From 39ef2d6d1c44387451bcd24324101b5c137e6be3 Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 21 Oct 2023 14:56:20 -0700 Subject: [PATCH] Tab edits --- parts/main.vim | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/parts/main.vim b/parts/main.vim index 95bac15..2f22ab6 100644 --- a/parts/main.vim +++ b/parts/main.vim @@ -75,17 +75,16 @@ nnoremap :set list! " Tab size shortcuts " TODO: VSCode-like tab menu -nnoremap :set tabstop=4 shiftwidth=4 noexpandtab -nnoremap :set tabstop=8 shiftwidth=8 noexpandtab - +nnoremap :set tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab +nnoremap :set tabstop=8 shiftwidth=8 softtabstop=4 noexpandtab " 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 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 \ No newline at end of file