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
When & why you should stay out of visual mode
Search
nelstrom
January 29, 2013
Programming
1
3.4k
When & why you should stay out of visual mode
nelstrom
January 29, 2013
Tweet
Share
More Decks by nelstrom
See All by nelstrom
Follow my leader
nelstrom
10
2k
Modelling State Machines with Ragel
nelstrom
11
24k
Vimprint - A Vim Keystroke Parser
nelstrom
1
1.1k
Vim - Precision editing at the speed of thought
nelstrom
29
5.5k
This is the problem
nelstrom
1
250
Progressive enhancement - a barrier to progress?
nelstrom
1
610
Other Decks in Programming
See All in Programming
Polars入門
daikikatsuragawa
1
100
Fast JSX: Don't clone props object #28768
yossydev
1
120
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
650
AWS CDKコントリビュートTIPS / aws-cdk-contribution-tips
gotok365
2
200
障害対応を起点としたもっといい開発と運用のサイクル作りのためにできること / Hatena Enginner Seminar #29
polamjag
0
180
Java 22 Overview
kishida
1
180
Ruby GitHub Packages
bkuhlmann
0
630
VS Code をプロダクトにどう取り込むか
onomax
1
370
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
370
Netty Chicago Java User Group 2024-04-17
sullis
0
180
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
170
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
91
13k
The Invisible Customer
myddelton
114
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
Code Review Best Practice
trishagee
55
15k
Atom: Resistance is Futile
akmur
259
25k
A Philosophy of Restraint
colly
197
16k
Gamification - CAS2011
davidbonilla
76
4.6k
Designing for humans not robots
tammielis
248
25k
Creatively Recalculating Your Daily Design Routine
revolveconf
210
11k
Music & Morning Musume
bryan
41
5.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
243
12k
Thoughts on Productivity
jonyablonski
58
3.8k
Transcript
29th January, 2013 Drew Neil WHEN & WHY YOU SHOULD
STAY OUT OF VISUAL MODE
v{motion}{command} VISUAL OPERATIONS (Vim at it’s most user-friendly)
v{motion}{command} VISUAL OPERATIONS (Vim at it’s most user-friendly) v engage
visual mode
v{motion}{command} VISUAL OPERATIONS (Vim at it’s most user-friendly) v engage
visual mode {motion} select the range of text to act upon
v{motion}{command} VISUAL OPERATIONS (Vim at it’s most user-friendly) v engage
visual mode {motion} select the range of text to act upon {command} execute
{command}{motion} NORMAL OPERATIONS (the old-school vi way)
{command}{motion} NORMAL OPERATIONS (the old-school vi way) {command} execute operation
{command}{motion} NORMAL OPERATIONS (the old-school vi way) {command} execute operation
{motion} over the specified range
COMMAND EFFECT HELP {Visual}u Make highlighted text lowercase :help v_u
gu{motion} Make {motion} text lowercase :help gu DOWNCASING
gu it it u v . downcase next 3 characters
downcase inner tag VISUAL OPERATOR OPERATOR- PENDING Vs.
COMMAND EFFECT HELP {Visual}gw Format the highlighted text :help v_gw
gw{motion} Format the lines that {motion} moves over :help gw HARD-WRAPPING
gq ip ip gq v . reformat next 4 lines
reformat inner paragraph VISUAL OPERATOR OPERATOR- PENDING Vs.
FOR REPETITIVE WORK (where dot is your friend) . PREFER
NORMAL OPERATIONS over VISUAL
Operator, the true power of Vim by Kana Natsuno http://whileimautomaton.net/2008/11/vimm3/operator
Practical Vim, Tip 23 Prefer operators to Visual commands where possible http://pragprog.com/book/dnvim/practical-vim FURTHER READING