Ⅰ. 插件描述
Make Vim handle line and column numbers in file names with a minimum of fussⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'kopischke/vim-fetch-speak-now'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'kopischke/vim-fetch-speak-now'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'kopischke/vim-fetch-speak-now'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/kopischke/vim-fetch
Ⅳ. 文档说明
# Vim-fetch
Fetch that line and column, boy!
<!-- vim-markdown-toc GFM -->
<!-- vim-markdown-toc -->
Intro
vim-fetch enables Vim to process line and column jump specifications in file
paths as found in stack traces and similar output. When asked to open such a
file, in- or outside Vim or via gF, Vim with vim-fetch will jump to the
specified line (and column, if given) instead of displaying an empty, new file.

If you have wished Vim would have a better understanding of stack trace formats than what it offers out of the box, vim-fetch is for you.
Usage
vim path/to/file.ext:12:3in the shell to openfile.exton line 12 at column 3:e[dit] path/to/file.ext:100:12in Vim to editfile.exton line 100 at column 12gFwith the cursor at^onpath/to^/file.ext:98,8to editfile.exton line 98, column 8gFwith the selection|...|on|path to/file.ext|:5:2to editfile.exton line 5, column 2
Besides the GNU colon format, vim-fetch supports various other jump specification formats, including some that search for keywords or method definitions. For more, see the documentation.
Rationale
Quickly jumping to the point indicated by common stack trace output should be a given in an editor; unluckily, Vim has no concept of this out of the box that does not involve a rather convoluted detour through an error file and the Quickfix window. As the one plug-in that aimed to fix this, Victor Bogado’s file_line, had a number of issues (at the time of this writing, it didn’t correctly process multiple files given with a window switch, i.e. -o, -O and -p, and as it choked autocommand processing for the first loaded file on the arglist), vim-fetch was born.
Installation
- The old way: download and source the vimball from the releases page, then run
:helptags {dir}on your runtimepath/doc directory. Or, - The plug-in manager way: using a git-based plug-in manager (Pathogen, Vundle, NeoBundle etc.), simply add
wsdjeg/vim-fetchto the list of plug-ins, source that and issue your manager's install command.
License
vim-fetch is licensed under the terms of the MIT license according to the accompanying license file.