美文网首页
vi--ex editor

vi--ex editor

作者: Ewitter | 来源:发表于2019-09-16 22:09 被阅读0次

from book "Learning The Vi And Vim Editors, 7th Edition"
eg:

ex-exercise.png
A Q in the command of vi invokes ex. And in ex the command vi return to vi editor. ex-command.png define_lines.png
.  stands for the current line;
$ stands for the last line of the file;
%  stands for every line in the file. 
define_lines-ex.png line_address.png line_address-1.png
number 0 stands for the top of the file.  0 is equivalent to 1-.
line_address-2.png

redefine the current position:

redefine_position.png global_search.png combine_ex_command.png save_part_file.png
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.
append_to_file.png copy_file.png
:g/old/s//new/g    has the same effect as    :%s/old/new/g

相关文章

网友评论

      本文标题:vi--ex editor

      本文链接:https://www.haomeiwen.com/subject/fuixuctx.html