Linux.com

agrayray

agrayray

  • Linux.com Member
  • Posts: 1
  • Member Since: 02 May 11
  • Last Logged In: 02 May 11

Latest Posts

Posted by
Topic
Post Preview
Posted
  • agrayray
    vi - anyway to jump line while in insert mode?
    Hello, I recently am put in a situation where I will be editing code on linux boxes that have nothing but vi or vim... and have a hope that there is a way I can jump up a line while in insert mode in vi. The reason is simply that I noticed in vi its very hard for me to enter my braces easily. In most editors, when I write a function, I add the open brace, hit enter twice and add the second brace (to avoid compilation problems)...it seems to me in vi this process requires I enter the first brace, enter twice and add the second brace, but then I have to leave insert mode and then issue a command to jump up a line and then back to insert mode. This process I find quite annoying and problematic as its much easier for me to just use my right hand and the arrow keys in most editors. In vi the best process I have so far is - brace, enter, ,brace ESC, O, i ..then code. Does anyone know if there is way to jump while in insert mode similar to way you can move back with CTRL-h? It would really make life easier for me... Thanks in advance.
    Link to this post 02 May 11

    Hello,

    I recently am put in a situation where I will be editing code on linux boxes that have nothing but vi or vim...

    and have a hope that there is a way I can jump up a line while in insert mode in vi.

    The reason is simply that I noticed in vi its very hard for me to enter my braces easily. In most editors, when I write a function, I add the open brace, hit enter twice and add the second brace (to avoid compilation problems)...it seems to me in vi this process requires I enter the first brace, enter twice and add the second brace, but then I have to leave insert mode and then issue a command to jump up a line and then back to insert mode.

    This process I find quite annoying and problematic as its much easier for me to just use my right hand and the arrow keys in most editors. In vi the best process I have so far is - brace, enter, ,brace ESC, O, i ..then code.

    Does anyone know if there is way to jump while in insert mode similar to way you can move back with CTRL-h? It would really make life easier for me...

    Thanks in advance.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board