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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
aryoung
January 29, 2013
Programming
3.8k
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Vim London: Custom Motions
An overview of motions and how to create custom motions.
aryoung
January 29, 2013
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
300
Other Decks in Programming
See All in Programming
AI 輔助遺留系統現代化的經驗分享
jame2408
1
760
RTSPクライアントを自作してみた話
simotin13
0
610
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
270
Lessons from Spec-Driven Development
simas
PRO
0
210
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
120
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
570
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
140
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
200
Performance Engineering for Everyone
elenatanasoiu
0
180
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
270
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
430
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
The Spectacular Lies of Maps
axbom
PRO
1
820
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
240
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
540
So, you think you're a good person
axbom
PRO
2
2.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Why Our Code Smells
bkeepers
PRO
340
58k
ラッコキーワード サービス紹介資料
rakko
1
3.7M
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