Emacs: Truncate lines only in prog-mode and conf-mode.
This commit is contained in:
parent
59e5b30955
commit
cd80739e8f
|
@ -1,6 +1,6 @@
|
|||
;;; buffers.el --- Default settings for buffers. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-02-02T10:16:51+0100>
|
||||
;; Time-stamp: <2020-02-05T16:35:38+0100>
|
||||
|
||||
;;; Commentary:
|
||||
;; * Setup scratch buffer.
|
||||
|
@ -40,10 +40,18 @@
|
|||
|
||||
(set-frame-parameter nil 'buffer-predicate 'my/buffer-predicate)
|
||||
|
||||
(defun my/truncate-lines ()
|
||||
"Truncate lines instead of wrapping them."
|
||||
(setq-local truncate-lines t))
|
||||
|
||||
:bind
|
||||
;; Switch buffers.
|
||||
("M-<left>" . previous-buffer)
|
||||
("M-<right>" . next-buffer)
|
||||
|
||||
:hook
|
||||
(prog-mode . my/truncate-lines)
|
||||
(conf-mode . my/truncate-lines)
|
||||
)
|
||||
|
||||
;; Show and select buffers.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; common.el --- Common programming settings. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-02-04T18:49:51+0100>
|
||||
;; Time-stamp: <2020-02-05T16:32:28+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -19,10 +19,6 @@
|
|||
tab-width 4)
|
||||
(electric-pair-mode t) ; Auto-type closing brackets.
|
||||
|
||||
:hook
|
||||
;; Wrap long lines in compilation output.
|
||||
(compilation-mode . (lambda () (setq-local truncate-lines nil)))
|
||||
|
||||
:bind
|
||||
;; Switch between header and implementation.
|
||||
("C-:" . ff-find-other-file)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-01-27T04:33:20+0100>
|
||||
;; Time-stamp: <2020-02-05T16:31:25+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -15,8 +15,6 @@
|
|||
(require-final-newline t) ; Always add newline at end of file.
|
||||
(fill-column 80) ; Documents are 80 chars wide by default.
|
||||
(word-wrap t) ; Wrap at word for continuation lines.
|
||||
(truncate-line t) ; No continuation lines.
|
||||
(truncate-lines t) ; The same?
|
||||
|
||||
:bind
|
||||
("C-r" . jump-to-register) ; Move point to location in register.
|
||||
|
|
Loading…
Reference in New Issue
Block a user