Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Desparately seeking a bilingual vim/Emacs expert

by InfiniteLoop (Hermit)
on Mar 23, 2005 at 08:12 UTC ( #441708=note: print w/replies, xml ) Need Help??

in reply to Desparately seeking a bilingual vim/Emacs expert

Try the abbrev-mode. Here is the sample code that you can stick in an .emacs file, which enables the abbrev-mode and sets up some global abbreviations:
(abbrev-mode 1) (define-abbrev-table 'global-abbrev-table '( ("dbg" "use Data::Dumper qw( Dumper );^Mwarn Dumper[];^[hi" nil 1) ))
I found that it is better to add a hook to the preferred editing made, to enable abbreviation mode, like:
(add-hook 'text-mode-hook (lambda () (abbrev-mode 1)))
This enables the abbreviation mode while editing text files. Also you can enbale the abbrev mode by typing: M-x abbrev-mode
For the pre-fab documents, try using auto-insert. This mode can work on the file extensions, this link gives more info

For tab stops etc, use cperl-mode.

Replies are listed 'Best First'.
Re^2: Desparately seeking a bilingual vim/Emacs expert
by TheDamian (Priest) on Mar 25, 2005 at 19:01 UTC
    That's really helpful. Thank-you!


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://441708]
[LanX]: I think it's a flag problem ... I'll produce a reprodocable example for SOPW
[Corion]: "flag problem" to me sounds like "contains UTF-8 bytes but was never properly decoded to an UTF-8 string"
[LanX]: not my code ...
[choroba]: yeah, sounds like one of the strings is not flagged as UTF-8
[choroba]: which usually means its input wasn't handled correctly
[Corion]: choroba: Yeah, I think that would be the good solution
[LanX]: I suspect the first string which comes from the DB ...
[LanX]: ... but this part is already in production for a year now
[Corion]: LanX: The "good" approach here would be to use the appropriate DBI parameters to make the driver decode strings properly. But that will have a ripple-on effect of messing up all the places where manual decoding happens ;)
[LanX]: which means albeit being broken UTF8 it'll be handled correctly

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-01-16 13:55 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (150 votes). Check out past polls.