up vote 7 down vote favorite
3
share [g+] share [fb]

I already use Notepad++ a lot for text, html/php/javascript and autohotkey files but I read I'll be more productive with vim once I learn it.

what's the real benefit here?

Stuff I like in notepad++: tabbed interface, highliting, ctrl+ / ctrl- to change the text size. I also like some textfx stuff. And to be able to execute some files/launch in browser is great.

Look, I don't want to start another editor war here ok? ;)

link|improve this question

feedback

closed as not constructive by Sathya Feb 9 '11 at 12:30

This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the FAQ.

8 Answers

up vote 19 down vote accepted

The biggest advantage of vim is its portability. Even if you're stuck editing something on a Linux machine over SSH, or trying to figure out what you did to your config file to make X11 crash, vim will be the same.

link|improve this answer
8  
+1 knowing a inter-os text editor is like knowing english – Mercer Traieste Jul 16 '09 at 16:06
I'm an N++ addict myself, but there are times when you sit in front of a Linux machine (or, sometimes, 200 km away) and want to edit files. I use nano, if available, but often enough I have to get back to vi. It's like the lingua franca under editors (vim being some kind of vi++) – Boldewyn Jul 16 '09 at 20:28
Well, I'm working only on windows machines. Don't know about the future, but I'm not seeing myself switching as 2 of my main apps are win only (AutoCAD & 3ds Max) – ino Jul 17 '09 at 10:49
@Boldewyn - actually, what you start under "vi" is often "vim" these days, since on a lot of systems two have been intermixed. I rarely find old vi these days. – ldigas Jul 17 '09 at 15:13
2  
vi is still rather common in BSD implementations. Its size, power, and flexibility are hard to match anywhere. Unless you're an emacs guy, then you're pretty on par. – Jack M. Jul 17 '09 at 21:13
show 1 more comment
feedback

In Vim, you do have:

  • tabs
  • highlighting
  • ability to change the text size (although not with a ctrl + / - combo unless you config it that way)
  • ability to execute shell stuff and others.
  • tags
  • outline facilities
  • code folding
  • autoindentation
  • syntax recognition
  • split windows in addition to tabs
  • a command setup that's easier on your hands than Ctrl-sequences.
  • and much, much more.

The power Vim has with pattern matching, global operations on a file, macro creation is hard to match to most editors but emacs, I think. Seriously, being able to jump from one end of a function / block to the other with %? Regex - based search and replace at your fingertips with just a :%s command? As a programmer, I wouldn't trade it for the world.

link|improve this answer
1  
yeah really great set of features that with the jumps and regex search. (I would have to learn some regex too, which would be positive imo) – ino Jul 17 '09 at 10:52
feedback

I've used vim as my primary editor for several years now, and the biggest benefit for me is not taking my hands off the keyboard. It's surprising how much more efficient you are when your fingers can sit on the home row for everything you need to do. It's an investment in time and energy to learn it, but once you do your productivity does really improve. I definitely notice the difference when I use another editor.

And, oh BTW, there's always...

behave mswin

...if you need to crawl before you walk. :-)

link|improve this answer
7  
In that case he's better off staying with n++; by using mswin it will just be harded to switch later. If you wish to start using vim, then start using it properly. Otherwise, stay with n++. – ldigas Jul 16 '09 at 20:47
feedback

The biggest advantages I see to using VIM are in flexibility, efficiency, and scripting.

Flexibility VIM can colour code and syntax highlight anything from XML to C#, and I've even heard tail of a Brainfuck syntax highlighter. It does it all.

Efficiency On top of tabs, split files, keyboard-based copy/paste, etc... VIM's shortcut keys for moving to the end of a word (w), move to the end of a line ($), move to a matching bracket (%), or even to delete everything between a pair of quotes (di") means you do not waste time moving around the file.

Scripting VIM's built in language for scripting actions is unbelievably useful. Find yourself typing #!/usr/bin/python at the top of every file with .py as the extension? Make VIM do it for you. Sick of writing out a list of Java import statements? Make an abbreviation for it, type out IMPORT and let VIM pull it out of a file.

Some people feel that VIM isn't worth the time to learn after spending a week with it for one small portion of their daily lives. The tricks below have taken me years to learn and implement fully (yes, I have my .vimrc under version control for easy access). If you take the time to learn, you'll eventually find yourself in MS Word with a long string of jjjj as you try to read through a file... Then you've made it.

