Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

breakpoints (currently vim only)

  • Loading branch information...
commit e78d2c4870cf3cc446c5a4696c3d94a043b1a9f4 1 parent de55ad7
@tomtom authored
View
78 autoload/quickfixsigns/breakpoints.vim
@@ -0,0 +1,78 @@
+" breakpoints.vim
+" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim])
+" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
+" @Created: 2010-11-26.
+" @Last Change: 2010-11-26.
+" @Revision: 20
+
+
+if exists('g:quickfixsigns#breakpoints#loaded')
+ finish
+endif
+let g:quickfixsigns#breakpoints#loaded = 1
+
+
+if index(g:quickfixsigns_classes, 'breakpoints') == -1
+ finish
+endif
+
+
+if !exists('g:quickfixsigns_class_breakpoints')
+ " :display: let g:quickfixsigns_class_breakpoints = {...} "{{{2
+ let g:quickfixsigns_class_breakpoints = {
+ \ 'sign': 'QFS_BREAKPOINT',
+ \ 'get': 'quickfixsigns#breakpoints#GetList()',
+ \ 'event': g:quickfixsigns_events,
+ \ 'timeout': 5
+ \ }
+ " \ 'event': ['BufEnter,BufWritePost']
+endif
+
+
+if g:quickfixsigns_class_breakpoints.sign == 'QFS_BREAKPOINT'
+ if exists('g:quickfixsigns_icons.breakpoint')
+ exec 'sign define QFS_BREAKPOINT text=# texthl=Special icon='. escape(g:quickfixsigns_icons.breakpoint, ' \')
+ else
+ sign define QFS_BREAKPOINT text=# texthl=Special
+ endif
+endif
+
+
+if !exists('g:quickfixsigns#breakpoints#filetypes')
+ " :read: let g:quickfixsigns#breakpoints#filetypes = {...} "{{{2
+ let g:quickfixsigns#breakpoints#filetypes = {
+ \ 'vim': 'quickfixsigns#breakpoints#Vim'
+ \ }
+endif
+
+
+function! quickfixsigns#breakpoints#GetList() "{{{3
+ if has_key(g:quickfixsigns#breakpoints#filetypes, &filetype)
+ return call(g:quickfixsigns#breakpoints#filetypes[&filetype], [])
+ else
+ return []
+ endif
+endf
+
+
+function! quickfixsigns#breakpoints#Vim() "{{{3
+ redir => bps
+ silent breaklist
+ redir END
+ let acc = []
+ for line in split(bps, '\n')
+ let ml = matchlist(line, '^\s*\(\d\+\)\s\+\w\+\s\+\(.\{-}\)\s\+\w\+\s\+\(\d\+\)$')
+ " TLogVAR line, ml
+ if !empty(ml)
+ let bufnr = bufnr(ml[2])
+ let item = {
+ \ 'bufnr': bufnr,
+ \ 'lnum': ml[3],
+ \ 'text': 'Breakpoint_'. ml[1]
+ \ }
+ call add(acc, item)
+ endif
+ endfor
+ return acc
+endf
+
View
BIN  bitmaps/open_icon_library/16x16/actions/media-playback-pause-3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
5 plugin/quickfixsigns.vim
@@ -49,7 +49,7 @@ if !exists('g:quickfixsigns_classes')
" event: The event on which signs of this type should be set.
" Possible values: BufEnter, any
" test: Update the sign only if the expression is true.
- let g:quickfixsigns_classes = ['cursor', 'qfl', 'loc', 'marks', 'vcsdiff'] "{{{2
+ let g:quickfixsigns_classes = ['cursor', 'qfl', 'loc', 'marks', 'vcsdiff', 'breakpoints'] "{{{2
" let g:quickfixsigns_classes = ['rel', 'qfl', 'loc', 'marks'] "{{{2
endif
@@ -121,7 +121,8 @@ if !exists('g:quickfixsigns_icons')
let g:quickfixsigns_icons = {
\ 'qfl': s:icons_dir .'status/dialog-error-5.png',
\ 'loc': s:icons_dir .'status/dialog-warning-4.png',
- \ 'cursor': s:icons_dir .'actions/go-next-4.png'
+ \ 'cursor': s:icons_dir .'actions/go-next-4.png',
+ \ 'breakpoint': s:icons_dir .'actions/media-playback-pause-3.png'
\ }
endif
unlet s:icons_dir
Please sign in to comment.
Something went wrong with that request. Please try again.