前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >vim编辑器设置

vim编辑器设置

作者头像
dogfei
发布2020-07-31 11:54:41
3820
发布2020-07-31 11:54:41
举报
文章被收录于专栏:devops探索devops探索

用vim来写python程序,所需要设置的地方

下载插件:

1

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

配置参考

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' Plugin 'vim-scripts/indentpython.vim' Plugin 'vim-syntastic/syntastic' Plugin 'altercation/vim-colors-solarized' Plugin 'scrooloose/nerdtree' Plugin 'jistr/vim-nerdtree-tabs' Plugin 'Lokaltog/vim-powerline' Plugin 'Yggdroot/indentLine' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required set nocompatible "关闭与vi的兼容模式 set number "显示行号 set nowrap "不自动折行 set showmatch "显示匹配的括号 set scrolloff=3 "距离顶部和底部3行" set encoding=utf-8 "编码 set fenc=utf-8 "编码 set mouse=a "启用鼠标 set hlsearch "搜索高亮 syntax on "语法高亮 au BufNewFile,BufRead *.py \ set tabstop=4 "tab宽度 \ set softtabstop=4 \ set shiftwidth=4 \ set textwidth=79 "行最大宽度 \ set expandtab "tab替换为空格键 \ set autoindent "自动缩进 \ set fileformat=unix "保存文件格式 set foldmethod=indent set foldlevel=99 map <F5> :call RunPython()<CR> func! RunPython() exec "W" if &filetype == 'python' exec "!time python36 %" endif endfunc

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018-03-27,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档