`
lgh06
  • 浏览: 55466 次
文章分类
社区版块
存档分类
最新评论

Sublime Text 2 VIM模式:Vintage插件的官方说明

 
阅读更多

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 theGitHubpage.

Enabling Vintage

Vintage is disabled by default, via theignored_packagessetting. If you remove "Vintage" from the list of ignored packages, you'll be able to edit with vi keys:
  1. Select thePreferences/Settings - Defaultmenu item
  2. Edit theignored_packagessetting, changing it from:
    	"ignored_packages": ["Vintage"]
    
    to:
    	"ignored_packages": []
    
    now save the file.
  3. 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": true
to 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
However, because they conflict with other Sublime Text 2 key bindings, these are disabled by default on Windows and Linux. They can be enabled with the vintage_ctrl_keys setting:
	"vintage_ctrl_keys": true
分享到:
评论

相关推荐

    SublimeText2代码编辑器插件合集

    教程名称:Sublime Text 2代码编辑器插件合集课程目录:【】【插件】Emmet for Sublime Text 2 plugin【】【插件】LESS build system package for Sublime Text 2【】【插件】LESS syntax package for Sublime Text ...

    sublime text2 jade语法高亮显示插件

    sublime text2 jade语法高亮显示插件

    sublime text福利 40多个插件集合 5款主题(完美支持sublime text3和st2)

    当初装sublime的时候在csdn上没找到比较好的插件合集 费了一点功夫...但是具体还是要看个人的需求吧 通过package control有太多的插件可供安装 希望这个插件集合能给大家带来一点小便利 方便刚装sublime text的用户哈

    SublimeText模板插件

    SublimeText模板插件SublimeText模板插件SublimeText模板插件SublimeText模板插件SublimeText模板插件SublimeText模板插件SublimeText模板插件SublimeText模板插件SublimeText模板插件SublimeText模板插件Sublime...

    Package Control:Sublime Text2的插件管理器

    Package Control是Sublime Text2的插件管理器,有了它,只要机器能联网,就可以下载并自动安装Sublime Text2的插件,非常好用。

    github_editor_theme, Textmate,sublime text 和Vim的Github主题.zip

    github_editor_theme, Textmate,sublime text 和Vim的Github主题 的主题这是 TextMate,sublime text 和Vim的GitHub主题。 TextMate 1要安装它:$ cd ~/Library/Application Support/TextMate/Themes &&a

    Sublime Text 3完整版

    Sublime Text 3是Sublime Text2的升级版。Sublime Text 是一款流行的文本编辑器软件,有点类似于TextMate,跨平台,可运行在Linux,Windows和Mac OS X。也是许多程序员喜欢使用的一款文本编辑器软件。 Sublime ...

    Sublime Text 4 Build 4152

    Sublime Text是由程序员Jon Skinner于2008年1月份所开发出来,它最初被设计为一个具有丰富扩展功能的Vim。 Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定...

    Sublime Text 2 插件安装配置

    Sublime Text 2 插件安装与配置,常用插件功能说明

    sublime text 2 3 system verilog自动补充插件

    sublime text 2 3 system verilog自动补充插件,非常好用,我自己在原版的基础上进行了一些修改使得它更加适合我们编程的风格,编程风格可以通过里面的配置文件进行修改,不会可以咨询我哦,

    离线安装sublime text3 Package Control: Install Package

    实现sublime text3离线安装Package Control: Install Package的功能

    sublime text2 插件包1

    sublime text 2插件包: sublimelinter :语法检查插件 sidebar:sublime 侧边栏增强插件

    sublime text2插件

    解决Sublime Text乱码问题,解压文件,修改文件夹名称为“ConvertToUTF8”,将给文件夹存放到Sublime Text 2\Data\Installed Packages目录下,启动Sublime Text 2,打开乱码文件 按下ctrl+shift+c即可解决

    sublime-vim 底行模式插件

    配置好了 Esc 之后,需要此插件开启底行模式

    Sublime Text3 离线汉化,汉化插件安装

    Sublime Text3 离线汉化包,可以使用命令安装汉化插件。建议使用命令进行汉化,比离线汉化的支持更好。具体查看压缩包内的txt 文件

    Go-GoSublime-SublimeText**3**的Golang插件集合

    GoSublime - SublimeText **3**的Golang插件集合, 提供代码完成和其他类似IDE的特性

    Sublime text 2 for linux

    Sublime Text 2 for linux

    Sublime Text 使用手册

    2.可扩展——Vim和Sublime Text均是包含大量实用插件的可扩展工具,可通过安装所需的插件来提高工作效率。 3.互补——Vim和Sublime Text分别是命令行环境(CLI)和图形界面环境(GUI)下的编辑器,二者并用功能...

    sublime text2 插件包

    sublime text2 的插件包 包含了常用的插件,比如zen coding、BracketHighlighter、JsFormat等。

Global site tag (gtag.js) - Google Analytics