

Vim: From Essentials to Mastery - mace
http://billodom.com/vim/vim-from-essentials-to-mastery-2011.pdf

======
nathansobo
I want to use Vim, but there are a few specific limitations I can't get past,
in order of importance:

NerdTree is hard to use. Other editors I've used (TextMate, IntelliJ,
RubyMine) have a simple "project drawer" that doesn't think it's a text
buffer. That doesn't accidentally get replaced with the contents of a file or
accidentally closed. What am I missing here?

Project-wide find and replace isn't nice. Vim is great at single file
replacements, but it's not clear to me how to do a project-wide search that's
anywhere near as productive as RubyMine. In RubyMine you can view a dialog of
all the candidate replacements and selectively include/exclude. You can
quickly hop between search results and fly through the code. You can preserve
case, which does the replacement in a case insensitive way without turning
upper case to lower case and vice versa.

I can't find a way of running focused Rspecs that I like. I just want to put
the cursor inside a spec or describe block, hit a key, and then pop up a
terminal at the bottom of the screen where I see the output of the spec
runner. I don't want a quickfix buffer... because if there are stack traces
that seems to obscure them. I tried to roll something together with ConqueTerm
but it insisted on moving my cursor into the spec output buffer, which slowed
me down.

The language plugins aren't syntax aware. In RubyMine I can hit ctrl-w to
expand the selection to the next node of the syntax tree. This is incredibly
useful for quickly selecting arbitrary regions of code. I know text-objects
can get you some of the way there, but they force you to choose a specific
type of region, rather than just progressively selecting higher nodes on the
syntax tree.

Finally, moving by word doesn't respect camelCase or underscore word
boundaries. Maybe this can be fixed?

I don't mind the learning curve. I like a lot of the concepts that Vim brings
to the table. But I just can't get past these issues. I know I may be able to
learn Vimscript and fix all these things, but so far it hasn't seemed worth
it.

~~~
sunkencity
I've tried rubymine, and yes the integration with tests is really good. It's
really fast when working with tests: run a test and point and click to the
source where it fails from the stacktraces. I used it for a big refactoration
of a rails app that would have taken longer time otherwise.

I switched to vim though because of some reasons (I was previously an emacs
user).

1\. less resource intensive (I had to upgrade to an SSD to even run RubyMine
on my late 2008 (then top of the line) macbook pro. Running any command in VIM
is almost instant, I never have to wait and I hate having to wait for the
machine to do something. I even run the terminal in non-anti-alias because I
like a 9pt monaco and that it's significantly faster than using an anti-
aliased font. mrxvt is even faster, it's crazy fast scrolling through a large
logfile, but then I occasionally have to copy and paste and doing that in OSX
X11 sucks.

2\. I want to use the mouse as little as possible (you cant get this with an
IDE)

3\. RubyMine could not understand all ruby code so the autocomplete stuff is
for me less useful than in vim, where it's super-fast.

4\. Less abstraction when working with code. If I really needed an IDE, I'd
rather code in smalltalk where the runtime is the IDE.

5\. Like having an almost stock editor running so that it's easy to stay
productive on any computer.

A great tip that I gathered from <http://http://peepcode.com/products/play-by-
play-bernhardt> is to map your current test to a key:

    
    
        :map ,t :!ruby -I test test/functional/foo_test.rb -n test_whatever<CR>
    

It's even better when not in a rails project so the whole stack doesn't have
to spin up. Boom! instant test result after a couple of seconds.

I've also mapped ,m to NerdTreeToggle, works fine and it remembers the state
of the project file.

------
gburt
This isn't particularly useful in the point-by-point slideshow form that was
obviously designed for someone to be saying something about most of the
points.

~~~
Gonsalu
True.

It seems that this was from a presentation at StrangeLoop 2011 (never heard of
it before) that occured from 18 to 20 of September
(<https://thestrangeloop.com/news/11/01/27/strange-loop-2011>) -- it ended
yesterday!

Recordings will be available ([http://groups.google.com/group/cascalog-
user/msg/d357e51cbbb...](http://groups.google.com/group/cascalog-
user/msg/d357e51cbbbcdf4e)), I just hope I remember to come back and check for
them.

There are some other slide decks available from the conference
(<http://lanyrd.com/2011/strange-loop/coverage/>); some other presentations
seem interesting.

There is also another awesome slide deck (this time with annotations) from
another presentation from Bill Odom, regarding key mappings:
<http://billodom.com/talks/vim-key-mapping.pdf>

