skip to main
|
skip to sidebar
Vi Command Help
顯示具有
Moving
標籤的文章。
顯示所有文章
顯示具有
Moving
標籤的文章。
顯示所有文章
2015年7月14日 星期二
bookmarks, go and back
設定 bookmark, 這樣以後可以回到這裡。
設定:
ma
(a,b, c....是 bookmark id)
回到...
`a
(a, b, c.. 回到 bookmark a, b, c..)
2009年3月26日 星期四
Mark and Jump 標記與在標記間跳躍
在目前游標位置輸入 mx x 可以是任意字元,用來代表這個mark 的位置。
移動到 line 10,輸入 ma
移動到 line 90,輸入 mb
然後在任何位置,輸入 `a 就會到 lin 10 (剛剛輸入 ma 的游標位置)。
輸入 `b 就會到 line90。
m 就是 mark 的意思,後面的字元代表 mark 為 ?
` 是到 mark 的位置。
兩個 `` 就會到 "上一個" 游標位置。
如果要在括弧間跳躍:
%
2009年2月3日 星期二
Go to the end of file
就是利用 command line ": 行數" 的方法,
然後利用 "$" 代表"最後":
先在command mode 按 ":" 這樣就會在最下面一行出現 ":"
然後再輸入 "$" 就代表最後一行。
按 Enter
^ 代表開頭
$ 代表最後
所以
:^
會到 file 的開頭
:$
會到 file 的最後
首頁
訂閱:
文章 (Atom)
advance
(7)
bookmark
(3)
browse
(8)
cheatsheet
(1)
copy-paste
(1)
diff
(4)
edit
(11)
files
(5)
Format
(5)
FormatConvert
(3)
gvim
(2)
indent
(2)
Moving
(3)
plugin
(3)
search
(4)
shell
(3)
show
(9)
網誌存檔
▼
2020
(1)
▼
6月
(1)
設定 tabs 寬度與縮排
►
2019
(1)
►
4月
(1)
►
2016
(1)
►
8月
(1)
►
2015
(1)
►
7月
(1)
►
2014
(1)
►
1月
(1)
►
2013
(2)
►
1月
(2)
►
2012
(4)
►
5月
(2)
►
1月
(2)
►
2011
(8)
►
10月
(3)
►
6月
(2)
►
3月
(2)
►
1月
(1)
►
2010
(8)
►
12月
(1)
►
11月
(2)
►
10月
(3)
►
9月
(1)
►
8月
(1)
►
2009
(9)
►
9月
(2)
►
3月
(4)
►
2月
(3)