1. .vimrc 文件: python
"语法高亮 syntax on "自动检测文件类型并加载相应设置 filetype plugin indent on # 或者 #filetype on #filetype plugin on #filetype indent on autocmd FileType python setlocal tabstop=4 expandtab shiftwidth=4 softtabstop=4 "显示行号 set number "在状态栏显示命令 set showcmd2. 从外部粘贴过来的内容不自动缩进,这对Python代码颇有用
粘贴前使用命令,进入粘贴模式: linux
set paste粘贴后,还原通常模式:
set nopaste
参考:
用vim编程,配置与技巧
shell