

The Great Vim / Textmate Debate: Opinion #56 - How to make Vim more accessible - Lewisham
http://blog.cflewis.com/the-great-vim-textmate-debate-opinion-56

======
gfodor
Defaults: Agreed, though those of us who have been on vim for a long time
obviously have a .vimrc we carry around. It'd be nice to have a better set of
defaults.

Plugins: Vimballs already solve this problem largely.

Automatically in insert mode: Oh gosh no. The only case where you'd want to
start in insert mode, I'd guess, is a new file. If you're opening an existing
file, you're not going to start wanting to type at the beginning of it.
Generally the first command in a file is a search or jump to line.

The author mentioned that he wanted a plugin that can quickly comment a line.
There's more than a few ways to do this manually in vim that is quick. For
example, to comment a block:

^<ctrl-v><n>jI# <ctrl-[>

where <n> is the number of lines to comment. You can also easily write a
command in your vimrc to comment the current line in one keystroke.

~~~
wwortiz
Thanks for that tip I would just have Visual mode, select lines, I, and then
#, Esc Esc

I need like a vim tip a day or something to show me more of these tricks.

~~~
cgs1019
The vim users mailing list is extremely lively and full of little tidbits like
this. I highly recommend following it.

~~~
gnosis
You might also be interested in #vim on freenode. Get all your questions
answered in real time.

~~~
Davertron
I second this, the people in #vim are awesome and usually very quick to answer
your questions. It's also one of the friendliest channels I've been in, for
what it's worth.

------
bjg
Warning: Mini Rant

It's funny that out of nowhere, all these ruby developers jump on the band
wagon after reading a few blog posts. Then they immediately complain about it
being so terrible.

The original version of vi was written in 1976. The first version of vim was
released in 1991.

The 19/34 year old defaults of vim/vi aren't good enough for the hipster
rubyists. However they seemed to be just fine for the hundreds or even
thousands of systems developers and hackers who developed the foundation for
the systems the take for granted. Rubyists are the loudest, most complaining,
annoying group of egotistical developers to have ever existed. Vim is an
editor, not emacs, not Textmate. There is no reason to use it or blog about
it, or utter it's name if you don't think it fit's your work flow. Really, 99%
of people don't care about your opinion on vim at all.

Also a small observation: Every Textmate user I have ever met (who all also
happen to be rubyists) depends too much on "bundles" and snippet features.

~~~
rue
> _The 19/34 year old defaults of vim/vi aren't good enough for the hipster
> rubyists. However they seemed to be just fine for the hundreds or even
> thousands of systems developers and hackers who developed the foundation for
> the systems the take for granted._

Yes, because as we know these hackers have empty .vimrc files. No sirree, just
the defaults thanks!

~~~
blasdel
I do. The only time I set a .vimrc is on Debian-derived distros where they
don't set nocompatible or syntax on.

vi has good defaults. If I used emacs, I'd have to drag around my config
everywhere to set usable keybindings. With vi and vim I can just use the
defaults everywhere.

~~~
sprout
I've gotten to the point where I'd rather use vi than MS notepad, but I'm
still better with vanilla Emacs.

------
telemachos
A few people have mentioned vimballs as a plugin solution. There are (at
least) two other potential solutions for plugin handling: Pathogen and Vimana.
Pathogen is what the blog author is actually using already, but he didn't
realize it initially. He refers to a .vim repo on Github that "does some magic
where [it] puts each plugin in its own directory under /~.vim/bundles/." What
he describes here is based on Tim Pope's Pathogen: basically a plugin to
manage all other plugins. I've been using Pathogen for a bit now, and it's
excellent. Another solution is Cornelius Lin's Vimana, which I've heard very
good things about, but I haven't tried. Some links below.

<http://github.com/tpope/vim-pathogen>

