From 11cabf4866dd3121608a5821f451b45cf3832c2e Mon Sep 17 00:00:00 2001 From: jakobst1n Date: Sat, 16 Mar 2024 21:35:01 +0100 Subject: Make colorcolumn less obnoxious --- Common/nvim/lua/basic.lua | 11 ++++---- Common/nvim/lua/helper_functions.lua | 49 ------------------------------------ 2 files changed, 5 insertions(+), 55 deletions(-) (limited to 'Common/nvim/lua') diff --git a/Common/nvim/lua/basic.lua b/Common/nvim/lua/basic.lua index 5fe59da..18128e1 100755 --- a/Common/nvim/lua/basic.lua +++ b/Common/nvim/lua/basic.lua @@ -88,11 +88,6 @@ vim.opt.foldcolumn = '0' -- Show leader commands vim.opt.showcmd = true --- Show colour column -vim.opt.colorcolumn = '80,120' -vim.api.nvim_set_hl(0, "ColorColumn", { ctermbg = 16 }) - - -- Colorscheme vim.cmd [[ colorscheme default ]] vim.opt.background = "light" @@ -107,7 +102,11 @@ vim.api.nvim_create_autocmd("ColorScheme", { callback = function() vim.api.nvim_set_hl(0, "SignColumn", {link = "LineNr"}) end -}) +}) + +-- Show colour column +vim.opt.colorcolumn = '80,120' +vim.api.nvim_set_hl(0, "ColorColumn", { ctermbg = "lightgrey", bg = "#eae7da" }) -- Set utf8 as standard encoding vim.opt.encoding = 'utf8' diff --git a/Common/nvim/lua/helper_functions.lua b/Common/nvim/lua/helper_functions.lua index 945473b..bf5eec3 100755 --- a/Common/nvim/lua/helper_functions.lua +++ b/Common/nvim/lua/helper_functions.lua @@ -159,52 +159,3 @@ vnoremap s :'<,'>GitHistoryForLine ]] --- Close buffer without closing window ---[[ -vim.cmd [[ - function! BufcloseCloseIt() - let l:currentBufNum = bufnr("%") - let l:alternateBufNum = bufnr("#") - - if buflisted(l:alternateBufNum) - buffer # - else - bnext - endif - - if bufnr("%") == l:currentBufNum - new - endif - - if buflisted(l:currentBufNum) - execute("bdelete! ".l:currentBufNum) - endif - endfunction -]] ---]] - -vim.cmd [[ - function! CmdLine(str) - exe "menu Foo.Bar :" . a:str - emenu Foo.Bar - unmenu Foo - endfunction - - - function! VisualSelection(direction, extra_filter) range - let l:saved_reg = @" - execute "normal! vgvy" - - let l:pattern = escape(@", "\\/.*'$^~[]") - let l:pattern = substitute(l:pattern, "\n$", "", "") - - if a:direction == 'gv' - call CmdLine("Ack '" . l:pattern . "' " ) - elseif a:direction == 'replace' - call CmdLine("%s" . '/'. l:pattern . '/') - endif - - let @/ = l:pattern - let @" = l:saved_reg - endfunction -]] -- cgit v1.2.3