Browse Source

Merge branch 'master' of github.com:ChristianChiarulli/nvim

Chris 5 years ago
parent
commit
5d78f939f1
5 changed files with 15 additions and 3 deletions
  1. 2 1
      init.vim
  2. 1 1
      keys/which-key.vim
  3. 8 0
      plug-config/vim-commentary.vim
  4. 0 1
      themes/airline.vim
  5. 4 0
      vim-plug/plugins.vim

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

+ 1 - 1
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['='] = [ '<C-W>='                     , 'balance windows' ]

+ 8 - 0
plug-config/vim-commentary.vim

@@ -0,0 +1,8 @@
+function! Comment()
+  if (mode() == "n" )
+    execute "Commentary"
+  else    
+    execute "'<,'>Commentary"
+  endif
+ endfunction
+vnoremap <silent> <space>/ :call Comment()

+ 0 - 1
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 = ''
 

+ 4 - 0
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..