Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Toggle Word Wrap In Emacs

** TL;DR

To toggle word wrap for a file buffer, I use:

#+begin_example Option + w #+end_example

That's keybind is setup by adding this into a config file that gets parsed by my Spacemacs install.

#+FILENAME: toggle-word-wrap.el #+begin_src elisp :results silent :tangle ~/workshop/dotfiles.alanwsmith.com/dotfiles/emacs/tangled-files/toggle-word-wrap.el (global-unset-key (kbd "M-w")) (global-set-key (kbd "M-w") 'visual-line-mode) #+end_src

** Notes

There's a `toggle-word-wrap` command as well, but that doesn't do what I expect. It takes running `visual-line-mode` (which acts as a toggle) to set the various things up that do what I expect.

Before I setup the hotkey above, I don't think there was a keybind for `visual-line-mode`. So, I'd run it with:

#+begin_example M-x visual-line-mode #+end_example