|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello guys,
In VI, I stumbled upon a command which display a quick reference of navigation, etc, which I found pretty handy. But I can't remember what keys I typed in VI command mode to get into that, does anyone know? Regards, Ben |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Mon, 23 Jul 2007 07:15:34 -0700, Benson.Hoi wrote:
> Hello guys, > > In VI, I stumbled upon a command which display a quick reference of > navigation, etc, which I found pretty handy. But I can't remember what > keys I typed in VI command mode to get into that, does anyone know? > > Regards, > Ben Normal vi does not have such a thing. "vim" has a lot of . To get navigation you can type : navigation and it will tell you about the keys used. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Jul 23, 7:15 am, Benson....@googlemail.com wrote:
> Hello guys, > > In VI, I stumbled upon a command which display a quick reference of > navigation, etc, which I found pretty handy. But I can't remember what > keys I typed in VI command mode to get into that, does anyone know? > > Regards, > Ben Not all OS's have vim,,,, Ok A few of the basic vm commands: Esc - The esc key puts you back in command mode. o - open a line, A - append to the end the line, i - insert text at cursor, yy - yank a line, copy it to a buffer, p - paste the line from the yy buffer, Command mode ( press esc ) j - go down, good to know these in case your arrows are not working. k - go up , h - go left, l - go right, / - search down, ? - search up, : - ed commands, press sec to get to the command mode 1st, then : :w write the file :q quit vi :w! write it any way, if you have an error message :q! quit with force, :w myfile.txt - write to a file named myfile.txt control-g - status line on bottom of the screen, :set nu - show the file with line numbers, :set nonu - turn off silly line numbers, set list - see all the non-printing chars in the file, tabs, cr lr, so on handy ... :wq write and quit, risk of missing messages if file not saved, shift-ZZ - Like :wq, short cut, risk of missing messages, Basic search and replace: :s%/foo/bar/g - change the foo to bar, global ( % ) , and fully left to right, ( g ) :3,6s/foo/bar/g - like above, just for lines 3 to 6. :s/foo/bar/ - sub the first foo on the line to bar, Just 2 cents: JB |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
<Benson.Hoi@googlemail.com> wrote in message news:1185200134.339617.155930@n2g2000hse.googlegro ups.com... > Hello guys, > > In VI, I stumbled upon a command which display a quick reference of > navigation, etc, which I found pretty handy. But I can't remember what > keys I typed in VI command mode to get into that, does anyone know? > > Regards, > Ben > Some vi versions have ":viusage" and ":exusage". With the other suggestions already given, I worked a vi in the eons past that would accept a ":h" for . I have one now that ":" returns the messages to use viusage or exusage. Old Man |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
<Benson.Hoi@googlemail.com> wrote in message news:1185200134.339617.155930@n2g2000hse.googlegro ups.com... > Hello guys, > > In VI, I stumbled upon a command which display a quick reference of > navigation, etc, which I found pretty handy. But I can't remember what > keys I typed in VI command mode to get into that, does anyone know? > > Regards, > Ben > Some vi versions have ":viusage" and ":exusage". With the other suggestions already given, I worked a vi in the eons past that would accept a ":h" for . I have one now that ":" returns the messages to use viusage or exusage. Old Man |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Jul 24, 9:04 pm, "Old Man" <reply2fo...@newgroup.com> wrote:
> <Benson....@googlemail.com> wrote in message > > news:1185200134.339617.155930@n2g2000hse.googlegro ups.com... > > > Hello guys, > > > In VI, I stumbled upon a command which display a quick reference of > > navigation, etc, which I found pretty handy. But I can't remember what > > keys I typed in VI command mode to get into that, does anyone know? > > > Regards, > > Ben > > Some vi versions have ":viusage" and ":exusage". With the other > suggestions already given, I worked a vi in the eons past that would > accept a ":h" for . I have one now that ":" returns the > messages to use viusage or exusage. > > Old Man Try using ' nav' It is showing the cursor options |
|
![]() |
| Outils de la discussion | |
|
|