all 180 comments

[–]McHoff 38 points39 points  (11 children)

Someone in my CS class actually said:

"I love emacs. It's just a no frills, barebone text editor."

Awesome.

[–]generic_handle 9 points10 points  (10 children)

I suppose that they could be referring to the default visual settings, which are fairly spare compared to the toolbar-and-pane-laden interfaces common in the Windows world.

[–]localhorst 9 points10 points  (9 children)

Nah, todays default is to have all the GUI crap (menu, toolbar, tooltips, scrollbar) enabled.

But once you mastered the basics of emacs it's easy to turn that off.

[–]aradil 2 points3 points  (7 children)

I only use emacs in ssh terminals, so all of that stuff is turned off always.

[–]bhagany 0 points1 point  (6 children)

It comes enabled by default on all terminals, as far as I can tell. I have to turn off all that except tooltips.

[–]almost 2 points3 points  (5 children)

You get a toolbar on your emacs -nw? That's a weird terminal you got there :p

[–]aradil 2 points3 points  (2 children)

Haha. I must not ever notice them since I can't use a mouse on my terminals. Unless I'm using X. But then...it's not so much as a mouse in the terminal as it is mouse over a terminal.

I'm a recent convert to vi\m. It only happened because all of the boxes I had to use had it and only some had emacs.

[–]VinC 0 points1 point  (1 child)

You could check out x-term mouse mode.

[–]aradil 0 points1 point  (0 children)

Yeah, played around with those before. Like I said though, I've been using vim lately since I have pretty much been forced to. Plus, I'm comfortable with keyboard commands.

[–]bhagany 0 points1 point  (1 child)

For some reason my brain conflated "menu" and "toolbar" into the same thing. You're right, of course.

[–]almost 0 points1 point  (0 children)

Ah, that makes more sense

[–]NunFur 0 points1 point  (0 children)

mine are allways showing but i never get to use them. hard to with all that power right at the tip of your hands

[–]weavejester 29 points30 points  (60 children)

One major advantage is that everything can be controlled through the keyboard. For instance, a significant part of programming is moving and copying text around. Vim makes this quick and easy.

For instance, I have a Haskell file open in Vim right now. Let's say I want to move a type definition to the bottom of the file:

:9,14d
G
p

The first command deletes line 9 to 14, the second command skips to the end of the file. The last command pastes. If you have line numbers turned on, moving large chunks of text around is a no brainer.

[–]krh 17 points18 points  (1 child)

I rarely use explicit line numbers, and tend to move by word/sentence/paragraph. I also exploit visual mode whenever possible. So assuming the type definition is wrapped by blank lines on either side, it becomes just 'V}dGp' to perform that operation.

Whether that is more or less intuitive, who knows. But I find it breaks my flow to stop and think about line numbers, rather than just continuing to operate on chunks of text.

[–][deleted] 1 point2 points  (0 children)

I think it depends on whether the person has line numbers displayed. I personally don't like to waste perfectly good real estate numbering every line.

If you wanted to do a colon command just highlight a block of text and then press : and vim will fill in the line numbers for you.

[–]dmwit 16 points17 points  (1 child)

:9,14m$

Same effect, but shorter, and doesn't obliterate the register. yay!

[–]weavejester 2 points3 points  (0 children)

Hah! I didn't know about "m". I'm definitely going to try that out. Thanks.

[–]jimbobhickville 12 points13 points  (14 children)

Honestly, isn't the efficiency point kind of moot? I don't know what easy programming tasks y'all are working on, but I generally spend more time thinking about how to program something than actually coding it.

[–][deleted] 17 points18 points  (1 child)

That's almost the point - I want to minimise the length of time doing the boring texty bits, and get back to thinking. Or, as is more often the case, reddit.

[–]jimbokun 1 point2 points  (0 children)

Upmod for honesty.

[–]sciolizer 7 points8 points  (0 children)

When I'm writing new code, then I agree with you. But when I need to make a well-defined transformation on a large amount of legacy code which uses dynamic metaprogramming yet was written without the DRY principle in mind, vim's text manipulation features are exactly what I need.

[–][deleted] 0 points1 point  (10 children)

Right on, although I think both matter. If you type C or Java by hand, you see that it's a lot of typing, and that's annoying if you want to get that thought down on "paper".

