小编Dar*_*yhp的帖子

Python 版 Vim 中的自动缩进

我现在正在尝试切换到 VIM,并希望让它像 Python 的 IDE 一样自动缩进。我有以下 .vimrc 文件

syntax on

set number
autocmd FileType tex,latex,python set showmatch

nnoremap j gj
nnoremap k gk

"Python Settings
autocmd FileType python set softtabstop=4
autocmd FileType python set tabstop=4
autocmd FileType python set autoindent
autocmd FileType python set expandtab
autocmd FileType python set textwidth=80
autocmd FileType python set smartindent
autocmd FileType python set shiftwidth=4
autocmd FileType python map <buffer> <F2> :w<CR>:exec '! python' shellescape(@%, 1)<CR>
autocmd FileType python imap <buffer> <F2> <esc>:w<CR>:exec '! python' …
Run Code Online (Sandbox Code Playgroud)

vim python

0
推荐指数
1
解决办法
8279
查看次数

标签 统计

python ×1

vim ×1