Added keymaps for raw writing and made the signs mechanism use full paths.
This commit is contained in:
parent
d0d7fd827e
commit
eba1009a51
@ -154,18 +154,18 @@ sign define vebugger_breakpoint text=** linehl=ColorColumn
|
||||
function! vebugger#std#updateMarksForFile(state,filename)
|
||||
let l:filename=fnamemodify(a:filename,":p")
|
||||
if bufexists(l:filename)
|
||||
exe 'sign unplace * file='.fnameescape(l:filename)
|
||||
exe 'sign unplace * file='.fnameescape(fnamemodify(l:filename,':p'))
|
||||
|
||||
for l:breakpoint in g:vebugger_breakpoints
|
||||
if l:breakpoint.file==a:filename
|
||||
exe 'sign place 2 name=vebugger_breakpoint line='.l:breakpoint.line.' file='.fnameescape(l:breakpoint.file)
|
||||
if fnamemodify(l:breakpoint.file,':p')==fnamemodify(a:filename,':p')
|
||||
exe 'sign place 2 name=vebugger_breakpoint line='.l:breakpoint.line.' file='.fnameescape(fnamemodify(l:breakpoint.file,':p'))
|
||||
endif
|
||||
endfor
|
||||
|
||||
if !empty(a:state)
|
||||
if !empty(a:state.std.location)
|
||||
if a:state.std.location.file==a:filename
|
||||
exe 'sign place 1 name=vebugger_current line='.a:state.std.location.line.' file='.fnameescape(l:filename)
|
||||
if fnamemodify(a:state.std.location.file,':p')==fnamemodify(a:filename,':p')
|
||||
exe 'sign place 1 name=vebugger_current line='.a:state.std.location.line.' file='.fnameescape(fnamemodify(l:filename,':p'))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
@ -30,6 +30,7 @@ function! s:get_visual_selection()
|
||||
endfunction
|
||||
|
||||
command! -range -nargs=0 VBGevalSelectedText call vebugger#std#eval(s:get_visual_selection())
|
||||
command! -range -nargs=0 VBGrawWriteSelectedText call vebugger#writeLine(s:get_visual_selection())
|
||||
|
||||
|
||||
if exists('g:vebugger_leader')
|
||||
@ -41,11 +42,13 @@ if exists('g:vebugger_leader')
|
||||
\'c':'VBGcontinue',
|
||||
\'t':'VBGtoggleTerminalBuffer',
|
||||
\'b':'VBGtoggleBreakpointThisLine',
|
||||
\'e':'VBGevalWordUnderCursor'})
|
||||
\'e':'VBGevalWordUnderCursor',
|
||||
\'w':'exe "VBGrawWrite ".input("VBG> ")'})
|
||||
exe 'nnoremap '.g:vebugger_leader.s:mapping[0].' :'.s:mapping[1].'<Cr>'
|
||||
endfor
|
||||
for s:mapping in items({
|
||||
\'e':'VBGevalSelectedText'})
|
||||
\'e':'VBGevalSelectedText',
|
||||
\'w':'VBGrawWriteSelectedText'})
|
||||
exe 'vnoremap '.g:vebugger_leader.s:mapping[0].' :'.s:mapping[1].'<Cr>'
|
||||
endfor
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user