|
|
|
|
@ -168,6 +168,38 @@ |
|
|
|
|
mode-line-misc-info |
|
|
|
|
mode-line-end-spaces)) |
|
|
|
|
#+END_SRC |
|
|
|
|
** Mark handling |
|
|
|
|
No transient mark is more flexible |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(transient-mark-mode 0) |
|
|
|
|
#+END_SRC |
|
|
|
|
But of course we need to /see/ the mark |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(require 'visible-mark) |
|
|
|
|
(visible-mark-mode t) |
|
|
|
|
(global-visible-mark-mode t) |
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
The following are some convenient bindings; notice that on my layout F13 and |
|
|
|
|
F14 are obtained by tapping the left and right shift respectively |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(global-set-key (kbd "<f13>") 'set-mark-command) |
|
|
|
|
(global-set-key (kbd "<f14>") 'set-mark-command) |
|
|
|
|
|
|
|
|
|
(defun jump-to-mark () |
|
|
|
|
"Jumps to the local mark, respecting the `mark-ring' order. |
|
|
|
|
This is the same as using \\[set-mark-command] with the prefix argument." |
|
|
|
|
(interactive) |
|
|
|
|
(set-mark-command 1)) |
|
|
|
|
(global-set-key (kbd "<M-f13>") 'jump-to-mark) |
|
|
|
|
(global-set-key (kbd "<M-f14>") 'jump-to-mark) |
|
|
|
|
|
|
|
|
|
(defun just-activate-mark () |
|
|
|
|
(interactive) |
|
|
|
|
(activate-mark)) |
|
|
|
|
(global-set-key (kbd "<S-f13>") 'just-activate-mark) |
|
|
|
|
(global-set-key (kbd "<S-f14>") 'just-activate-mark) |
|
|
|
|
#+END_SRC |
|
|
|
|
** Whitespace |
|
|
|
|
Trailing whitespace is evil; get rid of it |
|
|
|
|
*** TODO Have a look at ws-trim.el |
|
|
|
|
@ -374,29 +406,6 @@ |
|
|
|
|
(concat emacs-dir basename) |
|
|
|
|
(concat "~/.emacs-" basename))))) |
|
|
|
|
|
|
|
|
|
;; * clever mark stuff |
|
|
|
|
(require 'visible-mark) |
|
|
|
|
(visible-mark-mode t) |
|
|
|
|
(global-visible-mark-mode t) |
|
|
|
|
(transient-mark-mode 0) |
|
|
|
|
;; ** stuff that works |
|
|
|
|
(defun jump-to-mark () |
|
|
|
|
"Jumps to the local mark, respecting the `mark-ring' order. |
|
|
|
|
This is the same as using \\[set-mark-command] with the prefix argument." |
|
|
|
|
(interactive) |
|
|
|
|
(set-mark-command 1)) |
|
|
|
|
|
|
|
|
|
(defun just-activate-mark () |
|
|
|
|
(interactive) |
|
|
|
|
(activate-mark)) |
|
|
|
|
|
|
|
|
|
(global-set-key (kbd "<M-f13>") 'jump-to-mark) |
|
|
|
|
(global-set-key (kbd "<M-f14>") 'jump-to-mark) |
|
|
|
|
(global-set-key (kbd "<f13>") 'set-mark-command) |
|
|
|
|
(global-set-key (kbd "<f14>") 'set-mark-command) |
|
|
|
|
(global-set-key (kbd "<S-f13>") 'just-activate-mark) |
|
|
|
|
(global-set-key (kbd "<S-f14>") 'just-activate-mark) |
|
|
|
|
|
|
|
|
|
;; * Wordnik - this has bitrotten :fixme: |
|
|
|
|
;(require 'wordnik-synonym) |
|
|
|
|
;(global-set-key (kbd "H-=") 'wn/synonym-at-point) |
|
|
|
|
|