ubuntu16.04 build vim and pyt

ubuntu16.04 install IDE that supports python3

1. Install vim:
# apt-get install  -y vim-gnome
2. Install ctags, ctags is used to support taglist
# apt-get install ctags
3. Install taglist
# apt-get install vim-scripts vim-addon-manager
# vim-addons install taglist
4. Install pydiction to implement code completion:
# 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. Install python_fold automatic folding plugin
 Download python_fold.vim: 
	https://www.vim.org/scripts/script.php?script_id=515
	
	# mv python_fold.vim /usr/share/vim/vim74/plugin/
  
 # vim /root/.vimrc
	set foldmethod=indent

6. Generate ctag sequence:
Enter the directory where the python script is located, and execute it in that directory:
		# ctags -R *
Generate a ctags file, which records the program/Analysis sequence records of project functions, classes, etc..7.Install taglist plugin:
Download plugin:
		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        "Generate taglist help file list.
	: help taglist.txt "View taglist help information.
8. Install vim plug:
	# mkdir ~/.vim/autoload/
	# cd ~/.vim/autoload/
	# wget https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Configure vim plug:
	#vim  /root/.vimrc
	call 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    " required

call plug#begin('~/.vim/autoload')
Plug 'Valloric/YouCompleteMe'

call plug#end()set nocompatible "Turn off compatibility mode with vi
set number "Show line number
set nowrap    "Do not wrap
set showmatch    "Show matching brackets
set scrolloff=3"3 rows from top and bottom"set encoding=utf-8  "coding
set fenc=utf-8      "coding
" set mouse=a        "Enable mouse
set hlsearch        "Search highlight
syntax on    "Syntax highlighting
set helplang=cn
set encoding=utf-8

" au BufNewFile,BufRead *.py
set tabstop=4set softtabstop=4set shiftwidth=4set textwidth=79set expandtab
set autoindent
set fileformat=unix
set foldmethod=indent
set autoindent "Implement automatic indentation
set foldmethod=indent
set shiftwidth=4set expandtab
set number

" Flagging Unnecessary Whitespace
highlight BadWhitespace ctermbg=red guibg=darkred

let Tlist_Auto_Highlight_Tag=1let Tlist_Auto_Open=1let Tlist_Auto_Update=1let Tlist_Display_Tag_Scope=1let Tlist_Exit_OnlyWindow=1let Tlist_Enable_Dold_Column=1let Tlist_File_Fold_Auto_Close=1let Tlist_Show_One_File=1let Tlist_Use_Right_Window=1let Tlist_Use_SingleClick=1
filetype plugin on

let g:pydiction_location ='/usr/share/vim/vim74/pydiction/complete-dict'let g:pydiction_menu_height =20
autocmd FileType python set omnifunc=pythoncomplete#Complete

let Tlist_Show_One_File =1   "Do not display tags of multiple files at the same time, only display the current file
let Tlist_Exit_OnlyWindow =1 "If the taglist window is the last window, exit vim
let Tlist_Use_Right_Window =1  "Show the taglist window in the right window
" let Tlist_Auto_Open=1    "After starting vim, the taglist window is automatically opened
" let Tlist_File_Fold_Auto_Close=1 "Only display the current file tag, the tags of other files are folded

let Tlist_Auto_Highlight_Tag=1let Tlist_Auto_Open=1let Tlist_Auto_Update=1let Tlist_Display_Tag_Scope=1let Tlist_Exit_OnlyWindow=1let Tlist_Enable_Dold_Column=1let Tlist_File_Fold_Auto_Close=1let Tlist_Show_One_File=1let Tlist_Use_Right_Window=1let 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
Plug-in installation:
 Switch to the command line mode and enter
 PlugStatus
 PlugInstall
 You can install the plugin
 Use vim plug to easily manage plug-ins
 View plug-in type:
 :PlugStatus
 Install the plugin:
 :PlugInstall
 Update plugin::PlugUpdate
 vim-The plug itself is updated::PlugUpgrade

reference:

ubuntu16.04 makes Vim a powerful Python development environment:

https://www.jianshu.com/p/bc19b91354ef

Recommended Posts

ubuntu16.04 build vim and pyt
Centos7 uses vim to build powerful pyt
Ubuntu build etcd
Ubuntu build Seafile
Summary: Ubuntu Python2.x and
Ubuntu20.04 experience and beautification
Ubuntu 18.04 LTS LAMP build
Ubuntu introduction and installation
[python] python2 and python3 under ubuntu
Ubuntu backup and restore
Embedded Linux development environment to build and configure Ubuntu
[Linux] Build Samba server (ubuntu16.04)
ubuntu 16.04 build pptpd V** server
Ubuntu 16.04 compile and install PHP 7.2
ubuntu18.04 compile and install python3.8
Ubuntu16.04 installation and simple configuration
Jmeter (18)_Ubuntu deploy jmeter and ant
Build Ubuntu 12.04 cross compilation server
ubuntu install and configure GitLab
Ubuntu deployment and experience Nexus3
ubuntu1804 build the latest Suricata
ubuntu build python development environment
Ubuntu16.04 install SVN and configuration
Ubuntu16.04 install and uninstall VMware-Workstation 14
Ubuntu PostgreSQL installation and configuration
Ubuntu16.04 build GitLab server tutorial
Detailed ubuntu14.04 build (migration) hustoj record
Ubuntu creates users adduser and useradd
Build Nginx-RTMP live server on ubuntu
The difference between CentOS and Ubuntu
Ubuntu environment variables and ADB configuration
Netweaver and Windows, Ubuntu data sharing
Install and configure MySQL on Ubuntu
Ubuntu16.04 build php5.6 Web server environment
Install and configure Docker in Ubuntu
ubuntu modify and configure ip address
Ubuntu16.04 configuration OpenCV3.4.2 and basic use
Install and deploy Gerrit under Ubuntu
Redis installation under ubuntu and windows
Install nodejs and npm under Ubuntu 16.04
Ubuntu change password and username steps
Protect your eyes (ubuntu and chrome)
Build a file server on ubuntu
Ubuntu 19.1 installation and configuration Chinese environment
Configuration and beautification after Ubuntu installation (1)
Nginx installation and configuration load (ubuntu12.04)
Build Discuz forum based on ubuntu
Ubuntu upgrade software and ubuntu upgrade system commands
Ubuntu common instructions and usage details
Ubuntu18.04 installation Anaconda3 and VSCode guide
Coexistence of CUDA8.0 and CUDA9.0 under Ubuntu 16.04
Linux CentOS6 compile and install Pyt
Ubuntu configuration source and installation software
Compile and install QEMU under Ubuntu
Windows Ubuntu subsystem ssh and ftp
virtualBox install centos, and build tomcat
Linux basics (Ubuntu copy and paste)