Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Vim London: Custom Motions
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
310
Other Decks in Programming
See All in Programming
Railsバージョンを4倍にした話
optim
0
840
ActionController meets Protocol Buffers
sorah
1
750
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.9k
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
1.7k
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2k
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
7.1k
JIS keyboard support in Omarchy
lef237
0
170
LLM 101
dalinaum
0
370
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
190
ChromeでローカルLLM
ryu1013
0
180
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
230
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
310
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
380
Utilizing Notion as your number one productivity tool
mfonobong
4
630
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
590
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
How to make the Groovebox
asonas
2
2.5k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
660
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
340
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
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