gf-user-vimfn


Ⅰ. 插件描述

Extension for gf-user or ctrlp.vim - jump to the location where vim user function is declared

Ⅱ. 基本信息

创建日期:  2014-07-27
使用用户:  2
Github星:  4
插件作者:  hujo

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'hujo/gf-user-vimfn'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'hujo/gf-user-vimfn'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'hujo/gf-user-vimfn'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/hujo/gf-user-vimfn

Ⅳ. 文档说明

Build Status

gf-user-vimfn

Usage

CtrlP

If want to use as an extension of the CtrlP

" Example: Add 'vimfn' to g:ctrlp_extensions
let g:ctrlp_extensions = ['filer', 'tag', 'buffertag', 'vimfn']

" Example: define a command
command! CtrlPVimfn call ctrlp#init(ctrlp#vimfn#id())

vim-gf-user

vim-gf-user is a plug-in that extends the gf without breaking the original function of vim.
If you are using the vim-gf-user, gf-user-vimfn offers its extension.

Conditions to operate

  • filetype is vim or help
  • syntaxname of the cursor position begins with vim (filetype is not considered in this case)

used alone

Provide functions just one

" find from a keyword of the position of the cursor
call gf#vimfn#open()

" find from the string given in argument
call gf#vimfn#open('function name')
" Example:
call gf#vimfn#open('syntaxcomplete#Complete')
call gf#vimfn#open('s:hogefunc')

" It works if the function is loaded
call gf#vimfn#open('GetVimIndent')
call gf#vimfn#open('g:SyntasticRegistry.Instance')
call gf#vimfn#open('<SNR>1_hogefunc')
call gf#vimfn#open('1')
" Setting: set the how to open the file
"   default has('gui') ? 'tab drop' : 'edit'
let g:gf_vimfn_open_action = 'split'

" Example: define a mapping
nnoremap g1 :<c-u>call gf#vimfn#open()<cr>

" Example: define a command
command! -nargs=? -complete=function JumpVimFunc call gf#vimfn#open(<q-args>)

For more information, please refer to the ctrlpvim of documents or vim-gf-user of the document,

License

This is free and unencumbered software released into the public domain. See the UNLICENSE file for more information.

添加新评论