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
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
14
7.9k
TipKitTips
ktcryomm
0
150
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
200
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
1
570
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
150
Python’s True Superpower
hynek
0
200
Windows on Ryzen and I
seosoft
0
110
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
550
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
240
Event Storming
hschwentner
3
1.3k
SourceGeneratorのマーカー属性問題について
htkym
0
140
Featured
See All Featured
Mind Mapping
helmedeiros
PRO
1
110
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Code Reviewing Like a Champion
maltzj
528
40k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
350
Building Adaptive Systems
keathley
44
2.9k
The Pragmatic Product Professional
lauravandoore
37
7.2k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
190
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Fireside Chat
paigeccino
42
3.8k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Mobile First: as difficult as doing things right
swwweet
225
10k
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