Skip to content

Instantly share code, notes, and snippets.

@peccu
Created February 26, 2010 04: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 peccu/315423 to your computer and use it in GitHub Desktop.
Save peccu/315423 to your computer and use it in GitHub Desktop.
;;====================================
;;; 折り返し表示ON/OFF
;;====================================
(defun toggle-truncate-lines ()
"折り返し表示をトグル動作します."
(interactive)
(if truncate-lines
(progn ; 折り返さない
(setq truncate-lines nil)
(setq truncate-partial-width-windows nil))
(progn ; 折り返す
(setq truncate-lines t)
(setq truncate-partial-width-windows t)))
(recenter))
; C-cC-lへバインド
(global-set-key "\C-c\C-l" 'toggle-truncate-lines)
;; デフォルトを折り返すように設定する
(setq truncate-lines t)
(setq truncate-partial-width-windows t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment