diff --git a/vim/rc b/vim/rc index 75f088b..d9c883a 100644 --- a/vim/rc +++ b/vim/rc @@ -39,7 +39,7 @@ nnoremap Ctrl-l :nohlsearch "movement "move by visual line -nnoremap w g +nnoremap w g:call HL_branch():@/ nnoremap s g nnoremap a nnoremap d @@ -91,6 +91,7 @@ nnoremap l $ "general use inoremap jk nnoremap U CTRL-r +nnoremap :nohlsearch "u is normal undo "inoremap @@ -123,13 +124,13 @@ if 1 == 1 hi def link branch TODO endif "highlight branch in .dia is go back to insertmode -inoremap :call HL_branch() -nnoremap :call HL_branch() +inoremap :execute HL_branch() +nnoremap :execute HL_branch() function HL_branch() let line=getline('.') -"why does this not work with \+ like above??? -if line =~ "\[A-Z].*:" +"backslash muss escaped werden um + zu escapen in func +if line =~ "\[A-Z]\\+.*:" python << endpython import vim l = vim.current.line @@ -141,8 +142,9 @@ for tmp in llist[0]: else: break l = llist[0][i:] -vim.command("let l='%s'"% l) +#escaped \ for py AND vim +vim.command('let tmp=":execute \'normal gg/[A-Z]\\\\+%s.*:\\\'"'% l) endpython -echom l +return tmp endif endfunction diff --git a/vim/syntax/.dia.vim.swp b/vim/syntax/.dia.vim.swp index 1d0f28a..e8042ab 100644 Binary files a/vim/syntax/.dia.vim.swp and b/vim/syntax/.dia.vim.swp differ