how to set tab width in vim code example Example 1: vim change tab size set tabstop=4 Example 2: set tab length vim set shiftwidth=0 set tabstop=4