From ae4552b18439cfda1e4bf82a5347484c640aa870 Mon Sep 17 00:00:00 2001 From: Tommy Allen Date: Sat, 1 Apr 2017 15:50:10 -0400 Subject: [PATCH] Fix placeholder selection after visual line mode --- autoload/clang2.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/autoload/clang2.vim b/autoload/clang2.vim index 15504d3..66fd56d 100644 --- a/autoload/clang2.vim +++ b/autoload/clang2.vim @@ -172,11 +172,16 @@ function! s:select_placeholder(mode, dir) abort call setpos("'<", p1) call setpos("'>", p2) + let vkeys = 'gvze' + if visualmode() ==# 'V' + let vkeys = 'gvvze' + endif + if a:mode ==# 's' - return "\gvze\" + return "\" . vkeys . "\" endif - return "\gvze\" + return "\" . vkeys . "\" endfunction