Vim user switch to emacs?

Joe Van Dyk wrote:

Great! If I want to use that, I'd put it in $HOME/.vim/indent? And
it'll be used automatically instead of the stock version?

Should be so, yes,
        nikolai

···

--
Nikolai Weibull: now available free of charge at http://bitwi.se/\!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

Under what conditions? I'll agree that :shell from inside a gvim
window (note: gvim, not terminal vim) sucks. However, shell from a
terminal vim process works fine for me. It would be nice if it had
screen-type functionality, but I don't consider that one missed
feature enough to make it suck as horrendously as you imply. In all
respects, when I :shell from terminal vim, I might as well be in
another terminal except I have the added bonus that exit takes me back
to my still running vim instance.

So, I admitted the :shell under gvim sucks... but why would I need it?
If I'm in gvim, I've got plenty of other dedicated terminals just an
M-<tab> away. The only time I use shell is when I'm stuck in a
terminal vim across an SSH connection without X tunnelling.

Jacob Fugal

···

On 8/26/05, Derek Wyatt <derek@derekwyatt.org> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>If this is the sort of thing you're looking for then I have an
>>alternate solution. I was a hard-core emacs user who switched to
>>vim and the one major thing i missed was running a shell in my editor.
>
>
> did ':shell' not work for you?

Dont' get me wrong, i love vim and it's the greatest editor in the
history of the world, but umm... ":shell" sucks.

"Stefan Schmiedl" <s@xss.de> writes:

Josef 'Jupp' SCHUGT <jupp@gmx.de> writes:

When people hear me say "Emacs is great. It only lacks a good editor."
they first think that is meant to be a funny remark. It is not. Emacs
is a great program I use for many tasks but when it comes to quite
advanced editing tasks I usually save the file, do the complex editing
in vim, then switch back to Emacs.

Hmm, I'm curious. Can you show me a sample task that made you switch
to vim?

The global command, for example:

:%g/\[CRON\]/d deletes all (uninteresting) cron entries in my auth.log

C-x h M-x flush-lines \[CRON\] RET

:%g/Customer$/s/\([^ ]*\) \([^ ]*\)/&2, &1/g
.... give and take a few \ in front of parentheses ...
exchanges the first and second space delimited word in lines ending with Customer

M-% ... RET ... !

Being able to record arbitrary command sequences like (not a real life example)
df.3j04 p (cut upto and including . and paste the deletion 3 lines down after column 4)

C-x ( M-z . M-3 C-n C-a M-4 C-f C-y C-x )

