- Subject: Replacing certain characters
- From: "dvv" <dvv@xxxxxxxxx>
- Date: Thu, 22 Apr 2004 12:25:09 +0300
Hi!
I'm editing SGML docs and would like to replace certain letters (Bulgarian
"ia") automatically.
I'm pasting some ready configs for vim and emacs that do this.
Vim:
if !exists("format_fdp_sgml")
let format_fdp_sgml = 1
" correction for highlighting special characters
autocmd BufNewFile,BufRead *.sgml,*.ent,*.html syn match sgmlSpecial
"&[^;]*;"
" formatting FreeBSD SGML/Docbook
autocmd BufNewFile,BufRead *.sgml,*.ent set autoindent formatoptions=tcq2l
textwidth=76 shiftwidth=2 softtabstop=2 tabstop=8
" fix the lowercase 'ja'
autocmd BufEnter *.sgml,*.ent map! я я
endif
Emacs:
defvar fdp-sgml-want-special-ya nil
"If you want to remap \"я\" to я set this to 't'.")
(if fdp-sgml-want-special-ya
(global-set-key "я" "я"))
(defun fdp-sgml-toggle-special-ya()
"Toggle the input conversion of \"я\" to я."
(interactive)
(setq fdp-sgml-want-special-ya (not fdp-sgml-want-special-ya))
(message (concat "fdp-sgml-want-special-ya is " (cond
(fdp-sgml-want-special-ya "true.") (t "false."))))
(cond (fdp-sgml-want-special-ya (global-set-key "я" "я"))
(t (global-unset-key "я"))))
;; toggle state with F12
(define-key global-map [f12]
(lambda () (interactive)
(fdp-sgml-toggle-special-ya)))
How can I do this in jed? I tried turning on emacs emulation in my .jedrc
and after that pasting the emacs config - didn't work well.
Other approaches I have thought of are variables, replace_fsearch(),
replace_match().
Unfortunately I'm not good at setting editor configs and would be grateful
if someone can point me how to adapt these configs for jed.
Thank you in advance,
Dimitar Vassilev
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2004 date index]
[2004 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]