您的位置:首页 > 其它

vim 使 用 技 巧(vi and vim editors)

2011-11-25 13:09 405 查看
在 vi 编辑界面

Try to force the system to save your buffer with the ex command :pre (shortfor :preserve). If that doesn’t work, look for some files to remove.

Use :sh (or CTRL-Z if you are using a job-control system) to move out of vi and remove files.

Use CTRL-D (or fg) to return to vi when you’re done. Then write your filewith :w!.

:sh ------------ vim to shell

CTRL-D ------------ back to vim

CTRL-Z ------------ vim to shell

fg ------------- back to vim

when vim in command:

数字 0 ---------------- go to head of current line of cursor

$ --------------- go to end of current line of cursor

u ----------------- undo edit

nG ---------------- go to line n of current file
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: