靈活使用上面的選項,就可以很好地調整縮進設置。
可以將下述設置加入到~/.vimrc中: set sw=4
set ts=4
filetype indent on
autocmd FileType python setlocal et sta sw=4 sts=4
參考來源:
http://linux-wiki.cn/wiki/zh-tw/Vim%E4%BB%A3%E7%A0%81%E7%BC%A9%E8%BF%9B%E8%AE%BE%E7%BD%AE
來源: http://vim.wikia.com/wiki/File_format
:%s/\s\+$//
來源: http://vim.wikia.com/wiki/Remove_unwanted_spaces