[Top][All Lists]

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

simple editor required

From: Paul Edwards
Subject: simple editor required
Date: Tue, 03 Jun 2003 10:46:41 GMT

I'm wanting to use emacs as a substitute for vi.

I'm after the following features:

1. When I press the "a" key I want an "a" to appear on the screen
(that rules out "vi").

2. When I press the "delete" key I expect the current character
to be deleted, not the previous character (that rules out Emacs 20.7.1).

3. When I hit the enter key I expect the next line to begin underneath
the last line (that rules out Xemacs 20.4).

4. When I attempt to mark a block of text, I don't expect a find or
a goto to lose my marker (that rules out Xemacs 20.4).

5. As per (3), when I have a blank line, I don't want it to insert
spaces.  I don't mind it inserting spaces so much as I want to be
able to delete them with ctrl-k.  But when I do that it deletes my
blank line.  :-(  So I have to delete one character at a time instead.

Now due to normal beauracacy, it is difficult for me to get a
different version of emacs installed, and on some machines I
only have 20.4 and other machines only 20.7.1, so I'd prefer
both to work.  Is there any workaround?

I can't seem to stop it getting into C mode when I edit a ".c"
file.  Basically I don't want any junk loaded, I'm just after a
basic editor, ie "text mode".  I thought inhibit-default-init
would stop it from loading junk, but no such luck.

Here is my .emacs:

(setq-default tab-width 4)

(global-set-key [?\C-h] 'delete-backward-char)

(setq make-backup-files nil)

(setq inhibit-default-init 't)

(global-set-key [insertchar] 'overwritemode)

(setq auto-save-default nil)

(setq-default indent-tabs-mode nil)

;(setq-default indent-according-to-mode nil)

(setq-default default-major-mode 'text-mode)

;(global-set-key "\C-m" 'newline-and-indent)
(global-set-key [?\C-m] 'newline-and-indent)

(global-set-key "\M-g" 'goto-line)

(global-set-key "\M-r" 'replace-string)

(global-unset-key [delete])
(global-set-key [delete] 'delete-char)

; potential alternatives (nothing works on 20.7.1)
;(global-unset-key [deletechar])
;(global-set-key [deletechar] 'delete-char)
;(global-unset-key (kbd "<delete>"))
;(global-set-key (kbd "<delete>") 'delete-char)

Thanks.  Paul.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]