help-gnu-emacs
[Top][All Lists]
Advanced

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

emacs on a text console - please help me overcome the shock


From: peter hodgson
Subject: emacs on a text console - please help me overcome the shock
Date: Mon, 22 Aug 2011 14:44:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

here's part of a "mouseless" (and arrow-key-less) .emacs file whose
keymap is based on old wordstar;

instead of using mnemonic keystrokes, i start with wordstar's
geometric map;

my meta-key is Alt (on ergonomic keyboards, the left-hand space bar
can be rigged as a no-hand-displacement Alt meta-key); This frees
Ctrl for less frequent mappings, and ignores Escape altogether;
 --------------------------------

 (defun datestamp ()
  "Insert a datestamp at point." 
  (interactive "*")
  (shell-command "date +%Y%m%d | tr -d '\n'") 
  (insert-buffer "*Shell Command Output*")
  (kill-buffer "*Shell Command Output*")
  (forward-word 1))
(global-set-key "\eq" 'datestamp)

;; Changes all yes/no questions to y/n type
(fset 'yes-or-no-p 'y-or-n-p)

;; show line numbers
(autoload 'linum-mode "linum" "toggle line numbers on/off" t) 
(global-set-key (kbd "C-<f5>") 'linum-mode)

(add-hook 'python-mode-hook
  (lambda() (linum-mode 1)))

(add-hook 'python-mode-hook 
      '(lambda() 
        (setq tab-width 4)))

;; ispell must be installed 
(add-hook 'text-mode-hook 'flyspell-mode)

(global-set-key [f1] 'append-to-file)
(global-set-key [f2] 'list-buffers)
(global-set-key [f3] 'other-window)
(global-set-key [f4] 'delete-other-windows)
(global-set-key [f5] 'dired)
(global-set-key [f6] 'save-buffers-kill-emacs)

(global-set-key "\e4" 'insert-file)
(global-set-key "\e7" 'find-file)
(global-set-key "\e5" 'split-window-horizontally)
(global-set-key "\C-n" 'rename-buffer)

(global-set-key "\ed" 'forward-char)
(global-set-key "\ek" 'backward-char)
(global-set-key "\ef" 'forward-word)
(global-set-key "\ej" 'backward-word)
(global-set-key "\ei" 'previous-line)
(global-set-key "\en" 'next-line)
(global-set-key "\C-f" 'recenter)

(global-set-key "\ep" 'set-mark-command)
(global-set-key "\e0" 'exchange-point-and-mark)
(global-set-key "\e/" 'mark-whole-buffer)
(global-set-key "\e=" 'mark-paragraph)

(global-set-key "\C-d" 'kill-region)
(global-set-key "\C-w" 'append-next-kill)
(global-set-key "\C-e" 'kill-ring-save)
(global-set-key "\C-q" 'yank-pop)
(global-set-key "\C-s" 'yank)

(global-set-key "\eh" 'backward-delete-char)
(global-set-key "\eg" 'delete-char)
(global-set-key "\ev" 'kill-word)
(global-set-key "\ey" 'kill-line)

(global-set-key "\eo" 'open-line)
(global-set-key "\em" 'newline) 
(global-set-key "\e;" 'end-of-line)
(global-set-key "\eu" 'beginning-of-line)
(global-set-key "\e," 'end-of-buffer)
(global-set-key "\e." 'beginning-of-buffer)
(global-set-key "\ea" 'scroll-up)
(global-set-key "\ew" 'scroll-down)

(global-set-key "\ee" 'isearch-forward)
(global-set-key "\er" 'isearch-repeat-forward)
(global-set-key "\e'" 'isearch-exit)
(global-set-key "\e3" 'isearch-backward)
(global-set-key "\e2" 'isearch-repeat-backward)
(eval-after-load "isearch"
 '(define-key isearch-mode-map "\er" 'isearch-repeat-forward))
(global-set-key "\e6" 'query-replace)

(global-set-key "\et" 'bookmark-set)
(global-set-key "\e8" 'bookmark-jump)

(global-set-key "\eb" 'upcase-word)
(global-set-key "\ez" 'downcase-word)
(global-set-key "\ec" 'capitalize-word)

(global-set-key "\e1" 'undo)

(global-set-key "\e%" 'vc-toggle-read-only)  ;;"virtual console in buffer;

(global-set-key "\e-" 'vc-register)
(global-set-key "\e=" 'vc-next-action)
(global-set-key "\e\\" 'vc-print-log) 

(global-set-key "\C-o" 'start-kbd-macro)
(global-set-key "\C-p" 'end-kbd-macro)

(setq default-major-mode 'paragraph-indent-text-mode)
(add-hook 'mail-setup-hook 'paragraph-indent-minor-mode)
(add-hook 'html-mode-hook 'paragraph-indent-text-mode)
(global-set-key "\el" 'fill-paragraph)

(setq suggest-key-bindings t)
(setq make-backup-files t)
(setq backup-by-copying-when-linked t)

(setq version-control t) ; Make Numbered Backups of Files
(setq kept-new-versions 50) ; 3 = last three numbered backups are never 
deleted. 
(setq kept-old-versions 50) ; 3 = first three numbered backups are never 
deleted. 
(setq dired-kept-versions 100) 

(setq auto-save-interval 512) ; autosave every 512 keyboard inputs
(setq auto-save-timeout 30) ; autosave after 30 s idle

(setq Info-enable-edit t)

(menu-bar-mode nil)
;; This turns off the GUI menus in X.  You can toggle this at any point with


(set-coding-priority '(coding-category-utf-8))
(set-language-environment "UTF-8")
(setq locale-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

(transient-mark-mode t)

 -------------------snip----------------------                 

(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 )
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 )

--
imputerate@puteracy.com



reply via email to

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