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
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
160
CSC307 Lecture 01
javiergs
PRO
0
690
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
1
110
Architectural Extensions
denyspoltorak
0
290
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
Data-Centric Kaggle
isax1015
2
780
AI時代の認知負荷との向き合い方
optfit
0
160
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
760
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
52
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Designing for Timeless Needs
cassininazir
0
130
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Unsuck your backbone
ammeep
671
58k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
Faster Mobile Websites
deanohume
310
31k
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