To learn Vim or not to learn Vim

  • Thread starter kandelabr
  • Start date
  • #1
113
0
Hello.
I wonder - does it really pay off to learn Vim? I know it's fast and all, but if you compare it, for example, to Visual Studio editor (which isn't nearly as sophisticated), editing speed is not the only aspect of an editor.
I mean, in an IDE, there's tons of shortcuts and commands and if you use Vim, you're back to edit->command-line->compile.
I mean, again, how many professionals do you know that use Vim for writing code?
I mean, again again, if I'm going to learn a 570-page book, I'd better be knowing what I'm doing.
I work part-time as an SQL programmer (that is, cca. 50-100 kB of code per month).

I'm not starting a war (I haven't mentioned Emacs yet (uh, now I have)), I just find it hard to believe to those few that had enough time to learn it and all.

Cheers & thanks.
 

Answers and Replies

  • #2
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,950
19
Basic proficiency with vim doesn't take much investment -- just get a good cheat sheet and that's all you need. Maybe go through the first few bits of the vim tutorial instead, and write down what you think is important.

Sure, there are lots of other things you might want out of an editor. But sometimes, you really do just want speed. For me, that is my primary use case -- if I want to make a quick edit to something, I use vim without giving it a second thought. I do know someone who uses gvim pretty much exclusively.


Visual Studio is a wonderful IDE for C/C++. But other than that and MS's languages, it doesn't offer any useful features. Also IDE's have a more general drawback in that they tend to be very awkward outside of their expected use case -- what if you are developing a Linux application, or otherwise needs to run on a particular computer rather than your desktop? What if you have an unusual build requirement?

Additionally I've found IDE's to be awkward when dealing with lots of console output.


Incidentally, I believe vim can be used as an IDE, but I've not tried it. I essentially build my own adequate IDE simply by having several terminal windows open. :smile:

(I do most of my programming in a Linux environment, so VS is not an option even though I like it)
 
  • #3
You never know when you need it. If you went out somewhere for work and they only have old UNIX workstations, you don't have luxury to pick the editors and your only choice would be practically vi. Or what if your window manager fails to start ?
All you need to know is how to use esc, i, a, h, j, k, l, x and some regexp.
The rest of the key use is optional.

BTW, I have been using vi/vim to write verilog codes and perl scripts all my life.
 
Last edited:
  • #4
595
0
My claim is that VI is the _only_ usable editor. Maybe I would like emacs, but I learned VI long ago on a far distant planet, and, as a somewhat-glorfied word processor I hate to take my fingers off the keyboard. I don't know how many times I've had to coerce something into a plain text file so I can use the regexp substitute power of VI's EX command line. Gvim is a nice compromise between old- and gui-school. Eclipse has a VI plugin that _almost_ works, but I've yet to be able to get s/^.x*/fubar/g to work right...
 
  • #5
113
0
so your advice is definitely "to learn it"?
 
  • #6
mheslep
Gold Member
317
728
Basic proficiency with vim doesn't take much investment -- just get a good cheat sheet and that's all you need. Maybe go through the first few bits of the vim tutorial instead, and write down what you think is important.

Sure, there are lots of other things you might want out of an editor. But sometimes, you really do just want speed...
And flexibility - use over the network via ssh, or when there's no X/graphics environment, etc.
 
  • #7
595
0
so your advice is definitely "to learn it"?

Only if you would like to cut the apron strings tying you to a brain dead IDE that prevents you from understanding what actually needs to happen when you program...IMHO.
 
  • #8
306
1
And then you can use the Vimperator extension for firefox!
 
  • #9
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,950
19
Only if you would like to cut the apron strings tying you to a brain dead IDE that prevents you from understanding what actually needs to happen when you program...IMHO.
Ignoring the over-the-top your-opinion-as-exaggerated-fact routine, this has nothing to do with the question of what editor to use.

When I was writing *NIX code for a cygwin install and doing my builds with g++ or make, I still found it more convenient to use Visual Studio as my editor because it is well-suited both for the task and for the operating system.


And besides, jumping through all hoops to "manually" build executables using command-line programs has very little to do with programming. :tongue:
 
Last edited:
  • #10
595
0
And besides, jumping through all hoops to "manually" build executables using command-line programs has very little to do with programming. :tongue:

Sorry if my "humor" is not as apparent as one would like, since I refuse to use little smiley's due to advancing age and grumpyness...Yes, of course editors and IDEs are separate and distinct entities.

Anyway, I am a frequent contributor to a particular help forum for a small embedded system, which appears to be used mostly by clueless CS students (at least they ask the questions). The system is so convoluted, even though command line based, that my current belief is that there is no one left on the forum who actually understands how a build works. This is complicated by the fact that many of the users have never programmed outside of a hand-holding-IDE and don't have a clue as to how a compile occurs in the raw.

I tend to wear knowledge of VI as a badge of honor indicating that I did at one time know how to program...
 
  • #11
113
0
the fact is that i can't learn to use it while doing some important stuff.
i need something simple to begin with, something that doesn't require thinking.

thanks for your replies, guys, i'll need a while to get used to it.
 
  • #12
124
0
vimtutor is nice for learning (wish I had known about it when I started up).

Don't start with a 500 page book. Just learn the tutorial or find a short manual ~10-20 pages of basics, and get comfortable using those. Then add on a little at a time if you find that you are spending enough time using vim to make it worth while.

Edit/Note: "vimtutor" is a program you can call from the command line just like vim.
 
  • #13
17
0
I am an old timer so I use SlickEdit, which still supports Brief.
 
  • #14
A coder should know basic vim but one should be open to other choices, as well. Use it and if you don't like try something else. I personally use notepad++ which is great for me!
 

Related Threads on To learn Vim or not to learn Vim

  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
18
Views
6K
  • Last Post
Replies
16
Views
253
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
2
Views
2K
  • Last Post
3
Replies
55
Views
12K
Replies
7
Views
8K
Replies
56
Views
6K
Replies
5
Views
3K
Replies
13
Views
2K
Top