This is a companion discussion topic for the original entry at https://thoughtbot.com/upcase/videos/vim-to-config-or-not-to-config
@christoomey, I still donāt use it because itās terribly slow to run RSpec, but I have been fairly impressed by the vim-mode implementation in Githubās Atom editor. I havenāt had trouble moving around and editing text the couple times I gave it a try.
Iāll certainly agree that Vim emulation seems to be improving as the years go on. Recently Iāve been very impressed by wasavi which is a āVi editor for any web pageā.
None the less, I still find that all emulations fall short at some point and thus I stick with Vim. Modal editing is hard thing to nail when itās not the primary feature.
Switching to vim took me months to learn it, and another few months to learn how to configure it well. Now, I canāt use any other editors. I would love to watch a live demo of how thoughtbot developers pair program with vim and tmux working on a project.
Please note that the link to Vim Dispatch from the Notes section of the video points elsewhere (actually goes to vim-rspec) so youād maybe want to fix that.
Great video as always. I have a question regarding debugging. At the moment Iām using pry with a abbreviation command to put a break point and then as Iām using Vim-Conque for using an interactive shell then I can just go ahead and use the navigations commands in pry. The thing is that most of the time that script is a little bit buggy and normally I go to a terminal and do the debugging there. So I was wondering how do you setup vim to do such thing.
Thanks in advance,
Good to know, I have yet to switch to VIM at work, but only using it for my small projects and koans. I plan to completely switch during the holiday break. I feel like I can navigate single files well, just donāt know some of the key workflow shortcuts, like command p
was new for me when I watch this video.
I am unfortunately the :e .
people, but not anymore
Tim Popeās vim-unimpaired and vim-vinegar are also really useful for jumping around files. You can use unimpairedās [f
and ]f
to jump to adjacent files in the same folder (useful if youāre trying to move sequentially through a folder.
vinegar maps the minus key to jump out to a file view of the folder of the file youāre currently looking at which can be useful if youāre source-diving and want to get the lay of the land.
Oh great I didnāt realise there were those [f and ]f mappings! Guess I should read the documentation.
I never found movement in vim overly difficult. I wonder if my initial comfort came from being a pc gamer (mostly shooters) where a lot of movement is done with the āwasdā keys on the keyboad?
The docs on Tim Popeās plugins are generally very good. I had the keystroke guide from vim-unimpaired as a cheat sheet above my desk for three months. There are some other great ones like jumping through merge conflicts that I also love to use.
I am 2 weeks into now and find myself always adding new things to my .vimrc to improve my workflow. What are some other plugins people are using that they canāt live without?
@brianllamar, a few Iāve started using recently that I really like:
- bogado/file-line lets you append a line number to the end of a file to open directly to there. Nice if you run a spec or analysis tool and want to jump right to the problem.
-
jgdavey/vim-blockle easy toggling of Ruby
{ }
anddo end
blocks, it moves from single-line to multiline really nicely. I have this mapped to a leader. - gorodinskiy/vim-coloresque highlights CSS colors in your files so you can see them easily. Results may vary
- kristijanhusak/vim-multiple-cursors This plugin is a fork of a popular plugin that has not been maintained recently, it seems to work a bit better. Lets you select multiple places in ways that would be hard in visual mode and then edit them in place using normal/insert mode rather than the command line substitution
- othree/eregex.vim has a handle command and toggle to switch between using Vim-style and Ruby/Perl-style regular expressions for search in a way that doesnāt seem to break other plugins and macros. One of my things to work on is to do more substitution rather than editing more than one thing, and using Ruby-ish regex helps me just worry about learning one thing rather than struggling with Vimās odd regex and thinking about how to phrase my substitution.
Hope this helps! Interested in what plugins other folks are using. I just did a winter cleaning and culled the plugins I had that werenāt getting much use.
I love dash.vim paired with dash app. I have it configured to look up documentation for the method under my cursor. Itās great for keeping me from context switching. Ultisnips is great for text expansion and I use vundle to install all my plugins.
Check out the sites usevim.com and vimawesome.com.