Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

RE: Editor tricks.

by AgentM (Curate)
on Sep 29, 2000 at 18:54 UTC ( #34608=note: print w/replies, xml ) Need Help??

in reply to Editor tricks.

hey emacs guy, you're forgetting the cool split window stuff you can do. (same window, up to 5 files open). I use this alot to scan documentation and program in the same terminal. (C-x-1 reduces ya back to one and juts open a file to have the window split. This is the same thing that happens when you activate the help.)
AgentM Systems or Nasca Enterprises is not responsible for the comments made by AgentM- anywhere.

Replies are listed 'Best First'.
(Dermot) RE: RE: Editor tricks.
by Dermot (Scribe) on Sep 29, 2000 at 22:38 UTC
    I use vi, vim and Xemacs mostly. In windows I use Notepad just because it's there. I don't use windows for anything bar playing the odd game so I don't have to do any heavy work in it. The posts about Notepad+ caught my eye though, I'll check it out.

    With regards to editors under unix, I have long tried to stay away from the religious aspect of it although I think the flame fests can be funny they are getting a little tiring. Not that anything I think is going to stop history repeating itself. Many of the new college graduates I've worked with arrive into the company not really caring what they use but within weeks they are either raving vi nuts or raving emacs nuts. It's a cultural marker I suppose.

    I use vi or vim for system administration type work and for writing small bits of noddy code like the average perl script you see posted around here. For serious, project work, tracking down bugs in large collections of software or anything else of that nature I use emacs. I learn something new about emacs every now and again, it doesn't give up it's secrets too easily. Many would hate it for that. I love it for that. Why ? Well here are just a few of the reasons.

    1. Elisp. Imagine having an editor where you could write little pieces of Perl, name these functions and run them at will against the text in your editor. Thats what Elisp gives you in emacs.
    2. VM. Exactly the same environment for my mailer as for my editor. That's because my editor is also my mailer. Many have moved on to Mutt. Off with them I say. There's something soothing about being able to use the same keystrokes and functions in multiple applications. This extends I suppose to all applications that use the readline library including bash itself. I don't have access to a news-feed except for Deja but if I did I would use emacs for that too.
    3. M-q fill-paragraph. I mentioned this one in a previous post. There's nothing magical about it but it makes my life easier. Fscks up mightily on troff and other formats where there are no blank lines between paragraphs but everything has got its limitations, right ?.
    4. re-search-forward, re-search-backward. I don't have to tell Perl coders how useful being able to search for regexes is. The elisp regex flavour is ugly compared to Perls but it is basic and once you get over the leaning toothpick syndrome it's not too bad.
    5. BBDB. The Big Brother Database. Sits at the bottom of your VM frame in a separate window and it scans emails as they come in talking out names, alternate email addresses. Very useful, you soon build up a database of names, email addresses, phone numbers and addresses and half the time you don't even see it happening.
    6. Consistency. C-f goes forward a character, M-f goes forward a word. In the various programming modes they will go forward something equivalent, usually an expression instead of a word.
      Among my personal favoutite things about emacs are
      • the query replace functions
      • ediff (I can't say eough good things about this) - lets you do interactive diffs/merges on 2 or three files. Diffs are shown in different colors.
      • the comment aligning functions in most programming major modes. M-;
      • the way the tab key works. In text mode it aligns to the start of words in the line above, which makes colums really easy to do. In most programming modes it reindents the curent line. And it always does consistant formatting of the white space when you hit the tab key (i.e. it converts as many spaces at the begining to tabs as possible and fills the rest with space characters.
      • You can convert all tabs to spaces if you want
      And various other wonderful things too numerous to mention here.


      I know this is a bit late, but I just found this thread. :)

      Quoth Dermot:

      Imagine having an editor where you could write little pieces of Perl, name these functions and run them at will against the text in your editor.

      With Vim with Perl compiled in, you can do exactly that. With Perl. It's pretty slick.

      Black flowers blossum
      Fearless on my breath
      Teardrops on the fire
      Fearless on my breath

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://34608]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2020-05-29 14:13 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (169 votes). Check out past polls.