From eb3550a197fc1325738ee884e1773e56bd3407aa Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Tue, 23 Aug 2016 10:51:46 +0100 Subject: [PATCH] Add vim-surround cmake mapping to make a variable --- after/ftplugin/cmake.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/after/ftplugin/cmake.vim b/after/ftplugin/cmake.vim index 2095f62..25c8833 100644 --- a/after/ftplugin/cmake.vim +++ b/after/ftplugin/cmake.vim @@ -14,3 +14,7 @@ setlocal foldmethod=indent " Set comment string setlocal commentstring=#%s + +" Custon surround for creating a CMake variable from a text object. +" "ys{motion}v" makes a variable out of "" - > "${}" +autocmd FileType cmake let b:surround_{char2nr("v")} = "${\r}"