« get me outta code hell

vim: word wrap in text files - dotfiles - Miscellaneous configuration files of my personal use
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-13 20:09:03 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-13 20:09:03 -0300
commit4736c94869fd586a779e9a9cbbcc5eae8a6170a3 (patch)
tree7f8f4267b7adfaf3dbaa89b1cce638eea8c00b6c
parent1c01a60a1f4d90ed7760b469647fd7c05d011bc5 (diff)
vim: word wrap in text files
-rwxr-xr-x.vimrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index e2acbc9..fd195a9 100755
--- a/.vimrc
+++ b/.vimrc
@@ -173,6 +173,9 @@ autocmd FileType c,cpp,h,hpp set smartindent
 " word wrap javascript comments
 autocmd BufEnter,BufNew *.js autocmd CursorMoved,CursorMovedI * :if match(getline('.'), '^\s*//') == 0 | :setlocal textwidth=80 | :else | :setlocal textwidth=0 | :endif
 
+" text (txt) overrides
+au FileType text setlocal wrap
+
 " yaml overrides
 au FileType yaml setlocal indentexpr=
 au FileType yaml nmap <buffer> { ?---\+<CR>