From bb61c6f72c569dce81a619bf601524b8e627dfd2 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Fri, 20 Oct 2023 19:47:50 +0200 Subject: Furter house keeping --- .gitmodules | 3 +++ init.lua | 1 - pack/all/start/vim-under-the-cursor | 1 + plugin/max-find-bash.vim | 2 ++ plugin/max-highlight-word-under-cursor.vim | 26 -------------------------- plugin/youcompleteme.vim | 2 +- vimrc-common | 8 ++++---- 7 files changed, 11 insertions(+), 32 deletions(-) create mode 160000 pack/all/start/vim-under-the-cursor delete mode 100644 plugin/max-highlight-word-under-cursor.vim diff --git a/.gitmodules b/.gitmodules index 92552d3..b939c33 100644 --- a/.gitmodules +++ b/.gitmodules @@ -76,3 +76,6 @@ [submodule "pack/nvim/start/nvim-lsp"] path = pack/nvim/start/nvim-lsp url = https://github.com/prabirshrestha/vim-lsp +[submodule "pack/all/start/vim-under-the-cursor"] + path = pack/all/start/vim-under-the-cursor + url = https://github.com/coderonline/vim-under-the-cursor diff --git a/init.lua b/init.lua index c710f99..e2fec46 100644 --- a/init.lua +++ b/init.lua @@ -4,7 +4,6 @@ vim.o.termguicolors = true vim.o.exrc = true if vim.fn.has("win32") then - vim.o.shell = 'cmd.exe' vim.opt.rtp:append(vim.fn.expand("$HOME\\scoop\\shims")) end diff --git a/pack/all/start/vim-under-the-cursor b/pack/all/start/vim-under-the-cursor new file mode 160000 index 0000000..f8a3dfb --- /dev/null +++ b/pack/all/start/vim-under-the-cursor @@ -0,0 +1 @@ +Subproject commit f8a3dfbdf3b0b9d0eb18423115744f42660750fd diff --git a/plugin/max-find-bash.vim b/plugin/max-find-bash.vim index a5e243b..29cb7c3 100644 --- a/plugin/max-find-bash.vim +++ b/plugin/max-find-bash.vim @@ -6,4 +6,6 @@ if filereadable("/bin/bash") set shell=/bin/bash elseif filereadable("/usr/local/bin/bash") set shell=/usr/local/bin/bash +elseif has("win32") + set shell = 'cmd.exe' endif diff --git a/plugin/max-highlight-word-under-cursor.vim b/plugin/max-highlight-word-under-cursor.vim deleted file mode 100644 index f18c212..0000000 --- a/plugin/max-highlight-word-under-cursor.vim +++ /dev/null @@ -1,26 +0,0 @@ -"======================================================================================================================= -" HIGHLIGHT_WORD_UNDER_CURSOR: -"======================================================================================================================= - -let w:m1 = 0 -function! HighlightWordUnderCursor() - if(exists('w:m1') && w:m1 > 0) - silent! call matchdelete(w:m1) - let w:m1 = 0 - endif - let l:currentword = escape(expand(''), '.') - if(strlen(l:currentword) > 0) - let w:m1=100 - let l:q = matchstr(expand(''), '\x\{6\}') - if(l:q != "") - exec 'highlight! CurrentColor guibg=#'.l:q - " call matchadd('CurrentColor', escape(expand(''), '.'), -1, w:m1) - " if(match(expand(''), '^#\x\{6\}\|^0x\x\{6\}') == 0) - hi CurrentColor - else - silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1) - endif - endif -endfunction - -autocmd CursorHold,CursorHoldI * call HighlightWordUnderCursor() diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 9e17ad5..a241dae 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -4,7 +4,7 @@ augroup YOUCOMPLETEME let g:ycm_autoclose_preview_window_after_insertion = 0 let g:ycm_auto_trigger = 1 - let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file + let g:ycm_collect_identifiers_from_tags_files = 0 " Let YCM read tags from Ctags file let g:ycm_confirm_extra_conf = 0 " security is overrated ;) let g:ycm_always_populate_location_list = 0 " we can manually run :YcmDiags to do that diff --git a/vimrc-common b/vimrc-common index 6c06c66..fb760cb 100644 --- a/vimrc-common +++ b/vimrc-common @@ -359,10 +359,10 @@ augroup KEYBOARD_MAPPING " if the wildmenu is configured to to display suggestions vertically, then " reconfigure the cursor keys to work in that direction - " if &wildoptions =~# 'pum' - " cnoremap pumvisible() ? "" : "\" - " cnoremap pumvisible() ? "" : "\" - " endif + if &wildoptions =~# 'pum' + cnoremap pumvisible() ? "" : "\" + cnoremap pumvisible() ? "" : "\" + endif " INSERT_MODE_MAPPINGS: -- cgit v1.2.3