فهرست منبع

add a config file for vim commentary

Gharbi Mohamed 5 سال پیش
والد
کامیت
bd30daefea
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  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\ */}