diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 681ba73..d3bc27b 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -729,8 +729,8 @@ nnoremap F ':Autoformat:echo "The document has been formatted with :Autoformat"' "convert tabs to spaces and spaces to tabs - nnoremap t ':set expandtab:retab!:echo "Tabs have been converted to spaces"' - nnoremap T ':set noexpandtab:%retab!:echo "Spaces have been converted to tabs"' + nnoremap t ':let b:et=&expandtab:set expandtab:retab!:let &expandtab=b:et:echo "Tabs have been converted to spaces"' + nnoremap T ':let b:et=&expandtab:set noexpandtab:%retab!:let &expandtab=b:et:echo "Spaces have been converted to tabs"' "remove trailing whitespace nnoremap w ':FixWhitespace:echo "Trailing whitespace has been removed"'