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.5k
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
2.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.7k
This is the problem
nelstrom
1
250
Progressive enhancement - a barrier to progress?
nelstrom
1
620
Other Decks in Programming
See All in Programming
昭和の職場からアジャイルの世界へ
kumagoro95
1
400
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
140
PRレビューのお供にDanger
stoticdev
1
200
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
8
1.1k
Open source software: how to live long and go far
gaelvaroquaux
0
650
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
ソフトウェアエンジニアの成長
masuda220
PRO
12
2k
Pulsar2 を雰囲気で使ってみよう
anoken
0
240
楽しく向き合う例外対応
okutsu
0
420
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
570
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
1
350
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
9
1.8k
Featured
See All Featured
For a Future-Friendly Web
brad_frost
176
9.5k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Facilitating Awesome Meetings
lara
52
6.2k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
How to Ace a Technical Interview
jacobian
276
23k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
How GitHub (no longer) Works
holman
314
140k
Speed Design
sergeychernyshev
27
800
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