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
Don't Prompt Harder, Structure Better
kitasuke
0
780
GitHubCopilotCLIをはじめよう.pdf
htkym
0
200
🦞OpenClaw works with AWS
licux
1
160
Coding as Prompting Since 2025
ragingwind
0
840
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
3
340
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
440
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
170
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
470
10 Tips of AWS ~Gen AI on AWS~
licux
5
420
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
190
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
140
iOS機能開発のAI環境と起きた変化
ryunakayama
0
190
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
320
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
320
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
A Modern Web Designer's Workflow
chriscoyier
698
190k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
770
Thoughts on Productivity
jonyablonski
76
5.1k
Site-Speed That Sticks
csswizardry
13
1.2k
Building Applications with DynamoDB
mza
96
7k
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