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
3.8k
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Vim London: Custom Motions
An overview of motions and how to create custom motions.
aryoung
January 29, 2013
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
300
Other Decks in Programming
See All in Programming
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
350
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
360
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.8k
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
510
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
200
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
310
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
190
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
460
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.4k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
370
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
1
2.3k
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.3k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
410
Mind Mapping
helmedeiros
PRO
1
280
How STYLIGHT went responsive
nonsquared
100
6.2k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
220
Google's AI Overviews - The New Search
badams
0
1.1k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Automating Front-end Workflow
addyosmani
1370
210k
Bash Introduction
62gerente
615
220k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
970
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
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