Skip to content

Instantly share code, notes, and snippets.

@Sukonnik-Illia
Last active February 28, 2016 11:44
Show Gist options
  • Save Sukonnik-Illia/6e41cd23fcfcc703011b to your computer and use it in GitHub Desktop.
Save Sukonnik-Illia/6e41cd23fcfcc703011b to your computer and use it in GitHub Desktop.
(defun set-window-width (n)
"Set the selected window's width."
(adjust-window-trailing-edge (selected-window) (- n (window-width)) t))
(defun set-80-columns ()
"Set the selected window to 80 columns."
(interactive)
(set-window-width 80))
(global-set-key (kbd "C-x ~") 'set-80-columns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment