Skip to content

Instantly share code, notes, and snippets.

@wagjo
Created August 18, 2015 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wagjo/e3a273636b7d5a542172 to your computer and use it in GitHub Desktop.
Save wagjo/e3a273636b7d5a542172 to your computer and use it in GitHub Desktop.
emacs keybinding for setting window width
(defun set-window-width (n)
"Set the selected window's width."
(adjust-window-trailing-edge (selected-window) (- n (window-width)) t))
(defun set-70-columns ()
"Set the selected window to 80 columns."
(interactive)
(set-window-width 70))
(global-set-key "\C-x`" 'set-70-columns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment