summaryrefslogtreecommitdiff
path: root/.config/nvim/plug-config/vim-commentary.vim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/plug-config/vim-commentary.vim')
-rw-r--r--.config/nvim/plug-config/vim-commentary.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/nvim/plug-config/vim-commentary.vim b/.config/nvim/plug-config/vim-commentary.vim
new file mode 100644
index 0000000..b6758b3
--- /dev/null
+++ b/.config/nvim/plug-config/vim-commentary.vim
@@ -0,0 +1,8 @@
+function! Comment()
+ if (mode() == "n" )
+ execute "Commentary"
+ else
+ execute "'<,'>Commentary"
+ endif
+ endfunction
+vnoremap <silent> <space>/ :call Comment()