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

Re: programming editor



On Fri, Jun 18, 2004 at 12:39:35AM +0100, Anders Karlsson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Friday 18 Jun 2004 00:18, Steve Lamb wrote:
> > Anders Karlsson wrote:
> > > Best editor I have ever used though was CygnusED on the Amiga. 65kB in
> > > size and everything you'd expect an editor to do and then some (still
> > > have not found an editor that will do a rectangular area cut/paste in
> > > the middle of a text). Second to that is FrexxEd (Amiga, OS/2) that
> > > had a very nifty virtual disk you could drag/drop files in/out of that
> > > opened/saved files in the editor itself. But I digress...
> >
> >     You mean like vim?
> >
> > Do this:
> > 5i12345<ret><esc>4kl<CNTL-V>2j2lxp
> >
> >     Or, long form.  5 rows of "12345", go to 2nd row on the 2, hit
> > CNTL-V, down 2, over 2.  You'll now mark the middle block of 9 digits. 
> > x deletes it, p pastes it back in after the 5 so now the middle 3 rows
> > read "15234".
> 
> Well, CED would just allow you to highlight a rectangular area and Ctrl-C 
> copied it and Ctrl-V pasted it. :)
> 
> I am sure there is an Emacs mode *somewhere* that would allow this. Perhaps 
> in picture mode it can be done.

C-x r k - kill rectengle
C-x t y - yank rectangle
C-x r r - save rectangle to register
C-x r i - insert value from register

emacs does take some shift in though to handle properly, although vim
also, especially for people used to menu driven editors (emacs and
vi(m) started their way long before menus so ...)

> 
> Good to know that VIM is capable, even if the key stroke sequence is more 
> than a little daunting. ;-)

To protect vim, the key sequence includes making the 5x5 rectangle of
text to make the example on, move around and cut and past the
text. basically all you need to make the rectangular selection is press
Ctrl-v and move the pointer ;-)

and like some others said, I tend to use vim for light work and emacs
for heavy work, but it did take some time to configure emacs to my
liking. vim lacks some features I like (or I just didn't find them) like
latex preview (preview-latex & x-symbol), ecb, flyspell, and mainly I
prefer hotkeys to pressing Esc when I want to issue a cammand. The whole
Esc/i doesn't work well for me. It does seem to me that people around
me tend to use vim more then emacs (the non M$ ones at least ;-), maybe
because it take some more time to set up emacs to you liking.

> 
> Rgds,
> 
> - -- 
> Anders Karlsson <anders@trudheim.com>
> Trudheim Technology Ltd. - Linux System Administrator
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> 
> iD8DBQFA0iu+LYywqksgYBoRAlMvAKC4iE1ILAEGR/6ci4pDvrsOxHXlbwCg0SOG
> CCF3edotEF8cArk5h8w3hoc=
> =5pRV
> -----END PGP SIGNATURE-----
> 
> 
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 



Reply to: