diff --git a/init.vim b/init.vim index 1ea70635..ed4ab420 100644 --- a/init.vim +++ b/init.vim @@ -24,7 +24,8 @@ else source $HOME/.config/nvim/themes/airline.vim source $HOME/.config/nvim/plug-config/rnvimr.vim source $HOME/.config/nvim/plug-config/fzf.vim - source $HOME/.config/nvim/plug-config/nerd-commenter.vim + "source $HOME/.config/nvim/plug-config/nerd-commenter.vim switching to vim-commentary + source $HOME/.config/nvim/plug-config/vim-commentary.vim source $HOME/.config/nvim/plug-config/rainbow.vim source $HOME/.config/nvim/plug-config/codi.vim source $HOME/.config/nvim/plug-config/quickscope.vim diff --git a/keys/which-key.vim b/keys/which-key.vim index 661882c1..cc0c41a2 100644 --- a/keys/which-key.vim +++ b/keys/which-key.vim @@ -25,7 +25,7 @@ autocmd FileType which_key set laststatus=0 noshowmode noruler " Single mappings -let g:which_key_map['/'] = [ ':Commentary' , 'comment' ] +let g:which_key_map['/'] = [ ':call Comment()' , 'comment' ] let g:which_key_map['.'] = [ ':e $MYVIMRC' , 'open init' ] let g:which_key_map[';'] = [ ':Commands' , 'commands' ] let g:which_key_map['='] = [ '=' , 'balance windows' ] diff --git a/plug-config/vim-commentary.vim b/plug-config/vim-commentary.vim new file mode 100644 index 00000000..b6758b38 --- /dev/null +++ b/plug-config/vim-commentary.vim @@ -0,0 +1,8 @@ +function! Comment() + if (mode() == "n" ) + execute "Commentary" + else + execute "'<,'>Commentary" + endif + endfunction +vnoremap / :call Comment() diff --git a/themes/airline.vim b/themes/airline.vim index 828e726c..85c27b20 100644 --- a/themes/airline.vim +++ b/themes/airline.vim @@ -13,7 +13,6 @@ let g:airline#extensions#tabline#show_tab_type = 0 let g:airline#extensions#tabline#show_tab_nr = 0 let g:airline#extensions#tabline#fnamecollapse = 1 -let g:airline#extensions#tabline#show_tab_type = 0 let g:airline#extensions#tabline#buffers_label = '' let g:airline#extensions#tabline#tabs_label = '' diff --git a/vim-plug/plugins.vim b/vim-plug/plugins.vim index 6b580108..7369468a 100644 --- a/vim-plug/plugins.vim +++ b/vim-plug/plugins.vim @@ -8,6 +8,10 @@ endif call plug#begin('~/.config/nvim/autoload/plugged') + " jsx syntax support + Plug 'maxmellon/vim-jsx-pretty' + + Plug 'suy/vim-context-commentstring' " Change dates fast Plug 'tpope/vim-speeddating' " Convert binary, hex, etc..