mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-26 13:01:26 -05:00
Restore original expandtab value after modifying tabs with <Leader>t and <Leader>T
This commit is contained in:
parent
a414800c4d
commit
baf49c5576
1 changed files with 2 additions and 2 deletions
|
@ -729,8 +729,8 @@
|
||||||
nnoremap <silent><expr> <Leader>F ':Autoformat<CR>:echo "The document has been formatted with :Autoformat"<CR>'
|
nnoremap <silent><expr> <Leader>F ':Autoformat<CR>:echo "The document has been formatted with :Autoformat"<CR>'
|
||||||
|
|
||||||
"convert tabs to spaces and spaces to tabs
|
"convert tabs to spaces and spaces to tabs
|
||||||
nnoremap <silent><expr> <Leader>t ':set expandtab<CR>:retab!<CR>:echo "Tabs have been converted to spaces"<CR>'
|
nnoremap <silent><expr> <Leader>t ':let b:et=&expandtab<CR>:set expandtab<CR>:retab!<CR>:let &expandtab=b:et<CR>:echo "Tabs have been converted to spaces"<CR>'
|
||||||
nnoremap <silent><expr> <Leader>T ':set noexpandtab<CR>:%retab!<CR>:echo "Spaces have been converted to tabs"<CR>'
|
nnoremap <silent><expr> <Leader>T ':let b:et=&expandtab<CR>:set noexpandtab<CR>:%retab!<CR>:let &expandtab=b:et<CR>:echo "Spaces have been converted to tabs"<CR>'
|
||||||
|
|
||||||
"remove trailing whitespace
|
"remove trailing whitespace
|
||||||
nnoremap <silent><expr> <Leader>w ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
nnoremap <silent><expr> <Leader>w ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
||||||
|
|
Loading…
Reference in a new issue