Add formatting section for line wrapping
This commit is contained in:
+30
-10
@@ -41,6 +41,7 @@
|
|||||||
- [[#electric][Electric]]
|
- [[#electric][Electric]]
|
||||||
- [[#file-paths][File Paths]]
|
- [[#file-paths][File Paths]]
|
||||||
- [[#file-backups-versioning][File Backups Versioning]]
|
- [[#file-backups-versioning][File Backups Versioning]]
|
||||||
|
- [[#formatting][Formatting]]
|
||||||
- [[#hide-elements][Hide Elements]]
|
- [[#hide-elements][Hide Elements]]
|
||||||
- [[#org-1][Org]]
|
- [[#org-1][Org]]
|
||||||
- [[#recentf][Recentf]]
|
- [[#recentf][Recentf]]
|
||||||
@@ -584,16 +585,10 @@ https://github.com/laishulu/hl-fill-column
|
|||||||
(setq mouse-wheel-scroll-amount '(5))
|
(setq mouse-wheel-scroll-amount '(5))
|
||||||
(setq mouse-wheel-progressive-speed nil)
|
(setq mouse-wheel-progressive-speed nil)
|
||||||
|
|
||||||
;; Automatically add newline on save at the end of the file
|
|
||||||
(setq require-final-newline t)
|
|
||||||
|
|
||||||
;; Parenthesis, set behavior
|
;; Parenthesis, set behavior
|
||||||
(setq show-paren-delay 0)
|
(setq show-paren-delay 0)
|
||||||
(setq show-paren-style 'mixed)
|
(setq show-paren-style 'mixed)
|
||||||
|
|
||||||
;; End sentences with a single space
|
|
||||||
(setq sentence-end-double-space nil)
|
|
||||||
|
|
||||||
;; Tramp default protocol
|
;; Tramp default protocol
|
||||||
(setq tramp-default-method "ssh")
|
(setq tramp-default-method "ssh")
|
||||||
|
|
||||||
@@ -690,6 +685,28 @@ Setup file backups versioning.
|
|||||||
(setq version-control t) ; Use version numbers on backups
|
(setq version-control t) ; Use version numbers on backups
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Formatting
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
;; Columnn after line-wrapping happens
|
||||||
|
(setq-default fill-column 80)
|
||||||
|
|
||||||
|
;; Automatically add newline on save at the end of the file
|
||||||
|
(setq require-final-newline t)
|
||||||
|
|
||||||
|
;; End sentences with a single space
|
||||||
|
(setq sentence-end-double-space nil)
|
||||||
|
|
||||||
|
;; `tabify' and `untabify' should only affect indentation
|
||||||
|
(setq tabify-regexp "^\t* [ \t]+")
|
||||||
|
|
||||||
|
;; Do not wrap lines
|
||||||
|
(setq-default truncate-lines t)
|
||||||
|
|
||||||
|
;; Wrap lines in the middle of words, gives a \ indicator
|
||||||
|
(setq-default word-wrap nil)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Hide Elements
|
** Hide Elements
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@@ -778,10 +795,9 @@ Set UTF-8 encoding as default.
|
|||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(prefer-coding-system 'utf-8-unix)
|
(prefer-coding-system 'utf-8-unix)
|
||||||
(setq locale-coding-system 'utf-8-unix)
|
(setq locale-coding-system 'utf-8-unix)
|
||||||
;; Default also sets keyboard and terminal coding system
|
;; Default also sets file-name, keyboard and terminal coding system
|
||||||
(set-default-coding-systems 'utf-8-unix)
|
(set-default-coding-systems 'utf-8-unix)
|
||||||
(set-buffer-file-coding-system 'utf-8-unix)
|
(set-buffer-file-coding-system 'utf-8-unix)
|
||||||
(set-file-name-coding-system 'utf-8-unix)
|
|
||||||
(set-selection-coding-system 'utf-8-unix)
|
(set-selection-coding-system 'utf-8-unix)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
@@ -1022,6 +1038,9 @@ Evil command aliases.
|
|||||||
|
|
||||||
;; LaTeX, set correct tab mode
|
;; LaTeX, set correct tab mode
|
||||||
(add-hook 'latex-mode-hook (lambda () (setq indent-tabs-mode t)))
|
(add-hook 'latex-mode-hook (lambda () (setq indent-tabs-mode t)))
|
||||||
|
|
||||||
|
;; Wrap lines in the middle of words, gives a \ indicator
|
||||||
|
(add-hook 'visual-line-mode-hook (lambda () (setq word-wrap nil)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Key Bindings
|
* Key Bindings
|
||||||
@@ -1279,14 +1298,15 @@ General.el ~leader key binds.
|
|||||||
"s a" '(avy-goto-char-timer :which-key "Avy goto char")
|
"s a" '(avy-goto-char-timer :which-key "Avy goto char")
|
||||||
"s b" '(bookmark-jump-ido :which-key "Jump to bookmark")
|
"s b" '(bookmark-jump-ido :which-key "Jump to bookmark")
|
||||||
|
|
||||||
;; Tabs
|
;; Tabs / toggle
|
||||||
"t" '(:ignore t :which-key "tabs")
|
"t" '(:ignore t :which-key "tabs/toggle")
|
||||||
"t b" '(centaur-tabs-group-buffer-groups :which-key "Group tabs by buffer")
|
"t b" '(centaur-tabs-group-buffer-groups :which-key "Group tabs by buffer")
|
||||||
"t p" '(centaur-tabs-group-by-projectile-project :which-key "Group tabs by project")
|
"t p" '(centaur-tabs-group-by-projectile-project :which-key "Group tabs by project")
|
||||||
"t h" '(centaur-tabs-backward-group :which-key "Tab backward group")
|
"t h" '(centaur-tabs-backward-group :which-key "Tab backward group")
|
||||||
"t j" '(centaur-tabs-select-end-tab :which-key "Tab select first")
|
"t j" '(centaur-tabs-select-end-tab :which-key "Tab select first")
|
||||||
"t k" '(centaur-tabs-select-beg-tab :which-key "Tab select last")
|
"t k" '(centaur-tabs-select-beg-tab :which-key "Tab select last")
|
||||||
"t l" '(centaur-tabs-forward-group :which-key "Tab forward group")
|
"t l" '(centaur-tabs-forward-group :which-key "Tab forward group")
|
||||||
|
"t w" '(visual-line-mode :which-key "Toggle line wrapping")
|
||||||
|
|
||||||
;; Update packages
|
;; Update packages
|
||||||
"u" '(auto-package-update-now :which-key "Update packages")
|
"u" '(auto-package-update-now :which-key "Update packages")
|
||||||
|
|||||||
Reference in New Issue
Block a user