# vim_config **Repository Path**: wupengyue/vim_config ## Basic Information - **Project Name**: vim_config - **Description**: yueyue's vim config and install shell - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-06-18 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # vim_config ## Introduction: ### 1. Set up Vundle: `$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim` ### 2. Edit the ~/.vimrc as file vimrc ```vim " To use VIM settings, out of VI compatible mode. set nocompatible filetype off set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " 让vundle管理插件版本,必须 Plugin 'VundleVim/Vundle.vim' " 以下范例用来支持不同格式的插件安装. " 请将安装插件的命令放在vundle#begin和vundle#end之间. " Github上的插件 " 格式为 Plugin '用户名/插件仓库名' Plugin 'tpope/vim-fugitive' " 来自 http://vim-scripts.org/vim/scripts.html 的插件 " Plugin '插件名称' 实际上是 Plugin 'vim-scripts/插件仓库名' 只是此处的用户名可以省略 Plugin 'L9' Plugin 'bling/vim-airline' "Plugin 'derekwyatt/vim-scala' Plugin 'davidhalter/jedi-vim' Plugin 'godlygeek/tabular' "Plugin 'moll/vim-node' Plugin 'majutsushi/tagbar' "Plugin 'kien/ctrlp.vim' "Plugin 'fatih/vim-go' " 你的所有插件需要在下面这行之前 call vundle#end() " 必须 " 忽视插件改变缩进,可以使用以下替代: "filetype plugin on " " 简要帮助文档 " :PluginList - 列出所有已配置的插件 " :PluginInstall - 安装插件,追加 `!` 用以更新或使用 :PluginUpdate " :PluginSearch foo - 搜索 foo ; 追加 `!` 清除本地缓存 " :PluginClean - 清除未使用插件,需要确认; 追加 `!` 自动批准移除未使用插件 " " 查阅 :h vundle 获取更多细节和wiki以及FAQ " 将你自己对非插件片段放在这行之后 " Enable file type detection. filetype plugin indent on " Syntax highlighting. " 允许用指定语法高亮配色方案替换默认方案 syntax on " Other settings. set autoindent set autoread set autowrite "set background=light set background=dark set backspace=indent,eol,start set nobackup set cindent set cinoptions=:0 " 高亮显示当前行/列 set completeopt=longest,menuone set expandtab set fileencodings=utf-8,gb2312,gbk,gb18030 set fileformat=unix set helplang=cn set hidden set history=100 " 高亮显示搜索结果 set hlsearch set ignorecase set incsearch set laststatus=2 set mouse=c set number set pumheight=10 set ruler set scrolloff=5 set shiftwidth=4 set showcmd set smartindent set smartcase set tabstop=4 set termencoding=utf-8 "set textwidth=80 set whichwrap=h,l set wildignore=*.bak,*.o,*.e,*~ set wildmenu set wildmode=list:longest,full set nowrap set foldlevelstart=99 let OpenDir=system("pwd") nmap cd :exe 'cd ' . OpenDir:pwd " PLUGIN SETTINGS: {{{1 " NERDTree.vim let g:NERDTreeWinPos="left" let g:NERDTreeWinSize=30 let g:NERDTreeShowLineNumbers=1 "let g:NERDTreeQuitOnOpen=1 let g:go_fmt_autosave = 1 let g:TagbarToggleWinPos="left" " cscope.vim if has("cscope") set csto=1 set cst set nocsverb if filereadable("cscope.out") cs add cscope.out endif set csverb endif " plugin shortcuts function! RunShell(Msg, Shell) echo a:Msg . '...' call system(a:Shell) echon 'done' endfunction nmap :TagbarToggle nmap :NERDTreeToggle nmap :MRU nmap LookupFile nmap :call RunShell("Generate tags", "ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .") set pastetoggle= ``` ### 3. how table use >| run :PluginInstall in vim command model ### 4. 部分配置说明 >|`set pastetoggle= ` ```xml 在/etc/vim中,修改vimrc,添加 set pastetoggle= 在黏贴代码之前,进入insert模式,按F9,就可以关闭自动缩进。 当需要自己手写代码的时候,进入insert模式,默认就是自动缩进了。 ``` >| 'davidhalter/jedi-vim' ```xml Completion Goto assignments g (typical goto function) Goto definitions d (follow identifier as far as possible, includes imports and statements) Show Documentation/Pydoc K (shows a popup with assignments) Renaming r Usages n (shows all the usages of a name) Open module, e.g. :Pyimport os (opens the os module) Documentation (Pydoc) support (with highlighting, Shift+k). ```