Environment Configuration /Environment Setup 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 Python-Developed GVim Environment configuration (Windows) 
 
 
 
 
 
 
 
 1 based on Vundle to configure 
 
 
 
 
 
 
 
 Vim has multiple extension managers, but Vundle is highly recommended. You can think of it as a vim pip. With Vundle, installing and updating the package is effortless. 
 
 
 
 
 
 
 
 Install Vundle: 
 
 
 
 
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/vundle.vim
 
 
 
 
 The command will download the Vundle plugin Manager and place it in your Vim editor bundles folder. Now you can manage all extensions by using the. VIMRC configuration file. 
 
 
 
 
 
 
 
 Note: The home directory in the Windows environment is c:/users/yourusername/ 
 
 
 
 
 
 
 
 Add a profile to your user's home folder, and you can create a new file directly in Windows : 
 
 
 
 
Touch ~/.VIMRC
 
 
 
 
 Next, add the Vundle configuration down to the top of the configuration file: 
 
 
 
 
set nocompatible              " required  
filetype off                  " required  
" set the runtime path to include Vundle and initialize  
set rtp+=~/.vim/bundle/Vundle.vim  
call vundle#begin()  
" alternatively, pass a path where Vundle should install plugins  
"call vundle#begin(‘~/some/path/here‘)  
" let Vundle manage Vundle, required  
"<strong>Plugin ‘gmarik/Vundle.vim‘</strong>  
" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)  
" All of your Plugins must be added before the following line  
call vundle#end()            " required  
filetype plugin indent on    " required
 
 
 
 
 This allows you to complete the setup before using Vundle. After that, you can add the plugin you want to install in the configuration file, and then open the Vim editor and run the following command: 
 
 
 
 
:P Lugininstall
 
 
 
 
 This command tells Vundle to perform its magic-automatically downloads all plugins and installs and updates for you. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 2 Basic Configuration /Basic Configuration 
 
 
 
 
 
 
 
 The following commands can be used for environment configuration modifications in the. vimrc file. 
 
 
 
 
 
 
 
 Set number "Sets the ordinal display 
 
 
 
 
 
 
 
 Syntax enable 
 
 
 
 
 
 
 
 Syntax on "Open highlight 
 
 
 
 
 
 
 
 ColorScheme Desert "Set Theme color desert 
 
 
 
 
 
 
 
 Set Nocompatible "Don't vim imitate VI mode 
 
 
 
 
 
 
 
 Set Foldmethod=indent "Setting collapse 
 
 
 
 
 
 
 
 Set Filetype=python "Setting file type is Python 
 
 
 
 
 
 
 
 Au bufnewfile,bufread *.py,*.pyw setf python 
 
 
 
 
 
 
 
 Set Guifont=courier\ new:h16 "Setting the font size 
 
 
 
 
 
 
 
 Set lines=35 columns=118 "setting form size 
 
 
 
 
 
 
 
 Set Encoding=utf-8 "Settings encoding 
 
 
 
 
 
 
 
 Set Fileencoding=utf-8 
 
 
 
 
 
 
 
 Set Fileencodings=ucs-bom,utf-8,chinese 
 
 
 
 
 
 
 
 Set Writebackup "Write backup on normal shutdown, cancel backup on exit 
 
 
 
 
 
 
 
 Set Nobackup "Cancel automatic backup 
 
 
 
 
 
 
 
 Set Noundofile "Cancel Undofile Backup 
 
 
 
 
 
 
 
 Set Noswapfile "Cancel Swapfile backup 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 3 Ctags Configuration /ctags Configuration 
 
 
 
 
 
 
 
 Download the corresponding ctags, copy the extracted ctags.exe to the installation directory (C:\Program files (x86) \vim\vim80), and edit the _VIMRC file to add the following content 
 
 
 
 
set tags=tags
set autochdir
 
 
 
 
 Then run ctags-r in the directory where you need to view the source code 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 4 TagList Configuration /taglist Configuration 
 
 
 
 
 
 
 
 The Source Code analysis tool, TagList, can view information about all functions and variables in the current file. First download the Taglist_45.zip compressed package, unzip the folder doc and plugin into the vim root directory, add the following in the _VIMRC file: 
 
 
 
 
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
 
 
 
 
 
 
 
 
 
 
 
 
 
 5 Winmanager Configuration /Winmanager Configuration 
 
 
 
 
 
 
 
 File Browsing Component Winmanager, you can view all the file information in the current folder. First, you need to download the Winmanager.zip compressed package, the extracted folder doc and plugin to the VIM root directory, add the following in the _VIMRC file: 
 
 
 
 
let g:winManagerWindowLayout=‘FileExplorer|TagList‘
nmap wm :WMToggle<cr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 6 Minibufexpl Configuration /MINIBUFEXPL Configuration 
 
 
 
 
 
 
 
 Download the compressed package to copy the extracted Minibufexpl.vim to the Vim80 plugin file and add the following in _VIMRC: 
 
 
 
 
let g:miniBufExplMapCTabSwitchBufs=1
let g:miniBufExplMapWindowsNavVim=1
let g:miniBufExplMapWindowNavArrows=1
 
 
 
 
 
 
 
 
 
 
 
 
 
 7 grep Configuration /grep Configuration 
 
 
 
 
 
 
 
 Copy the downloaded Grep.vim file to the Vim80\plugin folder and add the following in _VIMRC: 
 
 
 
 
Nnoremap <silent> <F3>:grep<cr>
 
 
 
 
 Because Windows does not have grep, you need to download and install grep and add grep to the system path 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 8 Visualmark Configuration /Visualmark Configuration 
 
 
 
 
 
 
 
 Copy the downloaded Visualmark.vim file to the Vim80\plugin folder 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 9 Pydiction Configuration /pydiction Configuration 
 
 
 
 
 
 
 
 Download Pydiction-1.2.zip unzip the Python_pydiction.vim file inside to ~\vim80\ftplugin, copy complete-dict and pydiction.py to ~\vim80\ Ftplugin\pydiction, add the following in _VIMRC: 
 
 
 
 
filetype plugin on "Enable filetype plugin
let g: pydiction_location = ‘C: \ Program Files (x86) \ Vim \ vim80 \ ftplugin \ pydiction \ complete-dict’
let g: pydiction_menu_height = 20 "Set the height of the pop-up menu, the default is 15
 
 
 
 
 
 
 
 
 
 
 
 
 
 Ten Pyflakes Configuration /pydiction Configuration 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 Download the Pyflakes.zip and copy the Pyflakes.vim file and Pyflakes directory to the Ftplugin\python directory after decompression. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 Run Configuration /Run Configuration 
 
 
 
 
 
 
 
 In _VIMRC, add the following: 
 
 
 
 
Map <F5>:! C:\python34\python.exe%
 
 
 
 
 To bind the F5 to Python3.4 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 Ctrl + V Configuration /Ctrl + V Configuration 
 
 
 
 
 
 
 
 In Gvim, CTRL + V enters visual mode with a copy-paste conflict, for which you need to modify Vim/vim80/mswin.vim, as follows: 
 
 
 
 
" ctrl-v and Shift-insert are Paste " map<c-v> "+GP
 
 
 
 
 Map annotations can be 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 Reference links 
 
 
 
 
 
 
 
 http://www.vim.org/ 
 
 
 
 
 
 
 
 http://blog.csdn.net/anders_zhuo/article/details/8949003 
 
 
 
 
 
 
 
 Code Editor [0] Vim/gvim Python-based GVIM environment configuration (Windows)