vim 放便於linux下對文檔進行編輯修改,經過配置之後能夠構成一個強大的編程ide。使用vim過程主要注意vim工做模式之間的轉換,通常可分爲:普通模式(normal mode)、插入模式(insert mode)和視圖模式(visual mode)。html
vin工做模式之間的切換:
1. 普通模式 -> 插入模式:
i : 進入插入模式,光標處於當前字符以前
I : 進入插入模式,光標處於當前行的第一個非空字符前
a : 進入插入模式,光標處於當前字符以後
A : 進入插入模式,光標處於當前行尾
o : 進入插入模式,當前行後另起一行,光標位於新行
O : 進入插入模式,當前行前另外一起一行,光標位於新行
s : 刪除當前字符,進入插入模式
S : 刪除當前行,進入插入模式
2. 插入模式 -> 普通模式
[ESC] 鍵
3. 普通模式 -> 視圖模式
v : 進入視圖模式,以字節爲單位
V : 進入視圖模式,以行爲單位
4. 視圖模式 -> 普通模式
[ESC] 鍵linux
更多參考:
模式之間的切換:http://www.cnblogs.com/CoverCat/p/4852874.html
linux下,vim ide 配置:http://blog.csdn.net/doc_sgl/article/details/47205779
vim 經常使用命令: https://www.fprintf.net/vimCheatSheet.htmlc++
documentation: http://docs.sublimetext.info/en/latest/index.htmlgit
經常使用指令(mac):
註釋(去註釋):[command] + /
查找:[command] + F
選中行:[command] + Lgithub
多行選擇:
依次添加實例:command + D
跳過當前實例:command + K, command + D
撤銷當前選中的實例:command + U編程
簡單介紹與經常使用命令:
http://cenalulu.github.io/linux/tmux/vim
新建session:
tmux服務器
掛載全部session:
tmux attachsession
經常使用指令:
prefix = control + bapp
prefix + x : 關閉當前panel
prefix + " : 垂直切 panes
prefix + % : 水平切 panes
prefix + 方向鍵 : 將光標移動到相應的panel
prefix + [ : 滾動模式,可使用滾動條瀏覽當前窗口內容,q 推出
prefix z :當前窗口放大或者縮小
更多參考:tmux cheat sheet (注意,前綴中的a改爲b):
https://gist.github.com/andreyvit/2921703
重點選項說明:
-o transform_symlinks 表示轉換絕對連接符號爲相對連接符號
-o follow_symlinks 沿用服務器上的連接符號
-C 壓縮,或者-o compression=yes
-o reconnect 自動重連
-o cache=yes
-o allow_other
取消掛載:
umount /home/happyling/Desktop/server_workspace
- 安裝: XQuartz
- 本地鏈接服務器:ssh -AXY username@192.111.1.200
gcc install: grew install gcc
compile: g++ -o test test.cpp
run: ./test