Execute with C-x e as often as you want, or bind it to a key of your
choice. (Untested, I just wrote down what I'd intuitively type.)

and of course my favourite vim application: vimoutliner (www.vimoutliner.org)

Ok, outliners. There are lots of them for Emacs but I admit I don't
really like any of them (I prefer org-mode). I know I tried
vimoutliner once, but I can't recall how it was... I think I was not
too impressed. I use OPML Editor for now when I need outlines.

all of this without breaking my fingers because of the unlucky
positioning of CTRL.

Just curious: How do you leave vim's input mode?

I'm not the OP, but probably the same way I do, ESC.

···

On Aug 31, 2005, at 9:20 AM, Christian Neukirchen wrote:

On Tue, 30 Aug 2005 23:37:54 +0900, Christian Neukirchen >> <chneukirchen@gmail.com> wrote:

s.

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org

The global command, for example:

:%g/\[CRON\]/d deletes all (uninteresting) cron entries in my auth.log

C-x h M-x flush-lines \[CRON\] RET

vim lets you put any command after the global pattern. How does emacs solve this
with its interactive parameter queries?

:%g/Customer$/s/\([^ ]*\) \([^ ]*\)/&2, &1/g
.... give and take a few \ in front of parentheses ...
exchanges the first and second space delimited word in lines ending with Customer

M-% ... RET ... !

I don't know enough emacs to see through the dots, but that's not important.

Being able to record arbitrary command sequences like (not a real life example)
df.3j04 p (cut upto and including . and paste the deletion 3 lines down after column 4)

C-x ( M-z . M-3 C-n C-a M-4 C-f C-y C-x )

That's the main difference for me. I just can't remember all those meta/control
combinations. the vim command maps better to my brain.

all of this without breaking my fingers because of the unlucky
positioning of CTRL.

Just curious: How do you leave vim's input mode?

with a swish of the hand to the ESC button ... don't ask how often
I hit ESC while I typed this message in Opera ...

s.

···

On Wed, 31 Aug 2005 22:20:46 +0900, Christian Neukirchen <chneukirchen@gmail.com> wrote:

Christian Neukirchen wrote:

"Stefan Schmiedl" <s@xss.de> writes:

Being able to record arbitrary command sequences like (not a real

life example)

df.3j04 p (cut upto and including . and paste the deletion 3 lines

down after column 4)

C-x ( M-z . M-3 C-n C-a M-4 C-f C-y C-x )

I hate to say it but, strangely enough, you've just reinforced my
decision to switch from emacs. It probably took you at least twice
as long to type the example.

Regs,
D

- --
Derek Wyatt - C++ / Ruby / Unix Programmer

Dont' get me wrong, i love vim and it's the greatest editor in the
history of the world, but umm... ":shell" sucks.

Under what conditions? I'll agree that :shell from inside a gvim
window (note: gvim, not terminal vim) sucks. However, shell from a
terminal vim process works fine for me. It would be nice if it had
screen-type functionality, but I don't consider that one missed
feature enough to make it suck as horrendously as you imply. In all
respects, when I :shell from terminal vim, I might as well be in
another terminal except I have the added bonus that exit takes me back
to my still running vim instance.

So, I admitted the :shell under gvim sucks... but why would I need it?
If I'm in gvim, I've got plenty of other dedicated terminals just an
M-<tab> away. The only time I use shell is when I'm stuck in a
terminal vim across an SSH connection without X tunnelling.

Because the shell suspends current vim usage, and you can't get back
to it unless you exit the shell. I never understood why it existed
when a simple ^Z gets you back to your controlling shell and an fg
gets you back to vim, and of course, you didn't exit the shell, you
just pre-empted it.

I see absolutely no value in :shell.

Regs,
D

- --
Derek Wyatt - C++ / Ruby / Unix Programmer

"Stefan Schmiedl" <s@xss.de> writes:

The global command, for example:

:%g/\[CRON\]/d deletes all (uninteresting) cron entries in my auth.log

C-x h M-x flush-lines \[CRON\] RET

vim lets you put any command after the global pattern. How does emacs solve this
with its interactive parameter queries?

That's not directly possible; you can, however, apply a keyboard macro
(see below) to each line, which should result in about the same power.

:%g/Customer$/s/\([^ ]*\) \([^ ]*\)/&2, &1/g
.... give and take a few \ in front of parentheses ...
exchanges the first and second space delimited word in lines ending with Customer

M-% ... RET ... !

I don't know enough emacs to see through the dots, but that's not important.

The dots are your regex and replacement, properly escaped. :slight_smile:

Being able to record arbitrary command sequences like (not a real life example)
df.3j04 p (cut upto and including . and paste the deletion 3 lines down after column 4)

C-x ( M-z . M-3 C-n C-a M-4 C-f C-y C-x )

That's the main difference for me. I just can't remember all those meta/control
combinations. the vim command maps better to my brain.

I can't say I "remember" them, I just typed them and checked which
keys I hit. I guess it's all in muscle memory here (Emacs lossage
buffer helps seeing the keystrokes too, btw.) Still, the names are
comparatively easy to remember:

  C-x ( and C-x ) define the macro
  M-z zap to char
  M-<number> prefix argument
  C-n next line
  C-a beginning of line (ok, that doesn't fit)
  C-f forward
  C-y yank

all of this without breaking my fingers because of the unlucky
positioning of CTRL.

Just curious: How do you leave vim's input mode?

with a swish of the hand to the ESC button ... don't ask how often
I hit ESC while I typed this message in Opera ...

:wink: Interesting. In emacs, I use ESC quite often too, because you can
use it as M- and there was some time my X11 emacs was broken and
didn't recognize Alt.

···

On Wed, 31 Aug 2005 22:20:46 +0900, Christian Neukirchen <chneukirchen@gmail.com> wrote:

s.

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org

Top posting to say, if you're looking for (or to recommend) an editor and
you're considering vim or emacs, I'd recommend considering nedit as well.

In many ways it's almost as powerful as emacs (ignoring the emacs as an OS
syndrome), including such features as regular expressions, macros, recordable
keyboard macros (which can be editied to include any macro command or
construct available), (programmable) syntax highlighting, the possiblity to
do folding by virtue of macros (the text is, unfortunately, truly folded
instead of hidden--this may be its biggest weak point), but encased in a much
more modern GUI with "traditional" (Windows like) menus and keyboard
shortcuts.

