[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] vi, emacs, sharp sticks




> 
> In Emacs you have the choice between M-! sort (save 2 or 3 keystrokes
> ;-) and M-x sortlines, depending on whether the file is already loaded
> into a buffer or not.  What I like in Emacs though is the ability to
> run such commands on a region.
> 

Well...running external commands on a region is possible in vi. The '%' is 
just a shortcut for "all lines". Just replace with '10,.' or '0,4' or '100,$' 
as appropriate. :)


> I actually mostly use external commands like this:
> 
> C-SPC C-x C-x ; create a trivial region
> C-u M-|       ; filter region through pipe and replace it with output
> cd /coda/Projects/XEmacs/21.2-HEAD && cvs diff -U 0 src/ChangeLog
>    && cvs diff src/emacs.c RET
> 
> and mail it off to the patch list.  But you can do things like
> 

Now you're showing off -- that's not fair :P Mostly 'cos I've not had the 
need to try and do complex one-liners in vi (so never tried complex stuff). 
It should work though; no reason why it won't :)

> 
> For the information of Emacs fans who may not have seen these things
> yet; vi users won't be impressed.  :-)

I'm not impressed because you're just showing off.

*grin*

Chris...


-- 
Chris Johnson            \  "If not for me then, do it for yourself. If not
sixie@nccnet.co.uk        \  for then do it for the world." -- Stevie Nicks
www.nccnet.co.uk/~sixie/   ~---------------------------------------+
Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000   \______


---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word 
 "unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.