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.6k
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.6k
Introduction to Node and its Core Modules
aryoung
3
270
Other Decks in Programming
See All in Programming
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
390
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
440
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.3k
技術同人誌をMCP Serverにしてみた
74th
1
370
C++20 射影変換
faithandbrave
0
530
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
130
Team operations that are not burdened by SRE
kazatohiei
1
210
Gleamという選択肢
comamoca
6
760
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
230
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
320
Create a website using Spatial Web
akkeylab
0
300
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
390
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
48
14k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Building Adaptive Systems
keathley
43
2.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Building Applications with DynamoDB
mza
95
6.5k
Side Projects
sachag
455
42k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
17
940
KATA
mclloyd
29
14k
Why You Should Never Use an ORM
jnunemaker
PRO
57
9.4k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Become a Pro
speakerdeck
PRO
28
5.4k
A Modern Web Designer's Workflow
chriscoyier
694
190k
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