From cce7a634641855132e10f3304875862058fc6b6d Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 14 Sep 2017 18:16:09 +0100 Subject: Add termite colors --- vim/.vimrc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'vim') diff --git a/vim/.vimrc b/vim/.vimrc index e7e8251..fda3a68 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -304,10 +304,11 @@ nnoremap d :bd! nmap gs :set opfunc=Searchg@ xmap gs :call Search(visualmode()) -function! Search(vt) - let l=getline(a:0 ? "'<" : "'[") - let [line1,col1] = getpos(a:0 ? "'<" : "'[")[1:2] - let [line2,col2] = getpos(a:0 ? "'>" : "']")[1:2] +function! Search(vm) + let is_visual=(a:vm == "v") + let l=getline(is_visual ? "'<" : "'[") + let [line1,col1] = getpos(is_visual ? "'<" : "'[")[1:2] + let [line2,col2] = getpos(is_visual ? "'>" : "']")[1:2] call feedkeys(':Grepper -tool git -query "' . l[col1 - 1: col2 - 1] . '"') endfunction -- cgit v1.2.3