Skip to content

Commit 46bfb18

Browse files
committed
Change tabstop from 4 to 8
This won't affect 4-space indentation in any way. While the chance we find tab characters inside Rust sources is slim, it is best to have the tab character displayed in accordance to terminals and printers, where tabstop=8. Even Vim doc says: Note: Setting 'tabstop' to any other value than 8 can make your file appear wrong in many places (e.g., when printing it). Here's the full spec of settings for 4-space indentation in Vim: set tabstop=8 "A tab is 8 spaces set expandtab "Always uses spaces instead of tabs set softtabstop=4 "Insert 4 spaces when tab is pressed set shiftwidth=4 "An indent is 4 spaces More details: https://www.reddit.com/r/vim/wiki/tabstop
1 parent 5244fee commit 46bfb18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ftplugin/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ setlocal smartindent nocindent
4141

4242
if get(g:, 'rust_recommended_style', 1)
4343
let b:rust_set_style = 1
44-
setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
44+
setlocal tabstop=8 shiftwidth=4 softtabstop=4 expandtab
4545
setlocal textwidth=99
4646
endif
4747

0 commit comments

Comments
 (0)