dotfiles

Configuration for the software I use.
git clone https://git.sr.ht/~jbauer/dotfiles
Log | Files | Refs | README | LICENSE

commit d20dad73e3ff30c32905b7fbe452e131ec3d2255
parent 0e4ea0c21e0e7ea31055cac7f2e3c0f887c12e38
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Sat,  5 Nov 2022 16:50:05 -0400

Update vim and shrc

Diffstat:
M.config/nvim/init.vim | 21+++++++++++++++------
M.config/shrc | 2+-
2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -24,9 +24,6 @@ nnoremap <Tab> za " Shortcut to open the file underneath the cursor that mimics the 'gf' command :noremap <leader>gf :e <cfile><cr> -" When wrapping lines, break on word boundaries -set linebreak - " Enable Filetype Plugins/Indentation filetype plugin indent on @@ -134,13 +131,25 @@ func! SpellCheckToggle() endfu noremap <silent> <C-S> :call SpellCheckToggle()<CR> +func! WordProcessor() + map j gj + map k gk + setl formatoptions=1 + setl noexpandtab + setl wrap + setl linebreak + setl textwidth=0 + setl nosmartindent + call SpellCheckToggle() +endfu +noremap <silent> <C-W> :call WordProcessor()<CR> + " Preferences for File Formats -autocmd FileType gmi call SpellCheckToggle() -autocmd FileType gmi setl tw=0 +autocmd FileType gmi call WordProcessor() autocmd FileType gitcommit call SpellCheckToggle() autocmd FileType gitcommit setl tw=72 autocmd FileType mail call SpellCheckToggle() autocmd FileType mail setl tw=72 -autocmd FileType markdown call SpellCheckToggle() +autocmd FileType markdown call WordProcessor() autocmd FileType python setl expandtab tabstop=4 shiftwidth=4 autocmd FileType vim setl foldmethod=marker diff --git a/.config/shrc b/.config/shrc @@ -2,7 +2,7 @@ # Add ENV="$HOME/.shrc" to ~/.profile # The almighty shell prompt -PS1='[`whoami`@`hostname -s` `basename $PWD | sed "s,$(basename $HOME),~,"`]$ `printf "\x1b[\x33 q"`' +PS1='[`whoami`@`hostname -s` `basename "$PWD" | sed "s,$(basename $HOME),~,"`]$ `printf "\x1b[\x33 q"`' # Functions # Usage: <some_data> | pastesrv <filename>