vim 如何设置python自动缩进和自动提示

方法/步骤
-
1
缩进定义
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab
set smarttab
set autoindent
set nobackup -
2
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab
set smarttab
set autoindent -
3
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin -
4
键盘映射
map <F4> :!python % <CR>
map <F5> :!tcc -run % <CR> -
5
按F6 编译当前文件
map <F6> :!gcc % -g -o %<.exe <CR>
map <F7> :!%<.exe <CR>
map <F8> :call Run() <CR>
func Run()
exec "w"
exec "!gcc % -g -o %<.exe"
exec "!%<.exe"
endfunc -
6
插入匹配括号
inoremap ( ()<LEFT>
inoremap [ []<LEFT>
inoremap { {}<LEFT>
inoremap < <><LEFT>
inoremap " ""<LEFT>
inoremap ' ''<LEFT>END
文章评论