Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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.6k
Introduction to Node and its Core Modules
aryoung
3
270
Other Decks in Programming
See All in Programming
Google Antigravity and Vibe Coding: Agentic Development Guide
mickey_kubo
2
130
無秩序からの脱却 / Emergence from chaos
nrslib
2
12k
Building AI with AI
inesmontani
PRO
1
470
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
210
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.3k
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.2k
モダンJSフレームワークのビルドプロセス 〜なぜReactは503行、Svelteは12行なのか〜
fuuki12
0
180
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
4
260
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
0
310
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.2k
TVerのWeb内製化 - 開発スピードと品質を両立させるまでの道のり
techtver
PRO
3
1.4k
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
180
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Practical Orchestrator
shlominoach
190
11k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Context Engineering - Making Every Token Count
addyosmani
9
460
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
KATA
mclloyd
PRO
32
15k
4 Signs Your Business is Dying
shpigford
186
22k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
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