From 4cca819886657fe6300435ed97296a9848995cc8 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 20 Feb 2015 11:45:37 +0100 Subject: Minor changes * use ace-jump-line-mode for quick line jumping * column-number-mode enabled by default --- init/bindings.el | 6 +++--- init/functions.el | 7 +++++++ init/settings.el | 3 +++ 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'init') diff --git a/init/bindings.el b/init/bindings.el index c62daad544cd..e6128aaa78e2 100644 --- a/init/bindings.el +++ b/init/bindings.el @@ -31,7 +31,7 @@ (global-set-key (kbd "C-x M") (lambda () (interactive) (eshell t))) ;; Eval sexp and replace it with result -(global-set-key (kbd "C-c e") 'esk-eval-and-replace) +(global-set-key (kbd "C-c e") 'replace-last-sexp) ;; Start a regular shell if you prefer that. (global-set-key (kbd "C-x C-m") 'shell) @@ -45,8 +45,8 @@ ;; Add a fullscreen toggle - TODO: reenable in next Emacs release ; (global-set-key (kbd "M-RET") 'toggle-frame-fullscreen) -;; Replace standard goto-line with goto-line-with-feedback -(global-set-key (kbd "M-g g") 'goto-line-with-feedback) +;; Replace standard goto-line with ace-jump-line-mode +(global-set-key (kbd "M-g g") 'ace-jump-line-mode) ;; Goodness from @magnars ;; I don't need to kill emacs that easily diff --git a/init/functions.el b/init/functions.el index e26e1f1bea62..a0bf51a9e031 100644 --- a/init/functions.el +++ b/init/functions.el @@ -99,4 +99,11 @@ Including indent-buffer, which should not be called automatically on save." (find-file (concat "/sudo:root@localhost:" (ido-read-file-name "File: "))) (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name)))) +;; Evaluate sexp and replace it with result +(defun replace-last-sexp () + (interactive) + (let ((value (eval (preceding-sexp)))) + (kill-sexp -1) + (insert (format "%S" value)))) + (provide 'functions) diff --git a/init/settings.el b/init/settings.el index 8d1b7fbace5b..6c81536df1e4 100644 --- a/init/settings.el +++ b/init/settings.el @@ -25,6 +25,9 @@ (setq uniquify-buffer-name-style 'forward) +;; Give me column numbers +(column-number-mode t) + ;;; Code: (add-to-list 'exec-path "/usr/local/bin") -- cgit 1.4.1