VI Cheetsheet: Difference between revisions

Add section on multiple files
You need to type colon when in colon mode
Line 674: Line 674:
== Edit multiple files: ==
== Edit multiple files: ==
* press <kbd>Esc</kbd> (to leave editing or other mode)
* press <kbd>Esc</kbd> (to leave editing or other mode)
* type <kbd>t</kbd>+<kbd>a</kbd>+<kbd>b</kbd>+<kbd>e</kbd> (e for edit), [space] and then start typing the /path/to/filename
* then use one of the following sequences
* type <kbd>t</kbd>+<kbd>a</kbd>+<kbd>b</kbd>+<kbd>n</kbd> (n for next), to switch to the next buffer
* type <kbd>:</kbd>+<kbd>t</kbd>+<kbd>a</kbd>+<kbd>b</kbd>+<kbd>e</kbd> (e for edit), [space] and then start typing the /path/to/filename
* type <kbd>t</kbd>+<kbd>a</kbd>+<kbd>b</kbd>+<kbd>p</kbd> (p for previous), to switch to the previous buffer
* type <kbd>:</kbd>+<kbd>t</kbd>+<kbd>a</kbd>+<kbd>b</kbd>+<kbd>n</kbd> (n for next), to switch to the next buffer
* type <kbd>:</kbd>+<kbd>t</kbd>+<kbd>a</kbd>+<kbd>b</kbd>+<kbd>p</kbd> (p for previous), to switch to the previous buffer
* You can also type <kbd>:args</kbd> to get a list of the open buffers


[[Category:Tools]]
[[Category:Tools]]