OReilly.Learning the vi and vim editor

内部资料,请勿转载,多谢。
回复
头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

OReilly.Learning the vi and vim editor

帖子 leo » 2010-11-10 5:22

OReilly.Learning the vi and vim editor, 不错的书,当时要是有这个可能就不用买另一本口袋书了,而且买的那本使用的版本还和OpenBSD使用的不一样。
附件
OReilly.Learning the vi and vim editor.part5.rar
(190.3 KiB) 下载 453 次
OReilly.Learning the vi and vim editor.part4.rar
(976.56 KiB) 下载 426 次
OReilly.Learning the vi and vim editor.part3.rar
(976.56 KiB) 下载 436 次
OReilly.Learning the vi and vim editor.part2.rar
(976.56 KiB) 下载 472 次
OReilly.Learning the vi and vim editor.part1.rar
(976.56 KiB) 下载 427 次

f5b
锆 Zr
帖子: 642
注册时间: 2011-10-22 20:43

回复: OReilly.Learning the vi and vim editor

帖子 f5b » 2011-11-23 16:07

补充,这是第7版 7th,

我用vi,记住几个常见命令
esc返回命令模式
dd删除本行
o 插入新行
i 插入字符
a 添加字符
x 删除一个字符

:wq 保存退出
:wq! 强制保存覆盖只读文件
:q! 不保存退出

以上基本能满足需要,大家继续分享vi简易入门知识。
--------------还有最近学的
以下方法用来做危险的事情,就是删除/var/log/下面某个日志的内容,偷懒记录新日志的方法,当然,实时看日志是用 tail -f /var/log/*.log命令

How do I delete all lines in the current text file in vi/vim?

To delete all lines in vi/vim, use this command:

:1,$d

This "vi/vim delete all lines" command can be read like this:

Beginning at line 1, and
Ending at the last line in the file (represented by the '$'),
Delete each line.

yuyshfj
钛 Ti
帖子: 30
注册时间: 2012-09-01 16:46

Re: OReilly.Learning the vi and vim editor

帖子 yuyshfj » 2014-06-18 19:12

我觉得四个移动光标命令也可作为基础命令
h向左 j向下 k向上 l向右

头像
bsdplus
铁 Fe
帖子: 77
注册时间: 2013-08-16 12:02

Re: OReilly.Learning the vi and vim editor

帖子 bsdplus » 2014-06-19 10:42

还有一本中高级的:practical Vim: edit text at the speed of thought,想要再上一层的同学可以试试...

http://www.amazon.cn/Practical-Vim-Edit ... 1934356980

现在我在工作中需要非常频繁的进行文本编辑,我也把自己偶尔要用到、又不大容易记忆的放在一个文件里,以备后用

https://gitlab.com/acheng/unix_notes/bl ... _notes.txt
=acheng

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 0 访客