Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Yes, I agree that cperl is the right mode to use. I use it daily in XEmacs.

I've also been using mmm-mode regularly to edit HTML::Mason files, with the mode (and syntax highlighting and background) changing between blocks of html and perl.

I also like your brief version of the tab definitions. However, while I'm not sure exactly what the tab key does in vim perl, cperl's default tab definition took me a bit of getting used to - particularly in that by default hitting tab at the end of a line indents the whole line appropriately instead of moving to the righ to get ready for a comment.

It might be worth noting that

(setq-default cperl-tab-always-indent nil)
tells cperl that tab means indent when the cursor is to the left of the text, otherwise it means "insert-tab" - though I believe that's still different from the shift-tab defined as "tab-to-tab-stop" which I use more often.

As far as Damian's named macros for inserting a specific chunk of text or loading a specific template, I'd suggest something like the following.

; A named function to insert some specific text. (defun my-insert-stuff () "documentation string" (interactive "*") ; "*" => error if read-only (insert "This is the text to insert. ") ) ; Set it to a specific keystroke combo. (global-set-key [(control c) m] 'my-insert-stuff) ; Load a specific template in a new unattached buffer. (defun template-one () "documentation string" ; For help and info. (interactive) ; Make this user accessible. (switch-to-buffer "template-one") (insert-file "~/template_one") ) ; It too could be set to some specific key combination. (global-set-key [(control c) o] 'template-one)
Finally, you might be amused by these definitions. for », «, ¥
;;; ---- some "unicode" perl6 stuff ;; The numeric codes are base 10 from iso-8869-1. ;; Keys are control-c followed by control-(>, <, y), ;; without the shift key (global-set-key [(control c) (control ?.)] '(lambda () (interactive "*") (insert 187))) (global-set-key [(control c) (control ?,)] '(lambda () (interactive "*") (insert 171))) (global-set-key [(control c) (control ?y)] '(lambda () (interactive "*") (insert 165)))

Regards,

Jim Mahoney

update: fixed a typo; "control" not "crontol"


In reply to Re^2: Desparately seeking a bilingual vim/Emacs expert by barrachois
in thread Desparately seeking a bilingual vim/Emacs expert by TheDamian

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (7)
    As of 2014-07-23 23:16 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (154 votes), past polls