diff options
-rw-r--r-- | general/functions.vim | 21 | ||||
-rw-r--r-- | init.vim | 8 | ||||
-rw-r--r-- | plug-config/coc.vim | 2 | ||||
-rw-r--r-- | plug-config/goyo.vim | 1 | ||||
-rw-r--r-- | plug-config/quickscope.vim | 3 | ||||
-rw-r--r-- | plug-config/vim-rooter.vim | 1 | ||||
-rw-r--r-- | themes/airline.vim | 3 |
7 files changed, 32 insertions, 7 deletions
diff --git a/general/functions.vim b/general/functions.vim new file mode 100644 index 00000000..bec4580b --- /dev/null +++ b/general/functions.vim @@ -0,0 +1,21 @@ +" distinct highlight current, first and last match when searching +function! HLCurrent() abort + if exists("currmatch") + call matchdelete(currmatch) + endif + " only on cursor + let patt = '\c\%#'.@/ + " check prev and next match + let prevmatch = search(@/, 'bWn') + let nextmatch = search(@/, 'Wn') + " if on first or last match + if prevmatch == 0 || nextmatch == 0 + let currmatch = matchadd('EdgeSearch', patt, 101) + else + let currmatch = matchadd('IncSearch', patt, 101) + endif + redraw +endfunction + +nnoremap <silent> n n:call HLCurrent()<cr> +nnoremap <silent> N N:call HLCurrent()<cr> @@ -1,8 +1,8 @@ -" ____ _ __ _ -" / _/___ (_) /__ __(_)___ ___ +" ____ _ __ _ +" / _/___ (_) /__ __(_)___ ___ " / // __ \/ / __/ | / / / __ `__ \ " _/ // / / / / /__| |/ / / / / / / / -"/___/_/ /_/_/\__(_)___/_/_/ /_/ /_/ +"/___/_/ /_/_/\__(_)___/_/_/ /_/ /_/ " Always source these @@ -29,6 +29,8 @@ else source $HOME/.config/nvim/plug-config/coc.vim source $HOME/.config/nvim/plug-config/quickscope.vim source $HOME/.config/nvim/plug-config/sneak.vim + source $HOME/.config/nvim/plug-config/goyo.vim + source $HOME/.config/nvim/plug-config/vim-rooter.vim "source $HOME/.config/nvim/plug-config/easymotion.vim source $HOME/.config/nvim/plug-config/start-screen.vim source $HOME/.config/nvim/plug-config/signify.vim diff --git a/plug-config/coc.vim b/plug-config/coc.vim index c9ae319f..babae7ed 100644 --- a/plug-config/coc.vim +++ b/plug-config/coc.vim @@ -136,6 +136,6 @@ let g:coc_explorer_global_presets = { \ } \ } "nmap <silent> <space>e :CocCommand explorer<CR> -nnoremap <leader>e :CocCommand explorer<CR> +nnoremap <silent> <leader>e :CocCommand explorer<CR> nmap <space>f :CocCommand explorer --preset floatingRightside<CR> autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | q | endif diff --git a/plug-config/goyo.vim b/plug-config/goyo.vim new file mode 100644 index 00000000..1f5b17ac --- /dev/null +++ b/plug-config/goyo.vim @@ -0,0 +1 @@ +nmap <silent> <leader>z :Goyo<CR> diff --git a/plug-config/quickscope.vim b/plug-config/quickscope.vim index 934166b6..7950dc7d 100644 --- a/plug-config/quickscope.vim +++ b/plug-config/quickscope.vim @@ -1,7 +1,6 @@ " Trigger a highlight in the appropriate direction when pressing these keys: -" ; repeat forward , repeat backwards let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] highlight QuickScopePrimary guifg='#00C7DF' gui=underline ctermfg=155 cterm=underline -highlight QuickScopeSecondary guifg='#afff5f' gui=underline ctermfg=81 cterm=underline +highlight QuickScopeSecondary guifg='#eF5F70' gui=underline ctermfg=81 cterm=underline let g:qs_max_chars=150 diff --git a/plug-config/vim-rooter.vim b/plug-config/vim-rooter.vim new file mode 100644 index 00000000..0fea0770 --- /dev/null +++ b/plug-config/vim-rooter.vim @@ -0,0 +1 @@ +let g:rooter_silent_chdir = 1 diff --git a/themes/airline.vim b/themes/airline.vim index b7b500ad..26f73454 100644 --- a/themes/airline.vim +++ b/themes/airline.vim @@ -6,6 +6,7 @@ let g:airline#extensions#tabline#right_sep = '' let g:airline#extensions#tabline#right_alt_sep = '' let airline#extensions#tabline#show_splits = 0 let airline#extensions#tabline#tabs_label = '' +le " Disable tabline close button let g:airline#extensions#tabline#show_close_button = 0 @@ -39,7 +40,7 @@ set showtabline=2 set noshowmode " Sections -let g:airline_section_c = '' +" let g:airline_section_c = '' let g:airline_section_a = "Mach 2" let g:airline_section_y = '' let g:webdevicons_enable_airline_tabline = 1 |