Configure Vim mode in sublime

Source: Internet
Author: User
Tags imap

I recently used sublime text2, which is more beautiful than textmate, and has a consistent version on several platforms.

Sublime supports text editing using the vim mode. The Vim shortcut key is quite fast for editing text. It is nice to combine the two editors. Choose preferences> Settings-default, and there is a line at the bottom of the text.

"Ignored_packages": ["vintage"]

Here, sublime removes Vim support by default. We just need to delete "vintage.

In the edit box, try again. But in Vim, I have mapped the ESC key to 'II': IMAP 'II'. IMAP is not supported here. However, we can define it in the vintage package. My machine is windows, and the default packages are all installed in C: \ Documents and Settings \ zhengj1 \ Application Data \ sublime text 2 \ packages directory, find vintage \ default. sublime-keymap file, open it in a text editor, and add the following code:

{"Keys": ["I", "I"], "command": "exit_insert_mode ",

"Context ":

[

{"Key": "setting. command_mode", "operand": false },

{"Key": "setting. is_widget", "operand": false}

]

},


{"Keys": ["I", "I"], "command": "hide_auto_complete", "context ":

[

{"Key": "auto_complete_visible", "operator": "equal", "operand": true}

]

},


{"Keys": ["I", "I"], "command": "vi_cancel_current_action", "context ":

[

{"Key": "setting. command_mode "},

{"Key": "selection_empty", "operator": "equal", "operand": True, "match_all": false },

{"Key": "vi_has_input_state "}

]

},

In this keymap file, you can define your preferred shortcut keys. If you are interested, you may wish to study them.

The vintage plug-in does not support command. To support command, you need the next vintageex package. Some simple commands can be used.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.