7 ms·
The title of this blog is quite unfortunate imho, it really is an article describing how NOT to switch to VIM and how the author eventually managed to come up w
by JustAGeek 16y ago
The title of this blog is quite unfortunate imho, it really is an article describing how NOT to switch to VIM and how the author eventually managed to come up with a good way of switching.
Good (and as so often, kinda obvious ;) advice.
- phreeza 16y agoI agree. Makes me wonder if the OP would have been chastised for retitling, if he had changed the title to be more reflective of the content.
- wycats 16y agoI thought a bit about how to title this. On the one hand, I'm talking about successfully switching to vim. On the other hand, the thrust of my argument is that I got very bad advice repeatedly over several years on the topic. Apologies if the title wasn't as reflective of the content as I had hoped.
- kashif 16y agoTotally ineffective. May you enjoy your vim days.
- gaiusparx 16y agoAny reason why vim instead of emacs? I use textmate and might give vim/emacs a try again. Quite similar to your old experience.
- nimms 16y agoas a textmate to vim to emacs user, I'd say that vim is to textmate as emacs is to vim. Vim is awesome, but it's still just an editor. Emacs is an operating system that's built around editing text. You start with a powerful editing paradigm and then apply it to pretty much anything you need to do as a programmer...it's about the best editing experience I've ever had. My shell, source control, organiser, messaging, documentation, directory browsing, irc, document viewing etc is all done from within my text editor with all the awesome editing capability that 23 versions brings with it...also you can run vim from within emacs...
- eru 16y agoVim uses a similar paradigm of leveraging an operating system for editing. But it leverages Unix instead of coming up with its own half-baked OS. (Disclaimer: I do use Emacs, mostly.)
- ralph 16y agoExactly. Emacs didn't start on Unix IIRC and seems to prefer to have everything built in. vi was created by Bill Joy on Unix and wanted to work with the rich language of shell commands from the start, as ed(1) did, so it concentrated on editing text well and integrating with Unix well. To see some Emacs users you wonder why they're even bothering to run on Unix. ;-)
- yters 16y agoEmacs has VIPER mode, which uses the Vim keybindings in Emacs. Haven't tried learning the keybindings yet myself, and I've heard VIPER isn't the complete Vim.
- nocman 16y agoIf you want something closer to Vim keybindings in Emacs, try vimpulse: http://www.assembla.com/wiki/show/vimpulse http://www.assembla.com/wiki/show/vimpulse
- technomancy 16y ago> Emacs is an operating system that's built around editing text. It amuses me that people actually think that's just a joke.
- protez 16y agoit's a joke because it's almost true.
- Symmetry 16y agoEmacs is a better IDE than vim, but vim is a better editor than emacs. Emacs is far easier to script and plays nicer with other programs so there are more, more useful extensions for working in various languages. On the other hand, I find vim's modal interface faster and easier on my hands than emac's chording interface. viper-mode in emacs might be ideal.
- neutronicus 16y agoAvid emacs user here. Ergonomics. There's an emacs key chord for everything, but many of them involve two or three modifier keys. i.e. search and replace is Alt+Shift+5, indent block is Ctrl+Alt+\ These require some finger contortions. I haven't used vim, but the impression I get is that similar commands in vim are all closer to home row so you don't have to contort your hands as much.
- psadauskas 16y agoYup. I'm an avid vim user, but I tried emacs for a few weeks, and my hands were always sore. search & replace is % indent is > (auto-indent is =) Emacs seems really neat, and I'd like to try out some other editors, but none of them compare to the ease of vim's modal style.
- narrator 16y agoI use emacs for most of my text editing. I hate using vim because I find all the mode switching to be really annoying. I like how keys always mean one thing in emacs, even if it results in the occasional bit of emacs pinky.
- deleted 16y ago[deleted]
- johngunderman 16y agoYou can always re-map. I use Tab for indent-region, instead of bothering with indent-block.
- dtf 16y agoFor the eight years I've been using vim, I have never known about ci". I feel both stupid and in awe.
- telemachos 16y ago'i' and 'a' (mnemonic: the 'a' grabs all of something (and its white space) as opposed to 'i' which grabs the inner part) as modifiers for 'c', 'd', 'y', and 'v' can be very useful, but I don't see them talked about much in most tutorials. See :help motion.txt - they're in section 6. Text Object Selection. Also, just play around with them a little. For example: <p>This is a tes|t. Do not be alarmed.</p> If that's your text, and the cursor is at the pipe: ciw # remove all of 'test', enter insert mode caw # remove the word 'test' and preceding space, enter insert mode vit # visually select all the text within the <p> tags vat # visually select the whole <p> element
- llimllib 16y agoand diw and daw delete the whole word, gUiw uppercases the whole word, and ... The composability of vim motion commands is what keeps me using it.
- _pi 16y agoHmm for some reason my motions don't work with [ { ( or b/B. I can't seem to find a reason for this. " works though. Edit: seems actual jump selection can be finicky.
- stevelosh 16y agoYou can use other characters too: like ', {, [, (, t (HTML tag). Even better, you can use b instead of ( and B instead of {, because it's easier to type.
- rimantas 16y agoCheck out this: http://blog.interlinked.org/tutorials/vim_tutorial.html http://blog.interlinked.org/tutorials/vim_tutorial.html (text-objects section in particular).
- 16y ago
- Sukotto 16y agoI suggest you consider two rules from journalism: Firstly, that your title should align with the broad story "I like Vim now / Vim is pretty good" as well as the specific story "The usual advice on how to switch is wrong". Your title strongly implies that Vim is not worth learning and that you should ignore people who suggest you try it. Secondly, that you should start with your conclusion and slowly expand on it. This is because you don't know how much of your article any given reader will read before giving up or getting distracted. These are both a non-trivial effort. How do you, for example, convey the entire meaning of the article in the title while still making people want to click and read? How do you hit them with the key argument of your story without building up the foundation?
- SkyMarshal 16y agoFwiw I liked the title. As someone ramping up on vim, it definitely caught my attention, and was cleverly related to the rest of the article.
- confuzatron 16y agoI just saw it as a witty title, rather than an unfortunate one.
- antileet 16y agoAfter about four years of using Vim, I'm starting to see it's more of a paradigm (and almost a philosophy) built into an editor, rather than the editor itself. One thing many people complain about when they switch to Vim is editor's inability to understand their code unless they set up exuberant ctags, etc. Even then, the code completion (omnicomplete, supertab, etc) isn't to the grade of commercial IDEs. It's only in the past few months, I've realized that every major IDE out there - from Visual Studio to Netbeans have plugins to enable vi-mode. Heck, many popular ones like QT Creator, KDevelop, MonoDevelop have Vi mode baked in right into the IDE itself, ensuring a high degree of integration. This gives you the best of all worlds - you get an intelligent, yet efficient editor. A lot of projects exist, like VimWrapper[1], which enable application developers to embed Vim, or to emulate its functionality without excessive efforts and re-implementing the same code again and again. The Netbeans protocol in Vim is still used by editors like Pida to skillfully embed the entire editor, and there are great projects like Eclim, which prove the degree of integration Vim can have with its environment despite the governing policy discouraging interaction with external tools. Personally, I switched to Emacs for two months (or tried) but found that with some tweaking, most of what can be accomplished by Emacs can be done using GVim. I feel, that with a little effort, the vi-emulation in Emacs itself can make for a better generic editing experience than either of the standard editors.