-
Notifications
You must be signed in to change notification settings - Fork 0
/
keys.el
37 lines (30 loc) · 1.26 KB
/
keys.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(global-set-key (kbd "M-z") 'undo)
(setq mac-option-modifier 'meta)
(global-set-key "\C-x?" 'comment-or-uncomment-region)
(global-set-key "\C-x\C-b" 'electric-buffer-list)
(global-set-key "\C-x\C-m" 'compile)
(global-set-key "\M-/" 'hippie-expand)
(global-set-key [f3] 'next-error)
(global-set-key [f4] (lambda () (interactive) (next-error -1)))
(global-set-key "\C-z" 'shell)
(global-set-key "\C-c\C-m" (lambda ()
(interactive)
(let ((cmd (concat "open \"" (buffer-file-name) "\"")))
(shell-command cmd ()))))
(global-set-key (kbd "<C-right>") 'enlarge-window-horizontally)
(global-set-key (kbd "<C-left>") 'shrink-window-horizontally)
(global-set-key (kbd "<C-down>") 'enlarge-window)
(global-set-key (kbd "<C-up>") 'shrink-window)
;;aliases
(defalias 'qrr 'query-replace-regexp)
(defalias 'lml 'list-matching-lines)
(global-set-key (kbd "C-=") 'dupline)
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
(global-set-key (kbd "C-c M-x") 'smex-update-and-run)
;; This is your old M-x.
(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)
(global-set-key "\M-?" 'etags-select-find-tag-at-point)
(global-set-key "\M-." 'etags-select-find-tag)
;;move between buffers with S-<arrow>
(windmove-default-keybindings)