From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Dziulko Newsgroups: gmane.emacs.help Subject: Re: simple editor required Date: Tue, 3 Jun 2003 08:19:53 -0400 (EDT) Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1054646349 17694 80.91.224.249 (3 Jun 2003 13:19:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2003 13:19:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 03 15:19:01 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19NBgq-0004Zy-00 for ; Tue, 03 Jun 2003 15:19:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NApY-0001Ap-SU for gnu-help-gnu-emacs@m.gmane.org; Tue, 03 Jun 2003 08:23:56 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19NAoX-0000xi-H2 for help-gnu-emacs@gnu.org; Tue, 03 Jun 2003 08:22:53 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19NAo0-0000mI-Sb for help-gnu-emacs@gnu.org; Tue, 03 Jun 2003 08:22:22 -0400 Original-Received: from klaatu.canisius.edu ([138.92.8.100]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NAld-0000Dz-Du for help-gnu-emacs@gnu.org; Tue, 03 Jun 2003 08:19:53 -0400 Original-Received: from localhost (dziulko@localhost) by klaatu.canisius.edu (8.11.6/8.11.6) with ESMTP id h53CJrI11364 for ; Tue, 3 Jun 2003 08:19:53 -0400 Original-To: help-gnu-emacs@gnu.org In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10529 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10529 You can do something like: (global-set-key "\e[4~" 'delete-char) to get the delete key to work as you'd like. (\e[4~ would need to be subsituted by the escape sequence of your delete key). To find your delete keys escape sequence, go into the *scratch* buffer, hit C-q, then press your delete key. use something like: (setq auto-mode-alist (cons '("\\.c$" . text-mode) auto-mode-alist)) so that visiting *.c files will land you in text-mode. Good Luck! On Tue, 3 Jun 2003, Paul Edwards wrote: > 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 "")) > ;(global-set-key (kbd "") 'delete-char) > > > Thanks. Paul. > > > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs >