made vim automatically add text wrapping for text files

This commit is contained in:
305a385 2023-06-27 11:23:03 +02:00
parent 13e3f2bd9d
commit aed31ffe4b
2 changed files with 8 additions and 1 deletions

View File

@ -118,7 +118,7 @@ bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, L, exec, librewolf
bind = $mainMod, R, exec, wofi -S run
bind = $mainMod, S, exec, $HOME/.config/bin/music.sh # runs music launcher
bind = $mainMod, F3, exec, grim # takes screenshot
bind = $mainMod, F3, exec, grim -g "$(slurp)" $HOME/screenshots/$(date +%Y%m%d_%Hh%Mm%Ss).png # takes screenshot
bind = , XF86PowerOff, exec, $HOME/.config/bin/shutdown.sh

7
.vimrc
View File

@ -114,6 +114,13 @@ augroup skeleton
augroup END
" enable wrapping for markdown/text files
augroup textfiles
autocmd!
autocmd BufRead *.md setlocal wrap linebreak nolist
autocmd BufRead *.txt setlocal wrap linebreak nolist
augroup END
" If Vim version is equal to or greater than 7.3 enable undofile.
" This allows you to undo changes to a file even after saving it.