fixed highlighting in dia yet again

This commit is contained in:
Sheppy
2016-11-03 12:35:33 +01:00
parent f6cf098f9a
commit 50effe2c57

20
vim/rc
View File

@@ -122,13 +122,13 @@ if @% =~ ".*.dia"
hi def link badcode ErrorMsg
hi def link branch TODO
endif
"highlight branch in .dia <C-O> is go back to insertmode
inoremap <F5> <C-O>:execute HL_branch()<CR>
nnoremap <F5> :execute HL_branch()<CR>
nnoremap w g<Up>:execute HL_branch()<CR>
nnoremap s g<Down>:execute HL_branch()<CR>
"highlight branch in .dia <C-O> is go bacmato insertmode
inoremap <F5> <C-O>ma<C-O>:execute HL_branch()<CR><C-O>:set hlsearch<CR><C-O>`a
nnoremap <F5> ma :execute HL_branch()<CR>:set hlsearch<CR>`a
nnoremap w g<Up>ma :execute HL_branch()<CR>:set hlsearch<CR> `a
nnoremap s g<Down>ma :execute HL_branch()<CR>:set hlsearch<CR> `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.*:\\<cr>``\'"'% l)
#vim.command('let tmp=":execute \'normal /[A-Z]\\\\+%s.*:\\<cr>``\'"'% l)
vim.command("let @/='[A-Z]\+%s.*:'"% l)
endpython
return tmp
"return tmp
endif
return "echo ''"
"return "echo ''"
endfunction
endif