3 ms·
I've used vi editors for longer than I remember, I don't remember any of the things I type. They just happen. I'm 30 btw, vi and its arcane "behind the state of
by mitchty 15y ago
I've used vi editors for longer than I remember, I don't remember any of the things I type. They just happen. I'm 30 btw, vi and its arcane "behind the state of the art" interface are only behind if you don't understand the reasons behind the separation. Every single time I login to a ssh server over a slow ssh link, I am imminently thankful I can type and update a file faster than the screen can refresh my changes. One thing for which vi excels at.
Also, don't use :q!, just use ZZ, its quicker.
If you want to learn how to do something vimgolf is a good choice as the goal is to do a task in as few commands as possible.
Think of it as talking to your editor in as minimal a way as possible.
http://vimgolf.com/ http://vimgolf.com/
- losvedir 15y ago> Also, don't use :q!, just use ZZ, its quicker. But ZZ is equivalent to :wq, which is different. If OP finds themself in a text file in vim by accident and started typing a word, they will likely NOT want to save those changes. (Hence OP's :q!, rather than :q.)
- mitchty 15y agoIf you've made changes then yes its not equivalent, keep in mind I NEVER open a file for editing unless I intend to edit. That is what view/more/less are for.
- losvedir 15y agoOh, cool! I didn't know about view, actually... I'd been using vim to poke around in files because I'm familiar with the navigation key commands, and was always keen to make sure not to edit something. But opening as read-only is great!