Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
280
Other Decks in Programming
See All in Programming
ゲームの物理 剛体編
fadis
0
340
AIコーディングエージェント(NotebookLM)
kondai24
0
180
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
110
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
430
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
320
認証・認可の基本を学ぼう前編
kouyuume
0
200
チームをチームにするEM
hitode909
0
330
connect-python: convenient protobuf RPC for Python
anuraaga
0
410
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
2
920
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
460
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
How to train your dragon (web standard)
notwaldorf
97
6.4k
RailsConf 2023
tenderlove
30
1.3k
Git: the NoSQL Database
bkeepers
PRO
432
66k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Thoughts on Productivity
jonyablonski
73
5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
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