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
aryoung
January 29, 2013
Programming
3.9k
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
Transcript
15 slides
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
More Decks by aryoung
See All by aryoung
Vim and the Web
aryoung
0
7.9k
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
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
5.8k
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
2.1k
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
200
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
330
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
140
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
260
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
180
SODA - FACT BOOK(EN)
sodainc
1
240
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2.1k
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
140
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
160
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
250
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.6k
Why Our Code Smells
bkeepers
PRO
340
58k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
580
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7.1k
ラッコキーワード サービス紹介資料
rakko
5
5.8M
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
Mobile First: as difficult as doing things right
swwweet
225
10k
The SEO identity crisis: Don't let AI make you average
varn
0
630
Bash Introduction
62gerente
615
220k
Designing for Performance
lara
612
70k
Done Done
chrislema
187
17k