平常在Unix(目前主要是FreeBSD)下主要是使用 Vim ,而Emacs由于在远程终端下没有Vim方便简洁,真正使用的时间不是很多。Vim,从名字也可以看出,应该是早期Unix下标配编辑器VI的进化物,所以,Vim的基本东西还是承袭自VI,如果你熟悉VI,使用Vim起来自然得心应手。
虽然很早就迁移到Vim了,但对基本的VI编辑器依然不能忘怀,从网上找了这篇VI参考手册,一来留存纪念,二则时常温习温习,必定受益颇多。
今天又重新学习了几个生僻的命令,多用多用,自然不生僻了,呵呵!
The vi is a text editor. It is small, powerful, and standard on most UNIX systems. The vi often frustrates new users with a unique distinction between its two modes: Command Mode and Insert/Overtype Mode. This distinction, although difficult to become accustomed to for many users, provides great power and ability to the editor. Insert/Overtype Mode is designed for inserting text only. All text manipulations and cursor moving should be done from with in Command Mode.
Entering the vi
- prompt$ vi
- prompt$ vi file1 file2 …
- prompt$ vi -r file #Recover file from crash
- prompt$ vi +string file #Execute ex command “string”
- prompt$ vi @rcfile #Read commands from rcfile
Recent Comments