Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

To learn Vim or not to learn Vim

  1. Aug 11, 2010 #1
    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.
     
  2. jcsd
  3. Aug 11, 2010 #2

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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)
     
  4. Aug 11, 2010 #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: Aug 11, 2010
  5. Aug 13, 2010 #4
    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...
     
  6. Aug 14, 2010 #5
    so your advice is definitely "to learn it"?
     
  7. Aug 14, 2010 #6

    mheslep

    User Avatar
    Gold Member

    And flexibility - use over the network via ssh, or when there's no X/graphics environment, etc.
     
  8. Aug 14, 2010 #7
    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.
     
  9. Aug 14, 2010 #8
    And then you can use the Vimperator extension for firefox!
     
  10. Aug 15, 2010 #9

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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: Aug 15, 2010
  11. Aug 15, 2010 #10
    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...
     
  12. Aug 19, 2010 #11
    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.
     
  13. Sep 17, 2010 #12
    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.
     
  14. Sep 17, 2010 #13
    I am an old timer so I use SlickEdit, which still supports Brief.
     
  15. Sep 20, 2010 #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!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: To learn Vim or not to learn Vim
  1. Learning HTML (Replies: 2)

  2. Learning C (Replies: 6)

  3. Learning C++ (Replies: 9)

  4. Learning Python (Replies: 4)

Loading...