4 ms·
Ask HN: A better Vim distribution?
I'm trying to change my development workflow. Currently I find myself in graphical editors, writing C++ and I dont feel the workflow is great. Mouse to Keyboard, back again.
Ideally I'd like to end up with split screen editing, left hand file navigation, tabs. Do everything from the keyboard. This is going to take some practice getting used to.
So I downloaded the spf13 vim distro: https://github.com/spf13/spf13-vim
But now I am realizing I need a lot more knowledge to customize it. I cant just hop in and use it. Things like NERDTree persisting across all tabs. Setting up split screen from the start. Tabs.
Where do I find the balance between becoming productive in vim and learning to customize it to actually continuing to code and make progress as I can with my graphical editors?
- facorreia 12y agoI'm making the transition to vim as well. My wish list was similar to yours. But I've decided to adapt my expectations to be a better fit with how vim works. In many editors, a tab and a file are equivalent. In vim, you have buffers (in-memory representations of a file being edited), windows (views on a buffer) and tabs (sets of windows). Since in vim a tab is not a file, trying to make that file-per-tab model work may be possible but seems to lead to several pain points. I'm using the Command-T plugin to navigate the file system (to open files) and to change between opened files (i.e. buffers). I usually work on a single tab, splitting windows when needed, and alternating between buffers with ",b" (Command-T to show current buffers and select one) or "]b" (next buffer). If I need to work in two different window layouts, I can open a separate tab. That is rare, though. Additionally, I'm using the Ag plugin to search in files and the qargs plugin to replace text in the searched files.
- ejstronge 12y agoI think your experience hits on a problem with vim distributions - you're jumping into a solution to someone else's pain points. spf13, which has a lot of great plugins, probably started as someone's personal collection of plugins at some point. As such, the author had a lot of time to muse on what her/his current vim set up was missing. Sharing someone else's vim distribution, you miss out on the motivation behind including things (and also on the opportunity to pick alternatives more suited to your needs). I would start with stock vim and spend a few minutes outlining the features you need. I recommend, as a minimal set, a couple of plugins I think most people are happy about: Vundle [or Pathogen] (two managers for vim plugins hosted on GitHub) https://github.com/gmarik/Vundle.vim https://github.com/gmarik/Vundle.vim [https://github.com/tpope/vim-pathogen https://github.com/tpope/vim-pathogen] Sensible vim (useful defaults for vim) https://github.com/tpope/vim-sensible https://github.com/tpope/vim-sensible Fugitive (make vim aware of your local git repository) https://github.com/tpope/vim-fugitive https://github.com/tpope/vim-fugitive
- jason_slack 12y agoI'll start back to a clean slate and check these out.
- facorreia 12y agoI second that advice. I did just that and built piece by piece, research options and customizing to my preferences. It takes more time and effort, but at least I understand what's going on.
- yasith 12y agoFor C++, I highly recommend getting YouCompleteMe [https://github.com/Valloric/YouCompleteMe https://github.com/Valloric/YouCompleteMe] combined with SuperTab[https://github.com/ervandew/supertab https://github.com/ervandew/supertab]. This will make the transition from IDEs to be easier.
- jason_slack 12y agoThanks. These look great.
- b3b0p 12y agoOn the GitHub page it says YCM obsoletes SuperTab because it has everything and more.