News for hackers. Stuff that matters.
Re:Exploring Emacs by happy4crazy on Saturday December 08, 2012 @01:17PM (#4892252)
This is my experience exactly. I was a long-time, very fast Vim user, but I wanted to play around with Proof General, an Emacs mode for using proof assistants like Coq[0]. Emacs slowly cannibalized my Vim usage from there: I started using it for Clojure, and was amazed that M-. would hop me into Clojure source. Then I started using it for Erlang, and then I started taking all my notes in org-mode. It wasn't until I was already pretty comfortable in Emacs that I learned about the C-h commands.

For pure text surgery, I'm still significantly faster in Vim. But the fact that Emacs is so explorable/discoverable is just so fun!

[0] http://proofgeneral.inf.ed.ac.uk/

Re:Exploring Emacs by __david__ on Saturday December 08, 2012 @01:40PM (#4892320)
> For pure text surgery, I'm still significantly faster in Vim.

Have you tried viper mode or one of the equivalents? I'm curious how it compares to vi. One of the things that I (as a long time Emacs user) have considered is to switch to using viper mode, even though I only know vi enough to edit a config file on a remote machine that lacks emacs. But I'm curious how it compares to the real thing, and if it gets in the way of ancillary emacs stuff (I can't live without stuff like "C-x v =" and "M-/").

Re:Exploring Emacs by Hemospectrum on Saturday December 08, 2012 @02:23PM (#4892432)
Skip viper-mode and go straight to evil-mode, which is based on modern Vim rather than classic vi. It even supports a plugin system, so that missing features and popular extensions (like surround.vim) can be reimplemented with ease (https://github.com/timcharper/evil-surround).

The difference between Vim and the original vi is pretty huge. Just as an Emacs user might be stymied by the missing Lisp support in uemacs or zile, a habitual Vim user leans on stuff like text objects and visual selections, which were never even a twinkle in Bill Joy's eye.

Re:Exploring Emacs by numbnuts on Saturday December 08, 2012 @01:47PM (#4892337)
Evil[0] is where it's at for vi/m emulation. In my, albeit short, experience Evil is much less obtrusive than Viper and Vimpulse.

[0]: https://gitorious.org/evil/pages/Home

Re:Exploring Emacs by happy4crazy on Saturday December 08, 2012 @01:50PM (#4892345)
I haven't. Oddly, I find that the Vim and Emacs parts of my brain are completely separate. When I open Vim, my fingers do Vim stuff, and when I open Emacs, my fingers do Emacs stuff.
Re:Exploring Emacs by vsbuffalo on Saturday December 08, 2012 @02:12PM (#4892393)
I'm very curious about this. I've had the opposite experience: I was a slow Vim users (but stil, Vim lover), and I switched to emacs to use ESS-mode for R. Soon I realized the core movement operations I clumsily had to switch modes for in Vim were the same in bash (by default configuration) as they were in Emacs. Even textboxes in OS X behave somewhat same way. C-a, C-e, C-k, C-y M-b, M-f, are all the same for example. So is searching (C-r, C-s). I was fast at these in bash, so learning them in emacs was a breeze. So, how do you use bash? Do you use these bindings?
Re:Exploring Emacs by henrik_w on Saturday December 08, 2012 @02:21PM (#4892427)
C-r is very handy in bash. On the subject of search - I recently switch from Emacs to Vim, just to try something new. It's working out well, but so far I have not found an equivalent for C-s <some letters> C-w C-s(C-w to grab the current word, C-s again searches for the next apperance of it). This is still the best way to search incrementally that I have found in any editor. Any tips on how to do the same thing in Vim (with as few key-strokes as possible) are appreciated.
Re:Exploring Emacs by to3m on Saturday December 08, 2012 @02:54PM (#4892522)
* in edit mode is what you want - http://vimdoc.sourceforge.net/htmldoc/pattern.html#star - though it's not quite the same, as it will search left and right for the word boundary.

(emacs is actually a bit unwieldy by comparison - * was one of the things I missed when I left vim. I was also used to using this same functionality in Visual Studio and Scite (it's Ctrl+F3), so it was well embedded into my workflow.)

Re:Exploring Emacs by henrik_w on Saturday December 08, 2012 @03:43PM (#4892636)
Thanks. Yes, * is good, but only if you already are at the word you want to search for. When that's not the case, in Emacs I hit C-s, typed the first few letters, found the word, grabbed it with C-w, then hit C-s repeatedly. In Vim, I haven't found quite the same convenient way. I have been getting out of incremental search, then used *, but it's a few more key strokes, especially if the first hit is not the word I'm looking for.
Re:Exploring Emacs by johncoltrane on Sunday December 09, 2012 @03:25PM (#4895982)
Use n to go to next occurence of your search pattern and N to go the other way.
Re:Exploring Emacs by henrik_w on Monday December 10, 2012 @04:58AM (#4898322)
Yes, but I have to hit enter first. And, having hit n a couple of times, I haven't found a way to easily add more letters to the search pattern (but I am pretty new to Vim). Also, I (believe) I need to escape out of search mode if I want to use * if I found the word I was looking for and want to find more occurrences of it.
Re:Exploring Emacs by johncoltrane on Monday December 10, 2012 @06:18PM (#4902171)
You can use <C-r><C-w> to insert the word under the cursor in the command-line. You can use <C-r>/ t oinsert the latest search pattern. You can use <C-w> to delete the word on the left or <C-u> to delete everything you already entered. You can use // and ?? to reuse the latest pattern.
Re:Exploring Emacs by aerique on Sunday December 09, 2012 @01:55PM (#4895588)
Isn't '/' in Vim able to search incrementally? It does in evil-mode in Emacs.
Re:Exploring Emacs by johncoltrane on Sunday December 09, 2012 @03:26PM (#4895984)
Not by default, put

    set incsearch 
in your ~/.vimrc
Re:Exploring Emacs by tomjakubowski on Saturday December 08, 2012 @09:09PM (#4893498)
bash and anything else which uses readline offers a vi support mode [1]. Other shells, like zsh, allow you to use vi bindings as well [2].

[1]: http://blog.sanctum.geek.nz/vi-mode-in-bash/ [2]: http://zshwiki.org/home/zle/emacsandvikeys