VIM sets parentheses auto-complete and jumps out quickly

Source: Internet
Author: User

First, set the automatic completion of parentheses
Inoremap ""<ESC>iinoremap "" "<ESC>Iinoremap (()<ESC>Iinoremap [[]<ESC>iinoremap {{}<ESC>I<CR><ESC>V<O

Where curly braces {set, auto-complete and line-wrap indent, which is especially useful when writing functions or block of statements.

Reference:

http://blog.csdn.net/dark_fire/article/details/41970477

Http://www.cnblogs.com/lovepurple/p/3373959.html

Second, set the automatic jump out of auto-completion of the parentheses
"Set the brace to jump out of auto-completion to Func Skippair ()      if Getline ('. ') [Col ('. ')-1] = = ') ' | | Getline ('. ') [Col ('. ')-1] = = '] ' | | Getline ('. ') [Col ('. ')-1] = = ' "' | | Getline ('. ') [Col ('. ')-1] = = "'" | | Getline ('. ') [Col ('. ')-1] = = '} '          return ' \<ESC>la "      else          return" \ T "      endif  endfunc  "bind tab to jump out of brackets   <tab>< C-r >=skippair ()<CR>

Reference: http://blog.csdn.net/larrygoode/article/details/12377977

Three, Key mapping

There are mainly map,noremap,unmap,mapclear four commands, and there are four prefixes i,c,n,v decorated

Nore

Represents non-recursive, see the following introduction

N

Indicates effective in normal mode

v

Indicates effective in visual mode

I

Indicates effective in insert mode

C

Indicates effective in command-line mode

Map

A mapping that represents recursion

Unmap

Indicates that a map is deleted

Mapclear

Show Clear Mapping

Common commands:

: Map:noremap:unmap:mapclear
: Nmap:nnoremap:nunmap:nmapclear
: Vmap:vnoremap:vunmap:vmapclear
: Imap:inoremap:iunmap:imapclear
: Cmap:cnoremap:cunmap:cmapclear

Reference: http://blog.163.com/lgh_2002/blog/static/44017526201111503947906/

VIM sets parentheses auto-complete and jumps out quickly

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.