| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| When you type ESC : and then then UP Arrow to get a previous command, how can you edit that command, e.g. I want to change the beginning of the command, so I might try ESC :0 (beginning of line in VIM), but the ESC takes you out of the given command. CMM |
|
#2
| |||
| |||
| 2008-09-04, Charles M skribis: > When you type > > ESC : > > and then then UP Arrow to get a previous command, how can > you edit that command, e.g. I want to change the beginning > of the command, so I might try ESC :0 (beginning of line in VIM), > but the ESC takes you out of the given command. > > > CMM Just use arrow keys or <home> key to move. There should be no need to press <esc> again at the command line. -- kasmra :wq |
|
#3
| |||
| |||
| In article <slrngbvtfa.3mt.kasmra@foresto.suomi.net>, Tuomas Kasmra <kasmra@ne-spamon.gmail.com> wrote: >2008-09-04, Charles M skribis: >> When you type >> >> ESC : >> >> and then then UP Arrow to get a previous command, how can >> you edit that command, e.g. I want to change the beginning >> of the command, so I might try ESC :0 (beginning of line in VIM), >> but the ESC takes you out of the given command. >> >> >> CMM > >Just use arrow keys or <home> key to move. There should be no need to >press <esc> again at the command line. Or use q: (instead of ESC ![]() |
|
#4
| |||
| |||
| On 2008-09-04, Kenny McCormack <gazelle@shell.xmission.com> wrote: > In article <slrngbvtfa.3mt.kasmra@foresto.suomi.net>, > Tuomas Kasmra <kasmra@ne-spamon.gmail.com> wrote: >>2008-09-04, Charles M skribis: >>> When you type >>> >>> ESC : >>> >>> and then then UP Arrow to get a previous command, how can >>> you edit that command, e.g. I want to change the beginning >>> of the command, so I might try ESC :0 (beginning of line in VIM), >>> but the ESC takes you out of the given command. >>> >>> >>> CMM >> >>Just use arrow keys or <home> key to move. There should be no need to >>press <esc> again at the command line. > > Or use q: > (instead of ESC ![]() > I didn't know you could get a command history that way. Cool. |
|
#5
| |||
| |||
| In article <slrngc0142.1b7o.CharlesM@199.sub-75-204-7.myvzw.com>, Charles M <CharlesM@199.sub-75-204-7.myvzw.com> wrote: .... >> Or use q: >> (instead of ESC ![]() >> > > I didn't know you could get a command history that way. Cool. It is one of the niftier features of VIM. Definitely worth the price of admission. Note that there are bunch of related ones: q/ (edits the list of things searched for) and others (but I don't think I've used any other than q: and q/). |
|
#6
| |||
| |||
| Charles M <CharlesM@199.sub-75-204-7.myvzw.com> wrote: > On 2008-09-04, Kenny McCormack <gazelle@shell.xmission.com> wrote: >> In article <slrngbvtfa.3mt.kasmra@foresto.suomi.net>, >> Tuomas Kasmra <kasmra@ne-spamon.gmail.com> wrote: >>>2008-09-04, Charles M skribis: >>>> When you type >>>> >>>> ESC : >>>> >>>> and then then UP Arrow to get a previous command, how can >>>> you edit that command, e.g. I want to change the beginning >>>> of the command, so I might try ESC :0 (beginning of line in VIM), >>>> but the ESC takes you out of the given command. >>>> >>>> >>>> CMM >>> >>>Just use arrow keys or <home> key to move. There should be no need to >>>press <esc> again at the command line. >> >> Or use q: >> (instead of ESC ![]() >> > > I didn't know you could get a command history that way. Cool. You can also enter that mode from the command line by pressing Ctrl-F. I find <Esc> more natural than Ctrl-F, though, so I set the 'cedit' option like so: set cedit=<Esc> See :help cedit :help cmdwin :help history For easier editing on the command line itself, you can create a set of emacs-like edit-key bindings. See :help emacs-keys -- Gary Johnson |
|
#7
| |||
| |||
| Charles M wrote: >and then then UP Arrow to get a previous command, how can >you edit that command, e.g. I want to change the beginning >of the command, so I might try ESC :0 (beginning of line in VIM), >but the ESC takes you out of the given command. It's the featured tip this month at: http://vim.wikia.com/wiki/Main_Page http://vim.wikia.com/wiki/Using_command-line_history John |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.