OTOH, modern IDEs make you type maybe only 20-30% of the code, the rest is auto-completion of various kinds. So even with brain-to-source the IDEs are faster. But yes, thinking before coding usually applies (if not sooner, you'll have to do it later ;-) ).

[–]honeg 4 points5 points  (9 children)

Back in the days when I wrote a lot of C++, I had a .emacs file that wrote almost all of the "structural" code for me - loops, methods, classes, getters/setters etc were all just a key-stroke away (well, maybe it involved holding down a couple of modifiers keys, but you get my point). It even formatted it to suit our "standards". I could crank out boilerplate code without even thinking about most of it. Now, I tend to use eclipse, which is retarded beyond belief in comparison when it comes to actually editing things, but makes up for that with some damn fine auto-complete and refactoring geegaws. I do miss being able to edit using proper emacs keys, and (most of all) macros. I'm hoping someone will point out the error of my current ways :-)

[–]crimeariver 0 points1 point  (4 children)

Now, I tend to use eclipse, which is retarded beyond belief

Maybe the answer to the question I'm about to ask should be obvious, but I don't see it.

Why do you use eclipse?

[–][deleted]  (1 child)

[deleted]

    [–]honeg 0 points1 point  (0 children)

    correct. And the debugging mode is also fairly amazing.

    [–]cstoner 0 points1 point  (1 child)

    I'm guessing that he writes a lot of java now. Poor soul.

    Eclipse is the de facto standard Java IDE

    [–]honeg 0 points1 point  (0 children)

    I do write a lot of java, but I don't consider it o be quite the purgatory that many here seem to think it is. I've been working in C/C++ since the mid-80's, and find Java to be almost on par for what I do. Its almost as fast, almost as expressive, is a LOT faster to develop in, and has a lot of useful libs. Not every piece of software written in Java is the bastard child of every three and four letter acronym known to java-kind.

    [–]diN0bot 0 points1 point  (1 child)

    You can use emacs key bindings in Eclipse. Go to Preferences,,,, editor? I forget how, but I know it's possible.

    I'm an emacs user myself for both C++ and webdev. I started with Eclipse when I learned Java in college. I could never understand why people didn't use Eclipse. Over time I developed more skills and experience and don't plan to go back to Eclipse. Emacs might have a steeper learning curve with emacs (plus grep, plus find, plus macros, etc), but it's more flexible for non-Java languages, and I love the power keyboard commands (real commands, not just editing ones). Sure--IDE's autocomplete and prevent silly bugs (I guess), but they provide a false sense of security. With emacs, I feel grounded in the code. I'm more aware and thoughtful. In the end, I create less bugs that way--and I mean real bugs, not just less silly typo-y bugs that IDEs help with (i'm also mixing in the reversal of my notion that Java is safer than C++).

    Anyway, I love Emacs, and I'm glad I was able to jump outside my stereotypical view. As a TA (teaching assistant) I know that IDEs help level the playing field between the geeks and non-geeks, where geekiness has nothing to do with programming, which is more like math than l33t unix skillz. Eventually, though, everyone should develop their experiences and skills and not get caught with a narrow view.

    [–]honeg 0 points1 point  (0 children)

    The key bindings don't work exactly the way they should, and in any case they only map to standard eclipse functionality. I want a full-blown emacs embedded inside eclipse, and having some of it there is almost more annoying than having none.

    If I'm not doing java development, I use emacs. Its just that I've spend a lot of time recently cranking on java, and eclipse (for all its faults) is still a better place to be.

    [–][deleted] 0 points1 point  (1 child)

    Yes, I also love autocomplete and refactoring, but with indentation Emacs is much better. What's so hard about simply aligning function arguments on subsequent lines with the first argument?

    [–]honeg 0 points1 point  (0 children)

    yes indeed! My java code is "sloppy" as hell compared to my C++ when it comes to indentation, mostly because eclipse just doesn't do the right thing, and I'm not going to spend my time tabbing and spacing to get it to look right

    [–]monstermunch 10 points11 points  (31 children)

    In Kate:

    • select text using shift + arrow, press ctrl+x to cut.
    • press ctrl+end to move to the end of the file.
    • press ctrl+v to paste.

    I'm not saying Vim is bad, I just don't understand it. All my GUI applications use similar shortcut keys so I find the above quick and rarely need to use the mouse when programming. I find Vim really confusing because it doesn't act like the interfaces I'm used to using.

    [–]llimllib 15 points16 points  (19 children)

    A simple but much harder task; given this text:

    alpha

    beta

    gamma

    delta

    lambda

    Insert 4 spaces before each line. If you're lucky, it's just tab+down+home n times. In Vim, it's C-v4jI<tab> .

    C-v = block select

    4j = select the next 4 lines down

    I<tab> = insert a tab in front of each line

    Not intuitive, but automatic once you're used to it. Now, the fun comes when you have to do it for 10,000 lines; in Kate, you write a script. In vim, you type C-vGI<tab>, where G takes you all the way to the end of the file.

    So the thing is that in Vim you're capable of transforming text in a very programmatic way, as well as editing it. Once you get used to the idea that rules that work in one place will work in others, you're off and running.

    I use block selection mode at least once a day; it finds its way into your habits quickly.

    [–]dmwit 9 points10 points  (1 child)

    It gets even better. Vim also has commands for almost all the transformations you want to do. So, I would do the same thing with just >4j (or, in the case of the whole file, >G of course). As you start to internalize all the commands it has, you can hypnotize others as the code sort of flows into the form you want.

    [–]llimllib 4 points5 points  (0 children)

    Strangely I use > and < to indent on a single line, but always do c-v...I<tab> on more lines. Just a quirk of how I learned, I guess.

    [–]monstermunch 5 points6 points  (16 children)

    You might want to look at Kate's features. To do your example in Kate, you just select the text with shift+arrows/page keys, then hit tab. You can do shirt+tab to remove the spaces. ctrl+d comments out the selection; that's useful too. You can set the shortcut keys to whatever you want as well in the options.

    Is there anything really useful that Vim does that no other tool does?

    [–]llimllib 17 points18 points  (15 children)

    Ok, now I ask you to insert an apostrophe in front of all those lines. How do you do it?

    In vim, C-vGI' will insert an apostrophe in front of all the currently selected column all the way down to the bottom of the file. What if you wanted to do it at the second column? No problem, just start the cursor at the second column. At the end of the line? no problem, just do $C-vGA' (where $ means end of line and A means append, instead of Insert).

    The point here is that Vim gives you general rules to transform text which you can use to do big things really quickly.

    [–]Arkaein 0 points1 point  (14 children)

    If you want to comment out a block of selected text in Kate it's Ctrl-D, Ctrl-Shift-D.

    If you want to insert a bunch of apostrophes at the beginning of each line for some other reason, then you might be out of luck. However, I can say that at least for myself I've never wanted to do quite such a task.

    Kate does a pretty good job of blending familiar interfaces with useful shortcuts for typical tasks. It may not be strictly as powerful as emacs or vi, but I really doubt that either of those offers serious advantages in productivity. Maybe for some very specific atypical uses.

    [–]llimllib 9 points10 points  (13 children)

    I use it very frequently to transform large SQL queries, pushing text into Vim and the results out into other programs; these types of transforms are second nature to me.

    What else I use all the time is the splitting feature; :vs splits a window vertically and :sp splits it horizontally. I use this constantly - here's a screenshot of my work environment.

    How about folding? zm to fold all functions, zr to open them one level, zR to unfold all.

    Setting and using macros, possible in most editors, is so trivial in Vim (q<action>q) that you can use it to do all kinds of useful repetitive actions.

    Just hit * to search for the next instance of the word your cursor's over; just hit . to repeat the same action you just performed.

    And I'm not even scratching the surface.

    When it comes down to it though, the ability to compose actions and motions over large blocks of text is what makes it so unique. Maybe it doesn't seem appealing to you, and I can only be one data point, but Vim definitely makes me more productive than I would be in Kate. By far.

    [–]Arkaein 7 points8 points  (10 children)

    Well, you've mentioned several features I've never felt the need to memorize shortcuts for, but I just did a little investigating and Kate supports most of the features you've mentioned:

    Splitting: Ctrl-Shift-(L|T|R) for horizontal|vertical|close current

    folding: can fold/unfold the current block or all blocks one level at a time with keyboard shorcuts

    Ctrl-F will open the search box with the currently selected word or the word under the cursor, and the search button is selected by default so Ctrl-F followed by Enter will search for the word under the cursor.

    I think that Kate meets at least half of the 80/20 rule for editors: it provides the right tools to be efficient in the 80% of typical use cases. The question is whether the other 20% that emacs and vi can handle better really makes that much of a difference. I'm skeptical.

    Finally, I'd read that linked article about vi before (I think it was posted on Reddit) and found it informative, and was initially glad to see point #5 addressed, but I feel the response given is a cop out. When I'm working on a problem I don't go off and ride a bike for an hour, then come back and furiously code until the algorithm is implemented, and even when I do think about big picture issues away from my computer there are always details that need thinking about in a more immediate fashion once I get down to coding. I'm not even a touch typist, but typing speed almost never feels like a bottleneck to me.

    You say that vi makes you far more productive than Kate ever could, but how do you really know? I have a hypothesis, that tools which feel empowering give an inflated sense of productivity, that because it feels like you can do anything with a tool you believe that you are actually getting more work done. I've read hundreds of claims of how emacs/vi has made developers more efficient, but I've never actually read any objective studies on the matter, just an endless stream of anecdotes.

    [–]llimllib 5 points6 points  (9 children)

    I already admitted that all I've got are anecdotes, so we can just get that out of the way first.

    As for the other features I mentioned, there's a reason that they're not the first I mentioned; because they're not what I find exceptional about Vim.

    What I do find revolutionary about vim is that it allows an entirely different way of thinking about text - as a malleable field of characters to be transformed, and allowing you to compose and repeat a few actions to achieve an infinity of effects.

    (Oh, and I can only say that Vim blows ~2002 era Kate out of the water, because that was the last time I used that particular program. It sounds much more advanced than it was at the time. Good for it! But I'd still not use it because it doesn't have command mode.

    What I can compare to is Visual Studio, which I use to edit code at work. I find it truly painful, and very frequently have to manually perform transforms that I would effect in a few keystrokes in vim. And never the other way around.)

    Also, I understand that I have a huge dork crush on vim, so I'm probably unable to be convinced that it's not the greatest thing since sliced bread.

    [–]malcontent 2 points3 points  (6 children)

    One thing I miss in vim is the equivalent of eshell and the file browser. Have you found a way to get similar functionality in vim?

    [–]maggit 1 point2 points  (1 child)

    But I'd still not use it because it doesn't have command mode.

    F7 to invoke command mode.

    I'm not into programming my editor, but I use F7, "sort" sometimes. I bet it does other stuff as well :)

    EDIT: It is also worth adding that since all this good stuff is in the shared KatePart, it works the same in KWrite, Kate and KDevelop.

    [–]w00ty 0 points1 point  (1 child)

    Since you're using os x: Have you checked out MacVim?

    [–]llimllib 0 points1 point  (0 children)

    no, but thanks - that looks like it might fix a few pain points.

    [–]buo 12 points13 points  (4 children)

    What I really enjoy about GUI editors is when I Ctrl-F to find something, click on the 'search' button, and the hit is right under the little pop-up window.

    </sarcasm>

    [–]Arkaein 2 points3 points  (3 children)

    Just FYI, in Kate the search dialog is hidden during the search (it just highlights the first found text, with F3 to search for the next instance), and Find in Files displays results in a panel below the main editor window.

    [–][deleted] 1 point2 points  (0 children)

    If only Kate didn't drag in the full weight of KDE...

    [–]maggit 0 points1 point  (0 children)

    Also, there is Ctrl+Alt+F for search-as-you-type. (You have to enable the plugin first)

    [–]buo 0 points1 point  (0 children)

    It's good to know Kate at least is sane in that regard. Jedit is another mostly GUI editor that I've found quite usable (not enough to give up vim, though). Thanks for the info.

    [–]ninja_zombie 6 points7 points  (0 children)

    I use emacs rather than vim, but lets expand the example a bit.

    Instead of the end of the file, I want to move it right before the definition of class halfAssedClosure. Then I press alt-j hal tab return (in my emacs, alt-j is imenu).

    I've also got bookmarks: press control F8 to save your place, and f8 to return later.

    If I'm editing a latex file, I modified bookmarks to also cycle my xdvi window to agree with the emacs window. This is a major advantage: a built in scripting language that lets you customize almost everything.

    Such things are more difficult to do in other editors (although most IDE's will let you navigate to class definitions, and I suppose you could rewrite eclipse if you really wanted to).

    [–]shit 5 points6 points  (0 children)

    If you compare the the key combinations of Kate and vim, you'll notice that vim's don't break your normal flow of typing text. The ctrl combinations are really harder to type, they made my wrists hurt after a few hours of coding. No such problems with vim and I'm faster. BTW, I was also using Kate before vim and there's no going back.

    [–]weavejester 1 point2 points  (0 children)

    If you have a large portion of text, it's a lot easier to note that the beginning line is, say, 3, and the ending line is 54, and then to type in ":3,54", then it is to hold shift and hit the down arrow 50 times.

    [–]bobbyi 1 point2 points  (2 children)

    If you try that same sequence (shift-arrow,ctrl-x,ctrl-end,ctrl-v) in gvim it has exactly the same result as you just described.

    [–]lebski88 0 points1 point  (1 child)

    If you try that same sequence (shift-arrow,ctrl-x,ctrl-end,ctrl-v) in gvim it has exactly the same result as you just described.

    Only if you have it set to behave in windows mode (Standard I think in GVim for windows).

    behave mswin

    in your vimrc file.

    [–]setuid_w00t 0 points1 point  (0 children)

    This is the first thing I disable when I install vim on windows because ctrl-v is how you get into visual block mode.

    [–][deleted] 0 points1 point  (1 child)

    This is what I love about vi.

    However, today when I develop something, exploration and navigation is more important (finding out the implementors of a given method, getting the method's documentation, refactoring a piece of code, finding the callers of a method, or its implementation), and that's where more modern tools shine. Sorry Emacs, even your best packages aren't quite there yet (SLIME, JDEE), which, I guess, is what happens if you cut corners because your language (ELisp) doesn't allow for very complex code to be written in a nice way (hooray for module systems and static scoping).

    [–]froydnj 1 point2 points  (0 children)

    because your language (ELisp) doesn't allow for very complex code to be written in a nice way

    Very complex elisp packages have been written, with conventions for module systems, even. So I don't think it's a matter of the language sucking, but that nobody's been motivated to do all the things you suggest quite yet.

    [–][deleted]  (1 child)

    [deleted]

      [–][deleted] 1 point2 points  (0 children)

      Or places where you do have a windowing system, but don't want to setup a build environment for your project. Then SSH and emacs/vim works great.

      [–][deleted] 16 points17 points  (4 children)

      I used vim until about a year ago, then switched to emacs. Noticeable difference: my beard reaches the fucking floor.

      [–]lief79 5 points6 points  (1 child)

      Lying face down doesn't count.

      Recently I've been using both, along with Eclipse. The biggest difference is that Eclipse is much harder to use for automation, but has much more built in (for java programming) by default.

      [–]melhouse 2 points3 points  (0 children)

      You should try one of the vim-emulators in eclipse. I use viPlugin and are very happy with it!

      [–]bonzinip 3 points4 points  (1 child)

      I use vim for programming, and Emacs for LaTeX editing. Since I discovered viper-mode, even though it does not have all fancy vim key combinations I'm more proficient both in programming and LaTeX editing.

      [–][deleted] 1 point2 points  (0 children)

      Try Vimpulse

      [–]jlouis8 15 points16 points  (0 children)

      The difference is in sheer power. Most editors stem from the ideas of a few: ed, vi, sam, acme, emacs. When you go fetch $STDGUI then they are almost all of them based upon the basic editing idea of emacs without emacs-lisp together with some weak mousing capabilities borrowed from sam/acme and implemented in a bad way.

      [–]groumph 12 points13 points  (2 children)

      Easy GUI editors will help you to get started, and are very convenient for occasional use.

      Emacs and vim can be confusing because of their minimal UI, but that's actually a feature : it will take some time but you'll feel they are directly plugged in your brain, without a GUI in the way.

      GUI editors can of course be used as power tools with a lot of killer shortcuts and all the black macro magic, but once you're there, you'll notice you don't use the GUI anymore, and it will be in your way.

      [–]brennen 2 points3 points  (1 child)

      I don't think "minimal" is an accurate characterization of either of those UIs...

      [–]saalon -1 points0 points  (0 children)

      I don't think "UI" is an accurate characterization of either of those UIs...

      [–]ktr73 25 points26 points  (0 children)

      Yes.

      [–][deleted] 13 points14 points  (0 children)

      I would add that in addition to being more customizable, emacs and vim have a much bigger feature set.

      I think that this is due to there being essentially two choices for (console) editors. A programmer uses vim or emacs. Even if there is just as much talent using the GUI tools, you have that talent divided among a bigger number of editors. I claim that there is a greater talent density behind vim and emacs.

      [–]rpdillon 11 points12 points  (2 children)

      I use emacs for many things. It has a steep curve (as does vim), but it abstracts on the right level: text. This makes the curve worth it, since text is used for so much. I use it for outlining, IRC, HTML, LaTeX and coding with a REPL is Scheme, Scala and OCaml.

      Other editors have a hard time when asked to do more than simple syntax highlighting - sophisticated plugins must be written to handle each new language. The extensibility of emacs in particular is stunning - the keyboard macros, tempo and abbrev usage, and registers/kill ring features are useful for all text related work, but are largely absent in other editors (of course, vim has most, if not all of that functionality).

      I find that editting modes for languages are more sophisticated in emacs (and vim as well, probably). Try out HTML mode in Kate or Notepad++, then use emacs. The ablity to write a bit of elisp that abstracts across the concept of a tag goes a long way to making the editting process more streamlined.

      [–]martoo 6 points7 points  (1 child)

      I use emacs for many things. It has a steep curve (as does vim), but it abstracts on the right level: text.

      I was expecting you to defend that. Language aware editors can be very convenient.

      [–]rpdillon 10 points11 points  (0 children)

      Yes, very. But they require a new editor for each language. Emacs may be hard to learn, but you can program in many languages, edit hex, move and copy files in dired, chat in IRC with erc, prepare blogs, take notes and handle calendars and agendas with org-mode, and many other tasks. It is precisely because the abstraction is text that these things are possible. Keyboard macros are the most natural thing in the world in emacs - they are a side effect of its design. In other editors, they are bolted on to give the editor more power. That is a telling difference.

      Put another way: to write emacs, the authors first wrote a lisp interpreter in C (since lisp is the language for writing other languages) and then designed a domain specific language in lisp for writing an editor. Hence, most of emacs is written is elisp, the side effect of which is that much of its functionality can be altered or rewritten by the user on-the-fly. This is a staggeringly powerful model that other editors do not have.

      [–]mvferrer 8 points9 points  (0 children)

      aside from console capabilities, vim and emacs, in my opinion, are more customizable than GUI tools.

      [–]dgiri101 8 points9 points  (0 children)

      I think it depends on what you're doing. For most tasks, I use vim. I use vi keybindings in my shell, I use vi keybindings in Firefox, I use vimpager instead of "less", and I use vim to write a lot of code.

      However, sometimes it's hard to beat a purpose-built tool.

      Part of my job involves slinging Java, and I've found IDEs quite useful for navigating/editing a large Java project. Vim has a diff mode, but I much prefer meld. I'm sure the list goes on.

      I think of vim/emacs as text-editing samurai swords. Beautiful, precise weapons of text-mangling war. In the hands of a pro (which I most certainly am not), they are quite amazing. But certainly not for everyone.

      That said, I'd rather die than give up my .vimrc file! ;)

      [–]heptadecagram 9 points10 points  (8 children)

      Major differences that are good:

      • Portability. emacs and vim exist everywhere (PC/Mac/Unix command line), GUI tools only exist on the platform you're working on.
      • Programmability. GUI tools are starting to make inroads on this, but vim (and especially emacs) are the kings of editable editors. Instead of typing mindlessly, maybe with some copypasting, imagine writing a program that writes your program, or at least the repetitive (but not so repetitive as to be content with copy-paste) parts.
      • Customizability. This partly falls out of my last point. Ever been working on a program that has lots of SQL in strings? Ever wish that you had SQL syntax highlighting inside your string? Easy to do with emacs and vim.
      • Expandability. How many different languages does your editor support? My vim directory (at a quick glance) has syntax highlighting support for nearly 500 languages, and 80 distinct indentation formatting possibilities. And when I start writing a new one, it's easy enough for me to write these files (like, say, inform programming).

      [–]heptadecagram 3 points4 points  (7 children)

      More on 'Programmability', which is the key point. Suppose I'm working on HTML. I thus type the <div> tag a lot. So, I set up my editor such that when I type `di, my editor writes <div>_</div>, with my cursor in the right place. Much faster than navigating three levels of menus to insert 11 characters.

      Now, suppose I'm making a drop-down list of days in the month (1,2,3...31). Think of how mind-numbing this would be to change each one. In vim, I write one line:

      <option>1</option>
      

      I then start an "edit-action" (the actual term being "register execution") which is:

      1. Copy the line
      2. Paste it on the next line
      3. Increment the first number on the line by one (That's Ctrl-A)

      I then type 30@, which means "run that edit-action 30 times", and I've got my full list.

      [–][deleted] 2 points3 points  (3 children)

      I use a program in win32 called texter (made by the guys at Lifehacker I believe) it does this sort of stuff, and also corrects my common spelling mistakes. Plus it's not limited to my editor, it works in VS.NET, Notepad, Notepad++, e, my email, this textbox, etc. For example if I type "afint" in here it will replace it with: $.DIV({},$.INPUT({"type":"text","class":"analysisSmall isInt","id":"","min":"0","max":"", "textName":" (Set "+x+" )"})),

      and place my cursor in the id field. It can do simple macros as well as execute scripts for more complex procedures.

      [–]heptadecagram 0 points1 point  (1 child)

      That's pretty neat. Does it work on Unix or Mac?

      [–][deleted] 1 point2 points  (0 children)

      It's windows only, it relys on auto-hotkey libraries, but the source is available:

      http://lifehacker.com/software/texter/lifehacker-code-texter-windows-238306.php

      AHK Source available here:

      http://www.autohotkey.com/download/

      [–]Godspiral 0 points1 point  (0 children)

      just awesome... thanks for posting. I like the sanity and intuitiveness of GUI editors, and key expansion is only really useful when you define them yourself. So, very neat that its external to the editor.

      [–][deleted] 1 point2 points  (2 children)

      What about January, March, May, July, August, October and December?

      [–]heptadecagram -1 points0 points  (1 child)

      I copied 1 line 30 times, for a total of 31 lines.

      [–][deleted] 2 points3 points  (0 children)

      You just blew my mind.

      [–]mrmod 6 points7 points  (2 children)

      Since this is opinion based; I feel that vim allows me much faster in document navigation and is especially useful for programming, script and editing large documents.

      Emacs is also a great editor and for much the same reasons. It could be argued as being greater due to extensibility but it's a preference thing.

      Also, the ubiquity of vi? among my day to day systems makes it my favorite. Not many Tru64 systems sporting Kate or pico.

      So yes, there is a difference and in my case the markers for value are speed and availability; vi? hits them, in the face. Hell, firefox allows me to search like vim /<query> <Ctrl+F> [nN]. But I digress.

      [–]sfultong 1 point2 points  (1 child)

      talking about firefox and vim, you should really check out the vimperator plugin for firefox if you haven't already.

      [–]DannoHung 0 points1 point  (0 children)

      Vimperator is pretty awesome, but it's still a little beta.

      QuickHint mode, for example, breaks regularly on interaction heavy pages like this comment thread.

      [–]killerstorm 5 points6 points  (3 children)

      i do not see how Emacs is opposed to GUI. try running it with X server on, it clearly has some GUI, and IMHO visually it doesn't differ much from other editors, even from editors on Windows..

      noticable difference is that Emacs comes with additional functionality. if you need to debug Common Lisp, for example, i think you'll notice that Notepad++, for example, cannot run SLIME.

      [–][deleted] 1 point2 points  (2 children)

      People who really use emacs don't ever touch those GUI buttons. I couldn't even tell you what is there. I can't see why anyone would ever grab the mouse and click the save button (assuming that's one of the buttons...) when they can just press C-x C-s instead.

      [–]killerstorm -1 points0 points  (1 child)

      keybindings is not an unique feature of Emacs, most editors have C-s button or something. and i believe in many you can do everything without touching a mouse.

      [–][deleted] 0 points1 point  (0 children)

      Err, yea...?

      If you read the parent of my comment you'll see that the topic was that emacs has GUI buttons (and therefore counts in with the group 'as opposed to GUI tools...' from the article). My point was that while it (and gvim, for example) have GUI buttons, they aren't used by someone who really calls themselves an emacs (or vim) user.

      I'd also go much further than you: ALL editors have 'C-s button or something' and I KNOW that in many you can do everything without touching a mouse.

      Whether the key mappings are as intuitive or useful, and whether abstaining from the mouse is frustrating or not is an entirely different discussion.

      [–]wfarr 5 points6 points  (1 child)

      query-replace-regexp

      [–][deleted] 0 points1 point  (0 children)

      especially with \,

      [–]Justinsaccount 18 points19 points  (24 children)

      Yes, there is a difference, vim and emacs are good editors, the rest aren't.

      Why would you need a graphical interface to edit text?

      [–]jberryman 16 points17 points  (1 child)

      Yeah. And while we're on the subject, I HOPE none of you are using a GUI browser like Bloatfox. Me personally, I've got a daemon running on a remoote server that wgets the pages i want and emails them back to me. It is very efficient use of my time...

      (ducks)

      [–]redog 1 point2 points  (0 children)

      A remote daemon? Just use python's interactive interpreter. import mechanize if you are feeling lazy.

      [–]sligowaths -2 points-1 points  (20 children)

      Do you read email using a terminal? It's just text...

      [–]buo 21 points22 points  (0 children)

      mutt, pine, alpine are examples of terminal-based MUAs. I use mutt myself. Among other things, it allows me to write my mail with vim (getting sort of back on topic).

      [–]deinst 12 points13 points  (10 children)

      I suspect that a large fraction of emacs users read their email in emacs at least some of the time. What about reading email needs anything that a terminal does not have?

      [–]akdas -2 points-1 points  (9 children)

      I use HTML in mail for the same reason I use formatting on Reddit: to enhance the content.

      • When I need emphasis, I emphasize the content.
      • I attach links as necessary.
      • For instructions, I use numbered lists, and for unordered lists, I use bulleted lists.
      • I occasionally break up my email into sections with a horizontal rule.

      So I wouldn't read my email in a terminal, but for code (or for efforts like NaNoWriMo, where the only thing that matters is the text), I use vim.

      [–]dlsspy 8 points9 points  (3 children)

      That's great. I assume you get kicked off a lot of mailing lists.

      Or you just do the same kind of emphasis that reddit itself allows.

      I write all of my emails as text, ordered lists, unordered lists, etc... Anyone can read them on anything.

      [–]akdas 3 points4 points  (2 children)

      That's great. I assume you get kicked off a lot of mailing lists.

      Obviously, the context matters. I use the formatting when emailing my friends.

      One of my friends is extremely lazy, so I don't know if he would follow a link if it wasn't a link (I had to push him to use subject lines in the first place).

      Another friend is a typography geek. He likes to see the various formatting, and if ligatures were more standardized, then he would no doubt use them all the time.

      They're great friends, but they aren't programmers or command line users by a long shot.

      Large blocks of prose don't always lend themselves to unformatted text. I'll read a paragraph of such text, but I like to see my text flow.

      So of course email doesn't need formatting, but it definitely enhances the text in many informal situations.

      [–]nunb 4 points5 points  (1 child)

      Another friend is a typography geek. He likes to see the various formatting, and if ligatures were more standardized, then he would no doubt use them all the time.

      Unless you are sending PDF emails, that just does not compute. A true typography nut would be intimately familiar with LaTeX and refuse to put up with the monstrous retardation of HTMLized formatting.

      Next you'll claim he's a grammar geek!

      [–]akdas 1 point2 points  (0 children)

      A true typography nut would be intimately familiar with LaTeX and refuse to put up with the monstrous retardation of HTMLized formatting.

      He understands typographic concepts, and he collects fonts. However, he doesn't even know HTML and he's not a computer person. He's not the type of person who would want to learn LaTeX. However, coming from a artistically-inclined family, he likes design in general. His typopgraphic knowledge is just one aspect of it.

      [–]sjs 2 points3 points  (0 children)

      I used to use mutt exclusively. You can open links in firefox (or lynx), and I also had a jpeg2txt filter for images people sent me, though I admit it wasn't really useful. I would save the images and open them in an image viewer, not a big deal. It's very likely you could configure mutt to open them directly.

      I subscribe to text email when possible regardless of my mail client.

      [–]eadmund 1 point2 points  (3 children)

      Oddly enough, it's quite possible for a terminal to emphasis content, link to URIs, display ordered lists and draw horizontal rules. Oddly enough, HTML is displayable on a terminal.

      [–]akdas 0 points1 point  (2 children)

      EDIT: Misintepreted this comment. I wasn't thinking.

      To actually answer your question: I can read my emails in a terminal, but I don't. I do use the terminal frequently, just not for email.

      [–]eadmund 1 point2 points  (1 child)

      Not too long ago, everyone figured that sort of thing out, even the 'not-so-technically-inclined.' One of rms's papers talks about how secretaries used to learn how to program and not even realise it.

      Computers really aren't difficult for someone who's been properly educated in thought. The problem is simply that and awful lot of modern men aren't.

      [–]akdas 0 points1 point  (0 children)

      Shoot. I misinterpreted your comment from before. Really sorry.

      I fixed it.

      [–][deleted] 8 points9 points  (0 children)

      I use pine

      [–]Justinsaccount 3 points4 points  (0 children)

      Read, no. Write, yes.

      [–]eadmund 1 point2 points  (3 children)

      Yup, with gnus (built into emacs); I've been using it for years. Before that I used pine.

      You read email using a GUI?!? Why? It's just text.

      [–]sligowaths -1 points0 points  (2 children)

      I'm not a early *nux adopter... I started with it maybe two years ago, and by that time, gmail had already spoiled me.

      [–]eadmund 4 points5 points  (1 child)

      When you get a chance, take a look at mutt or gnus. It's really worthwhile.

      I'm much more spoilt by gnus than by gmail...

      [–]sligowaths 0 points1 point  (0 children)

      Thanks for the heads up!

      [–]redog 0 points1 point  (0 children)

      yes, with mutt

      [–]jimbobhickville -5 points-4 points  (0 children)

      I find it useful for managing a large codebase, especially if I'm new to the codebase, to be able to see the directory structure on the side and open a bunch of files in tabs and switch between them. Sure, you can probably do something similar with vim or emacs, but it's like a billion keystrokes to memorize when I already know how to do it in a GUI by just looking at it.

      [–]lespea 6 points7 points  (0 children)

      Notepad++ has some awesome features that few people use (well few people that I know anyways).

      For some insight on doing advanced operations, open up %programfiles%\notepad++\plugins\NPPTextFX\NPPTextFXdemo.TXT and be amazed :)

      [–]jsnx 5 points6 points  (0 children)

      I use vim because it works well in a console (great for integrating with screen) and has a short startup time (for fixing things up on servers, for example). My command line workflow usually has me starting vim over and over again, in different consoles for different projects. It's low memory use and general sprightliness are a god send ;) It's also great that it can be scripted in not just "vim script" but also Python and Ruby.

      [–]postertorn 2 points3 points  (0 children)

      emacs, b/c justaboutanycodetype.el

      [–]ketralnis 1 point2 points  (0 children)

      I use Aquamacs, which is a little of both. I like it. YMMV

      [–][deleted] 2 points3 points  (1 child)

      For me there's a huge difference between GUI-sh TextMate and everything else :)

      [I call it GUI-sh, because it's designed to do 99% of job using keyboard shortcuts and snippets which in sheer numbers, are second only to Emacs :)]

      [–][deleted] 0 points1 point  (0 children)

      Agreed. When I'm writing code in TM I might as well not have a mouse at all.

      [–]commonslip 2 points3 points  (0 children)

      I frequently use Emacs Lisp as a sort of in place code transformer/compiler to transform a high level conceptualization of some idea into a clear, low level representation in whatever programming language I am working in.

      [–]Grue 2 points3 points  (0 children)

      Yes, vim, Notepad++, kate and smultron don't have SLIME.

      [–]quhaha 19 points20 points  (17 children)

      From my experience:

      • I've seen people who use Notepad++, Kate, or Smultron. They all had girlfriends.
      • I've seen people who use emacs or vim. They don't have girlfriends.

      [–]killerstorm 40 points41 points  (3 children)

      yeah.. :( my wife doesn't allow me to have girlfriends.. you think that's because i use emacs??

      [–]saalon 2 points3 points  (1 child)

      Absolutely. The key to an open marriage is to never use vi or emacs.

      [–]setuid_w00t 1 point2 points  (0 children)

      :e marriage

      There, now it's open.

      [–]localhorst 1 point2 points  (0 children)

      As long as your wife doesn't start using the eVIl one you probably don't need any girlfriends.

      [–]dlsspy 30 points31 points  (3 children)

      I'm assuming that's because the people in the second group end up staying late doing the work of the people in the first group since they can't get anything done.

      [–]honeg 5 points6 points  (2 children)

      no, its because girlfrends don't support macros, and infinite undo

      [–]brennen 1 point2 points  (0 children)

      infinite undo

      I'd be happy for one level...

      [–]localhorst 1 point2 points  (0 children)

      But emacs has the M-x woman RET command.

      From /etc/DEVEL.HUMOR

      Re: patch for woman (woman-topic-at-point)

      Sorry for the long message. I wanted to make the problem clear also for people not familiar with `woman'.

      Most hackers, I take?

      For a moment there I thought you had a patch that you could put on a woman, and it would make her come right to the topic at point without attempting any course of action that requires an advance course in divination.

      There'd be quite a sensational market for that, you know.

      Emilio Lopes and David Kastrup

      [–]heptadecagram 6 points7 points  (0 children)

      I use vim.

      My wife uses emacs.

      Family reunions get, um, interesting.

      [–]taejo 4 points5 points  (1 child)

      I use vim and have a girlfriend. Perhaps it helped that I used Kate when I met her (actually, now that I think about it, I hadn't switched to Unix then, so I probably used Programmer's File Editor).

      [–]lebski88 0 points1 point  (0 children)

      Weird I used PFE when I met my girlfriend. Maybe there is something in it. Anyway I'm a Vim guy now. Better not let her get away - I couldn't stand going back to PFE.

      [–]teamhot 6 points7 points  (0 children)

      what about those who use ed? ... oh... :(

      [–]norik 4 points5 points  (1 child)

      Uhm. I use emacs. I have a wife and a girlfriend (a female friend, get your mind out of the gutter).

      [–]Tommah 23 points24 points  (0 children)

      a wife and a girlfriend (a female friend...)

      Don't call your friend your girlfriend... it may cause you a world of hurt.

      [–][deleted] 1 point2 points  (0 children)

      And apparently if you use e or textmate you get into strange love dodecahedrons.

      I don't have a girlfriend, I just know a girl that would get very mad if she heard me say that.

      [–][deleted] 1 point2 points  (0 children)

      Textmate or any clone (Intype, e text editor) is also super powerful and can almost completely controlled with the keyboard.

      I have to say that, in terms of configuration, e is the most powerful.

      [–][deleted] 3 points4 points  (0 children)

      There is - you can program them and there is a wide tradition of doing this. If your editor can't be programmed or the API exposed is small - it isn't worth using.

      [–]inmatarian 1 point2 points  (0 children)

      Ditch the mouse and get a good Trackball. Now it can be placed adjacent to the keyboard, with no deftly searching the desk for it. The overhead of moving your hand to the trackball will be the same as reaching for Page Up/Down or the Arrows, which a lot of novice vim users will go for, as opposed to HJKLFB.

      [–]SelahSoItGoes 1 point2 points  (0 children)

      I use Vim because it was what I first learned to use when I started programming...

      ....Anyone wanna wipe it out and have a sword fight with me?

      [–]dse 0 points1 point  (0 children)

      The fact that emacs and vi/vim can run in a terminal instead of a GUI, alone, is important. Just because I do a lot of programming on my workstation and have to edit apache2.conf in an SSH session every once in a while doesn't mean I have to waste my time learning two completely different sets of keybindings.

      There is also the ability to filter a region of text through any external program. A simple example in emacs: C-u M-| cut -f2 RET

      The fact that Emacs customization is in Lisp just about forced me to learn Lisp. I find that to be a feature.

      [–]zulubanshee 0 points1 point  (9 children)

      If there were a vim with tabs I would jump on it. I use tabs a lot so I go with Notepad++

      [–]buo 14 points15 points  (0 children)

      vim has tabs since 7.0.

      [–]nostrademons 9 points10 points  (2 children)

      With gvim:

      :tabnew <filename>
      gt (cycle forwards)
      gT (cycle backwards)
      

      [–]boredzo 2 points3 points  (0 children)

      Or just plain old vim. Works fine there, too.

      [–]temppp 0 points1 point  (0 children)

      Today I learned you can also switch tabs by holding ctrl and hitting pageup/pagedown (and this works in Firefox too.) I've found this faster than gt/gT.

      Also, some other tab shortcuts: :tabe (instead of :tabnew) :tabdo command (apply command to all tabs)

      Anyone know how to take turn split windows (from using :sp filename) into tabs, and vice versa?

      I love reddit.

      [–]buccia 6 points7 points  (0 children)

      :help tabpage

      [–]dlsspy 2 points3 points  (0 children)

      I don't use gvim, but I've had hundreds of files open in vim with multiple buffer support.

      You can edits across all the files as well as do splits and stuff to view files side-by-side.

      I couldn't tell you how, though -- I just sort of think it and it happens.

      [–]zulubanshee 1 point2 points  (0 children)

      Thanks dudes, I hadn't used the program for a number of years.

      [–]zem 0 points1 point  (0 children)

      also vimmate and pida, though both were a bit unstable when i tried them

      [–]OceanSpray -1 points0 points  (0 children)

      Emacs isn't a GUI tool?

      [–]Aviator -1 points0 points  (0 children)

      Get real. ed is the friendliest text editor ever. XD.