5 ms·
Really useful commands: ^X-2: Split window horizontally ^X-3: Split window vertically ^X-0: Combine window with sibling ^X-1: Undo all splits From my
by geophile 16y ago
Really useful commands:
^X-2: Split window horizontally
^X-3: Split window vertically
^X-0: Combine window with sibling
^X-1: Undo all splits
From my .emacs file:
;;; Key bindings
(global-set-key "\C-xg" 'goto-line)
(global-set-key "\C-xl" 'what-line)
(global-set-key [f1] 'goto-line)
(global-set-key [f2] 'switch-to-buffer)
(global-set-key [f3] 'shell)
(global-set-key [f4] 'query-replace)
(global-set-key [f5] 'compare-windows)
(global-set-key [f6] 'set-left-margin)
(global-set-key [f7] 'find-file)
(global-set-key [S-f7] 'revert-buffer)
(global-set-key [f8] 'save-buffer)
(global-set-key [f9] 'auto-fill-mode)
(global-set-key [f10] 'call-last-kbd-macro)
(global-set-key [S-f10] 'apply-macro-to-region-lines)
(global-set-key [f11] 'sort-lines)
(global-set-key [f12] 'undo)
(global-set-key [home] 'beginning-of-line)
(global-set-key [end] 'end-of-line)
;;; no insert key on mac keyboard
(global-set-key [insert] 'other-window)
(global-set-ke y [help] 'other-window)
(global-set-key [S-help] 'yank)
(global-set-key [C-home] 'beginning-of-buffer)
(global-set-key [C-end] 'end-of-buffer)
(global-set-key [S-next] 'scroll-other-window)
(global-set-key [S-prior] 'scroll-other-window-down)
Not key bindings, but very nice to have in .emacs:
;;; this highlights the marked region
(transient-mark-mode t)
;; don't automatically add new lines when scrolling down at
;; the bottom
;;of a buffer.
(setq next-line-add-newlines nil)
;;; Don't truncate lines when windows are split vertically
(setq-default truncate-partial-width-windows nil)
- cycojesus 16y agoBy default goto-line is mapped to M-g M-g which I find quite convenient already. I mention this because I used to have it bound to C-x g before discovering it was already bound elsewhere, default was good so C-x g got the boot to be available for something else someday. Here's some of mine (full config @ http://github.com/cycojesus/emacs http://github.com/cycojesus/emacs ) (global-set-key (kbd "C-z") 'undo) (global-set-key [delete] 'delete-char) (global-set-key [kp-delete] 'delete-char) (global-set-key (kbd "C-c b") 'browse-url) (global-set-key (kbd "C-c c") 'calendar) (global-set-key (kbd "C-c h") 'calc) ;; 'h' for 'h'P-48 (global-set-key (kbd "C-c l") 'linum-mode) (global-set-key (kbd "C-c w") 'whitespace-mode) (global-set-key [(control mouse-4)] (lambda () (interactive) (text-scale-increase 1))) (global-set-key [(control mouse-5)] (lambda () (interactive) (text-scale-decrease 1))) (define-key global-map (kbd "RET") 'newline-and-indent) (global-set-key (kbd "C-;") 'shrink-window) (global-set-key (kbd "C-.") 'enlarge-window) (global-set-key (kbd "M-/") 'hippie-expand) ;; scrollwheel on the modeline to navigate buffers (global-set-key [mode-line mouse-4] 'next-buffer) (global-set-key [mode-line mouse-5] 'previous-buffer)