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
3.8k
6
Share
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
290
Other Decks in Programming
See All in Programming
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
260
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
150
🦞OpenClaw works with AWS
licux
1
340
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
210
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.2k
[RubyKaigi 2026] Require Hooks
palkan
1
300
AI時代になぜ書くのか
mutsumix
0
270
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
490
The Less-Told Story of Socket Timeouts
coe401_
3
1k
GitHubCopilotCLIをはじめよう.pdf
htkym
0
330
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.8k
Featured
See All Featured
The Invisible Side of Design
smashingmag
302
52k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
260
The World Runs on Bad Software
bkeepers
PRO
72
12k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
So, you think you're a good person
axbom
PRO
2
2k
Deep Space Network (abreviated)
tonyrice
0
130
We Are The Robots
honzajavorek
0
220
Designing for Timeless Needs
cassininazir
0
220
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
550
Are puppies a ranking factor?
jonoalderson
1
3.4k
How to Ace a Technical Interview
jacobian
281
24k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.9k
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