6 ms·
Mastering Vim in Vim
- louhong 13y agoNice post g! This is going to be really helpful.
- gmccreight2 13y agoThanks Lou! Glad it'll help you.
- jacobparker 13y agoI think it's hard to go wrong with Vim Tutor followed by http://pragprog.com/book/dnvim/practical-vim http://pragprog.com/book/dnvim/practical-vim
- gmccreight2 13y agoThanks for the link, Jacob. I'll have to check out Practical Vim. I notice it says that it has more than 100 Vim tips. I guess I would take those tips and put them into my study deck so that I'd actually be able to remember all of them. ;)
- mkaito 13y agoThat book has been on my wish list for a while. Guess I'm buying it soon.
- aharris88 13y agoI like that!
- msoad 13y agoFor me, a GUI editor is always preferred over Vim. But when I have to use CLI editors, Vim is the best. That's why I will never master in Vim. Because files that I edit most are hosted locally
- gmccreight2 13y agoI suppose it depends what you're coding. For Objective-C I use xCode. For Android I use Android Studio. They provide many key affordances because they are tuned to their particular use cases. However, if I'm writing in shell, Ruby, JavaScript, or any other oddball language without a purpose-built IDE, a well-tuned Vim setup, and extensive familiarity with how to use it, works wonders.
- TimJRobinson 13y agoThere's a plugin called 'ideavim' for android studio (and all jetbrains editors). I use it in webstorm and intellij and it works great, gives you the best of both worlds.
- sghodas 13y agoThere's a plugin called XVim for Xcode that provides the best of both worlds IMO. https://github.com/JugglerShu/XVim https://github.com/JugglerShu/XVim
- blablabla123 13y agoUsed to be the same with me. Then I got a Mac and realized that some keys are missing. My goal was then to learn how to do the stuff that I commonly do in GUI editors: edit multiple files at the same time, copy&paste code around, navigate through the file system conveniently... Googling for these things took some time but now I'm pretty fluent in vim. Also I like the workflow having vim open and then ^Z into the command line to run unit tests.
- mbrameld 13y agoEven better than ^Z to run tests is temporarily mapping a key combination to run them. For instance, I'll do :map ,t :w\|!rspec<CR> which lets me type ,t in command mode to save the file and run the tests. Vim will show you the output of your command and then wait for you to press a key to return to Vim.
- 13y ago
- eroullit 13y agoFor Vim mastering outside of Vim, I have found this quite pleasant: http://vim-adventures.com/ http://vim-adventures.com/
- rbatty 13y agoI love the idea and execution of this simply because I find making myself practice vim commands to be the hardest part of learning vim, but $25 for a 6 month limited license? I'm all about game developers getting paid for their work, but that seems crazy overpriced to me & really turned me off of the whole project.
- germano 13y agoIf you consider the price in terms of the utility you'll get out of it I think that's a reasonable price. This book[1] is recommended up the page and that's $23 minimum. [1]: http://pragprog.com/book/dnvim/practical-vim http://pragprog.com/book/dnvim/practical-vim
- rbatty 13y agoRight, but you get to keep the book, not give it back after 6 months.
- lightblade 13y agoCan someone explain the last panel in the comic? Where emacs gets a spiral?
- ancarda 13y agoIt looks like Debian's logo: https://www.debian.org/ https://www.debian.org/ -- but I'm not sure if it's trying to imply emacs is impossible to learn or something.
- ambiate 13y agoEmacs uses lisp and loads of recursive functions. I imagine the spiral has something to do with recursion.
- mkhattab 13y agoI imagine the spiral symbolizes the point past which a person becomes proficient enough to write Elisp easily. The person then realizes the infinite malleability of Emacs and begins customizing it endlessly.
- synotic 13y agoI learned the most with VimGolf (http://vimgolf.com/ http://vimgolf.com/). It's also pretty fun.
- scelerat 13y agoAre there any other modal text editors in wide use? All others I can think of have you strongly in one mode (insertion, typing) and you only drop out of it if you hold down a command key (Control, or pull down a menu, etc.). Before GUIs it was a lot more common to have 'entry mode' and command mode in your text editor/word processor, but vim is the only one I know of now where 'insert' is merely one mode, and by default you're in a movement/command mode. Not saying it's bad; I spend most of my day in vim and wouldn't have it any other way.
- pydave 13y agoemacs + evil? Aside from vi-emulation, I haven't seen many editors that heavily use modal editing.
- X4 13y agoMost of the commands are suited for a en_US keyboard only, do you know a .vimrc that is optimized for a de_DE keyboard?
- darklajid 13y agoI'm serious: Are you really comfortable with that layout? I mean, most programmin related symbols are hard to reach in my world.. I'm on en_US just because of that.
- b3n 13y agoWhich commands are you having trouble with? I'm using the Colemak keyboard layout and have no problems.
- X4 13y ago[ ] { } and / are harder to reach on de_DE than on en_US. I once learned the en_US layout, but after that I had problems with de_DE and when I visited Paris, I also had trouble with fr_FR, altouhgh I knew azerty and qwertz quite well. I have never ever heard about Colemak. I use Gentoo with the KDE destop, btw.
- reirob 13y agoI learned en_US and tossed the other keyboard layouts that I had to learn before (German qwertz and later French azerty). It was really worth it! It was difficult for 3 weeks. On Linux I use the US International AltGr Dead Keys layout, which I find very suitable because it allows me to write all the German, French and Turkish characters by composing accents on them. On Windows this layout does not exist (but the simple US which is backward compatible for all ASCII characters is there) so I had to find it on the net and install it manually. The rational is, that in almost all non-English countries the US keyboard layout is available and you can really quickly change to it (on windows it is LeftShift+LeftAlt) if you have to touch the keyboards of your colleagues. The pre-requisite is to be able to type blindly. I took this decision when I had to work in different countries. It was a life changing experience. If I knew it before I would never have learned azerty when I moved to France. One problem though is to get computers with the US layout. In this regards Lenovo seems to be the only one that lets you chose the US layout.
- ivanca 13y agoIn sublime text you open the command panel[0] (ctrl+shift+p) and it reminds you of the key shortcuts for any given command, and you can fuzzy search the name of the command. I use modifier keys but you can use 'Vintage mode' if you want a vim-like command mode. [0](http://i.imgur.com/oFlB8Br.png http://i.imgur.com/oFlB8Br.png)