PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > VI queston
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

VI queston

Réponse
 
LinkBack Outils de la discussion
Vieux 23/07/2007, 15h15   #1
Benson.Hoi@googlemail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut VI queston

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

  Réponse avec citation
Vieux 23/07/2007, 16h56   #2
Icarus Sparry
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: VI queston

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.
  Réponse avec citation
Vieux 23/07/2007, 19h02   #3
johngnub
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: VI queston

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




  Réponse avec citation
Vieux 24/07/2007, 17h04   #4
Old Man
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: VI queston


<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


  Réponse avec citation
Vieux 24/07/2007, 17h04   #5
Old Man
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: VI queston


<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


  Réponse avec citation
Vieux 25/07/2007, 08h31   #6
ramesh.thangamani@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: VI queston

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

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h32.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14592 seconds with 14 queries