Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a configuration option vebugger_ignore_patterns #88

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion autoload/vebugger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,27 @@ endfunction

"Handle a single line from the debugger's interactive shell
function! s:f_debugger.handleLine(pipeName,line) dict
call self.addLineToTerminal(a:pipeName,a:line)
let l:ignore_patterns = []
if exists('b:vebugger_ignore_patterns')
let l:ignore_patterns = b:vebugger_ignore_patterns
elseif exists('g:vebugger_ignore_patterns')
let l:ignore_patterns = g:vebugger_ignore_patterns
endif

if len(l:ignore_patterns)
let l:ignore_the_line = 0
for pattern in l:ignore_patterns
if match(a:line, pattern) >= 0
let l:ignore_the_line = 1
break
endif
endfor
if !l:ignore_the_line
call self.addLineToTerminal(a:pipeName,a:line)
endif
else
call self.addLineToTerminal(a:pipeName,a:line)
endif

let l:readResult=deepcopy(self.readResultTemplate,1)

Expand Down
16 changes: 16 additions & 0 deletions doc/vebugger.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,22 @@ Example: >
let g:vebugger_use_tags=1
<

If you want to prevent Vebugger from writing messages in a specific pattern
on a terminal buffer opened by using |:VBGtoggleTerminalBuffer| command, you
can use a vim regex pattern in the option *g:vebugger_ignore_patterns* or
*b:vebugger_ignore_patterns*

Example: >
let g:vebugger_ignore_patterns = [
\ '^*stopped',
\ '^[*^]running',
\ 'next$',
\ '^&\?display',
\ '^&\?continue',
\ '\^done$',
\ ]
<

LAUNCHING DEBUGGERS *vebugger-launching*

A debugger's implementation is responsible for starting it. The standard is to
Expand Down