博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vim配置
阅读量:7120 次
发布时间:2019-06-28

本文共 13682 字,大约阅读时间需要 45 分钟。

hot3.png

  1 set nocompatible                                                                                                   2 set modifiable                                                                    3 set write                                                                         4 filetype off       5                                           6 " set the runtime path to include Vundle and initialize                           7 set rtp+=~/.vim/bundle/Vundle.vim                                                 8 call vundle#begin()                                                               9 " alternatively, pass a path where Vundle should install plugins                 10 "call vundle#begin('~/some/path/here')                                           11                                                                                  12 " let Vundle manage Vundle, required                                             13 Plugin 'VundleVim/Vundle.vim'                                                    14                                                                                  15 " The following are examples of different formats supported.                     16 " Keep Plugin commands between vundle#begin/end.                                 17 " plugin on GitHub repo                                                          18 Plugin 'tpope/vim-fugitive'                                                      19 Plugin 'rkulla/pydiction'                                                        20 "Plugin 'scrooloose/nerdtree'                                                    21 "Plugin 'Xuyuanp/nerdtree-git-plugin'                                            22 " plugin from http://vim-scripts.org/vim/scripts.html                            23 Plugin 'L9'                                                                      24                                                                                  25 " Git plugin not hosted on GitHub                                                26 "Plugin 'git://git.wincent.com/command-t.git'                                    27 Plugin 'https://github.com/robhudson/snipmate_for_django'                        28 Plugin 'https://github.com/vim-scripts/winmanager'                               29 Plugin 'https://github.com/vim-scripts/taglist.vim'                              30 Plugin 'https://github.com/altercation/vim-colors-solarized'                     31 " git repos on your local machine (i.e. when working on your own plugin)         32 "Plugin 'file:///home/gmarik/path/to/plugin'                                     33 " The sparkup vim script is in a subdirectory of this repo called vim.           34 " Pass the path to set the runtimepath properly.                                 35 Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}                                       36 " Install L9 and avoid a Naming conflict if you've already installed a           37 " different version somewhere else.                                              38 "Plugin 'ascenator/L9', {'name': 'newL9'}                                        39                                                                                  40 " All of your Plugins must be added before the following line                    41 call vundle#end()            " required                                          42 filetype plugin indent on    " required                                          43 " To ignore plugin indent changes, instead use:                                  44 "filetype plugin on                                                              45 "                                                                                46 " Brief help                                                                     47 " :PluginList       - lists configured plugins                                   48 " :PluginInstall    - installs plugins; append `!` to update or just             49 ":PluginUpdate                                                                   50 " :PluginSearch foo - searches for foo; append `!` to refresh local cache        51 " :PluginClean      - confirms removal of unused plugins; append `!` to          52 " auto-approve removal                                                           53 "                                                                                54 " see :h vundle for more details or wiki for FAQ                                 55 " Put your non-Plugin stuff after this line                                      56                                                                                  57 set autowrite                                                                    58 set nu                                                                           59 set cc=80                                                                        60 set noshowmatch  "高亮匹配括号                                                   61 set tabstop=4                                                                    62 set softtabstop=4                                                                63 set cursorline                                                                   64 set cursorcolumn                                                                 65 set autoindent                                                                   66 set nocp                                                                         67 set backspace=indent,eol,start                                                   68 set smartindent                                                                  69 set smarttab                                                                     70 set shiftwidth=4                                                                 71 set cindent                                                                      72 set noswapfile                                                                   73 set nobackup                                                                     74 set bufhidden=hide                                                               75 syntax on                                                                        76 set nowritebackup                                                                77 set ignorecase                                                                   78 set smartcase                                                           79 set expandtab                                                                    80 set linebreak                                                                    81 set nowrap                                                                       82 set completeopt=longest,menu                                                     83 let g:NERDTreeIndicatorMapCustom = {                                             84     \ "Modified"  : "✹",                                                         85     \ "Staged"    : "✚",                                                         86     \ "Untracked" : "✭",                                                         87     \ "Renamed"   : "➜",                                                         88     \ "Unmerged"  : "═",                                                         89     \ "Deleted"   : "✖",                                                         90     \ "Dirty"     : "✗",                                                         91     \ "Clean"     : "✔︎",                                                         92     \ "Unknown"   : "?"                                                          93     \ }                                                                          94                                                                                  95 "************************************************************************************ 96 "solarized配色方案                                                               97 syntax enable                                                                    98 syntax on                                                                        99 set t_Co=256                                                                    100 set bg=dark                                                                     101 colorscheme solarized                                                           102                                                                                 103 "************************************************************************************104 "pydiction配置                                                                  105 filetype plugin on                                                              106 let g:pydiction_location = '~/.vim/bundle/pydiction/complete-dict'              107 "pydiction快捷键                                                                108 "
              -- Accept current match and insert a space.               109 "CTRL-Y               -- Accept current match and and don't insert a space.     110 "
              -- Accept current match and insert a newline.             111 "
 or CTRL-E      -- Close the menu and do not accept any match.            112 "                                                                               113 "You can also now use Shift-Tab to Tab backwards through the popup menu.        114                                                                                 115                                                                                 116                                                                                117 "************************************************************************************118 "Taglist配置                                                                    119  " 这项必须设定,否则出错,配置taglist的ctags路径                                120 let Tlist_Ctags_Cmd = '/usr/bin/ctags'                                          121  " " 不同时显示多个文件的 tag ,显示当前文件的                                  122 let Tlist_Show_One_File=1                                                       123  " " 如果 taglist 窗口是最后一个窗口,则退出 vim                                124 let Tlist_Exit_OnlyWindow=1                                                     125  " "让当前不被编辑的文件的方法列表自动折叠起来                                  126 let Tlist_File_Fold_Auto_Close=1                                                127  " "把taglist窗口放在屏幕的右侧,缺省在左侧                                     128 "let Tlist_Use_Right_Window=1                                                   129  " "显示taglist菜单                                                             130 let Tlist_Show_Menu=1                                                           131  " "启动vim自动打开taglist                                                      132 "let Tlist_Auto_Open=1                                                          133                                                                                 134                                                                                 135                                                                                 136 "************************************************************************************137 "winmanager配置                                                                 138 "设置界面分割                                                                   139 let g:winManagerWindowLayout = "BufExplorer,FileExplorer|TagList"               140 "let g:winManagerWindowLayout = "TagList|FileExplorer"                          141 ""设置winmanager的宽度,默认为25                                                142 let g:winManagerWidth = 30                                                      143 "定义打开关闭winmanager按键                                                     144 nmap wm : WMToggle
                                                          145 "如果所有编辑文件都关闭了,退出vim                                              146 let g:persistentBehaviour=0                                                     147                                                                                 148                                                                                 149                                                                                 150                                                                                 151 "************************************************************************************152 "NERDTree配置                                                                   153 "只剩一个nerdtree窗口时自动关闭                                                 154 "autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif155                                                                                 156                                                                                 157                                                                                 158                                                                                 159                                                                                 160                                                                                 161 "************************************************************************************162 "snipmate_for_django高亮插件                                                    163 autocmd FileType python set ft=python.django " For SnipMate                     164 autocmd FileType html set ft=htmldjango.html " For SnipMate                     ~

转载于:https://my.oschina.net/toooooyoung/blog/644280

你可能感兴趣的文章
Java岗 面试考点精讲(网络篇03期)
查看>>
PBOC规范研究之五、安全相关的PKI基础知识(转)
查看>>
day-11 进程
查看>>
vue中自定义指令的使用
查看>>
python generator用法
查看>>
[leetcode-191-Number of 1 Bits]
查看>>
Uva12230Crossing Rivers 数学
查看>>
UVA 12096 The SetStack Computer
查看>>
Python学习文档指引
查看>>
[LeetCode]-- Merge Intervals
查看>>
Python基础4—常用方法
查看>>
跪一下lsj教主枚举子集(状压)的代码
查看>>
EABI和OABI
查看>>
find详解
查看>>
[BZOJ3709][PA2014]Bohater[贪心]
查看>>
大数据工程师干不过35是真的吗?
查看>>
203. Remove Linked List Elements
查看>>
下载的文件名字当前时间(精确到秒)+ 随机数
查看>>
Hibernate 处理事务
查看>>
Python 生成器和迭代器
查看>>