Pārlūkot izejas kodu

add a config file for vim commentary

Gharbi Mohamed 5 gadi atpakaļ
vecāks
revīzija
bd30daefea
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  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\ */}