Permalink
Browse files

ugh emacs

  • Loading branch information...
1 parent 5b411c4 commit 24047ad3e88eeb6059dcf4ae3182889b7f31188c @bkudria committed Dec 12, 2011
Showing with 36 additions and 13 deletions.
  1. +1 −0 .emacs
  2. +19 −2 .emacs.d/init-bindings.el
  3. +4 −0 .emacs.d/init-common.el
  4. +3 −3 .emacs.d/init-el-get.el
  5. +9 −8 .emacs.d/init-modes.el
View
1 .emacs
@@ -3,6 +3,7 @@
;; Add . emacs.d/ dir to load-path:
(add-to-list 'load-path "~/.emacs.d/")
+(add-to-list 'load-path "~/.emacs.d/emacs-color-theme-solarized/")
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
View
@@ -1,6 +1,9 @@
;; Delete key should delete forward
(global-set-key [delete] 'delete-char)
+;; Delete key should delete forward
+(global-set-key [kp-delete] 'delete-char)
+
;; Backspace shouldn't untabify
(global-set-key [backspace] 'backward-delete-char)
@@ -14,7 +17,7 @@
(global-set-key [f3] 'ido-switch-buffer)
;; C-F3 to show buffers using ibuffer
-(global-set-key (kbd "S-<f3>") 'ibuffer)
+(global-set-key (kbd "s-<f3>") 'ibuffer)
;; F4 refreshes and reindents the buffer
(global-set-key [f4] 'clean-buffer-or-region)
@@ -23,6 +26,7 @@
(global-set-key [f5] #'(lambda () (interactive) (revert-buffer nil t) (fit-frame)))
(global-set-key "\C-w" 'kill-buffer-and-window)
+(global-set-key (kbd "s-w") 'kill-buffer-and-window)
(global-set-key "\M-w" 'nuke-all-buffers)
@@ -40,11 +44,15 @@
;; Bind M-g to goto-line
(global-set-key "\M-g" 'goto-line)
+(global-set-key (kbd "s-g") 'goto-line)
+
;; Having to hit escape 3 times is silly and slow
(global-set-key [escape] 'keyboard-escape-quit)
(global-set-key "\C-f" 'isearch-forward)
+(global-set-key (kbd "s-f") 'isearch-forward)
+
(define-key isearch-mode-map [down] 'isearch-repeat-forward)
(define-key isearch-mode-map [up] 'isearch-repeat-backward)
(define-key isearch-mode-map [backspace] 'isearch-del-char)
@@ -54,8 +62,10 @@
(define-key isearch-mode-map (kbd "\C-r") 'isearch-query-replace-regexp)
(global-set-key "\C-s" 'ido-save-or-write-file)
+(global-set-key (kbd "s-s") 'ido-save-or-write-file)
+
(global-set-key "\C-o" 'ido-find-file)
-(define-key ido-file-completion-map (kbd "C-o") 'ido-recentf)
+(global-set-key (kbd "s-o") 'ido-find-file)
(global-set-key "\C-d" 'comment-or-uncomment-region)
@@ -73,13 +83,18 @@
(global-set-key (kbd "RET") 'align-newline-and-indent)
(global-set-key (kbd "C-SPC") 'highlight-symbol-at-point)
+(global-set-key (kbd "s-SPC") 'highlight-symbol-at-point)
(global-set-key (kbd "C-`") #'(lambda () (interactive) (dired (getenv "HOME"))))
;; Sane beginning-of-line behavior.
(global-set-key "\C-a" 'dwim-home)
(global-set-key [home] 'dwim-home)
+;; Sane end-of-line behavior.
+(global-set-key "\C-e" 'end-of-line)
+(global-set-key [end] 'end-of-line)
+
;; Use ido to find tags
(global-set-key "\M-." 'ido-find-tag)
@@ -141,3 +156,5 @@
(define-key rinari-sane-map (kbd "c") 'rinari-console)
(define-key rinari-sane-map (kbd "g") 'rinari-rgrep)
(define-key rinari-sane-map (kbd "t") 'rinari-test)
+
+
View
@@ -36,3 +36,7 @@
(color-theme-scanner-brightly)
(defalias 'yes-or-no-p 'y-or-n-p)
+
+;; _ and - Aren't word delimeters
+(modify-syntax-entry ?- "w")
+(modify-syntax-entry ?_ "w")
View
@@ -3,14 +3,14 @@
(let ((el-get-recipes
'(
ack
- autofit-frame
+;; autofit-frame
autopair
coffee-mode
dtrt-indent
el-get
elunit
emacs-textmate
- ensime
+;; ensime
fit-frame
flymake-ruby
flymake-fringe-icons
@@ -24,7 +24,7 @@
lua-mode
magit
markdown-mode
- notify
+;; notify
org-mode
php-mode-improved
rinari
View
@@ -57,22 +57,23 @@
;; Ruby Mode
+
(add-hook 'ruby-mode-hook
'(lambda ()
- (ruby-electric-mode)
+ (ruby-electric-mode t)
+ (setq-default ruby-indent-tabs-mode nil)
+ (setq-default indent-tabs-mode nil)
+ (setq-default ruby-indent-level 2)
+ ;; _ and - Aren't word delimeters
+ (modify-syntax-entry ?- "w")
+ (modify-syntax-entry ?_ "w")
))
(add-hook 'ruby-electric-mode-hook
'(lambda ()
(setq-default ruby-electric-expand-delimiters-list '(96 124))
))
-(add-hook 'ruby-mode-hook
- '(lambda ()
- (setq-default ruby-indent-tabs-mode t)
- (setq-default ruby-indent-level 2)
- ))
-
;; Rakefiles are Ruby too
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
@@ -117,7 +118,7 @@
(setq-default whitespace-global-modes t)
(setq-default whitespace-line-column 100)
(setq-default whitespace-style
- '(tabs spaces trailing space-before-tab indentation empty space-mark tab-mark))
+ '(tabs spaces trailing space-before-tab space-before-tab::tab indentation indentation::space empty space-mark tab-mark newline))

0 comments on commit 24047ad

Please sign in to comment.