Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / share / vim / vim74 / ftplugin / | server ip : 172.67.156.115 your ip : 108.162.216.168 H O M E |
Filename | /usr/share/vim/vim74/ftplugin/gprof.vim |
Size | 939 |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:56 |
Last modified | 03-Jan-2014 03:40 |
Last accessed | 06-Jul-2025 16:38 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
" Language: gprof
" Maintainer: Dominique Pelle <[email protected]>
" Last Change: 2013 Jun 09
" When cursor is on one line of the gprof call graph,
" calling this function jumps to this function in the call graph.
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin=1
fun! <SID>GprofJumpToFunctionIndex()
let l:line = getline('.')
if l:line =~ '[\d\+\]$'
" We're in a line in the call graph.
norm! $y%
call search('^' . escape(@", '[]'), 'sw')
norm! zz
elseif l:line =~ '^\(\s\+[0-9\.]\+\)\{3}\s\+'
" We're in line in the flat profile.
norm! 55|eby$
call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW')
norm! zz
endif
endfun
" Pressing <C-]> on a line in the gprof flat profile or in
" the call graph, jumps to the corresponding function inside
" the flat profile.
map <buffer> <silent> <C-]> :call <SID>GprofJumpToFunctionIndex()<CR>
" vim:sw=2 fdm=indent
" Maintainer: Dominique Pelle <[email protected]>
" Last Change: 2013 Jun 09
" When cursor is on one line of the gprof call graph,
" calling this function jumps to this function in the call graph.
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin=1
fun! <SID>GprofJumpToFunctionIndex()
let l:line = getline('.')
if l:line =~ '[\d\+\]$'
" We're in a line in the call graph.
norm! $y%
call search('^' . escape(@", '[]'), 'sw')
norm! zz
elseif l:line =~ '^\(\s\+[0-9\.]\+\)\{3}\s\+'
" We're in line in the flat profile.
norm! 55|eby$
call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW')
norm! zz
endif
endfun
" Pressing <C-]> on a line in the gprof flat profile or in
" the call graph, jumps to the corresponding function inside
" the flat profile.
map <buffer> <silent> <C-]> :call <SID>GprofJumpToFunctionIndex()<CR>
" vim:sw=2 fdm=indent