Thread: [Assorted-commits] SF.net SVN: assorted: [276] configs/trunk/src/emacs/yang.el
Brought to you by:
yangzhang
|
From: <yan...@us...> - 2008-01-30 05:49:12
|
Revision: 276
http://assorted.svn.sourceforge.net/assorted/?rev=276&view=rev
Author: yangzhang
Date: 2008-01-29 21:49:17 -0800 (Tue, 29 Jan 2008)
Log Message:
-----------
disabled custom key bindings for org-mode because they interfered with defaults that were actually important
Modified Paths:
--------------
configs/trunk/src/emacs/yang.el
Modified: configs/trunk/src/emacs/yang.el
===================================================================
--- configs/trunk/src/emacs/yang.el 2008-01-30 05:48:40 UTC (rev 275)
+++ configs/trunk/src/emacs/yang.el 2008-01-30 05:49:17 UTC (rev 276)
@@ -120,11 +120,11 @@
;; refill long lines
;; (add-hook 'org-mode-hook 'refill-mode)
-;; custom keys
-(add-hook 'org-mode-hook
- (lambda ()
- (define-key org-mode-map [(tab)] [M-right M-right])
- (define-key org-mode-map [S-iso-lefttab] [M-left M-left])))
+;; custom keys TODO
+;; (add-hook 'org-mode-hook
+;; (lambda ()
+;; (define-key org-mode-map [(tab)] [M-right M-right])
+;; (define-key org-mode-map [S-iso-lefttab] [M-left M-left])))
;; highlight-parentheses
(require 'highlight-parentheses)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <yan...@us...> - 2008-02-24 07:17:54
|
Revision: 496
http://assorted.svn.sourceforge.net/assorted/?rev=496&view=rev
Author: yangzhang
Date: 2008-02-23 23:17:57 -0800 (Sat, 23 Feb 2008)
Log Message:
-----------
folded in sbw's .emacs
Modified Paths:
--------------
configs/trunk/src/emacs/yang.el
Modified: configs/trunk/src/emacs/yang.el
===================================================================
--- configs/trunk/src/emacs/yang.el 2008-02-24 07:00:01 UTC (rev 495)
+++ configs/trunk/src/emacs/yang.el 2008-02-24 07:17:57 UTC (rev 496)
@@ -259,6 +259,17 @@
;; }}}
+;; modes {{{
+
+(defun linux-c-mode ()
+ "C mode with adjusted defaults for use with the Linux kernel."
+ (interactive)
+ (c-mode)
+ (c-set-style "K&R")
+ (setq c-basic-offset 8))
+
+;; }}}
+
;; commands {{{
;; TODO fill-line
@@ -316,6 +327,31 @@
;;; TODO how to fix this?
;;(global-set-key "\C-%" 'match-paren)
+;; Silas' simple match-paren
+;(defun match-paren (arg)
+; "Go to the matching paren if on a paren"
+; (interactive "p")
+; (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
+; ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
+; (t (message "no paren under cursor"))))
+
+(defun forward-open-curly ()
+ (interactive)
+ (forward-char) (search-forward "{" nil t) (backward-char))
+(defun forward-closed-curly ()
+ (interactive)
+ (forward-char) (search-forward "}" nil t) (backward-char))
+(defun backward-open-curly ()
+ (interactive)
+ (backward-char)
+ (if (equal nil (search-backward "{" nil t))
+ (forward-char)))
+(defun backward-closed-curly ()
+ (interactive)
+ (backward-char)
+ (if (equal nil (search-backward "}" nil t))
+ (forward-char)))
+
;; }}}
;; macros {{{
@@ -328,10 +364,27 @@
;; key bindings {{{
+(global-set-key "C-xj" 'compile)
(global-set-key [f5] 'goto-line)
(global-set-key "\C-ha" 'apropos)
(global-set-key (kbd "C-c j") 'join-lines)
+;; Silas' key bindings
+
+;(global-set-key "\e[1;5A" 'backward-paragraph) ;; C-up
+;(global-set-key "\e[1;5B" 'forward-paragraph) ;; C-down
+;(global-set-key "\e[1;5C" 'forward-word) ;; C-right
+;(global-set-key "\e[1;5D" 'backward-word) ;; C-left
+;
+;(global-set-key "\e[1;5H" 'backward-open-curly) ;; C-home
+;(global-set-key "\e[5;5~" 'backward-closed-curly) ;; C-pageup
+;(global-set-key "\e[1;5F" 'forward-open-curly) ;; C-pageup
+;(global-set-key "\e[6;5~" 'forward-closed-curly) ;; C-pageup
+;(global-set-key [f11] 'shrink-window-horizontally)
+;(global-set-key [f12] 'enlarge-window-horizontally)
+;
+;(global-set-key "\e[2;5~" 'indent-relative-maybe)
+
;; TODO make the following scroll without moving the cursor
;(defun scroll-up-one (arg)
@@ -354,11 +407,10 @@
;; options {{{
-;; TODO what's the default?
;; TODO make work in XEmacs
;; default to better frame titles
-;(setq frame-title-format
-; (concat "%b - emacs@" system-name))
+(setq frame-title-format
+ (concat "%b - emacs@" system-name))
;; enable word wrapping
(add-hook 'text-mode-hook 'turn-on-auto-fill)
@@ -374,11 +426,22 @@
;; expand tabs into spaces
(setq-default indent-tabs-mode nil)
+(setq-default fill-column 80)
+;; auto fill
+(setq-default auto-fill-function 'do-auto-fill)
+
+;; tab, indent dimensions
+(setq-default c-basic-offset 4)
+(setq-default tab-width 4)
+
+;; Make lines wrap automatically in text mode.
+;;(add-hook 'text-mode-hook
+;;'(lambda () (auto-fill-mode 1)))
+
;; larger default font
;(set-face-font 'default "9x15")
-;; TODO what does this do?
;; default to unified diffs
(setq diff-switches "-u")
@@ -477,6 +540,26 @@
+;; Silas' custom set variables
+
+;(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.
+; '(auto-compression-mode t nil (jka-compr))
+; '(case-fold-search t)
+; '(current-language-environment "UTF-8")
+; '(default-input-method "rfc1345")
+; '(global-font-lock-mode t nil (font-lock))
+; '(hl-line-face (quote highlight))
+; '(show-paren-mode t nil (paren))
+; '(transient-mark-mode t))
+;(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.
+; '(highlight ((((type tty) (class color)) (:underline t)))))
+
+
+
;;;(setq default-frame-alist '((background-color . "white"))
;;; font-lock-face-attributes
;;; '((font-lock-comment-face "Sienna")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <yan...@us...> - 2008-03-16 21:53:15
|
Revision: 628
http://assorted.svn.sourceforge.net/assorted/?rev=628&view=rev
Author: yangzhang
Date: 2008-03-16 14:53:15 -0700 (Sun, 16 Mar 2008)
Log Message:
-----------
disabled a problematic hotkey
Modified Paths:
--------------
configs/trunk/src/emacs/yang.el
Modified: configs/trunk/src/emacs/yang.el
===================================================================
--- configs/trunk/src/emacs/yang.el 2008-03-15 21:33:36 UTC (rev 627)
+++ configs/trunk/src/emacs/yang.el 2008-03-16 21:53:15 UTC (rev 628)
@@ -364,7 +364,7 @@
;; key bindings {{{
-(global-set-key "C-xj" 'compile)
+;;(global-set-key "C-xj" 'compile) ;; TODO PROBLEM
(global-set-key [f5] 'goto-line)
(global-set-key "\C-ha" 'apropos)
(global-set-key (kbd "C-c j") 'join-lines)
@@ -655,4 +655,4 @@
;; use pretty fonts
(if (>= emacs-major-version 23)
- (set-default-font "Bitstream Vera Sans Mono-10"))
\ No newline at end of file
+ (set-default-font "Bitstream Vera Sans Mono-10"))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <yan...@us...> - 2008-05-09 05:17:54
|
Revision: 761
http://assorted.svn.sourceforge.net/assorted/?rev=761&view=rev
Author: yangzhang
Date: 2008-05-08 22:18:00 -0700 (Thu, 08 May 2008)
Log Message:
-----------
added note on global-auto-revert-mode
Modified Paths:
--------------
configs/trunk/src/emacs/yang.el
Modified: configs/trunk/src/emacs/yang.el
===================================================================
--- configs/trunk/src/emacs/yang.el 2008-05-09 05:16:50 UTC (rev 760)
+++ configs/trunk/src/emacs/yang.el 2008-05-09 05:18:00 UTC (rev 761)
@@ -485,6 +485,10 @@
;; highlight current line
(global-hl-line-mode t)
+;; automatically detect when buffers have changed; disabled for now because what
+;; I really want is not a silent revert but a prompt, as in vim
+;; (global-auto-revert-mode t)
+
;; set default haskell interpreter
;; TODO check this
(setq haskell-program-name "ghci -fglasgow-exts")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|