mirror of
https://github.com/FAUSheppy/config
synced 2025-12-09 16:18:33 +01:00
hl for dia now working
This commit is contained in:
16
vim/rc
16
vim/rc
@@ -39,7 +39,7 @@ nnoremap Ctrl-l :nohlsearch
|
|||||||
|
|
||||||
"movement
|
"movement
|
||||||
"move by visual line
|
"move by visual line
|
||||||
nnoremap w g<Up>
|
nnoremap w g<Up>:call HL_branch():@/
|
||||||
nnoremap s g<Down>
|
nnoremap s g<Down>
|
||||||
nnoremap a <Left>
|
nnoremap a <Left>
|
||||||
nnoremap d <Right>
|
nnoremap d <Right>
|
||||||
@@ -91,6 +91,7 @@ nnoremap l $
|
|||||||
"general use
|
"general use
|
||||||
inoremap jk <esc>
|
inoremap jk <esc>
|
||||||
nnoremap U CTRL-r
|
nnoremap U CTRL-r
|
||||||
|
nnoremap <F4> :nohlsearch<CR>
|
||||||
"u is normal undo
|
"u is normal undo
|
||||||
|
|
||||||
"inoremap <esc> <nop>
|
"inoremap <esc> <nop>
|
||||||
@@ -123,13 +124,13 @@ if 1 == 1
|
|||||||
hi def link branch TODO
|
hi def link branch TODO
|
||||||
endif
|
endif
|
||||||
"highlight branch in .dia <C-O> is go back to insertmode
|
"highlight branch in .dia <C-O> is go back to insertmode
|
||||||
inoremap <F5> <C-O>:call HL_branch()<CR>
|
inoremap <F5> <C-O>:execute HL_branch()<CR>
|
||||||
nnoremap <F5> :call HL_branch()<CR>
|
nnoremap <F5> :execute HL_branch()<CR>
|
||||||
|
|
||||||
function HL_branch()
|
function HL_branch()
|
||||||
let line=getline('.')
|
let line=getline('.')
|
||||||
"why does this not work with \+ like above???
|
"backslash muss escaped werden um + zu escapen in func
|
||||||
if line =~ "\[A-Z].*:"
|
if line =~ "\[A-Z]\\+.*:"
|
||||||
python << endpython
|
python << endpython
|
||||||
import vim
|
import vim
|
||||||
l = vim.current.line
|
l = vim.current.line
|
||||||
@@ -141,8 +142,9 @@ for tmp in llist[0]:
|
|||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
l = llist[0][i:]
|
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.*:\\<cr>\'"'% l)
|
||||||
endpython
|
endpython
|
||||||
echom l
|
return tmp
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user