2011-11-30 6 views

risposta

40

del file successivo: :n

File precedente: :p, :N o :prev a seconda di quale applicazione vi si sta utilizzando.

Ecco un tipico cheat che ha una sezione "File" su questo argomento.

http://www.lagmonster.org/docs/vi2.html

+0

Grazie tialaramex :) – Dinesh

+6

sia qualche editor vi,: p non funziona. Usa: prev invece – kingsmasher1

-1

:e# dove # è il numero di file

+1

er che crea un file chiamato '#' (qualunque numero tu abbia messo lì) – Catskul

+1

Vuoi ': b #'. –

3

Per Linux Red-Hat VI versione 7.2.411 uso: n e: N per passare successivo e precedente.

+0

Funziona anche su Mac OS X (che è BSD). Non sono sicuro del "vero" BSD vi. –

+0

CentOS pure! – Poli

0

AIX's vi ha i propri comandi; mi ci è voluto un po 'per trovare questa informazione perché le risposte in questa domanda non ce l'avevano già, quindi aggiungerò questa risposta.

:p, :N, nè :prev lavoro per andare al file precedente, è necessario utilizzare una delle varianti del comando :n ---.

Il :n per lo spostamento al file successivo è lo stesso

Usa :n file_name per passare a un certo file (può aprire nuovi file in questo modo anche) (per andare al file precedente, basta farlo con il precedente il nome del file

Usa :n list of file names per definire un nuovo elenco di file da modificare (in questo caso, i file list, of, file e names sarebbe stata aperta in serie utilizzando :n dopo l'esecuzione :n list of file names

Altri risultati utili dalle pagine man

:e File 
     Edits the specified file. If you are using this subcommand 
     from the ex editor, you do not need to type the : (colon). 
    :e! 
     Re-edits the current file and discards all changes. 
    :e + File 
     Edits the specified file starting at the end. 
    :e + Number File 
     Edits the specified file starting at the specified line number. 
    :e # 
     Edits the alternate file. The alternate file is usually the 
     previous file name before accessing another file with a 
     :e command. However, if changes are pending on the current 
     file when a new file is called, the new file becomes the 
     alternate file. This subcommand is the same as the Ctrl-A 
     subcommand. 
    Ctrl-G 
     Shows the current file name, current line number, number of 
     lines in the file, and percentage of the way through the 
     file where the cursor is located. 
Problemi correlati