From 50effe2c5707a24e36d3866657cadccf043cab0d Mon Sep 17 00:00:00 2001 From: Sheppy Date: Thu, 3 Nov 2016 12:35:33 +0100 Subject: [PATCH] fixed highlighting in dia yet again --- vim/rc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/vim/rc b/vim/rc index 8b593ad..fcb96c5 100644 --- a/vim/rc +++ b/vim/rc @@ -122,13 +122,13 @@ if @% =~ ".*.dia" hi def link badcode ErrorMsg hi def link branch TODO -endif -"highlight branch in .dia is go back to insertmode -inoremap :execute HL_branch() -nnoremap :execute HL_branch() -nnoremap w g:execute HL_branch() -nnoremap s g:execute HL_branch() + "highlight branch in .dia is go bacmato insertmode + inoremap ma:execute HL_branch():set hlsearch`a + nnoremap ma :execute HL_branch():set hlsearch`a + + nnoremap w gma :execute HL_branch():set hlsearch `a + nnoremap s gma :execute HL_branch():set hlsearch `a function HL_branch() let line=getline('.') @@ -146,9 +146,11 @@ for tmp in llist[0]: break l = llist[0][i:] #escaped \ for py AND vim -vim.command('let tmp=":execute \'normal /[A-Z]\\\\+%s.*:\\``\'"'% l) +#vim.command('let tmp=":execute \'normal /[A-Z]\\\\+%s.*:\\``\'"'% l) +vim.command("let @/='[A-Z]\+%s.*:'"% l) endpython -return tmp +"return tmp endif -return "echo ''" +"return "echo ''" endfunction +endif