zoukankan      html  css  js  c++  java
  • 我的vim配置

      1 filetype on
      2 filetype plugin on
      3 
      4 filetype indent on
      5 
      6 syntax enable
      7 syntax on
      8 
      9 set nocompatible
     10 set incsearch 
     11 set ignorecase
     12 set wildmenu 
     13 set autoread 
     14 set gcr=a:block-blinkon0
     15 set laststatus=2
     16 set ruler
     17 set number
     18 set cursorline
     19 set hlsearch
     20 set nowrap
     21 set backspace=2
     22 set backspace=indent,eol,start
     23 set novisualbell
     24 
     25 set guioptions-=l
     26 set guioptions-=L
     27 set guioptions-=r
     28 set guioptions-=R
     29 
     30 set guioptions-=m
     31 set guioptions-=T
     32 
     33 set expandtab
     34 set tabstop=4
     35 set shiftwidth=4
     36 set softtabstop=4
     37 set foldmethod=syntax
     38 set nofoldenable
     39 set shell=bash -i
     40 
     41 filetype off
     42 set rtp+=~/.vim/bundle/Vundle.vim
     43 call vundle#begin()
     44 Plugin 'VundleVim/Vundle.vim'
     45 Plugin 'Lokaltog/vim-powerline' 
     46 Plugin 'octol/vim-cpp-enhanced-highlight' 
     47 Plugin 'kshenoy/vim-signature'
     48 Plugin 'vim-scripts/BOOKMARKS--Mark-and-Highlight-Full-Lines'
     49 Plugin 'Valloric/YouCompleteMe'  
     50 Plugin 'kien/ctrlp.vim'  
     51 Plugin 'vim-scripts/grep.vim'  
     52 Plugin 'Lokaltog/vim-easymotion'  
     53 Plugin 'vim-scripts/ShowTrailingWhitespace.git'  
     54 Plugin 'vim-scripts/indentpython.vim.git'
     55 Plugin 'vim-scripts/Solarized.git'  
     56 Plugin 'nathanaelkane/vim-indent-guides.git'  
     57 Plugin 'davidhalter/jedi-vim' 
     58 Plugin 'vim-scripts/Markdown'
     59 Plugin 'tpope/vim-surround'
     60 Plugin 'ekalinin/Dockerfile.vim'
     61 call vundle#end()
     62 filetype on
     63 
     64 let g:Powerline_colorscheme='solarized256'
     65 
     66 
     67 let tagbar_left=1
     68 nnoremap <Leader>t :TagbarToggle<CR>
     69 let tagbar_width=32
     70 let g:tagbar_compact=1
     71 
     72 let g:SignatureMap = {
     73          'Leader'             :  "m",
     74          'PlaceNextMark'      :  "m,",
     75          'ToggleMarkAtLine'   :  "m.",
     76          'PurgeMarksAtLine'   :  "m-",
     77          'DeleteMark'         :  "dm",
     78          'PurgeMarks'         :  "mda",
     79          'PurgeMarkers'       :  "m<BS>",
     80          'GotoNextLineAlpha'  :  "']",
     81          'GotoPrevLineAlpha'  :  "'[",
     82          'GotoNextSpotAlpha'  :  "`]",
     83          'GotoPrevSpotAlpha'  :  "`[",
     84          'GotoNextLineByPos'  :  "]'",
     85          'GotoPrevLineByPos'  :  "['",
     86          'GotoNextSpotByPos'  :  "mn",
     87          'GotoPrevSpotByPos'  :  "mp",
     88          'GotoNextMarker'     :  "[+",
     89          'GotoPrevMarker'     :  "[-",
     90          'GotoNextMarkerAny'  :  "]=",
     91          'GotoPrevMarkerAny'  :  "[=",
     92          'ListLocalMarks'     :  "ms",
     93          'ListLocalMarkers'   :  "m?"
     94          }
     95 
     96 nmap <Leader>f :NERDTreeToggle<CR>
     97 let NERDTreeWinSize=32
     98 let NERDTreeWinPos="right"
     99 let NERDTreeShowHidden=1
    100 let NERDTreeMinimalUI=1
    101 let NERDTreeAutoDeleteBuffer=1
    102 
    103 let g:ycm_complete_in_comments=1
    104 let g:ycm_confirm_extra_conf=0
    105 let g:ycm_collect_identifiers_from_tags_files=1
    106 set tags+=/data/misc/software/misc./vim/stdcpp.tags
    107 "inoremap <leader>; <C-x><C-o>
    108 set completeopt-=preview
    109 let g:ycm_min_num_of_chars_for_completion=1
    110 let g:ycm_cache_omnifunc=0
    111 let g:ycm_seed_identifiers_with_syntax=1
    112 let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
    113 
    114 
    115 """ color settings
    116 set t_Co=256
    117 if has("gui_running")
    118 set guioptions=gR
    119 set mousemodel=popup
    120 set background=light
    121 ""hi LineNr cterm=bold guibg=black guifg=white
    122 ""hi CursorLine cterm=none ctermbg=lightgray ctermfg=none
    123 ""hi CursorColumn cterm=none ctermbg=lightgray ctermfg=none
    124 else
    125 set background=dark
    126 ""hi LineNr cterm=bold ctermbg=black ctermfg=white
    127 ""hi CursorLine cterm=none ctermbg=darkgray ctermfg=none
    128 ""hi CursorColumn cterm=none ctermbg=darkgray ctermfg=none
    129 endif
    130 colorscheme solarized
    131 "colorscheme default
    132 
    133 " indent guides
    134 "let g:indent_guides_enable_on_vim_startup=1
    135 let g:indent_guides_start_level=2
    136 "let g:indent_guides_auto_colors = 0
    137 "hi IndentGuidesOdd  guibg=red   ctermbg=3
    138 "hi IndentGuidesEven guibg=green ctermbg=4
    139 let g:indent_guides_guide_size=1
    140 noremap <Leader>sj :IndentGuidesToggle<CR>

     https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source

    http://blog.jobbole.com/58978/

     效果如图:

    set nocompatible              " be iMproved, 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
    Plugin 'VundleVim/Vundle.vim'
    Plugin 'scrooloose/nerdtree'
    Plugin 'jistr/vim-nerdtree-tabs'
    Plugin 'majutsushi/tagbar'
    Plugin 'scrooloose/syntastic'
    Plugin 'vim-airline/vim-airline'
    Plugin 'vim-airline/vim-airline-themes'
    Plugin 'jiangmiao/auto-pairs'
    Plugin 'Valloric/YouCompleteMe'
    
    " The following are examples of different formats supported.
    " Keep Plugin commands between vundle#begin/end.
    " plugin on GitHub repo
    " Plugin 'tpope/vim-fugitive'
    " plugin from http://vim-scripts.org/vim/scripts.html
    " Plugin 'L9'
    " Git plugin not hosted on GitHub
    " Plugin 'git://git.wincent.com/command-t.git'
    " git repos on your local machine (i.e. when working on your own plugin)
    " Plugin 'file:///home/gmarik/path/to/plugin'
    " The sparkup vim script is in a subdirectory of this repo called vim.
    " Pass the path to set the runtimepath properly.
    " Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
    " Avoid a name conflict with L9
    " Plugin 'user/L9', {'name': 'newL9'}
    
    " All of your Plugins must be added before the following line
    call vundle#end()            " required
    filetype plugin indent on    " required
    " To ignore plugin indent changes, instead use:
    "filetype plugin on
    "
    " Brief help
    " :PluginList       - lists configured plugins
    " :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
    " :PluginSearch foo - searches for foo; append `!` to refresh local cache
    " :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
    "
    " see :h vundle for more details or wiki for FAQ
    " Put your non-Plugin stuff after this line
    
    " airline
    let g:airline_powerline_fonts = 1
    set t_Co=256
    set laststatus=2
    
    " ycm
    let g:ycm_python_binary_path='/usr/bin/python'
    let g:ycm_confirm_extra_conf=0
    
    let g:ycm_server_python_interpreter='/usr/bin/python'
    "let g:ycm_global_ycm_extra_conf='~/.vim/.ycm_extra_conf.py'
    let g:ycm_global_ycm_extra_conf='/home/ubuntu/.vim/.ycm_extra_conf.py'
    
    let g:ycm_collect_identifiers_from_tags_files = 1 "tag complete
    let g:ycm_seed_identifiers_with_syntax = 1        "yu yi complete
    
    set completeopt-=preview
    
    let g:ycm_complete_in_comments=1                 "comment of complete
    
    syntax on
    
    set number
    set cindent
    set autoindent
    set expandtab
    set smarttab
    " set mouse=a
    set shiftwidth=4
    set softtabstop=4
    set hls
    set bg=dark
  • 相关阅读:
    linux-满足多字符条件统计行数
    oracle的面试问题
    在开发过程中为什么需要写存储过程
    面向对象编程
    动态SQL
    触发器

    子程序
    游标
    集合
  • 原文地址:https://www.cnblogs.com/douzujun/p/6376513.html
Copyright © 2011-2022 走看看