diff --git a/init.vim b/init.vim index c42d4f7..255db68 100644 --- a/init.vim +++ b/init.vim @@ -146,8 +146,6 @@ vnoremap K " Plugin configuration --------------------------------------------------- {{{ - - let g:VM_leader = 'm' autocmd BufReadPost * :DetectIndent @@ -190,9 +188,9 @@ au Syntax * RainbowParenthesesLoadBraces nnoremap :Files -map f (easymotion-bd-f) -map s (easymotion-overwin-f2) -let g:EasyMotion_smartcase = 1 +"map f (easymotion-bd-f) +"map s (easymotion-overwin-f2) +"let g:EasyMotion_smartcase = 1 let g:signify_sign_add = '▍' let g:signify_sign_delete = '▍' @@ -204,32 +202,46 @@ hi SignifySignDelete cterm=NONE gui=NONE guifg='#fb4934' hi SignifySignChange cterm=NONE gui=NONE guifg='#83a598' hi SignifySignAdd cterm=NONE gui=NONE guifg='#8ec07c' - -" Airline {{{ +" Airline -------------------------------------------------------------------------- {{{ let g:airline#extensions#tabline#enabled = 1 let g:airline_powerline_fonts = 0 -let g:airline_section_a = '%#__accent#%{airline#util#wrap(airline#parts#mode(),0)}%#__restore__#%{airline#util#append(airline#parts#iminsert(),0)}' -let g:airline_section_b = '' -let g:airline_section_c = '%<%<%#__accent_red#%{airline#util#wrap(airline#parts#readonly(),0)}%#__restore__#%#__accent_bold#%{airline#util#wrap(airline#extensions#coc#get_status(),0)}%#__restore__#' -let g:airline_section_y = '' -let g:airline_section_z = '%4l% %3v' -let g:airline_section_warning = '%{airline#extensions#whitespace#check()}%{airline#util#wrap(airline#extensions#coc#get_warning(),0)}' -let airline#extensions#coc#error_symbol = '' -let airline#extensions#coc#warning_symbol = '' -let airline#extensions#coc#stl_format_err = '%E{[%e(#%fe)]}' -let airline#extensions#coc#stl_format_warn = '%W{[%w(#%fw)]}' +function! AirlineInit() + let g:airline_section_a = ' + \%#__accent# + \%{airline#util#wrap(airline#parts#mode(),0)} + \%#__restore__# + \%{airline#util#append(airline#parts#iminsert(),0)}' + let g:airline_section_b = '' + let g:airline_section_c = ' + \%<%< + \%#__accent_red#%{airline#util#wrap(airline#parts#readonly(),0)} + \%#__restore__# + \%#__accent_bold# + \%{airline#util#wrap(airline#extensions#coc#get_status(),0)} + \%#__restore__#' + + let g:airline_section_y = '' + let g:airline_section_z = '%4l% %3v' + + let g:airline_section_warning = ' + \%{airline#extensions#whitespace#check()} + \%{airline#util#wrap(airline#extensions#coc#get_warning(),0)}' + + let airline#extensions#coc#error_symbol = '' + let airline#extensions#coc#warning_symbol = '' + let airline#extensions#coc#stl_format_err = '%E{[%e(#%fe)]}' + let airline#extensions#coc#stl_format_warn = '%W{[%w(#%fw)]}' +endfun +autocmd User AirlineAfterInit call AirlineInit() + let g:airline_theme='elkowars_gruvbox' - " update airline themes properly... idk why this is so weird function! s:update_highlights() hi airline_tabfill ctermbg=NONE guibg=NONE - hi airline_a_to_airline_b ctermbg=NONE guibg='#ff0000' - hi airline_b_to_airline_c ctermbg=NONE guibg='#ff0000' - hi airline_c_to_airline_x ctermbg=NONE guibg=NONE hi airline_tablabel_right ctermbg=NONE guibg=NONE ctermfg=NONE guifg=NONE endfunction autocmd User AirlineAfterTheme call s:update_highlights() @@ -240,7 +252,8 @@ autocmd User AirlineAfterTheme call s:update_highlights() " }}} -" :: and _ as space {{{ +" :: and _ as space ------------------------------------------------------------------- {{{ + function RebindShit(newKey) let b:RemappedSpace={ \ 'old': maparg("", "i"), diff --git a/plugins.vim b/plugins.vim index 85f7859..adcf014 100644 --- a/plugins.vim +++ b/plugins.vim @@ -6,6 +6,7 @@ endif call plug#begin('~/.vim/plugged') + Plug 'tpope/vim-repeat' Plug 'junegunn/goyo.vim', {'on': 'Goyo'} @@ -32,7 +33,7 @@ call plug#begin('~/.vim/plugged') Plug 'godlygeek/tabular' " :Tab /regex can align code on occurrences of the given regex. I.e. :Tab /= aligns all = signs in a block. Plug 'tpope/vim-surround' - Plug 'easymotion/vim-easymotion' " press f [somekey] to have quick-movement to any occurrence of the key + "Plug 'easymotion/vim-easymotion' " press f [somekey] to have quick-movement to any occurrence of the key Plug 'christoomey/vim-tmux-navigator' " good integration with tmux pane switching Plug 'nathanaelkane/vim-indent-guides' " Can be toggled using ig (intent-guides) diff --git a/whichkeyConfig.vim b/whichkeyConfig.vim index 00844b0..ee53ac1 100644 --- a/whichkeyConfig.vim +++ b/whichkeyConfig.vim @@ -9,7 +9,7 @@ call which_key#register('', "g:which_key_map") let g:which_key_map = { \ 'h' : 'which_key_ignore', 'l' : 'which_key_ignore', - \ 'f' : 'which_key_ignore', 's': 'which_key_ignore' , + "\ 'f' : 'which_key_ignore', 's': 'which_key_ignore' , \ 'c' : { 'name': '+comment_out' }, \ 'e' : { 'name': '+emmet' }, \ '[' : ['(YoinkPostPasteSwapBack)', 'Swap last paste backwards' ], @@ -44,6 +44,13 @@ let g:which_key_map['m'] = { \ 'O' : [ '(coc-openlink)' , 'open link under cursor' ] , \} +let g:which_key_map['f'] = { + \ 'name': '+folds', + \ 'o': [ ':foldopen' , 'open fold' ] , + \ 'n': [ ':foldclose' , 'close fold' ] , + \ 'j': [ 'zj' , 'jump to next fold' ] , + \ 'k': [ 'zk' , 'jump to previous fold' ] , + \ } let g:which_key_map['a'] = { \ 'name': '+Bookmarks',