Skip to content

Commit

Permalink
truncate lines setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed Jun 25, 2015
1 parent f61860e commit db64249
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion lisp/init-misc-lazy.el
Expand Up @@ -228,7 +228,6 @@ grab matched string, cssize them, and insert into kill ring"
"elpa"))
(add-to-list 'grep-find-ignored-directories v))
))
(add-hook 'grep-mode-hook (lambda () (toggle-truncate-lines 1)))

;; {{ support MY packages which are not included in melpa
(autoload 'wxhelp-browse-class-or-api "wxwidgets-help" "" t)
Expand Down
7 changes: 7 additions & 0 deletions lisp/init-misc.el
Expand Up @@ -218,6 +218,13 @@

(add-hook 'prog-mode-hook 'generic-prog-mode-hook-setup)

;; {{ display long lines in truncated style (end line with $)
(defun truncate-lines-setup ()
(toggle-truncate-lines 1))
(add-hook 'grep-mode-hook 'truncate-lines-setup)
;; (add-hook 'org-mode-hook 'truncate-lines-setup)
;; }}

;; turns on auto-fill-mode, don't use text-mode-hook because for some
;; mode (org-mode for example), this will make the exported document
;; ugly!
Expand Down

0 comments on commit db64249

Please sign in to comment.