vim-headfirst


Ⅰ. 插件描述

Edit sibling files like a boss

Ⅱ. 基本信息

创建日期:  2018-09-27
使用用户:  0
Github星:  0
插件作者:  Andrew Nichols

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'tandrewnichols/vim-headfirst'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'tandrewnichols/vim-headfirst'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'tandrewnichols/vim-headfirst'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/tandrewnichols/vim-headfirst

Ⅳ. 文档说明

# Vim-Headfirst

Commands to quickly open sibling files in vim.

Overview

This plugin is a small wrapper around :e, :sp, :vsp, and :tabe for editing sibling files. That is, it's comparable to typing :e %:h/<Tab>, but it also let's you supply multiple files to open.

Installation

If you don't have a preferred installation method, I really like vim-plug and recommend it.

Manual

Clone this repository and copy the files in plugin/, autoload/, and doc/ to their respective directories in your vimfiles, or copy the text from the github repository into new files in those directories. Make sure to run :helptags.

Plug (https://github.com/junegunn/vim-plug)

Add the following to your vimrc, or something sourced therein:

Plug 'tandrewnichols/vim-headfirst'

Then install via :PlugInstall

Vundle (https://github.com/gmarik/Vundle.vim)

Add the following to your vimrc, or something sourced therein:

Plugin 'tandrewnichols/vim-headfirst'

Then install via :BundleInstall

NeoBundle (https://github.com/Shougo/neobundle.vim)

Add the following to your vimrc, or something sourced therein:

NeoBundle 'tandrewnichols/vim-headfirst'

Then install via :BundleInstall

Pathogen (https://github.com/tpope/vim-pathogen)

git clone https://github.com/tandrewnichols/vim-headfirst.git ~/.vim/bundle/vim-headfirst

Usage

Using the following commands to edit sibling files in the corresponding windows. Tab completion works as normal.

:He/:Hedit

Edit a sibling file in the current window.

:He foo.js

:Hsp/:Hsplit

Edit a sibling file in a split.

" All these commands accept multiple sibling files, although it may not make sense to ":edit"
" multiple files at the same time. It's basically like preloading the additional ones.
:Hsp foo.js bar.js

:Hvsp/:Hvsplit

Edit a sibling file in a vertical split.

:Hvsp foo.js

:Htabe/:Htabedit

Edit a sibling file in a new tab.

:Htabe foo.js bar.js baz.js

Contributing

I always try to be open to suggestions, but I do still have opinions about what this should and should not be so . . . it never hurts to ask before investing a lot of time on a patch.

License

See LICENSE

添加新评论