| I recently "declared vim bankruptcy" and rebuilt my vimrc from scratch. I want a full-featured vim, but I want to keep it responsive. There are many fancy presets out there
https://github.com/skwp/dotfiles
https://github.com/carlhuda/janus
https://github.com/spf13/spf13-vim
https://github.com/vgod/vimrc
but they freak me out. They turn vim into a singing, dancing, syntax/spell checking, indexing, buffer Whack-a-mole. My philosophy is that vim shouldn't do anything behind your back, but it should do great things if you ask. * Jumping to definitions
* Finding all uses of a symbol in a repo
* Running things
+ A test
+ Code in a repl
* Git blame, diff
* Summarizing methods in open file
* Navigating my (rails) app
When putting this together, I found Vundle to be the easiest package manager. Just specify any desired vim plugin github repos in your vimrc and let the :BundleInstall, :BundleClean etc commands do the rest.I used the standard plugins for most of the stated objectives, but there are places where I found some tricks. The coolest trick is running external programs without locking vim. You can send commands and selections to a tmux terminal using Vimux:
https://github.com/benmills/vimux
After wrangling with running vim under tmux, I discovered that the vimux plugin works in MacVim too when tmux is running alongside. The thing I run most often is tests. In Rubyland people advise using Guard, which runs tests automatically when test files change. However this goes against my "don't do things behind my back" philosophy. Vim-turbux is more my taste. It extends vimux to run cucumber and rspec tests with the press of a key: https://github.com/jgdavey/vim-turbux The next area where most megadotfile presets are lacking is finding the uses of code. Finding code definition is pretty well handled by exuberant-ctags and vim-rails, but finding code uses is trickier. The cscope utility does this, but its language support is limited from what I could tell. Another contender is GNU global. Its setup is...interesting:
http://simple-and-basic.com/2008/10/using-rtags-ang-gtags-fo...
I couldn't get it working and the GTAGS files it generates cluttered my repos. I cheated and just mapped a key to do :Ggrep (git-fugitive) on the current word. While cscope or global would give the finest results, a massive grep comes close. Let me know, anyone, if you've gotten the tagging systems working better. My work in progress is here:
https://github.com/begriffs/dotfiles
I'd appreciate any criticism; I have lots to learn. |