diff options
author | Urbain Vaes <urbain@vaes.uk> | 2017-09-14 18:16:09 +0100 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2017-10-14 16:28:18 +0200 |
commit | cce7a634641855132e10f3304875862058fc6b6d (patch) | |
tree | a3c98588389ca4ac15ec7960299faa39dd18bd20 /vim | |
parent | c541ec2dcd39d32bcf9f289632d16b792c81746e (diff) |
Add termite colors
Diffstat (limited to 'vim')
-rw-r--r-- | vim/.vimrc | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -304,10 +304,11 @@ nnoremap <Leader>d :bd!<cr> nmap gs :set opfunc=Search<cr>g@ xmap gs :<c-u>call Search(visualmode())<cr> -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 |