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.6k
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
SQLアンチパターン第2版 データベースプログラミングで陥りがちな失敗とその対策 / Intro to SQL Antipatterns 2nd
twada
PRO
38
11k
대규모 트래픽을 처리하는 프론트 개발자의 전략
maryang
0
120
Nuances on Kubernetes - RubyConf Taiwan 2025
envek
0
110
新世界の理解
koriym
0
130
React 使いじゃなくても知っておきたい教養としての React
oukayuka
18
5.4k
GUI操作LLMの最新動向: UI-TARSと関連論文紹介
kfujikawa
0
630
Reactの歴史を振り返る
tutinoko
1
170
No Install CMS戦略 〜 5年先を見据えたフロントエンド開発を考える / no_install_cms
rdlabo
0
470
一人でAIプロダクトを作るための工夫 〜技術選定・開発プロセス編〜 / I want AI to work harder
rkaga
7
1.6k
書き捨てではなく継続開発可能なコードをAIコーディングエージェントで書くために意識していること
shuyakinjo
0
230
プロダクトという一杯を作る - プロダクトチームが味の責任を持つまでの煮込み奮闘記
hiliteeternal
0
430
Understanding Kotlin Multiplatform
l2hyunwoo
0
250
Featured
See All Featured
Designing for Performance
lara
610
69k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
How to Ace a Technical Interview
jacobian
278
23k
How to Think Like a Performance Engineer
csswizardry
25
1.8k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
How STYLIGHT went responsive
nonsquared
100
5.7k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
GraphQLとの向き合い方2022年版
quramy
49
14k
For a Future-Friendly Web
brad_frost
179
9.9k
Agile that works and the tools we love
rasmusluckow
329
21k
The Cost Of JavaScript in 2023
addyosmani
51
8.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
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