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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
aryoung
January 29, 2013
Programming
6
3.7k
Vim London: Custom Motions
An overview of motions and how to create custom motions.
aryoung
January 29, 2013
Tweet
Share
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
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
290
Java 21/25 Virtual Threads 소개
debop
0
310
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
350
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
220
AI Assistants for YourAngular Solutions @Angular Graz, March 2026
manfredsteyer
PRO
0
130
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
190
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.2k
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
570
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
710
AI 開発合宿を通して得た学び
niftycorp
PRO
0
180
OTP を自動で入力する裏技
megabitsenmzq
0
130
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
310
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Crafting Experiences
bethany
1
97
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Believing is Seeing
oripsolob
1
99
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Why Our Code Smells
bkeepers
PRO
340
58k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Technical Leadership for Architectural Decision Making
baasie
3
300
How GitHub (no longer) Works
holman
316
150k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
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