vi--ex editor
2019-09-16 本文已影响0人
Ewitter
from book "Learning The Vi And Vim Editors, 7th Edition"
eg:

A Q in the command of vi invokes ex. And in ex the command vi return to vi editor.


. stands for the current line;
$ stands for the last line of the file;
% stands for every line in the file.



number 0 stands for the top of the file. 0 is equivalent to 1-.

redefine the current position:




append to file
Use the Unix redirect and append operator(>>) with w
to append all or part of the contents of the buffer to an existing file.


:g/old/s//new/g has the same effect as :%s/old/new/g