diff --git a/autoload/vebugger/std.vim b/autoload/vebugger/std.vim index 677f952..70988e1 100644 --- a/autoload/vebugger/std.vim +++ b/autoload/vebugger/std.vim @@ -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 diff --git a/plugin/vebugger.vim b/plugin/vebugger.vim index d04df6c..94623a3 100644 --- a/plugin/vebugger.vim +++ b/plugin/vebugger.vim @@ -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].'' endfor for s:mapping in items({ - \'e':'VBGevalSelectedText'}) + \'e':'VBGevalSelectedText', + \'w':'VBGrawWriteSelectedText'}) exe 'vnoremap '.g:vebugger_leader.s:mapping[0].' :'.s:mapping[1].'' endfor endif