mirror of
https://github.com/FAUSheppy/config
synced 2025-12-09 16:18:33 +01:00
inoffical merge of .dia hightlighting with master (cip)
This commit is contained in:
29
vim/rc
29
vim/rc
@@ -120,20 +120,19 @@ if @% =~ ".*.dia"
|
|||||||
hi def link regie Operator
|
hi def link regie Operator
|
||||||
hi def link text String
|
hi def link text String
|
||||||
hi def link badcode ErrorMsg
|
hi def link badcode ErrorMsg
|
||||||
|
|
||||||
hi def link branch TODO
|
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>
|
"highlight branch in .dia <C-O> is go back to insertmode
|
||||||
nnoremap s g<Down>:execute HL_branch()<CR>
|
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()
|
"function for highlighting
|
||||||
let line=getline('.')
|
function HL_branch()
|
||||||
"backslash muss escaped werden um + zu escapen in func
|
let line=getline('.')
|
||||||
if line =~ "\[A-Z]\\+.*:"
|
"backslash muss escaped werden um + zu escapen in func
|
||||||
|
if line =~ "\[A-Z]\\+.*:"
|
||||||
python << endpython
|
python << endpython
|
||||||
import vim
|
import vim
|
||||||
l = vim.current.line
|
l = vim.current.line
|
||||||
@@ -146,9 +145,9 @@ for tmp in llist[0]:
|
|||||||
break
|
break
|
||||||
l = llist[0][i:]
|
l = llist[0][i:]
|
||||||
#escaped \ for py AND vim
|
#escaped \ for py AND vim
|
||||||
vim.command('let tmp=":execute \'normal /[A-Z]\\\\+%s.*:\\<cr>``\'"'% l)
|
vim.command("let @/='[A-Z]\+%s.*:'"% l)
|
||||||
endpython
|
endpython
|
||||||
return tmp
|
endif
|
||||||
|
return "echo ''"
|
||||||
|
endfunction
|
||||||
endif
|
endif
|
||||||
return "echo ''"
|
|
||||||
endfunction
|
|
||||||
|
|||||||
Reference in New Issue
Block a user