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

Re: emacs/vim & programmering



  Hej Hanrik,
du kan ju studera min .emacs. Kanske inte världens bästa
men den duger för mig.

Hälsningar,
/Karl

-----------------------------------------------------------------------
Karl Hammar                    Aspö Data           karl@kalle.csb.ki.se
Lilla Aspö 2340               0173 140 57                       Nätverk
S-742 94 Östhammar           070 511 97 84               PC/Sun datorer
Sweden                                            Linux/Unix konsulting
-----------------------------------------------------------------------

From: Henrik Andersson <hean@mds.mdh.se>
Subject: emacs/vim & programmering
Date: Sun, 19 Nov 2000 23:51:43 +0100

> Hej
> 
> Är det någon som har tips för hur man kan göra emacs/xemacs eller vim till en lätthanterlig programmeringsmiljö? Jag skulle vilja binda samma tangenter som jag har i windows. Så att jag tex kan trycka ctrl+f9 för att kompilera. Vill inte göra det med make-kommandot.
> 
> Har tittat lite efter konfigurationsfiler men har inte hittat något bra. Det måste ju finnas en hel del som programmerar med antingen emacs eller vim...
> 
> -- 
> Henrik Andersson
> 
> 
> --  
> To UNSUBSCRIBE, email to debian-user-swedish-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

/etc/emacs/site-start.el alt. ~/.emacs

;; Emacsen independent startup file.  All of the various installed
;; flavors of emacs (emacs 19, emacs 20, xemacs) will load this file
;; at startup.  Make sure any code you put here is emacs flavor
;; independent.

;; Package maintainers: do not have Debian packages edit this file.
;; See the policy manual for the proper way to handle Emacs package
;; initialization code.

(setq next-line-add-newlines nil)
(setq vc-initial-comment t)
(load "hilit19")
(setq standard-display-european t)

;; Make the sequence "C-x w" execute the `what-line' command,
;; which prints the current line number in the echo area.
;(global-set-key "\C-xw" 'what-line)

;; set up the function keys to do common tasks to reduce Emacs pinky
;; and such.

;; Make F5 be `undo'
(global-set-key [f5] 'undo)
;; Make F6 be "start macro", F7 be "end macro", F8 be "execute macro"
(global-set-key [f6] 'start-kbd-macro)
(global-set-key [f7] 'end-kbd-macro)
(global-set-key [f8] 'call-last-kbd-macro)

;; Control-F5 is "pop mark off of stack"
(global-set-key [C-f5] (lambda () (interactive) (set-mark-command t)))
(global-set-key [C-f6] 'compile)
(global-set-key [C-f7] 'eval-defun)
(global-set-key [C-f8] 'indent-region)

;; Change the behavior of mouse button 2 (which is normally
;; bound to `mouse-yank'), so that it inserts the selected text
;; at point (where the text cursor is), instead of at the
;; position clicked.
(setq mouse-yank-at-point t)

;; This adds additional extensions which indicate files normally
;; handled by cc-mode.
(setq auto-mode-alist
      (append '(("\\.C$"  . c++-mode)
                ("\\.cc$" . c++-mode)
                ("\\.hh$" . c++-mode)
                ("\\.c$"  . c-mode)
                ("\\.h$"  . c-mode))
              auto-mode-alist))

;; Tell cc-mode not to check for old-style (K&R) function declarations.
;; This speeds up indenting a lot.
(setq c-recognize-knr-p nil)

;;; ********************
;;; Edebug is a source-level debugger for emacs-lisp programs.
;;;
(define-key emacs-lisp-mode-map "\C-xx" 'edebug-defun)

(auto-compression-mode 1)



Reply to: