views:

1833

answers:

16

I work as a c# developer in a purely Microsoft shop.

I recently started teaching myself assembly using gas and Linux in my free time away from work. I like messing about with Linux, I'm still very new to it though.

I keep hearing I should learn VIM or Emacs but the thing is, there is absolutely no way I'll need to use them in work, so I feel a bit guilty pouring time into mastering one of them. Worse than that I'm wondering if learning VIM or Emacs could make me slower with visual studio as I'd confusing short cut keys.

Currently I'm doing my editing in Linux using SciTE (I think this became notepad++ on windows).

For someone who works in a purely ms product environment is there any real reason for me to learn Emacs/VIM? I see that there is a setting in vs studio to use Emacs shortcuts, has anyone here got more productive by mastering them in vs, or in other words can you see it being worth while?

Thanks in advance!

Related: Is learning VIM worth the effort?
Related: Is it worth investing time in learning to use Emacs?
Related: Why should I use an IDE? (view from the otherside)

+15  A: 

Begin the flame war :)

I'm a VIM addict and not ashamed to admit it. I find that using VIM makes me significantly more productive in my daily life. Coding is a lot faster when you don't have to take your hands off of the keyboard.

By default VS has poor support for VIM bindings. However, there is a cheap add-in available (ViEmu) that provides excellent VIM keybindings for Visual Studio. I have a personal license and I believe it was worth every penny.

That being said there is a steep learning curve associated with VIM. It will in all likelyhood kill your productivity for a week or two. After that though, the benefits will start coming and you should notice a boost in your productive powers.

JaredPar
I'll point out the temporary productivity loss is while you are using Vim. If you go back to the standard editor you shouldn't be slowed down, but will end up frustrated you aren't using Vim.
he_the_great
A: 

take a look at JP Boodhoo and what he's doing www.jpboodhoo.com. He and Kyle Bailey have been blogging recently about using VIM as part of their development experience with VS2008.

Chris Conway
+3  A: 

I used to use VIM almost exclusively, and after moving to a nearly 100% MS shop, have found no problems switching back and forth.

VIM and EMACS are great if you're willing to learn the keyboard shortcuts. I find that I don't really have issues when I go back and forward - I think it helps that they are such a completely different environment than VS that it's easy to make the mental switch.

You can always start slow - use them, and see how it goes. You'll have some learning curve, but it's very much up to you.

If Scite is working for you, and you're just "playing around" as a hobby, it may not be worth the effort. For me, the effort of learning new and different ways of working/thinking is part of the fun, though.

Reed Copsey
I find that when I move from Vim to a lesser editor like VS, my productivity takes a nosedive as all of the tools I'm accustomed to having in Vim are suddenly not there and nearly impossible to recover.
greyfade
That's how I used to feel in VS - but VS has many tools VIM doesn't, too - especially if you have any addins like resharper. It's all about learning the different sets of tools well. I still love VIM for many tasks, though. :)
Reed Copsey
+7  A: 

I work in a 90% Microsoft shop, but I still use gvim every day. I have a vi plugins for every IDE I work with. I'd recommend vim if you are going to learn one or the other, but I know emacs users will strongly disagree.

emacs and vi have been around for a long time, and are both very powerful. Learning one of these might open your eyes to a more efficient world of coding.

Andy White
+2  A: 

Mastering a good editor is always worth, as a developer you spend a lot of time typing plain text, writing programs, XML, HTML, you can save much of that time by using a good editor and using it effectively.

I started to learn Vi like nine years ago, and now I can't live without it.

Whatever which editor you select, I think almost you'll be able to find plugins to have the input model of your editor of choice, in all major IDE's, for Visual Studio you can use ViEmu or the Emacs Keybindings

CMS
can live without it or **can't* :)
JaredPar
@JaredPar: for sure can't!!!
CMS
+1  A: 

Learning one will be completley worth it. I personally would recommend emacs but I am biased. Im 99% sure that emacs can be setup to the .net devlopment backend (cant think of the right words sorry).

+3  A: 

I also work for a Microsoft only shop, but, at home, I only use Linux. Suffice it to say that I use Vim exclusively for editing at home. At work, I use Visual Studio for all development, but I use Vim for many tasks that require complex text manipulation. Even if I didn't use Vim at home, it would still be incredibly useful to me for what I do at work. Our IT guy thinks I'm some sort of magician when he sees me doing my Vim acrobatics. That's got to be worth something, right? ;)

Jeremy Cantrell
+1  A: 

JaredPar mentioned ViEmu, which I've heard really good things about. But if you're really wondering what the benefits of switching would be, there's a good article hosted on the ViEmu site: Why, oh WHY, do those #?@! nutheads use vi?

