Tuesday, 15 June 2010

vim move position of the closing bracket -


Editing in Vim I often find myself in a situation where I want to move the position of a closing bracket.

For example, first I type

  if a == 1 then  

Then I realized that in fact I I want to bracket around 'a == 1' part so that I should go back and put a bracket and end it with

  if () a == 1 then  

I am using the auto-pair plugin so that the coupled bracket is correctly generated.

My question is, this is the fastest way to see it:

  If (a == 1) then  

For example, currently I can use x to delete the second character

  • f1
  • Li> A and attach to ')'

    It seems that

    1. avoid
    2. one word to another bracket Go ahead. With

    , you just press a == 1 And (.

    Around plugin has the same mapping (pressing multiple keys on them, but they follow more vi

    If you really want to be in inserted mode, you can press CTRL-V once before by pressing () ) .

    You can also select a == 1 , and type s (^ r ") . (< CTRL-R for Code> ^ R )


    No comments:

    Post a Comment