4 ms·
> Everyone who has used vi(m) has copied and pasted text in while in command mode and done who knows what. If you are using vim, you should play per vim rules
by irahul 14y ago
> Everyone who has used vi(m) has copied and pasted text in while in command mode and done who knows what.
If you are using vim, you should play per vim rules. When you are entering text, you enter insert mode. When you are done, back to command mode. Once you have that mental model, you don't try to c-v(or c-shift-v or whatever) in command mode. Also, if you are willing to try vim, grab a vim build with clipboard support and copy-paste from within vim(=+p paste clipboard, =p paste x selection, =+y{motion} copy to clipboard ... in command mode; or ctrl-r+ paste from clipboard, ctrl-r paste from x selection in insert mode)
> I find the concepts of modes jarring, even antiquated.
The thing I like about vim is translating intent to vim commands - delete 10 lines and then move to the top of the file 10ddG, delete everything inside these parens and put me in insert mode cib etc. Without modes, these won't be as short and sweet. You will be left with long key combinations - the way emacs does it.
> Emacs is better in this regard but I find Emacs's need to consecutive key presses (or a key press followed by a command) to be longwinded.
Isn't that obvious? If you always want to be in insert mode, how else will the special instructions be entered?
> The advantage of either is they're easy to use over ssh+screen (or tmux) for resuming sessions.
And they are very good at editing text, and majority of programming languages, though might require some configuration.
> For statically typed languages (eg Java/C#), IDEs (quite rightly) rule supreme. Static code analysis, auto-completion, etc are just so much better than text-based editors.
I generally am able to find something for Vim which makes language specific stuff easy.
Clojure - http://www.vim.org/scripts/script.php?script_id=2501 http://www.vim.org/scripts/script.php?script_id=2501
Java - http://eclim.org/ http://eclim.org/
Go - https://github.com/nsf/gocode https://github.com/nsf/gocode
C - http://www.vim.org/scripts/script.php?script_id=3302 http://www.vim.org/scripts/script.php?script_id=3302
Python - http://rope.sourceforge.net/ropevim.html http://rope.sourceforge.net/ropevim.html
And a lot more...
> I tend to think the speed differences over not using the mouse are largely illusory.
Doesn't that depend on the task? What will be faster - ctrl-f on this page or clicking edit(or some menu)->find?
Also, for me, it is more about having my fingers on home row is the sweet spot and moving my fingers from my sweet spot is irritating.
- flyinRyan 14y ago>If you are using vim, you should play per vim rules. This issue is that studies show us vim's rules are wrong: modal editing is a source of confusion and error. I used vi[m] exclusively for 8 years or so and until the very last day I could still make major modal based errors.
- irahul 14y ago> This issue is that studies show us vim's rules are wrong: modal editing is a source of confusion and error. The so called studies show people who aren't used to modes are confused when using a modal editor. > I used vi[m] exclusively for 8 years or so and until the very last day I could still make major modal based errors. I have been using vim exclusively for 5 years now. And I stopped making modal based errors after 2 weeks. My anecdote cancels yours? From what I have seen, people who leave vim in insert mode are the ones making mode errors. Insert mode isn't the rest mode for vim, normal mode is. You are bound to make errors when starting because out of habit, your mind assumes insert mode as the rest state.
- flyinRyan 14y ago>The so called studies show people who aren't used to modes are confused when using a modal editor. "Don't listen to this study, listen to my firmly held belief". That's not how this works. If you want to combat a study you need to do so with another one, not by just saying throwing out untested assumptions. >From what I have seen, people who leave vim in insert mode are the ones making mode errors. Insert mode isn't the rest mode for vim, normal mode is. You are bound to make errors when starting because out of habit, your mind assumes insert mode as the rest state. Thanks for the condescension. Have you ever started to type a word and had your hands just finish it for you? Sometimes there will be some relatively large word that I type out commonly enough that when my hands notice the first few letters of it they'll type it out automatically with me having to go back and delete it and type out the similar starting word I meant to write. I even recall having my hands do it again on the correction once. Having this kind of muscle memory is a killer for vi usage. Lots of times I have intentionally left the editor in insert mode for just a second while I grab some text from, say, a website to paste in. What I didn't realize is that my hands knew to always get back to command mode when changing screens so even though my mind had tried to save keystrokes my hands defeated me. The result? Pasted a huge document into command mode. Great. Similar sync issues came up regularly enough that I typically mashed Esc 2-4 times (in case there was, e.g. a command active that would write in the Esc char) rapidly before starting anything to ensure that I was where I thought I was. In my experience, I wouldn't get the time savings I should have been getting due to having to slow down for the mode management.