" ```````````````````````````````````````````````
" General Setting of Vim
" ..............................................
set number
set nowrap
set nocompatible
" Backup cancel
set nobackup
set nowb
set noswapfile
set ignorecase
set ruler
set tabstop=4
set paste
autocmd! bufwritepost $HOME/.vimrc source %
syntax on
filetype off
filetype plugin indent on
2. Settings of plugins in Vundle
Vundle 安装的插件的一些设置
" ----------------------------------------------
" Plugins Content & Plugins settings
" .............................................
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'" Bottom Line
Plugin 'Lokaltog/vim-powerline'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'Xuyuanp/nerdtree-git-plugin'
" NerdTree
autocmd vimenter * NERDTree
map <C-n> :NERDTreeToggle<CR>
let NERDTreeShowHidden=1
let g:NERDTreeShowIgnoredStatus = 1
let g:nerdtree_tabs_open_on_console_startup=1"let g:NERDTreeIndicatorMapCustom = {
" \ "Modified" : "",
" \ "Staged" : "",
" \ "Untracked" : "",
" \ "Renamed" : "",
" \ "Unmerged" : "═",
" \ "Deleted" : "",
" \ "Dirty" : "",
" \ "Clean" : "",
" \ 'Ignored' : '',
" \ "Unknown" : "?"
" \ }
let g:NERDTreeDirArrowExpandable = '+'
let g:NERDTreeDirArrowCollapsible = '-'" Powerline
set rtp+=~/.vim/bundle/vim-powerline/plugin/Powerline.vim
set laststatus=2
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" Theme
Plugin 'altercation/vim-colors-solarized'
Plugin 'tomasr/molokai'
Plugin 'vim-scripts/phd'" Coding
" Plugin 'Valloric/YouCompleteMe'" Web Front-end
" Emmet
Plugin 'mattn/emmet-vim'
let g:user_emmet_leader_key='<Tab>'
let g:user_emmet_settings = {
\ 'javascript.jsx' : {
\ 'extends' : 'jsx',
\ },
\ }
" html 5
Plugin 'othree/html5.vim'
" css 3
Plugin 'hail2u/vim-css3-syntax'
Plugin 'ap/vim-css-color'
augroup VimCSS3Syntax
autocmd!
autocmd FileType css setlocal iskeyword+=-
augroup END" JavaScipt
Plugin 'pangloss/vim-javascript'
let g:javascript_plugin_jsdoc = 1
let g:javascript_plugin_ngdoc = 1
let g:javascript_plugin_flow = 1
set foldmethod=syntax
let g:javascript_conceal_function = ""
let g:javascript_conceal_null = ""
let g:javascript_conceal_this = "@"
let g:javascript_conceal_return = ""
let g:javascript_conceal_undefined = ""
let g:javascript_conceal_NaN = ""
let g:javascript_conceal_prototype = ""
let g:javascript_conceal_static = ""
let g:javascript_conceal_super = "Ω"
let g:javascript_conceal_arrow_function = ""
let g:javascript_conceal_noarg_arrow_function = ""
let g:javascript_conceal_underscore_arrow_function = ""
set conceallevel=1
" Prettier
Plugin 'prettier/vim-prettier', {
\ 'do': 'yarn install',
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql'] }
let g:prettier#config#bracket_spacing = 'true'
let g:prettier#config#jsx_bracket_same_line = 'false'
let g:prettier#autoformat = 0
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql PrettierAsync
" Markdown
Plugin 'suan/vim-instant-markdown'
call vundle#end()
问题 3:
安装 YCM 后启动 Vim,Vim 底部提示The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). YCM core library not detected; you need to compile YCM before using it.
问题 4 :
YCM 报错:YouCompleteMe unavailable: requires Vim 7.4.1578+.
Info: You appear to be running the default system Vim on macOS. It reports as patch 8056, but it is really older than 1578. Please consider MacVim, homebrew Vim or a self-built Vim that satisfies the minimum requirement.