mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
updates
This commit is contained in:
parent
b5f4a43775
commit
86bb86e4f1
7 changed files with 32 additions and 7 deletions
21
general/functions.vim
Normal file
21
general/functions.vim
Normal file
|
@ -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>
|
2
init.vim
2
init.vim
|
@ -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
|
||||
|
|
|
@ -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
plug-config/goyo.vim
Normal file
1
plug-config/goyo.vim
Normal file
|
@ -0,0 +1 @@
|
|||
nmap <silent> <leader>z :Goyo<CR>
|
|
@ -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
plug-config/vim-rooter.vim
Normal file
1
plug-config/vim-rooter.vim
Normal file
|
@ -0,0 +1 @@
|
|||
let g:rooter_silent_chdir = 1
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue