소스 검색

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\ */}