

Reasons To Give The Vim Text Editor A Chance - surfingdino
http://www.makeuseof.com/tag/top-7-reasons-to-give-the-vim-text-editor-a-chance/

======
TheEzEzz
Just last week I was about to start learning Vim, but after perusing the
shortcut list I decided I could do better, so I rolled my own. Basically it's
just a multi-modal keystroke catcher/dispatcher running transparently in the
background. The upshot is that most of the commands work transparently in my
IDE, in notepad, and even this little textbox I'm typing in right now!

Unfortunately, the original point was to increase my productivity, which I've
failed at horribly... because I can't stop playing around with the code!

~~~
sant0sk1
Open source it and we can all waste time playing with the code!

~~~
TheEzEzz
Definitely. I'm gonna dogfood it a few more weeks and then throw it up on
github.

------
davidtgoldblatt
My reasons for being a vim user a lot more practical than those I see on these
"top 10 reasons for trying X":

\- In the long run, it's faster to learn and use an "efficiency" editor, so I
need to learn one of vim, emacs, notepad++, etc. The differences between these
are probably negligible for a proficient user.

\- Of these, only vim will be installed (or vi, which has a big enough overlap
that it won't matter to me) on every system I'm going to need to use.

These are, incidentally, the same reasons I use QWERTY instead of Dvorak.

~~~
singular
Dvorak has actually been shown to really be no better than QWERTY -
<http://reason.com/archives/1996/06/01/typing-errors/3>

~~~
OneWhoFrogs
You're right about that, but Dvorak is much easier on the hands. The average
distance travelled by your fingers is greatly reduced. (It looks like Colemak
beats both, though: <http://colemak.com/Compare.>)

~~~
zcid
I type Colemak 99% of the time, but the 1% I don't, it can be a really
frustrating experience. It amazes me that 20 years of typing ability was
forgotten almost entirely in a month.

------
doorhammer
I've been tooling around with emacs, having plopped down vimpulse and viper on
it. I get slime for clojure, the power of elisp for modifications and so on,
as well as my preferred editing style, which is modal. It's not for everyone,
but it works for me. It helps that my life isn't terribly busy, and I enjoy
taking the time to make everything work together. Of course, caps rebinding is
a must for either.

It's been fun, either way. Time will tell if it ends up being practical.

~~~
gnosis
When I started learning Lisp, I tried using Emacs with viper and vimpulse.

Although it did make using Emacs less painful, it still required way too much
knowledge of Emacs to use effectively and configure than I had time to
dedicate to learning it.

Emacs+SLIME+vimpulse+viper might be good enough for someone who already knows
Emacs or who hasn't invested a lot of time in learning vim. But for someone
fluent in vim, I just don't think huge time investment in learning Emacs well
is worth it.

~~~
doorhammer
That's completely understandable. I really don't have a huge reason to be
doing things this way. I've just been going through The Joy of Clojure and
decided to give emacs a spin, and I wanted some similar editing idioms while
messing with it.

I've basically been translating the shortcuts and techniques I use in vim into
some ugly elisp, bit by bit, assuming they don't work as expected with
vimpule/viper. I wouldn't say it's an amazing solution, but mucking through
the emacs docs to get things working has been a quick way to get a basic
proficiency in how emacs works, and how elisp can be used.

Ultimately I still end up in vim for most of my editing, and I keep tacking
things onto emacs as I go, but mostly when I'm just writing some clojure. I
wouldn't say it's efficient at all; it's just interesting enough to kill time
with because my life isn't very busy and it seems 'nifty'.

------
phatbyte
I love vim, I use it daily, but always for quick text editing. For real coding
I need an IDE (netbeans). I never understood how people can code without
debugging, profiling, code exploring. I'll probably get voted down, but, what
Vim saves me, I wasted it on debugging. So I don't see any advantage using it
as my primary editor.

~~~
jrockway
Most people that use vim also don't use graphical debuggers. I use the "print"
statement.

~~~
eropple
Spewing print statements all over a piece of code is as bad as any other
shotgun debugging technique. The reason breakpoints and watches were invented
were to _reduce_ reliance on bad ways of doing things.

~~~
jrockway
What's good about print statements is that they don't require me to do
anything more than once. When you run code in a debugger, there is a lot of
manual interaction involved. continue, break, see where you are, think about
that, poke around, repeat. With print statements, you run your test, analyze
the output, and make the changes. It's all automated except for the analysis
step, which is all the human should be doing.

If you need breakpoints, watchpoints, and a GUI to click around in, your code
is too complicated and unmaintainable, which is probably why you need a
debugger in the first place.

~~~
eropple
Manual interaction? Sorry, but I'm still very skeptical. Pausing in a debugger
does not require materially more "manual interaction" than endlessly running
your program to spit out some printed statements--it just front-loads the
manual interaction so you're doing it sooner and, if you're doing it right,
doing less of it. A debugger allows live autopsy, which is far more valuable
than this silly print-statement thing--when your print statement does not
return as expected, you are not much better off with your print statements
than just seeing the broken output of the program.

Couple live autopsy with live edit-and-continue and you've got a recipe for a
considerably more effective way of debugging code.

And "your code is too complicated and unmaintainable if you need a debugger"
is preposterous on its face if you've ever...oh, I don't know...written a
driver? Or any other remotely complex (you're conflating complicated and
complex) task with a significant number of interlocking parts? (Hell, one
could just as easily say that your code is too complicated and unmaintainable
if you're barfing print statements all over the place.)

~~~
jrockway
You "step over" instead of "step into". Now what? You have to start over.

With test cases and print statements, starting over is free. If you need more
information, edit the code to give it to you and re-run.

Getting a debugged program back to the desired state is, in my experience,
difficult even with an automatic test. Not only does the program state have to
be right, but so does the debugger state. Without the debugger, you have half
the state to bother with.

------
IvarTJ
I chose it because I am under the impression that it is more ergonomic than
Emacs and mainstream text editing environments. I learnt the basics of Emacs
before I learnt vi/m.

------
Diabeetus
Coincidentally, all the points equally apply to Emacs. Well, except the last
one, I guess.

~~~
wpinbacker
Exactly. Emacs doesn't need an elaborate case for its defense; non-modal is
more natural/easier-to-learn/BETTER (control-this, control-that) than modal.
Not merely my 2 cents -- it's the TRUTH!

~~~
gcr
Long time vim user here, and I'm considering learning emacs. How do you _know_
it's the truth? And, how did you get started?

~~~
ams6110
I've been using emacs since the 1980s, got started in school because it's the
editor one of my early comp. sci. courses used. Tried vi a few times, and I
still use it occasionally on systems where emacs is not available (this is one
real advantage of vi[m] it tends to be on even the most bare-bones systems),
but the separate input and command modes have never really felt natural to me.

------
CJefferson
I've tried hard to love vim, but as a programmer's editor, for C++, it's just
awful.

Now, many of the problems are because C++ is awful (hard to parse, for
indenting / formatting), and C++ compilers are awful (20 page error messages).

In particular, I tried half a dozen packages and none could tame C++ template
error messages, while xcode, visual studio and cde in eclipse all mastered
this years ago. A shame.

------
16s
My reason for using vi/vim is that it's the lowest common denominator text
editor. You'll find it by default on most any Linux or BSD system.

~~~
surfingdino
That's my reason too. I use it on Linux, BSD, Mac OS X, and MS Windows. I like
TextMate for some tasks better than Vim, but my ratio of time spent in both is
still 9:1 (Vim:TextMate).

------
chernevik
Reason 8: Vim keystrokes can be incorporated into ex scripts, either alone or
in "here" scripts. These commands are already useful, they can do stuff like
replace strings in lines that are N lines above or below lines holding another
string, and they can be leveraged further via scripting.

For example, a search and replace across files under the working directory:

tgt_string=$1

repl_string=$2

for file_name in $(grep -rl "$tgt_str")

    
    
       do
    

ex - $file_name << END_HERE_SCRIPT

%s/$tgt_string/$repl_string/g

wq

END_HERE_SCRIPT

    
    
        done
    

Yes, the indentation of the "here" script is ugly, white space before line
texts can bork execution.

Yes, sed or awk can do very similar things, maybe better. My point is, it's
nice to get some of these capabilities just by knowing your editor.

(Ed: Sorry about the formatting, if I don't double-space the script it turns
into one large text clump.)

------
reso
When they started pushing Unix on us in 2nd year CS, I hated VIM with a
burning passion. After a little while of using it though, I can say my typing
efficiency is far, far, higher than it was before, and I can "flow" better
since I don't have to interrupt my stream-of-consciousness with a mouse
movement. I wouldn't use anything else nowadays.

------
vacri
It's not surprising to see that the logo isn't amongst the list :)

I use a mix of Elvis and Vim as I'm training up on vi-likes, and I'm not sure
which I prefer yet. Vim has more-intuitive-to-me stuff like character-by
character deleting (ie characters are removed when you delete, not when you
leave Insert mode), but elvis has things like pressing = twice to reflow
paragraphs.

Vim may win in the end as Elvis is hard to google for...

~~~
koenigdavidmj
Vim can reflow too, but I will admit that 'gwap' is a bit unintuitive...

~~~
vacri
cool, thanks for that!

