From 12755c630b718fd54ea0bd4674da7d036e8a49dd Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Mon, 27 Mar 2017 12:40:54 +0100 Subject: [PATCH] Add C inline comment surround mapping --- after/ftplugin/c.vim | 2 ++ after/ftplugin/groovy.vim | 2 ++ 2 files changed, 4 insertions(+) diff --git a/after/ftplugin/c.vim b/after/ftplugin/c.vim index b48d322..0478db2 100644 --- a/after/ftplugin/c.vim +++ b/after/ftplugin/c.vim @@ -10,6 +10,8 @@ setlocal textwidth=0 nnoremap K :YcmCompleter GetDoc " "ys{motion}t" turns "word" -> "TODO(word):" let b:surround_{char2nr("t")} = "TODO(\r):" +" "ys{motion}/" turns "text" into "/*text*/" +let b:surround_{char2nr("/")} = "/*\r*/" " Map K to get YouCompleteMe documentation nnoremap K :YcmCompleter GetDoc " DoxygenToolkit diff --git a/after/ftplugin/groovy.vim b/after/ftplugin/groovy.vim index 3143dd1..18a2779 100644 --- a/after/ftplugin/groovy.vim +++ b/after/ftplugin/groovy.vim @@ -1 +1,3 @@ setlocal commentstring=//%s +" "ys{motion}/" turns "text" into "/*text*/" +let b:surround_{char2nr("/")} = "/*\r*/"