Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'rking/joy'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'rking/joy'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'rking/joy'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/rking/vim-joy
Ⅳ. 文档说明
Installation
If you don't have a preferred installation method, I recommend
installing pathogen.vim, and
then simply copy and paste:
cd ~/.vim/bundle
git clone git://github.com/rking/vim-joy.git
Once you run :Helptags you can view the manual with :help joy
joy.txt Esc key where Bill Joy had his.
Author: ☈king http://github.com/rking
License: Utterly CC0/PD
INTRODUCTION
tl;dr:
:imap <tab> <esc>
(See: <https://en.wikipedia.org/wiki/Vi#Creation >)
IBM made some really odd decisions in popularizing the current keyboard, so
we're taking the power back.
This is the real heart of vim-joy. Just make it so hitting tab in Insert mode
gets you out into Normal mode.
The only extra complexity is due to the "Training Wheels" needed to get used
to not being able to hit tab normally. This is most surprising when:
- When on an empty line, meaning "increase indent". Use <C-t> instead.
- When in the middle of a line, and trying to line things up. I don't have an
exact solution for this, other than to do the work in Normal mode (e.g. with
<C-v> combined with << and >>)
To affect the behavior of this plugin, you can either:
let g:joy_pure = 1
Commit to using <C-t> instead of <Tab> for indentation. At this point it
becomes identical in behavior to Insert Mode <Tab> == <Esc>.
let g:joy_mixed = 1
To turn off the nag message, and forget about <C-t> for indent.
TEMPORARILY
Sometimes you want to affect the behavior only for this session (e.g. for pair
programming with someone who isn't feeling it)
To go back to impure mode:
:unlet g:joy_pure
To make <Tab> be default in behavior:
:unimap <Tab>
THANKS
Thanks to tpope, as always!
ABOUT
Grab the latest version or report a bug on Github:
http://github.com/rking/vim-joy
vim:tw=78:et:ft=help:norl: