VIM 常用命令
Function | Command | Remark |
---|---|---|
显示行号 | :set no | |
查找高亮port | /port | 按n下个 |
取消高亮 | :noh | |
:set no |
1) Vim 设定自动缩进 (python脚本的编写)
vim /etc/vimrc
# 添加如下内容
set filetype=python
au BufNewFile,BufRead *.py,*.pyw setf python
set autoindent " same level indent
set smartindent " next level indent
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4