Parcourir la source

add a config file for vim commentary

Gharbi Mohamed il y a 5 ans
Parent
commit
bd30daefea
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9 0
      plug-config/vim-commentary.vim

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

@@ -0,0 +1,9 @@
+function! Comment()
+  if (mode() == "n" )
+    execute "Commentary"
+  else    
+    execute "'<,'>Commentary"
+  endif
+ endfunction
+vnoremap <silent> <space>/ :call Comment()
+autocmd filetype javascript.jsx setlocal commentstring={/*\ %s\ */}