Personally I feel that using gvim has been a huge boost to my productivity, and I definitely prefer it to the Visual Studio editor or SlickEdit or any of the others I've used. But as mentioned in earlier answers, Vim can be a steep learning curve. There are people who have used it professionally for 5-10 years and are still learning things about it. Vim can be a lot like perl... there are a lot of ways to make any series of edits, and it can take a while to learn the best one.

Dan Olson
+2  A: 

I've been a professional C/C++ programmer for 16 years. 5 years ago I picked up some Common Lisp, and ended up learning elisp/emacs too. I also dabble in Haskell. I've found these experiences massively helpful in programming C++. If nothing else you get to see the future, as the C++ slowly becomes more expressive by adopting things that CL has had for decades.

Learning emacs is a long slow process that starts to pay off once you're fully fluent in its features, way of doing things and elisp. I use Visual Studio for a lot of my development, but often I switch to emacs to take advantage of the quick to use key macros, or to do some complex processing on a table of values. Lot's of stuff that you can knock up really quickly in elisp that would take a few hours of hair tearing with Visual Studios plugins.

justinhj
This is exactly right, having more tools at your command -- languages or editors -- makes you more effective in solving problems and getting work done.
ashawley
+2  A: 

I use emacs and Visual Studio together and would have a difficult time without emacs. VS is indispensable of course, but it doesn't deliver the text editing that emacs does. Emacs is 98.4% editing pane for me. Visual Studio has 12 different panels, each of them important, but sometimes I just want to look at the code. Emacs lets me do that. And I can split screens and see 4 editing windows on a single screen, even in the same file. With dual-monitors I can have emacs windows on each one. This sounds kooky but it is very helpful to me when I am working on different parts of the code at the same time (let's say an interface definition and an implementation, at the same time). The regex search-and-replace.

I have auto-revert mode turned on in emacs, which is the analog to the VS feature that says "a file changed outside of Visual Studio, do you want to reload it?" Except in emacs it always silently reloads, which is the way I want it. So I bounce from VS to emacs and back, and there's never a problem with pending changes in the source code that haven't shown up in the other editor. VS has "full screen" capability, but I haven't found that to be as flexible or useful as emacs.

I cannot imagine not having the capability of this combination of tools. Visual Studio alone just does not offer this. Emacs alone wouldn't be sufficient. I still use emacs for basic snippets and small test programs. I use VS for managing projects, TFS, testing and debugging.

My use of emacs is not a choice at this point. I picked it up a long time ago, at a previous company, where emacs was the standard tool, so it was ... not to say "easy" but it was automatic. I cannot imagine learning emacs "on my own." I learned things osmotically, just from the community of other emacs users around me. From the people in the hallway, I acquired and customized a bunch of elisp code for my setup. Doing it with a book... I cannot imagine.

As for making you less productive because of finger confusion... I haven't had a problem.

Cheeso
A: 

You should learn at least how to save (:w) and edit files (magic) in VIM--even minimal OS installs have it included. That way if you are stranded on an empty unix box, you can at least edit files.

Otherwise, naw--I dont buy the hype. You've got bigger fish to fry and nano is getting better all the time. Heck, nano has some syntax coloring and auto-indentation and it even works with the mouse over PuTTY.

The best thing to learn is how to configure Samba on your unix box and then use a real text editor on your Windows box like UltraEdit (cue flamewar). I use this configuration for editing anything larger than a config file in /etc.

Cory R. King
Before I learnt vim, I used nano. But after using vim, and getting used to all the keyboard shortcuts, nano becomes very annoying.
nbolton
evidently you have never seriously tried vim/emacs
Sujoy
A: 

I am also a long time C# developer. When developing C++ in Linux, I use Eclipse CDT because it's the closest thing I have found to Visual Studio.

Being quite experienced with vim, I use it for editing Linux config files and such, but I'm not particularly drawn to it for development when I could just use an IDE.

By the way, if you do use vim, you may want to enable line numbers and syntax highlighting; I always add these lines to my ~/.vimrc file:

number on
set syntax
nbolton
A: 

If you're using Vim with VS, or thinking about it, you should be aware of the Vim Intellisense project: http://insenvim.sourceforge.net/

Herbert Sitz
A: 

IMHO, no. i am using acme over vim. gedit or vs2008 at work.

plan9assembler
+1  A: 

I was hardcore user of VIM and also developed intellisense for C# (http://insenvim.sourceforge.net/).. but with latest language changes i cannot avoid using Visual Studio. But many time look back using VIM is for simplicity reasons. Visual Studio takes lot of memory and start-up time is very huge. Even to read a file or do simple things it require quite a few minutes. But with it is so easy to open a file and navigate. I might port VIM intellisense to C# 3.0.

A: 

Speed of coding is very much dependent on editor choice, so its one of the most important deceisions you will take.

majkinetor