您的位置:首页 > 其它

lesson3 -Vim

2015-09-09 19:59 288 查看
1. creat newfile sudo vim newfile
read file sudo vim filename(if this file is not exist,creat a new one) and no houzhuiming
sudo vim /etc/passwd system account

2.change the owner of file

sudo chown user file
sudo chown root newfile
exit

3. editing and navigatating

insert: 'a'
get out insert moden: 'esc'
find sth,seach: :/ *max* notice space max means what are you looking for
:/ ?
hit 'n' : go to the next search

4. command in vim
open file: :e file
colse file :q! (no change,no save)
:wq (save and close) back to system ,quit vim
:w filename (save as another file)

本文出自 “SystemAdmin笔记” 博客,请务必保留此出处http://christhai.blog.51cto.com/1584747/1693245
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: