ubuntu16.04打造vim和python3的IDE
ubuntu16.04 安装支持python3的IDE
1. 安装vim: # apt-get install -y vim-gnome 2. 安装ctags,ctags用于支持taglist # apt-get install ctags 3. 安装taglist # apt-get install vim-scripts vim-addon-manager # vim-addons install taglist 4. 安装pydiction 实现代码补全: #wget https://www.vim.org/scripts/script.php?script_id=850/pydiction-1.2.3.zip # unzip pydiction-1.2.3.zip # cd pydiction/after/ftplugin/ # mkdir /usr/share/vim/vim74/pydiction # cp -rp python_pydiction.vim /usr/share/vim/vim74/ftplugin/ # cp complete-dict pydiction.py /usr/share/vim/vim74/pydiction/
5.安装python_fold自动折叠插件下载python_fold.vim: https://www.vim.org/scripts/script.php?script_id=515# mv python_fold.vim /usr/share/vim/vim74/plugin/#vim /root/.vimrcset foldmethod=indent6. 生成ctag序列:进入到python脚本所在的目录,在该目录下执行:# ctags -R *生成一个 ctags 文件,该文件记录了程序/项目的函数、类等的分析序列记录.7. 安装taglist插件:下载插件:https://www.vim.org/scripts/script.php?script_id=273# unzip taglist_46.zip# cp plugin/taglist.vim /usr/share/vim/vim74/plugin/# cp doc/taglist.txt /usr/share/vim/vim74/doc/#vim:helptags /usr/share/vim/vim74/doc "生成taglist帮助文件列表。: help taglist.txt “查看taglist帮助信息。
8. 安装vim plug:# mkdir ~/.vim/autoload/# cd ~/.vim/autoload/# wget https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim配置vim plug:#vim /root/.vimrccall plug#begin('~/.vim/autoload') Plug 'Valloric/YouCompleteMe' call plug#end() #vim /root/.vimrc filetype off " required" set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/vundle call vundle#begin()" let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' Plugin 'vim-scripts/indentpython.vim' Bundle 'Valloric/YouCompleteMe'" All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " requiredcall plug#begin('~/.vim/autoload') Plug 'Valloric/YouCompleteMe'call plug#end()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 "语法高亮 set helplang=cn set encoding=utf-8"au BufNewFile,BufRead *.py set tabstop=4 set softtabstop=4 set shiftwidth=4 set textwidth=79 set expandtab set autoindent set fileformat=unix set foldmethod=indent set autoindent " 实现自动缩进 set foldmethod=indent set shiftwidth=4 set expandtab set number"Flagging Unnecessary Whitespace highlight BadWhitespace ctermbg=red guibg=darkredlet Tlist_Auto_Highlight_Tag=1 let Tlist_Auto_Open=1 let Tlist_Auto_Update=1 let Tlist_Display_Tag_Scope=1 let Tlist_Exit_OnlyWindow=1 let Tlist_Enable_Dold_Column=1 let Tlist_File_Fold_Auto_Close=1 let Tlist_Show_One_File=1 let Tlist_Use_Right_Window=1 let Tlist_Use_SingleClick=1 filetype plugin onlet g:pydiction_location = '/usr/share/vim/vim74/pydiction/complete-dict' let g:pydiction_menu_height = 20 autocmd FileType python set omnifunc=pythoncomplete#Completelet Tlist_Show_One_File = 1 "不同时显示多个文件的tag,只显示当前文件的 let Tlist_Exit_OnlyWindow = 1 "如果 taglist 窗口是最后一个窗口,则退出 vim let Tlist_Use_Right_Window = 1 "在右侧窗口中显示 taglist 窗口 "let Tlist_Auto_Open=1 "在启动 vim 后,自动打开 taglist 窗口 "let Tlist_File_Fold_Auto_Close=1 "只显示当前文件 tag,其它文件的tag折叠 let Tlist_Auto_Highlight_Tag=1 let Tlist_Auto_Open=1 let Tlist_Auto_Update=1 let Tlist_Display_Tag_Scope=1 let Tlist_Exit_OnlyWindow=1 let Tlist_Enable_Dold_Column=1 let Tlist_File_Fold_Auto_Close=1 let Tlist_Show_One_File=1 let Tlist_Use_Right_Window=1 let Tlist_Use_SingleClick=1 nnoremap <silent> <F8> :TlistToggle<CR> filetype plugin on autocmd FileType python set omnifunc=pythoncomplete#Complete autocmd FileType javascrīpt set omnifunc=javascriptcomplete#CompleteJS autocmd FileType html set omnifunc=htmlcomplete#CompleteTags autocmd FileType css set omnifunc=csscomplete#CompleteCSS autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags autocmd FileType php set omnifunc=phpcomplete#CompletePHP autocmd FileType c set omnifunc=ccomplete#Complete autocmd FileType python set omnifunc=pythoncomplete#Complete
插件安装:切换到命令行模式,依次输入PlugStatusPlugInstall就可以安装插件了使用vim plug可以方便的管理插件查看插件类型::PlugStatus安装插件::PlugInstall更新插件::PlugUpdatevim-plug本身更新::PlugUpgrade
参考:
ubuntu16.04 将Vim打造为强大的Python开发环境:
https://www.jianshu.com/p/bc19b91354ef
转载于:https://blog.51cto.com/liyuanjie/2179139
ubuntu16.04打造vim和python3的IDE相关推荐
- vim python3开发环境_[宜配屋]听图阁 - ubuntu16.04制作vim和python3的开发环境
1. 安装vim: # apt-get install -y vim-gnome 2. 安装ctags,ctags用于支持taglist # apt-get install ctags 3. 安装t ...
- ubuntu16.04安装vim报错 vim : Depends: vim-common (= 2:7.4.052-1ubuntu3.1) but 2:7.4.1689-3ubuntu1.3
ubuntu16.04安装vim时出现如下报错 The following packages have unmet dependencies: vim : Depends: vim-common ( ...
- ubuntu16.04源码安装python3.7
ubuntu16.04源码安装Python3.7 python源码安装包下载:https://www.python.org/downloads/release/python-371/ 在安装的过程中, ...
- linux系统脚本安装失败,ubuntu16.04下vim安装失败的原因分析及解决方案
先给大家说下问题描述? 重装了ubuntu系统,安装vim出现了以下问题: sudo apt-get install vim 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信 ...
- Ubuntu16.04 python2.7升级python3.5
2019独角兽企业重金招聘Python工程师标准>>> 正常情况下,你安装好ubuntu16.04版本之后,系统会自带 python2.7版本,如果需要下载新版本的python3.5 ...
- ubuntu16.04中如何将python3设置为默认
ubuntu16.04自带python,但是既有python2,又有python3. 但是默认的python命令是python2,我要想执行python3就必须输入python3. 为解决如何将pyt ...
- Ubuntu16.04 + GeForce GTX 1080 + Python3.6 安装 CUDA11.3
与安装CUDA8.0类似,在升级显卡驱动后,我也对CUDA11.3进行了升级. 首先删除历史版本: sudo /usr/local/cuda-8.0/bin/uninstall_cuda_8.0.pl ...
- ubuntu16.04升级 vim 8.0
一,首先安装依赖 sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \ libgtk2.0-dev libatk1.0 ...
- (ubuntu16.04)关于caffe+python3.5(非anaconda安装)编译的一些问题
最近被要求安装caffe+python3.5,又听说python3.5对caffe的不太友好,真的很心累. 不过在尝试了一个晚上和白天之后,终于装好了... 现在将一些我的操作在下面进行说明,常规的那 ...
最新文章
- 【matlab】第三章数组和数组的运算
- 数据库服务器跟网站服务器间传输慢的问题
- 扩增子图表解读8网络图:节点OTU或类Venn比较
- ASP.NET Core 新核心对象WebHost(一)
- python论坛签到_论坛自动签到教程
- 计算机技术是双证,计算机技术在职研究生单证可以转双证吗
- column 格式化列显示 命令介绍
- Windows开启远程桌面服务(Win10)
- 最大子序和:单调队列维护一个上升序列
- 任务计划、chkconfig工具、systemd管理服务、unit、target
- mybatis 带分号批量sql_请查收,32 道 MyBatis 的高频面试题已答完
- Algorithm Data structure
- 开课吧Java课堂:什么是流?如何运用字节流和字符流?
- PIC单片机开发环境搭建
- 自然语言处理要解决的问题
- JQuery常用属性整理
- 微博如何发订阅消息_微博怎么添加订阅 - 卡饭网
- OHSAS18000认证(转载)
- html阅读是什意思,HTML是什么意思?什么是HTML5?什么是H5? | 前端面试题
- 免费学python的网课-像玩游戏一样学Python,和各种网课说再见
热门文章
- Zigbee 学习计划——第2天——熟悉CC2530的基本例程
- [VB]使用ADO Recordset对象导入Excel
- VB 几种打开文本文件速度对比
- Linux字符集的修改方法
- 全球首台商用量子计算机发布!体积如同大象,算力不及笔记本
- 尴尬!Google搜索现在也会“千人千面”了,退出登录也一样
- Facebook语音助手Aloha细节曝光,它的logo竟然是一座小火山?
- 拔掉机器人的一条腿,它还能学走路?| 三次元里优化的DRL策略
- webpack打包原理(待续)
- Linux -单用户模式(忘记Linux的root密码)