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
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
280
Other Decks in Programming
See All in Programming
CSC307 Lecture 10
javiergs
PRO
1
660
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
CSC307 Lecture 09
javiergs
PRO
1
840
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
1
110
今から始めるClaude Code超入門
448jp
8
9k
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
dchart: charts from deck markup
ajstarks
3
1k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
140
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
140
2026年 エンジニアリング自己学習法
yumechi
0
140
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
170
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
470k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
GraphQLとの向き合い方2022年版
quramy
50
14k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
330
Site-Speed That Sticks
csswizardry
13
1.1k
Between Models and Reality
mayunak
1
190
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
97
Amusing Abliteration
ianozsvald
0
100
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
190
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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