Sublime Text 2 VIM模式:Vintage插件的官方说明
来源:互联网 发布:吉他选购 知乎 编辑:程序博客网 时间:2024/04/30 09:34
Vintage Mode
Overview
Vintage is a vi mode editing package for Sublime Text 2. It allows you to combine vi's command mode with Sublime Text's features, including multiple selections.
Vintage mode is developed in the open, and patches are more than welcome. If you'd like to contribute, details are on the GitHub page.
Enabling Vintage
Vintage is disabled by default, via the ignored_packages setting. If you remove "Vintage" from the list of ignored packages, you'll be able to edit with vi keys:- Select the Preferences/Settings - Default menu item
- Edit the ignored_packages setting, changing it from:
"ignored_packages": ["Vintage"]
to:"ignored_packages": []
now save the file. - Vintage mode is now enabled - you'll see "INSERT MODE" listed in the status bar
Vintage starts in insert mode by default. This can be changed by adding:
"vintage_start_in_command_mode": trueto your User Settings.
What's Included
Vintage includes most basic actions: d (delete), y (copy), c (change), gu (lower case), gU (upper case), g~ (swap case), g? (rot13), < (unindent), and > (indent).
It also includes many motions, including l, h, j, k, W, w, e, E, b, B, alt+w (move by sub-words), alt+W (move backwards by sub-words), $, ^, %, 0, G, gg, f, F, t, T, ^f, ^b, H, M, and L.
Text objects are supported, including words, quotes, brackets and tags.
Repeat ('.') is in there, as is specifying counts for commands and motions. Registers are supported, as are macros and bookmarks. Many other miscellaneous commands are supported too, such and *, /, n, N, s, S and more.
What's Not
Insert mode is regular Sublime Text 2 editing, with the usual Sublime Text 2 key bindings: vi insert mode key bindings are not emulated.
Ex commands are not implemented, apart from :w and :e, which work via the command palette.
Under the Hood
Vintage mode is implemented entirely via key bindings and the plugin API - feel free to browse through the Vintage package and see how it's put together. As an example, if you'd like to bind "jj" to exit insert mode, you can add this key binding:
{ "keys": ["j", "j"], "command": "exit_insert_mode","context":[{ "key": "setting.command_mode", "operand": false },{ "key": "setting.is_widget", "operand": false }]}
OS X Lion
In Lion, holding down a key won't repeat it, but will instead show a popup menu to select between character variations. This doesn't work well with command mode, so you may want to disable it. This can be done via entering this at the terminal:
defaults write com.sublimetext.2 ApplePressAndHoldEnabled -bool false
Ctrl Keys
Vintage supports these ctrl key bindings:
- Ctrl+[: Escape
- Ctrl+R: Redo
- Ctrl+Y: Scroll down one line
- Ctrl+E: Scroll up one line
- Ctrl+F: Page Down
- Ctrl+B: Page Up
"vintage_ctrl_keys": true
- Sublime Text 2 VIM模式:Vintage插件的官方说明
- Sublime Text3工具的安装、破解、VIM功能vintage插件教程(已经实践、绝对可用)
- Sublime Text3工具的安装、破解、VIM功能vintage插件教程(已经实践、绝对可用)
- sublime text vim模式
- sublime text 2 开启 vim 模式
- Sublime Text 3 插件安装及Vim 模式设置
- Sublime Text 2 插件安装和Vim 模式设置写C#
- Sublime Text vim模式快捷键
- Sublime Text 2 插件
- Sublime Text 2插件
- 一些必不可少的Sublime Text 2插件
- 一些必不可少的Sublime Text 2插件
- 一些必不可少的Sublime Text 2插件
- 一些必不可少的Sublime Text 2插件
- 安装Sublime Text 2插件的方法:
- 一些必不可少的Sublime Text 2插件
- 一些必不可少的Sublime Text 2插件
- 一些必不可少的Sublime Text 2插件
- Eclipse for Python
- 事务控制
- codeblocks窗口还原
- visual studio 2010远程调试.NET代码实践
- Oracle闪回技术之一Oracle 11g 利用FlashTable (闪回表)恢复(用delete)误删的数据
- Sublime Text 2 VIM模式:Vintage插件的官方说明
- PyQT tutorial
- C++解析IEEE754中float格式的数据
- 2013华为工作之电信客服行
- 网站应用程式架构
- 三角形面积,三点顺序
- 为什么可穿戴设备会在此时兴起?- 物联其实可以从手机开始
- Windows下NTP时间服务器配置
- 数据库函数之sum