Vim 編輯器
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
有時出現以下,而無法WQ離開時
NO WRITE SINCE...
可加上!
如下
:Q!
如果檔案編輯中突然離開
它會自動產生.檔名.swp
檔案
把他刪除即可
啟用滑鼠
:set mouse=a
接著就可以使用滑鼠移動游標或是選取文字區塊
復原
u
貼上
shift+ins(鍵盤右上)
或直接按右鍵
在某一行按v
之後利用方向鍵即可開始選行,進行複製刪除等動作
按下小寫y
可以複製起選擇的文字,按下d可以刪除掉選取的文字。
在想要貼上文字的地方,按下p
就可以貼上剛才複製好的文字。
到行尾 : shift+$
到行首 : 0
安裝vim package manger 有幾種可以選擇,這裡使用NeoBundle
$ curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh > ./install.sh
$ sh ./install.sh
注意事項:
如果使用windows cmd去用vim可能會造成跑版,但putty沒問題
搜尋word
進入檔案後按下/
然後輸入要搜尋的字後按 enter
往後搜尋 n
往前搜尋 shift + n