systemSetup

system setup, configuration and dotfiles
git clone https://noulin.net/git/systemSetup.git
Log | Files | Refs | README | LICENSE

commit 02e88ea6c9e1cee09b07890f0adede04f3ef2187
parent 6e87a20d93d70e21dde3edb71905c90b0e35e01b
Author: Remy Noulin <loader2x@gmail.com>
Date:   Thu,  5 Jul 2018 11:26:22 +0200

vim: add f for function names

dotfiles/.vimrc | 11 +++++++++++
1 file changed, 11 insertions(+)

Diffstat:
Mdotfiles/.vimrc | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc @@ -188,3 +188,14 @@ nnoremap <F5> :UndotreeToggle<cr> " display status line and filename set statusline="%f%m%r%h%w [%Y] [0x%02.2B]%< %F%=%4v,%4l %3p%% of %L" set laststatus=2 + +" press f to show function name in C programs +fun! ShowFuncName() + let lnum = line(".") + let col = col(".") + echohl ModeMsg + echo getline(search("^[^ \t#/]\\{2}.*[^:]\s*$", 'bW')) + echohl None + call search("\\%" . lnum . "l" . "\\%" . col . "c") +endfun +map f :call ShowFuncName() <CR>