vim中调试python配置

看前面的帖子,安装coc

然后vimrc中添加这段

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => python settings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""------F5 run python-file------
map <F5> :call CompileRunGcc()<CR>
func! CompileRunGcc()
    exec "w"
    if &filetype == 'python'
        exec "!python %"
    endif
endfunc
"------End------
let python_highlight_all=1
autocmd Filetype python set tabstop=4
autocmd Filetype python set softtabstop=4
autocmd Filetype python set shiftwidth=4
autocmd Filetype python set textwidth=79
autocmd Filetype python set expandtab
autocmd Filetype python set autoindent
autocmd Filetype python set fileformat=unix
autocmd Filetype python set foldmethod=indent
autocmd Filetype python set foldlevel=99

set updatetime=100

按下f5键就可以运行python啦

 

posted on 2022-01-26 00:33  风中狂笑  阅读(333)  评论(0编辑  收藏  举报

导航