Ⅰ. 插件描述
eunuch.vim: Helpers for UNIXⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'tpope/eunuch-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'tpope/eunuch-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'tpope/eunuch-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/tpope/vim-eunuch
Ⅳ. 文档说明
# eunuch.vim
Vim sugar for the UNIX shell commands that need it the most. Features
include:
:Delete
: Delete a buffer and the file on disk simultaneously.:Unlink
: Like:Delete
, but keeps the now empty buffer.:Move
: Rename a buffer and the file on disk simultaneously.:Rename
: Like:Move
, but relative to the current file's containing directory.:Chmod
: Change the permissions of the current file.:Mkdir
: Create a directory, defaulting to the parent of the current file.:Cfind
: Runfind
and load the results into the quickfix list.:Clocate
: Runlocate
and load the results into the quickfix list.:Lfind
/:Llocate
: Like above, but use the location list.:Wall
: Write every open window. Handy for kicking off tools like [guard][].:SudoWrite
: Write a privileged file withsudo
.:SudoEdit
: Edit a privileged file withsudo
.- File type detection for
sudo -e
is based on original file name. - New files created with a shebang line are automatically made executable.
Installation
Install using your favorite package manager, or use Vim's built-in package
support:
mkdir -p ~/.vim/pack/tpope/start
cd ~/.vim/pack/tpope/start
git clone https://tpope.io/vim/eunuch.git
vim -u NONE -c "helptags eunuch/doc" -c q
Contributing
See the contribution guidelines for
pathogen.vim.
Self-Promotion
Like eunuch.vim? Follow the repository on
GitHub and vote for it on
vim.org. And if
you're feeling especially charitable, follow tpope on
Twitter and
GitHub.
License
Copyright (c) Tim Pope. Distributed under the same terms as Vim itself.
See :help license
.