summaryrefslogtreecommitdiff
path: root/.config/nvim/plug-config/vim-commentary.vim
diff options
context:
space:
mode:
authoraktersnurra <grydholm@kth.se>2021-02-13 23:11:25 +0100
committeraktersnurra <grydholm@kth.se>2021-02-13 23:11:25 +0100
commit8ae928dcb6fc49b805eff0aa0956cd18aa1c3f85 (patch)
treedc0087f4e9a3f6fb1e840546edea36b6d92cc384 /.config/nvim/plug-config/vim-commentary.vim
parent35fe0e5db892099cd1cc9f3a7ff298055f92bdc7 (diff)
added some vim plugins
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()