Skip to content

Commit

Permalink
Work changes: ggtags, smex
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Epstein committed Nov 12, 2014
1 parent e416bb3 commit 2969cce
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
4 changes: 4 additions & 0 deletions personal/c-style.el
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@

;; (add-hook 'c++-mode-hook 'snail-style-c++-mode-hook)
(add-hook 'prelude-c-mode-common-hook 'snail-style-c++-mode-hook)
(add-hook 'prelude-c-mode-common-hook 'ggtags-mode)

;; Use C++ style for IDL files
(add-hook 'idl-mode-hook 'snail-style-c++-mode-hook)

;; (sp-local-pair 'c-mode "(" nil :pre-handlers '(:rem " "))
;; (sp-local-pair 'c++-mode "(" nil :pre-handlers '(:rem " "))
30 changes: 29 additions & 1 deletion personal/caleb.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(setq prelude-guru nil)
(setq sp-use-paredit-bindings nil)
(setq smartparens-mode nil)
(setq ibuffer-expert t)
(desktop-save-mode 1)
(remove-hook 'prog-mode 'flycheck-mode)
Expand Down Expand Up @@ -34,8 +35,35 @@

(setq helm-command-prefix-key "C-c h")
(global-set-key (kbd "C-x b") 'helm-mini)
(global-set-key (kbd "M-x") 'helm-M-x)
;; (global-set-key (kbd "M-x") 'helm-M-x)

;; Smex all the things!
(require 'smex) ; Not needed if you use package.el
(smex-initialize) ; Can be omitted. This might cause a (minimal) delay
; when Smex is auto-initialized on its first run.
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
;; This is your old M-x.
(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)

;; Unbind C-x C-c when using a display
(if window-system
(global-unset-key (kbd "C-x C-c")))

;; From: http://redd.it/2lf4un
;; (setq-default fci-rule-column 80) ;; Show column ruler at 80 columns
(show-paren-mode 1) ;; Always attempt to show matching parentheses
(global-hl-line-mode) ;; Always highlight the current line
(semantic-mode 1) ;; CEDET holdover
(global-ede-mode 1) ;; CEDET holdover
;; (add-hook 'c-mode-common-hook 'fci-mode)
(add-hook 'c-mode-common-hook 'company-mode)
(add-hook 'c-mode-common-hook 'linum-mode)
(add-hook 'c-mode-common-hook 'hs-minor-mode)
(add-hook 'c-mode-common-hook 'hideshowvis-minor-mode)

;; (Conditional) C/C++ Keybinds
(add-hook 'c-mode-common-hook
(lambda () (local-set-key (kbd "<C-tab>") 'company-complete)))
(add-hook 'c-mode-common-hook
(lambda () (local-set-key (kbd "C-c j") 'find-tag)))

0 comments on commit 2969cce

Please sign in to comment.