Tab edits

master
Mark 2023-10-21 14:56:20 -07:00
parent ce26f57800
commit 39ef2d6d1c
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 6 additions and 7 deletions

View File

@ -75,17 +75,16 @@ nnoremap <F3> :set list! <CR>
" Tab size shortcuts
" TODO: VSCode-like tab menu
nnoremap <C-p> :set tabstop=4 shiftwidth=4 noexpandtab<CR>
nnoremap <C-o> :set tabstop=8 shiftwidth=8 noexpandtab<CR>
nnoremap <C-p> :set tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab<CR>
nnoremap <C-o> :set tabstop=8 shiftwidth=8 softtabstop=4 noexpandtab<CR>
" Autodetect filetypes and set proper indentation
" Default: 4, with tabs.
set tabstop=4 shiftwidth=4 noexpandtab
set tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab
augroup tabsize_gp
autocmd!
autocmd Filetype py setlocal tabstop=4 shiftwidth=4 noexpandtab
autocmd Filetype lua setlocal tabstop=4 shiftwidth=4 noexpandtab
autocmd Filetype py setlocal tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab
autocmd Filetype lua setlocal tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab
augroup END
" The matchit plugin makes the % command work better, but it is not backwards
@ -102,7 +101,7 @@ nmap <F2> <Plug>ToggleHexHighlight
let g:pencil#textwidth = 70
augroup pencil
autocmd!
autocmd FileType markdown,mkd call pencil#init({'wrap': 'soft'})
autocmd FileType markdown,md call pencil#init({'wrap': 'soft'})
autocmd FileType text call pencil#init()
autocmd FileType text setlocal list
augroup END