annotate runtime/ftplugin/gprof.vim @ 19774:00a1b89256ea v8.2.0443

patch 8.2.0443: clipboard code is spread out Commit: https://github.com/vim/vim/commit/45fffdf10b7cb6e59794e76e9b8a2930fcb4b192 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 24 21:42:01 2020 +0100 patch 8.2.0443: clipboard code is spread out Problem: Clipboard code is spread out. Solution: Move clipboard code to its own file. (Yegappan Lakshmanan, closes #5827)
author Bram Moolenaar <Bram@vim.org>
date Tue, 24 Mar 2020 21:45:04 +0100
parents a5352e73dc00
children 9f41bfdbc6fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Language: gprof
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
4869
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4681
diff changeset
3 " Last Change: 2013 Jun 09
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 " When cursor is on one line of the gprof call graph,
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " calling this function jumps to this function in the call graph.
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 if exists("b:did_ftplugin")
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 finish
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 endif
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 let b:did_ftplugin=1
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 fun! <SID>GprofJumpToFunctionIndex()
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 let l:line = getline('.')
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 if l:line =~ '[\d\+\]$'
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 " We're in a line in the call graph.
4869
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4681
diff changeset
16 norm! $y%
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 call search('^' . escape(@", '[]'), 'sw')
4869
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4681
diff changeset
18 norm! zz
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 elseif l:line =~ '^\(\s\+[0-9\.]\+\)\{3}\s\+'
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 " We're in line in the flat profile.
4869
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4681
diff changeset
21 norm! 55|eby$
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4681
diff changeset
22 call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW')
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4681
diff changeset
23 norm! zz
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 endif
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 endfun
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 " Pressing <C-]> on a line in the gprof flat profile or in
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 " the call graph, jumps to the corresponding function inside
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 " the flat profile.
4869
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4681
diff changeset
30 map <buffer> <silent> <C-]> :call <SID>GprofJumpToFunctionIndex()<CR>
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 " vim:sw=2 fdm=indent