At a quick glance, I believe that all of the tasks mentioned below can be done
in nedit (but I might not respond to any challenge to prove it, at least not
at the moment).

Randy Kramer

···

On Wednesday 31 August 2005 11:01 am, Stefan Schmiedl wrote:

On Wed, 31 Aug 2005 22:20:46 +0900, Christian Neukirchen <chneukirchen@gmail.com> wrote:
>> The global command, for example:
>> :%g/\[CRON\]/d deletes all (uninteresting) cron entries in my auth.log
>
> C-x h M-x flush-lines \[CRON\] RET

vim lets you put any command after the global pattern. How does emacs solve
this with its interactive parameter queries?

>> :%g/Customer$/s/\([^ ]*\) \([^ ]*\)/&2, &1/g
>>
>> .... give and take a few \ in front of parentheses ...
>> exchanges the first and second space delimited word in lines ending with
>> Customer
>
> M-% ... RET ... !

I don't know enough emacs to see through the dots, but that's not
important.

>> Being able to record arbitrary command sequences like (not a real life
>> example) df.3j04 p (cut upto and including . and paste the deletion 3
>> lines down after column 4)
>
> C-x ( M-z . M-3 C-n C-a M-4 C-f C-y C-x )

That's the main difference for me. I just can't remember all those
meta/control combinations. the vim command maps better to my brain.

>> all of this without breaking my fingers because of the unlucky
>> positioning of CTRL.
>
> Just curious: How do you leave vim's input mode?

with a swish of the hand to the ESC button ... don't ask how often
I hit ESC while I typed this message in Opera ...

s.

Derek Wyatt <derek@derekwyatt.org> writes:

> C-x ( M-z . M-3 C-n C-a M-4 C-f C-y C-x )

I hate to say it but, strangely enough, you've just
reinforced my decision to switch from emacs. It probably
took you at least twice as long to type the example.

It probably took Stefan even longer to think through what
commands he needed to include in the macro. I very much
doubt that raw typing speed is any bottleneck here.

···

--
Daniel Brockman <daniel@brockman.se>

