" text Object
{operator}{a}{object}
{operator}{i}{object}
daw = delete a word
==a==n object: include tail space
ciw = change inner word
==i==nner object: just content self
exclude tail word space
" word/sentence/paragraph
textObject specification
w word
s sentence
p paragraph
" chunk object
]/[ []block
)/( b block
>/< >/< <>block
}/{ B Block
t tag block: <> </>
" visual mode
viw select word
vis select sentence
vip select paragraph
vi( select content in (
vi[ select content in [
vit select content in tab
v2i{ select content in 2{
v3aw select 3 word
v3iw select 3 word, exclude tail space
v operator can substitute to c x d y etc. operator effect on text Object
====================================
" macro
if you write a thing once,it is okay. However if you're writing
t twice or more times, then you should find a better way to do it.
qa start record macro and reg to a
q stop record macro
n@a execute n times macro a
@@ redo last operation
:n,mnormal @a n to m row execute reg a
:let @a= ' edit macro reg a
" best operation
normalize cursor pos: 0
execute edit and operator
move cursor to easy back pos: j
" macro save
viminfo/vimrc file
save history and not null reg
vim launch read
easy to cover
8.textObject_macro
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 2018年12月11日 : 破解文件下载提取码:ad4b 此破解版本为Windows版 , 下载链接中包含破解工...