10 ms·
Vim as you IDE
- Legion 14y agoI think it's a Vim rite of passage to write these posts. Just reading this one now makes me want to write my own, even though I know everyone has seen them a million times and has little interest in my Vim special flower.
- s00pcan 14y agoWould anyone be interested in a writeup of my setup? Arch Linux + xmonad + tmux + urxvt + zsh + vim. No desktop environment, just a setup optimized for reliable web development. I've been building this setup from scratch at work and at home for the past year, so I've got most of the minor annoyances figured out.
- dllthomas 14y agoI'd be mildly interested; Debian + ratpoison + screen + urxvt + vim, here, so there's bound to be similarities but differences might also be enlightening.
- tammer 14y agoI use precisely the same setup, and love it. Full control over every tool in the whole chain. I'd add one more that I find essential: Pentadactyl. Without it, the context switch when using a browser really disrupts the flow.
- s00pcan 14y agoI use Chromium + Vimium, which makes my entire workflow possible from the keyboard when doing backend development. I somehow managed to go a full productive day at work without touching my mouse (except to move it out of the way at the start of the day) while working on a drag-and-drop feature. Since you're using the same setup, do you have a dotfiles repo so I can take a look? Mine is kind of messed up at the moment, but here's an old revision with everything: https://github.com/chris-ritsen/dotfiles/tree/113442a72ddacb2ee89dc5c408c1b610eb7bfeaf https://github.com/chris-ritsen/dotfiles/tree/113442a72ddacb...
- haridas 14y agoI was using Vimperator for a while, but it didn't give good experience, My chrome has also its vim plugin but it has slightly different key map, because of that I stopped using vim plugin on both browsers. I surely want to try out the new vim plugin Pentadactyl for firefox.
- evoxed 14y agoI'm doing primarily web dev at the moment after a loooong err, "sabbatical", just started using vim, and waiting for my drive to come so I can finally have a stable Arch boot. So yes, I'd be very interested!
- deleted 14y ago[deleted]
- s00pcan 14y agodotfiles (old): https://github.com/chris-ritsen/dotfiles/tree/113442a72ddacb2ee89dc5c408c1b610eb7bfeaf https://github.com/chris-ritsen/dotfiles/tree/113442a72ddacb... photos: http://s00pcan.com/~chris/dev.png http://s00pcan.com/~chris/dev.png http://s00pcan.com/~chris/2012-07-12_23-01-53_856.jpg http://s00pcan.com/~chris/2012-07-12_23-01-53_856.jpg
- nuttendorfer 14y agoPlease don't use shorteners, use the actual URL. Edit: He has changed them.
- donniezazen 14y agoWhat are you running on your tablet?
- s00pcan 14y agodonniezazen: I got home with my ipad and immediately bought issh to try out this setup: http://yieldthought.com/post/12239282034/swapped-my-macbook-for-an-ipad http://yieldthought.com/post/12239282034/swapped-my-macbook-... It was disappointingly terrible.
- chrizel 14y agoHow well does Arch run on the MacBook Air? Looks like a great setup, would be interested in more info about it too.
- frou_dh 14y agoI'd love to see that. I'm a fan of tiling windows and a custom Arch setup is my escape plan if OS X goes off the rails.
- mkmkmmmmm 14y agoActually I feel the same as you, except I'd say it's already off.
- frou_dh 14y agoMy main annoyances are the monkeying around with both the traditional process lifecycle for GUI apps, and the saving/loading of documents. I gather there has been some refinement of these (or at least more options) in 10.8, which I'll try a couple of point-releases in. http://arstechnica.com/apple/2012/07/os-x-10-8/18/#automatic-termination http://arstechnica.com/apple/2012/07/os-x-10-8/18/#automatic... http://arstechnica.com/apple/2012/07/os-x-10-8/5/#document-model http://arstechnica.com/apple/2012/07/os-x-10-8/5/#document-m...
- mkmkmmmmm 14y agoThere's that, and also monkeying about with the trackpad (reverse scroll is okay, three-finger drag is very awkward for me), as well as hiding the Library folder, forcing use of the App Store to get Xcode, Xcode constantly crashing... I feel like I'm not part of the target market anymore.
- haridas 14y agoThat's interesting setup. Waiting to see how it looks like.
- jcurbo 14y agoInterested as well. debian + awesome + vim + urxvt and I am always looking for more ways to make it better.
- haridas 14y agoI'm using Debian + KDE + vim + konsole. I love KDE Konsole.
- donniezazen 14y agoArch + DWM + URXVT + VIM here and love it. Tiling WM are so convenient. I am a little too apprehensive using Xmonad, dont have enough time to mess with haskell.
- tygorius 14y agoI'm using the same setup except xmonad instead of dwm. Aside from installing GHC as a dependency, I've have no need to mess with Haskell to use xmonad. And unless you're doing something crazy/brilliant with dwm, I'd doubt you'd need to hit the Haskell books either. I used to prefer Awesome in part for the tweak-it-while-it's-running appeal of Lua configuration, although I rarely used it. Now xmonad has the same runtime configurability via GHC, with recompilation taking a second at most.
- jentulman 14y agoYes, very much. I'm deving with Eclipse on OS X, but have been wanting to move away from Apple/OS X since Lion appeared and a linux xmonad setup seems intriguing so have been reading up on similar things and every extra helps.
- navs 14y agoFunnily enough that is exactly what I did after the release of Snow Leopard. I came to really enjoy using Arch Linux with wmii, vim and dwb. But a kernel panic later I'm back to OSX, for the time being.
- uggedal 14y agoSounds similar to my setup: Arch Linux, monsterwm, dwb, urxvt, zsh, tmux, vim. All managed with salt[1] and keeping dotfiles in git[2]. [1]: http://github.com/uggedal/states http://github.com/uggedal/states [2]: http://github.com/uggedal/dotfiles http://github.com/uggedal/dotfiles
- achompas 14y agoYes please! I'd like to take the dive into Arch Linux at some point, this kind of post would be super helpful.
- o1iver 14y agoExactly my setup :) Although, since xmonad I don't use tmux that much anymore!
- david_shaw 14y agoFirst off, I'm sure that with the (recent?) surge in "check out my super efficient setup" posts, a write up of your config would be fairly well received. The real reason I'm responding is to throw in my $0.02 that for those that want an easy and efficient tiling window manager setup, but don't want to go through the relative pain of xmonad, `awesome` is a great substitute. I've used it for years now, and although my office hardware changed from an old-ish ArchLinux box to a Macbook Pro, I'm still an avid fan of tiling WM's. Even on OS X, the first app I install is always 'DoublePane' to mimic the functionality. [1] As efficient as vim shortcuts can make you while banging out code, I am a firm believer that most window managers are absolutely and completely inefficient. Most people whom I convince to give a tiling, scriptable WM a try never look back. It's vim efficiency for everything you do! [1] I'm not affiliated with DoublePane in any way, and there are alternatives out there. That said, for $1.99 (last I checked), it does an incredible job of increasing my efficiency on my Mac.
- weaksauce 14y agoIf you like DoublePane you might like size-up better. I use that and cinch but I am considering a switch to Moom. It has even more interesting features and combines the size-up features with cinch.
- david_shaw 14y agoI'll check those out now -- thanks! :)
- nilium 14y agoI've actually been looking for something like this, and Moom seems to do the trick. It's got some nice customization, so I can at least set my own shortcuts for different areas of the screen. It works really well since I don't like straight 50/50 screen splits (I prefer a sort of pseudo-golden ratio layout -- Moom can't do it precisely, but it's close enough). Pretty good use of $10, I think, unless I suddenly need that $10 for an emergency, like beer or coffee or a raw turkey. So, thanks, even if I'm stuck without a supply of raw turkey for a week.
- 14y ago
- w1ntermute 14y agoArch + xmonad + Screen + urxvt + Bash + Vim here, though I've found my use of Screen has dropped significantly since switching from KDE to xmonad, because the tiling is done right in the WM. I've got certificate-based login and Bash aliases set up for all my frequently accessed servers, so it's easy to open new terminals. The only real need for Screen is for stuff that needs to be persistent, but I try to avoid using persistency whenever possible, because it would just lead to me opening 100+ terminals in a Screen session, much like I do in Firefox (also not a good thing, but I haven't found a solution yet).
- dkersten 14y agoArch + goomwwm + urxvt + bash + vim for me. I stopped using screen/tmux on my local machine (still use tmux on servers though) in favour of 1) keeping all my text editing in a single vim session using buffers/tabs/splits - this way I can use the standard vim commands (yank, etc) to copy and paste between files, and 2) multiple urxvt instances as goomwwm makes managing them just as simple as if I were using screen/tmux. I also started to use uzbl as my browser. Maybe one day I can throw my mouse away :)
- w1ntermute 14y agoI'd love to use uzbl, but unfortunately there's no LastPass support (apart from some bookmarklets that can provide basic functionality). So I've stuck with Firefox but have installed Pentadactyl, which adds Vim emulation support. It gets me close enough to avoiding mouse use as I think I'll ever get.
- prpatel 14y agoHAH, vim looks more and more like emacs :)
- rit 14y agoAs I recall, that was always the idea behind Vim. To bring the power and flexibility the author appreciated in EMACS to the style and interface of Vi. There's value to be found in taking the best of multiple worlds into one product. I for example, cut my teeth on Bill Joy VI, and the keystrokes are burned permanently and naturally into my brain. I love the extra stuff that Vim gives me, because it is a natural extension of that toolset that I started with.
- mhd 14y agoWell, you've got to use your memory above the first 640K for something.
- insertnickname 14y agoI'm sure the article is interesting, but the writing is awful.
- haridas 14y agoThanks for the feed back. Actually I'm not good at explaining things,Sorry that's not an excuse. I'm always trying to improve my language and presentation skill.
- jufo 14y agoIt's a great article. Assuming English isn't your first language, I think @insertnickname is being unfair.
- haridas 14y agoI feel happy about that. I want to know how I performing :).
- insertnickname 14y agoYou're right. I have apologized to OP.
- insertnickname 14y agoI hope you're not misinterpreting my criticism. I didn't mean to humiliate you or make fun of you, I was just trying to let you know that you should improve your writing skills. I am not a great writer, but I do try to do my best and I am sure you do the best you can too. If I was too harsh in my original comment – which it now seems that I was – I apologize.
- haridas 14y agoNo problem man. I understood that. :)
- tspiteri 14y agoMany times, improvements come from just iterating over the text and rewriting parts of it. Native speakers will need less iterations, and very few people can write really well the first time round.
- saryant 14y agoI've been content with the Janus[1] extensions for about a year now but I just added MiniBufExplorer and I'm really enjoying that. I typically keep three panes open, one of which is NERDTree. Right now my biggest gripe is the strange highlighting of the Play! framework's template files. The files are name.scala.html which results in weird highlighting of the inline Scala. I have yet to find a good solution (admittedly I haven't looked in a while) to this but if someone knows of one I'd love to hear it. [1] https://github.com/carlhuda/janus https://github.com/carlhuda/janus
- haridas 14y agoI hope this would be helpful to you - https://github.com/sjl https://github.com/sjl
- drivebyacct2 14y agoOr I can use a text editor like TM2 or ST2 and turn on vim bindings and get 80% of the way there (that's a generous 20% for all of the vim hotkeys that don't work in the emulated modes).
- bcrescimanno 14y agoWhat I've found with "vim modes" is that I get the wrong 80%. It's really about how you approach development; in my world, it's very editing-centric. For others, it's tool-centric. If I can get 100% of the editing environment I want with 80% of the tools I want, I'm happier than I would be with your suggestion which would be reversed.
- mhd 14y agoOr you can use a few plugins to get 80% of the "missing" features of something like TM2/ST2. Especially if terminal/cross-platform support is an issue. Whatever floats your boat, any half-way decent expandable editor should be able to emulate other editors features with some effort. Corollary: Whatever you do, there still will be some rabid CygnusEd fan complaining.
- Legion 14y ago80%? Every attempt I make to use a Vim emulation mode doesn't get 20 seconds without failing to replicate Vim behavior on even fairly basic things.
- weaksauce 14y agoWhat features do they fail on typically? Have you tried Xvim? It's far from perfect(still alpha) but it's got a lot going for it. It turns out Vim has a lot of features and it takes a while to get to a polished state.
- Derbasti 14y agoThen check out Evil for Emacs and ViEmu for Visual Studio. ViEmu even supports something like nnoremap in its .viemurc. Case in point: My first introduction to Vim was through ViEmu.
- njharman 14y agoIf you're using a language that (practically) requires an IDE, or, you really want what the modern idea of IDE is. You probably want to look elsewhere. That, or grok that Unix is the IDE. Vim is just the editor component.
- haridas 14y agoYou are absolutely correct. I started to use Vim as main editor (Around 6 Month) only after realizing the easiness of its command based editing, not looking after its plugins. I tried to explain that in the blog summary portion. Then why we need all those plugins ?. It just add extra features, who don't like it ?
- mhd 14y agoThere's plenty of middle ground to stand on. By choosing vim alone, you already deviated from Unix purism (rabid Unix purists aren't that happy with bog-standard vi, either). Saving round-trips to she shell ain't necessarily evil. Separate unix tools are great, but e.g. presenting info in the editor is quite helpful. Ctags does your parsing, but you can display it with tagbar. Language-specific tools do linting, but you can display it in the editor with syntastic…
- thedeuce 14y agoI've switched FROM vim and all this crap to real IDE's and the productivity is much greater.
- googletron 14y agothis post might be interesting to some looking into zsh + vim + tmux http://www.mahdiyusuf.com/post/24784023641/beautiful-tools http://www.mahdiyusuf.com/post/24784023641/beautiful-tools
- haridas 14y agoI tried zsh for a while after seeing its colorful features. But IMHO it lacks command rendering and auto complete speed compared to bash.
- 3amOpsGuy 14y agoOver the years I seem to have gone full circle with Vim. These days I lean towards few or even no plugins - snipmate is the last plugin i'm struggling to eliminate. This is more than likely a factor of my environment though. I'm frequently using Vim "away from home" so to speak. Best approach for this i've found so far is to set a $VIMINIT on remote login (i.e. an admittedly clunky combination of SendEnv set for Host * in ~/.ssh/config). Still on the lookout for a better way though.
- SeanDav 14y agoI have been so spoiled. I have never been much of a Microsoft fan (except for Excel, best software ever) but have done most of my development in C, C++, C# using Microsoft IDE's which as everyone knows are pretty much the dogs bollocks. I do Java development using Eclipse. Always wanted to know what to use as a general purpose IDE that is ideally cross platform and was looking for opinions on whether these VIM layouts might be suitable?
- mkmkmmmmm 14y agoI've found vim is the finest code editor I've ever used, but it's a crap IDE in terms of organizing a project, compiling, and debugging all from one software. Disclaimer A: I haven't spent a ton of time trying to make it an IDE, and B: I have the misfortune ;) of being an iPhone dev, and only Xcode plays nice with the devices and simulator. If anyone can prove me wrong, please, please, please do so, because vim is just awesome for editing code.
- terhechte 14y agoNot entirely true. Appcode, an alternative IDE, also works fine with development on devices and the simulator. I haven't heard of an open source plugin to do this yet, though. So no way to do that for vim. (There's a vim plugin for app code though, it's not perfect but ok).
- mkmkmmmmm 14y agoAh; I tried Appcode and hated it too much to get to debugging, but it is nice that someone's figured out how to interoperate.
- sea6ear 14y agoHonestly, for an IDE replacement rather than just an editor, I'd suggest Emacs rather than Vim. Reasons: * Emacs plays well with other programs, you can start other shells, language interpreters etc, from within Emacs and interact with them easily. There are some Vim plugins that try to enable this but I've always found them less satisfying. * Emacs is usable in all the same scenarios as Vim (i.e. cross-platform, over ssh, dual GUI/Terminal ability, screen/tmux/dvtm compatible etc) Random Thoughts: Vim is an amazing editor but I've always found that these attempts to add features to make it into an IDE cause it to start to feel clunky. Emacs on the other hand, plugins generally work well (except when they don't). Vim (or at least vi) is installed on basically every Unix install (and available for install everywhere). Emacs is installable everywhere also but setup generally takes a bit longer. If you are going to use Emacs and you are intrigued by Vim style keybindings, I've found Emacs Evil-mode to be one of the best Vim emulation packages that I've tried (most Vim emulation packages will eventually cause frustration - Evil mostly doesn't). I find that I use Vim more when I'm switching between a lot of different computers, and Emacs when I'm mostly developing on one stable computer setup. So my workflow in a particular environment is usually, first install Vim so I can get work done, and as I use the environment more I'll end up installing Emacs and gradually switching over to it.
- ww520 14y agoShouldn't it be VIM + Shell as your IDE?
- haridas 14y agoHmm... That make sense. But the title should be a simple one.
- pimentel 14y agoI didn't get how to get syntastic to check PEP8 compliance. I have it along with pyflakes, and never seen such an error (I don't believe I'm that PEP8 compliant myself) EDIT: oh, nevermind, just needed pip's flake8 package
- mkramlich 14y agoI don't read tutorials written by people with bad English. Life's too short, and too many better alternatives already exist.
- state 14y agoI agree, but also find it hilarious that this title is on the front page.
- petercooper 14y agoYou'd almost think the mods on HN were more interested in screwing up useful titles than fixing ones that are actually broken.
- dpritchett 14y agoI like to tell myself it's a principled protest rather than heartless moderation. http://en.wikipedia.org/wiki/Work-to-rule http://en.wikipedia.org/wiki/Work-to-rule
- haridas 14y agoHa.. ha.. Actually I missed the 'r' while posting it on HN and I noticed it after an hour. No way to change the title. I tried to proof read my article to make it correct as much as possible.
- daviddaviddavid 14y ago"too many better alternatives already exist" This is utterly false. In academia you will find numerous peer-reviewed journals which have high percentages of non-native English speaking authors. You'd probably find many articles in such journals to contain "bad English". But they're often doing totally original research and so, no, better alternatives don't exist. We live in an era where English is the de-facto language of the internet and some of the most brilliant people aren't native speakers of English and so might be considered to have "bad English". Not reading their work seems like a perfect way to miss out on learning things you might not otherwise learn.
- Derbasti 14y agoFunny. I was at more or less that point about two years ago. My desire for more of that lead down a slippery slope that ended in Emacs. And for some reason I am now coming full circle and realize that I don't actually require a lot of these plugins any more. I'm still trying to figure out why I feel that way.
- jcaimbridge 14y agoI love vim and I've used it for many years, but for programming I've found the "code understanding" features of an IDE to be as valuable as the dexterity that vim allows in terms of input and navigation. I do not simply mean syntax checking--a baseline in my opinion, but more of things like inheritance hierarchy navigation, refactoring of code (e.g. renaming all instances of a particular local variable, a particular function, etc etc, without the risk of a simple text substitution), mark occurrences (showing all of the reads and/or writes of a particular the variable under the cursor in all views), and so on. It is even better if your IDE can run parts of the compiler on the fly (an instructor once told me that eclipse does this with java. However, I'm not sure if it's feasible for something like C++ due to the complexity of the language). And then you have all of the other features of the IDE at your fingertips too (e.g. an integrated debugger or profiler). A few years ago I searched high and low for something satisfactory that combines the text editing/navigation of vim with the extremely useful features of an IDE. The closest thing I could find for C++ was Netbeans combined with the jVi plugin. The VIM functionality provided by such a setup is not too barebones, and the IDE fills in the gaps where other VIM plugins may have been used. There may be something better now, but I've grown accustomed to this setup and it takes a substantial amount of time and effort to reroll. There is also Eclipse CDT and the "eclim" plugin for it (which actually uses an existing vim process. Since this means that all of the other vim functionality and vim plugins work in tandem with the IDE, this is the ideal setup), but I recall that there was much lacking with both Eclipse CDT and "eclim" itself (I do not recall exactly what, but, again, this was a few years ago). Things may be different now and I encourage anyone looking for something similar to take a peek at both Netbeans with the jVi plugin and Eclipse CDT with the eclim plugin.
- spullara 14y agoIf your IDE doesn't do isomorphic refactorings reliably it is really just an editor.
- kamaal 14y agoWhen will be the day when this sort of a thing gets shipped with the default vim installation? The reasons I say this is every time somebody brings up the apparent ancientness of vim/emacs people point to something like this. I agree that all this is doable, but you must realize tailoring a vanilla installation with plugins to do all this is really difficult for most programmers. Especially if you want newbies to start with using vim. If people wanted to use an IDE, they would use an IDE- There are plenty available these days. All it takes is going to go to the eclipse website, and downloading one. Why in the world would any body spend hours(days?) hunting all these basic plugins which are must have for today's software development needs? Somethings like auto complete in ST2 looks to just give what the user wants. In vim you would be doomed press ctrl-n as and when you need it, but it happens automatically with ST2.All these modern GUI based editors are basically these many tiny optimization on old concepts .There is also that file browser that gets opened by default on the left hand side. The minimap on the right hand side. The search functionality using ctrl-p. These are few tiny yet useful automations that should ship with vim/emacs by default. I see no reason why they shouldn't. Apart from trying to sell themselves as endlessly customizable editors, they must also do many of tiny day to day needs by default. Things like package managers, a proper good looking GUI et al are must have things in any software tool these days. Arcane 80's style GUI, default tooling support for software development needs going two decades back is not going to fly.
- darkandbrooding 14y agoI guess I'd fall into the "Unix as an IDE" camp, so I'm glad that by default Vim is "just" an editor. I think it's great fun to see how people have tricked out their Vim installations, but I confess I view those custom Vim setups kind of like I do tricked out hot rods, or Burning Man art installations. I hope people never stop producing arbitrarily complex Vim installations, because software can be art.
- nfm 14y agoI respectfully disagree. Choosing to use a graphical IDE or a terminal based editor is a matter of personal preference; it's foolish to proclaim one or the other as universally superior. There are pros and cons to each, and they are fundamentally different in many ways. Yes, vim is old, but it's not a web browser - it's for manipulating text (or in our case, code), the process of which has changed little in the last 30 years. Before writing vim off, pair program with someone who is masterful at it and you'll see some if its many pros first hand. Yes, this may take (quite literally) years of use and customization to achieve, but no, it's certainly not something you can write off as obsolete or inferior.
- kayoone 14y agoEverytime someone writes a post about vim we see these editor wars emerge again and there seems no real solution, as it is mostly "use what works best for you". There are amazing software engineers using vim, and others using Eclipse with Java on Windows like notch or Visual Studio like John Carmack. Use whats you feel comfortable with. Personally i like the simplicity of vim for editing taks, i could see me writing javascript or any other scripting language with it. But for complex software i definately would miss the abilities of modern IDEs, be it only for refactoring.
- jacobr 14y agoI really would like ctags to work well with JavaScript, but I'm using require.js and Exuberant ctags really doesn't like that.