Chris vor 5 Jahren
Ursprung
Commit
86bb86e4f1
7 geänderte Dateien mit 32 neuen und 7 gelöschten Zeilen
  1. 21 0
      general/functions.vim
  2. 5 3
      init.vim
  3. 1 1
      plug-config/coc.vim
  4. 1 0
      plug-config/goyo.vim
  5. 1 2
      plug-config/quickscope.vim
  6. 1 0
      plug-config/vim-rooter.vim
  7. 2 1
      themes/airline.vim

+ 21 - 0
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>

+ 5 - 3
init.vim

@@ -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

+ 1 - 1
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

+ 1 - 0
plug-config/goyo.vim

@@ -0,0 +1 @@
+nmap <silent> <leader>z :Goyo<CR>

+ 1 - 2
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

+ 1 - 0
plug-config/vim-rooter.vim

@@ -0,0 +1 @@
+let g:rooter_silent_chdir = 1

+ 2 - 1
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