From 3513d65b8b63f639059eb1909eb490cd3dcf2c43 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Mon, 1 Jun 2009 19:13:30 +0200 Subject: updated emacs config: rect-mark, saveposition, gitignore added rect-mark to make it posible to visual select rectangle regions added saveposition to jump to the position of the last visit of the file added gitignore file to ignore the dynamic files by emacs --- emacs | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'emacs') diff --git a/emacs b/emacs index b464a33..c31c101 100644 --- a/emacs +++ b/emacs @@ -209,7 +209,7 @@ ; load-path anpassen (setq load-path (cons "/usr/share/maxima/5.9.0/emacs" load-path)) -(setq load-path (append load-path (list "~/.emacs.d/lisp" ))) +(setq load-path (cons "~/.emacs.d/lisp" load-path)) (autoload 'maxima-mode "maxima" "Maxima mode" t) (autoload 'maxima "maxima" "Maxima interactive" t) @@ -306,6 +306,39 @@ (setq template-query nil) (require 'template-simple) +; remember last position in file +(setq save-place-file "~/.emacs.d/saveplace") +(setq-default save-place t) +(require 'saveplace) + +; clever autocomplete mode +(require 'ido) +(ido-mode t) +(setq + ido-ignore-buffers '("\\` " "^\*Mess" "^\*Back" ".*Completion" "^\*Ido") + ido-case-fold t + ido-use-filename-at-point nil + ido-use-url-at-point nil + ido-enable-flex-matching t + ido-max-prospects 6 + ido-confirm-unique-completion t) + +; rectagle select +(require 'rect-mark) +(global-set-key (kbd "C-x r C-SPC") 'rm-set-mark) +(global-set-key (kbd "C-w") + '(lambda(b e) (interactive "r") + (if rm-mark-active + (rm-kill-region b e) (kill-region b e)))) +(global-set-key (kbd "M-w") + '(lambda(b e) (interactive "r") + (if rm-mark-active + (rm-kill-ring-save b e) (kill-ring-save b e)))) +(global-set-key (kbd "C-x C-x") + '(lambda(&optional p) (interactive "p") + (if rm-mark-active + (rm-exchange-point-and-mark p) (exchange-point-and-mark p)))) + ; servermode (to edit files with emacsclient) (server-start) -- cgit v1.2.3