link|improve this answer
+1 for scripting – bandi Jul 17 '09 at 21:00
3  
you'll eventually find yourself in MS Word with a long string of jjjj ... some would recognize this as an annoyance. It would be great if Vim offered all those benefits without requiring your brain to "unlearn" how to communicate with the other 98% of the world. – user2499 Aug 14 '09 at 19:37
To be honest, most of the time I end up writing everything in VIM, then open it in Word to format/print it. Unless it is something that can be printed in Courier. – Jack M. Aug 17 '09 at 14:31
2  
jjjjjjjj... crap – sixtyfootersdude Feb 26 '10 at 21:27
feedback

I have been using Notepad++ (mostly for web develpment; PHP, MySQL, XHTML, CSS, JavaScript, XML, AJAX) for years, it has even replaced NuSphere PHP Editor, Dreamweaver (except for occasional XHTML/CSS/JS code that DW provides a good environment for code-completion and error detection/debugging), Zend Studio, and Eclipse. Since Notepad++ is so powerful and far surpasses the editors of any commercial IDE it was my tool of choice.

I always thought of VIM and EMACS as complex editors that possibly did not offer 'enough goodies' to substantiate the 'gigantic' learning curve; but I MUST TELL EVERYONE SINGLE ONE OF YOU, I WAS WRONG!!!

I am a complete noob at VIM, in fact I just read the 30-minute tutorial (vimtutor), but I must say: THERE IS ABSOLUTELY NO COMPARISON to these command-line editors (VIM and I assume EMACS as well). I had never thought of using an editor in this way and frankly what it offers to a programmer is just BEYOND imagination and limits.

[ANECTODE]

For instance, I had a very complex unstructured Excel document that a customer sent to us which provides an array of quotas required for a marketing campaign. I had already developed this campaign but I needed to insert the data in MySQL, since the data comes in a REALLY CRAPPY disorganized manner I have to edit the file to either generate a CSV or an INSERT sql command.

The last time I edited the document I used Notepad++ and I was able to perform rectangular selections, ALT-C column insertions, limited replaces/substitutions , etc. N++ worked wonders and allowed me to format the document as I needed in little more than an hour.

With JUST the NOOB knowledge I have in VIM after reading the vimtutor I was like: "OK let's give it a try with this annoying document, it would be the perfect example". Well, it took me about 15 minutes to edit the document using VIM, and I honestly can't say that I know VIM yet.


Frankly, I am more of a Windows guy, ironically I do WAMP development far more than LAMP, mostly because we have proprietary telephony software that's Windows-based. But I must say these LINUX tools just FUCKING ROCK!!!

link|improve this answer
feedback

Any unix machine, anywhere, any age, will have vi. Maybe it's on old VAX machines as well. You can get it for Windows, Dos, Macs...

It also has something like twenty years of support behind it, which is a record untouched by nearly all Windows programs.

link|improve this answer
I used to use it on VAX II/780 in the late 80's. Wonder if I could pick it up again ... – Alan B Nov 27 '09 at 9:20
2  
Actually, vi has more like 34 years of support behind it. I started using it on a VAX/780 (running BSD 4.0a) in January, 1980, and it is so deeply ingrained into my psyche that I literally don't think of the commands anymore, I just edit. And those editing skills port to any machine I am likely to be working on (*NX, Win-whatever, Mac OS X), although it normally means a server that is N timezones away. Oh, and I love what vim has done to extend vi. – Peter Rowell Sep 22 '10 at 17:48
feedback

If you are confortable, fast and productive with Notepad++ don't worry to learn vim.

vim is nice to edit files throught a terminal connection, otherwise you don't need it on a GUI.

link|improve this answer
I always felt the GUI form of VIM was just to get used to the vim commands ;-). Yeah, I agree, no value in learning just the vim GUI. – nik Jul 16 '09 at 15:17
feedback

The only benefit I see is, if you need to interact with a unix environment where there is no Notepad++, the good command of vi may save your life.

If you don't get your hands close to a unix box, perhaps you don't need to bother.

I'm don't know notepad++, but something I value in vim/gVim is the ability to do almost everything I need without taking my hands of the keyboard.

I don't use the mouse and every time I need to take my hands off the keyboard to grab the mouse and hunt for a diminute menu, feels like time wasted for me :P.

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.