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
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
170
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.6k
20260514_its_the_context_window_stupid.pdf
heita
0
970
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
770
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.2k
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.9k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
380
AWSはOSSをどのように 考えているのか?
akihisaikeda
0
120
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
810
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
AIを導入する前にやるべきこと
negima
2
350
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
250
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
170
The Limits of Empathy - UXLibs8
cassininazir
1
330
Tell your own story through comics
letsgokoyo
1
920
Building AI with AI
inesmontani
PRO
1
980
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
BBQ
matthewcrist
89
10k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
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