[http://tammersaleh.com/posts/the-modern-vim-config-with-
path...](http://tammersaleh.com/posts/the-modern-vim-config-with-pathogen)

<http://ithaca.arpinum.org/2010/06/28/vim-updates.html>

<http://github.com/c9s/Vimana>

~~~
xtho
There are other similar solution for handling "bundles" (or plugins
distributed as git repositories):

tpugin (on demand path manipulation):
[http://github.com/tomtom/vimtlib/blob/master/macros/tplugin....](http://github.com/tomtom/vimtlib/blob/master/macros/tplugin.vim)

scriptmanager: <http://github.com/MarcWeber/vim-addon-manager>

------
Ramone
So I know this won't be popular, but I've got to say it.

I'm baffled at these text editor debates.

It's almost like developers think that code-input is a significant part of
their job. It's not. It's just some accidental complexity that goes with the
territory. Speeding up your text-wrangling ability won't do anything to help
you be a better/faster developer.

I use vim all the time (as well as a bunch of others) and yes of course it was
an unnecessary pain-in-the-ass to learn. It's all mindless rote learning that
doesn't prove anyone's smarter than anyone else either. My theory is that
people won't admit this because they're already invested and on the other side
of the steep learning curve.

The bottom line is that there's no editor that will make you a better
programmer. If you're worried about quick input, you're probably banging out
boilerplate and not working at the right level of abstraction.

~~~
tel
Totally disagree. The kind of shoe you wear is conceptually orthogonal to your
job of walking from one place to another. Practically, however, your choice
will drastically impact your comfort, walking range, and possibly even overall
health.

So pick an editor (or set of editors) that fits, is comfortable, and lets you
walk, run, jog, and sprint.

~~~
Ramone
I actually agree with everything you've said there. I just don't think the top
editors are different enough in feature-set to make it matter much.

Your choice of text editor is just a micro-optimization. As much as I'd like,
there isn't one that will turn me into the code-whisperer.

~~~
sophacles
Sure it wont make you a code whisperer, but once you find an editor that works
with your way of thought, you find some crazy cool stuff does happen. For me,
it has become as if my editor is directly connected to my brain. If i want to
go to a function definition, it just happens. If I want to search, i find
myself a the target without every thinking "now i need to do a search". When
refactoring I can move chunks of code around, and refit everything to the new
pattern without any thought of the text level changes. This is brought by
knowing a good tool well combined with knowing the code base and language
well. However, without the tool I couldn't be nearly as effective.

------
sigzero
I did not know there was a "great" debate between Textmate and Vim. I would
expect the camps to be rather far apart. It would be nice if the "new" version
of Textmate would come out. It seems to be floundering.

~~~
dasil003
I think it's just a hot topic currently in the Ruby community because there is
so much blogging and memes take hold faster than in other developer
communities.

That said, I am a ruby developer on OS X, and I have been using TextMate as my
primary editor even though I cut my teeth on basic vi usage 15 years ago. The
fact that TextMate 2 is suffering serious second-system syndrome is
undoubtedly a big part of why Vim is getting so much mindshare.

TextMate is an amazing editor, and in my (limited) experience, certainly one
of the few in the last 2 decades to even attempt to challenge emacs/vim on
their own turf (ie. lightweight powerful editors). But ultimately I think a
one-developer closed source model will never be able to create a third truly
great editor.

The main factors driving me towards vim are maturity and general editing
optimality.

Maturity because vim has been around and is open source, so millions of
wrinkles have been ironed out: very few crashing bugs, good performance on
large files, handles edge cases well and has settings for probably anything
you'd ever need, etc.

Optimality because vi attempts to allow editing with the fewest number of
keystrokes. Becoming fluent in vi means that for any type of text editing you
can make any desired change in a near optimal number of keystrokes. It's a
pretty safe bet that no one will ever come up with a more optimal editor for
such a wide range of tasks. Sure IDEs have a high local maxima, but they fall
off quickly as you jump to files that fall outside known semantics. TextMate
gives you a middle ground for writing quick snippets and commands, but I'm
starting to question the long term value of that versus the benefits of
universal availability and just taking some time to find good plugins for
various language-specific development.

~~~
Lewisham
I definitely felt somewhat pushed by the mythical creature that TextMate 2 is.
This isn't to say I have any outstanding critical issues with TextMate as it
is, more that I feel like I've plateaued with it, but I know there's a faster
way of doing things by watching Vim masters at work.

Katz's post was the catalyst to pushing me to actually go and try it; he
seemed like he was a similar mindset to me, and his success spurred me on.

------
zmmz
Regarding the plugin issue, the solution is already around, .vba files:
<http://vimdoc.sourceforge.net/htmldoc/pi_vimball.html>

Actually, the doc says that you need to do the following:

    
    
      vim someplugin.vba
      :so %
      :q
    

With macVim, I found that simply double clicking the .vba in finder does
everything needed.

------
Ayjay
I recently converted from various other graphical IDE's (Visual Studio and
Eclipse) to start using exclusively Vim to develop with, and I'm loving it.

I don't think it really needs to be made more accessible, but what would have
been AWESOME would be to have known about vim-tutor. I only just found out
about it after I've spent a few weeks working in Vim, and have largely passed
the time when vim-tutor would have helped. It REALLY should be on the main vim
screen, not in the help.

Maybe I'm weird in that I have an inherent distrust the help in open source
apps. Most of the times, they seem to be archaic, and targeted at the very
advanced users (see man pages).

Thankfully, I've passed the initial stumbling-around period, and now know that
the help is actually written in a very readable format. Maybe all that needs
to happen is for that to be better communicated.

\-- Ayjay on Fedang

------
jarin
Funny timing, I just started my annual "gonna try to switch from TextMate to
vim" last night.

It seems like every time I do this the amount of time I use vim gets longer
and longer (went from a few days to a week to a few weeks to a month). Every
time I learn more and more things that make me edge toward switching to vim
full-time. I've got pretty much all the basics down, and I think I might stick
to it this time.

The things that are helping me out the most this time are: increasing my
system key repeat rate, lowering the repeat delay, and buying PeepOpen
<http://peepcode.com/products/peepopen>

~~~
planckscnst
For the next step, I highly recommend Vimperator plugin for Firefox. It uses
Vim keybindings and really gets your fingers used to using the letters for
commands instead of ctrl+keys.

------
carussell
_This was all the proof I had previously needed that Vim wasn’t for me; the
only command I ever learnt previously was :!q._

I guess he wrote a shell script at ~/bin/q that killed Vim processes?

------
telemachos
A sidenote, but for people who are following the Vim 7.3 betas, 7.3e (which is
meant to be the last beta - this is last call for problems) was out yesterday.
I've been using 7.3 a little, and persistent undo (undo history between
editing sessions) is very nice.

Announcement and how to get it: <http://xrl.us/bhvizi>

------
bonaldi
I wonder what things would have been like if they'd used BBEdit for that Rails
screencast, way back when.

------
KaeseEs
Does vimtutor not come with MacVim? It would have alleviated some of his
issues.

------
swah
But Vim is IMO ugly. Even Emacs looks so much better.. Vim is so.. character
based.

------
jrockway
Sounds like the "more accessible" version of Vim is Emacs.

