emacs-lisp source: :tangle ~/nix/lisp/text-editing.el(provide 'cce/text-editing)
Text editing is of course one of the fundamental functions of a modern computer. In the last few years we've seen a surge in voice-assistant applications and have even seen a few serviceable self-hosted privacy-preserving options like Mycroft.ai Mycroft.ai. However I still find dactile keyboard input to be the most efficient way to convey and capture my thoughts. I have invested a lot in my physical computing inventory working to build a set of tools which can be productive at home and on the road. I also strive in my Emacs configuration to extend the power of my environment to its limits and to my world. Most of the text-editing configuration is handled in other places but should reference ideas here.
One thing which I want to try is to integrate the idea of SmartTabs eventually. For now though tabs become four spaces.
emacs-lisp source: :tangle ~/nix/lisp/text-editing.el(setq-default indent-tabs-mode nil tab-width 4) (setq-default require-final-newline t) #+END_SRC I use Visual Line Mode in =text-mode= but not in =prog-mode=. Either way I disable the automatic text-wrapping mode since I am wrapping my code manually in the case of =prog-mode= buffers. =YAML= mode derives from =text-mode= and not =prog-mode= but I generally treat it as data. really what I need is an [[id:39e7910b-1ab2-47e3-ad0e-f6680f6a362b][Emacs 'data-mode']] maybe. 🤔 #+begin_src emacs-lisp :tangle ~/nix/lisp/text-editing.el (defun cce/text-mode-hook () (visual-line-mode 1) (auto-fill-mode -1)) (add-hook 'text-mode-hook #'cce/text-mode-hook) (diminish 'visual-line-mode)
emacs-lisp source: :tangle ~/nix/lisp/text-editing.el(defun cce/prog-mode-hook () (visual-line-mode -1) (auto-fill-mode -1)) (add-hook 'text-mode-hook #'cce/text-mode-hook) (add-hook 'yaml-mode-hook #'cce/text-mode-hook)
Since I will be in Visual Line Mode when I am I in text-mode refit Evil Mode to use visual line commands so that they properly traverse long paragraphs of text. I want to try to use things like avy-mode more and more often and to use these sorts of movement less often.
More to come...