I've got some great new keybindings that are really helping my fingers. First, here are some to help you scroll up and down in a file by one line. Great for when you're looking at lots of code, but pgup and pgdown are moving too much:
;; scroll one line at a time
(defun scroll-one-line-up (&optional arg)
"Scroll the selected window up (forward in the text) one line (or N lines)."
(interactive "p")
(scroll-up (or arg 1)))
(defun scroll-one-line-down (&optional arg)
"Scroll the selected window down (backward in the text) one line (or N)."
(interactive "p")
(scroll-down (or arg 1)))
;; Bind these functions (substitute your favorite keys for mine)
(global-set-key "\M-v" 'scroll-one-line-up)
(global-set-key "\C-b" 'scroll-one-line-up)
(global-set-key "\C-v" 'scroll-one-line-down)
(global-set-key [S-down] 'scroll-one-line-up)
(global-set-key [S-up] 'scroll-one-line-down)
(global-set-key [(kp-subtract)] 'scroll-one-line-down)
(global-set-key [(kp-add)] 'scroll-one-line-up)
I've had these bound to C-b and C-v for quite some time, but find that the "shift up arrow" (S-up) and "shift down arrow" (S-down) are much easier on the hands.
(global-set-key [S-down] 'scroll-one-line-up)
(global-set-key [S-up] 'scroll-one-line-down)
And so that I don't have to move my fingers to the "Page Up" and "Page Down" keys, I've rebound these to "meta left" and "meta right":
(global-set-key [?\e down] 'scroll-up)
(global-set-key [?\e up] 'scroll-down)
I've also rebound the shift and meta left and right to move more effectively within paragraphs:
(global-set-key [S-right] 'forward-word)
(global-set-key [S-left] 'backward-word)
(global-set-key [?\e right] 'forward-sentence)
(global-set-key [?\e left] 'backward-sentence)
These work great with my Enlightenment keybindings to move to different virtual and multiple desktops:
I've got ctrl-arrows moving between different virtual desktops, and ctrl-alt-arrows to move to the first four multiple desktops. I find that the 2x2 virtual desktop works great, I used to do a 3x3 virtual desktop, but found that it took a bit too much mental effort to remember the 9 different areas. Now, instead, I have 9 multiple desktops, each with a 2x2=4 virtual desktops on each one. Each multiple desktop is for a different task, I have a Emacs utility 2x2 desktop, A web desktop, a coding desktop, a desktop to monitor the development webserver, a desktop for multimedia with mplayer (and monitoring my production webserver), a desktop with root shells on my local machines (and a firefox that's running on tarayai for Gmail), an Emacs desktop for blogging, web browing with w3m and .emacs, a Emacs and Evince desktop for documentation, and finally an Emacs desktop for my info browsers.
That might seem like a lot of desktops, but with each one being 2x2, and each having a real distinct purpose, I find it super easy to use and keep track of.
Oh, right, also I should mention that each of those virtual desktops has only one window, either a rxvt-unicode terminal or a web browser, that's my real trick, no fancy desktop nonsense like I used to have, no widgets to distract me, just a big window with a font that is easy on the eyes (Bitstream Vera Sans Mono 15).
Back in the day, I used to have tons of widgets, man, I had them all, CPU monitors, network monitors, time and date, phase of the moon, xscreensaver widgets, volume control, it was crazy. Nowadays, I like the zen simplicity thing.
No comments:
Post a Comment