Explorar el Código

add a config file for vim commentary

Gharbi Mohamed hace 5 años
padre
commit
bd30daefea
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  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\ */}