Christian Neukirchen <chneukirchen@gmail.com> writes:

  C-x ( and C-x ) define the macro
  M-z zap to char
  M-<number> prefix argument
  C-n next line
  C-a beginning of line (ok, that doesn't fit)

Ironically, I think C-a for beginning-of-line is one of the
best and easiest-to-remember bindings of all time.

Not only is `A' the first letter of the alphabet, which
would make a perfectly adequate mnemonic, but the `A' key is
actually located physically at the beginning of the keyboard
(on both Dvorak and QWERTY!).

In my experience, this "spatial mnemonic" enables you to
wire the C-a binding really deep into muscle memory. YMMV.

···

  C-f forward
  C-y yank

--
Daniel Brockman <daniel@brockman.se>

Daniel Brockman wrote:

Derek Wyatt <derek@derekwyatt.org> writes:

> C-x ( M-z . M-3 C-n C-a M-4 C-f C-y C-x )
>
> I hate to say it but, strangely enough, you've just
> reinforced my decision to switch from emacs. It probably
> took you at least twice as long to type the example.

It probably took Stefan even longer to think through what
commands he needed to include in the macro. I very much
doubt that raw typing speed is any bottleneck here.

Blah, blah, blah.

Can we please end this thread now? Use comp.editors for editor wars.
Or, better yet, keep your goddam opinionated ramblings to yourselves and
let people use whatever fucking editor they want. We already know that
Emacs is crap because it uses key-chords, that Vim is crap because it
uses modes, that Sam is crap because it more or less only runs on Plan 9
and hasn't seen an update in 20 years, that NEdit is crap simply because
it's crap, that Emacs is the shit because it can have embedded
terminals, that Vim is the shit because it's fast, that Sam is the shit
because it can do complex edits easily, that NEdit is the shit because
it's crap and works like most editors for Windows would've. Can we now
return to our discussion on the rights and wrongs of abortion, the merit
of the war in Iraq, the stupidity of George W. Bush, and our discussion
on what SCM beats all the other SCMs, *please*,
        nikolai

···

--
Nikolai Weibull: now available free of charge at http://bitwi.se/\!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

Daniel Brockman <daniel@brockman.se> writes:

Christian Neukirchen <chneukirchen@gmail.com> writes:

  C-a beginning of line (ok, that doesn't fit)

Ironically, I think C-a for beginning-of-line is one of the
best and easiest-to-remember bindings of all time.

Yeah, it makes sense but there is no direct english word.
(in german: Anfang und Ende.)

···

In my experience, this "spatial mnemonic" enables you to
wire the C-a binding really deep into muscle memory. YMMV.

Daniel Brockman <daniel@brockman.se>

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org

Nikolai,

Blah, blah, blah.

Can we please end this thread now?

Don't look at me, I didn't start it. I'm just making a
stand against The Antagonists. :slight_smile:

···

--
Daniel Brockman <daniel@brockman.se>

Nikolai Weibull wrote:

Daniel Brockman wrote:

> Derek Wyatt <derek@derekwyatt.org> writes:

> > > C-x ( M-z . M-3 C-n C-a M-4 C-f C-y C-x )
> >
> > I hate to say it but, strangely enough, you've just
> > reinforced my decision to switch from emacs. It probably
> > took you at least twice as long to type the example.

> It probably took Stefan even longer to think through what
> commands he needed to include in the macro. I very much
> doubt that raw typing speed is any bottleneck here.

Can we please end this thread now? Use comp.editors for editor wars.
Or, better yet, keep your goddam opinionated ramblings to yourselves and
let people use whatever fucking editor they want.

OK, I realize now that I may have come on a little strong here. I'm
sorry if anyone feels that my response was uncalled for. However, I
didn't want to see this thread spin off into yet another Vim-vs.-Emacs
discussion, so I wrote down what I felt about the potential future of
this _sub-thread_,
        nikolai

P.S.
For all those that can't possibly see life without shell-buffers,
there's always http://www.wana.at/vimshell/index.php\. I forgot to
mention it earlier.
D.S.

···

--
Nikolai Weibull: now available free of charge at http://bitwi.se/\!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

Daniel Brockman wrote:

Not only is `A' the first letter of the alphabet, which
would make a perfectly adequate mnemonic, but the `A' key is
actually located physically at the beginning of the keyboard
(on both Dvorak and QWERTY!).

Q is the leftmost letter on *my* QWERTY keyboard.

A would be a good mnemonic if you're French, though...

In any case, vi's corresponding command of 0 is similarly easy to recall (column zero). Or you can use ^, and the mnemonic for that is the regex.

mathew

···

--
<URL:http://www.pobox.com/~meta/&gt;
          WE HAVE TACOS

Hi --

···

On Thu, 1 Sep 2005, Christian Neukirchen wrote:

Daniel Brockman <daniel@brockman.se> writes:

Christian Neukirchen <chneukirchen@gmail.com> writes:

  C-a beginning of line (ok, that doesn't fit)

Ironically, I think C-a for beginning-of-line is one of the
best and easiest-to-remember bindings of all time.

Yeah, it makes sense but there is no direct english word.
(in german: Anfang und Ende.)

Alpha and... end :slight_smile:

David

--
David A. Black
dblack@wobblini.net

Daniel Brockman wrote:

Nikolai,

Blah, blah, blah.

Can we please end this thread now?

Don't look at me, I didn't start it. I'm just making a
stand against The Antagonists. :slight_smile:

Time to add a "vi/vim/gvim/emacs/xemacs" trash filter to the 'ol email client. This dead horse has been flogged long enough.

Dan

P.S.
For all those that can't possibly see life without shell-buffers,
there's always http://www.wana.at/vimshell/index.php\. I forgot to
mention it earlier.
D.S.

You are now officially my hero. I've been looking for this forever,
and I now have it! Yay!