Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Vim London: Custom Motions
Search
aryoung
January 29, 2013
Programming
6
3.7k
Vim London: Custom Motions
An overview of motions and how to create custom motions.
aryoung
January 29, 2013
Tweet
Share
More Decks by aryoung
See All by aryoung
Vim and the Web
aryoung
0
7.8k
Tern for Vim
aryoung
2
1.7k
Introduction to Node and its Core Modules
aryoung
3
280
Other Decks in Programming
See All in Programming
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
1k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
330
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
4.6k
Navigating Dependency Injection with Metro
l2hyunwoo
1
200
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
130
GoLab2025 Recap
kuro_kurorrr
0
790
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
570
TestingOsaka6_Ozono
o3
0
230
Deno Tunnel を使ってみた話
kamekyame
0
280
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
ゲームの物理 剛体編
fadis
0
390
Java 25, Nuevas características
czelabueno
0
120
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
2
270
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
80
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
67
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Heart Work Chapter 1 - Part 1
lfama
PRO
3
35k
How to train your dragon (web standard)
notwaldorf
97
6.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
140
Measuring & Analyzing Core Web Vitals
bluesmoon
9
720
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Transcript
Custom Motions in Vim Alex
Goals ‣ Revise
Motions move the cursor What
Custom Motions ‣ Motions
Vim’s Grammar [operator][count][motion] Change
Vim’s Grammar [operator][count][motion] d 2 w delete 2 words Wednesday,
30 January 13
Vim’s Grammar [operator][count][motion] Operator- Pending
Operator-Pending Mode ‣ Map
Mappings ‣ Example:
Mappings " From: learnvimscriptthehardway.stevelosh.com/chapters/51.html function! s:NextSection(type, backwards) endfunction noremap <script>
<buffer> <silent> ]] :call <SID>NextSection(1, 0)<cr> noremap <script> <buffer> <silent> [[ :call <SID>NextSection(1, 1)<cr> noremap <script> <buffer> <silent> ][ :call <SID>NextSection(2, 0)<cr> noremap <script> <buffer> <silent> [] :call <SID>NextSection(2, 1)<cr> Wednesday, 30 January 13
Mappings function! s:NextSection(type, backwards) if a:type == 1 let pattern
= ... elseif a:type == 2 let pattern = ... endif if a:backwards let dir = '?' else let dir = '/' endif execute 'silent normal! ' . dir . pattern . "\r" endfunction Wednesday, 30 January 13
In the Wild ‣ Functions ‣ search() ‣ Keys
search() ‣ Regular
Another Example ‣ New! ‣ Like
The End omap search() noremap Wednesday, 30 January 13