Created
April 14, 2016 08:31
-
-
Save htfy96/e865fe4cfb1ee8f7206e4ec9c1a74812 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set guiheadroom=-20 | |
set shell=/bin/bash | |
if &term =~ '^\(xterm\|screen\)$' && $COLORTERM == 'gnome-terminal' | |
set t_Co=256 | |
endif | |
filetype on | |
filetype plugin on | |
set autoindent | |
set nolazyredraw | |
set number | |
set magic | |
set shiftwidth=4 | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
call plug#begin('~/.nvim/bundle') | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
" The following are examples of different formats supported. | |
" Keep Plug commands between vundle#begin/end. | |
" plugin on GitHub repo | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'vim-scripts/SyntaxRange' | |
Plug 'tpope/vim-fugitive' | |
Plug 'octol/vim-cpp-enhanced-highlight' | |
Plug 'Mizuchi/STL-Syntax' | |
Plug 'tpope/vim-markdown' | |
Plug 'skammer/vim-css-color' | |
Plug 'vim-scripts/Perfect-Dark' | |
Plug 'bling/vim-airline' | |
Plug 'mhinz/vim-startify' | |
Plug 'majutsushi/tagbar' | |
Plug 'scrooloose/nerdtree' | |
Plug 'scrooloose/nerdcommenter' | |
Plug 'tpope/vim-unimpaired' | |
Plug 'Shougo/vimshell.vim' | |
Plug 'xuhdev/SingleCompile' | |
Plug 'rust-lang/rust.vim' | |
"Plug 'scrooloose/syntastic' | |
"Plug 'Valloric/YouCompleteMe', {'do': 'python2 ./install.py --clang-completer'} | |
Plug 'benekastah/neomake' | |
Plug 'artur-shaik/vim-javacomplete2' | |
Plug 'Shougo/vimproc.vim', {'do': 'make'} | |
Plug 'easymotion/vim-easymotion' | |
Plug 'othree/html5.vim' | |
Plug 'pangloss/vim-javascript' | |
Plug 'JulesWang/css.vim' | |
Plug 'mattn/jscomplete-vim' | |
Plug 'rking/ag.vim' | |
Plug 'mattn/webapi-vim', {'do': 'make'} | |
Plug 'mattn/gist-vim' | |
Plug 'ntpeters/vim-airline-colornum' | |
Plug 'gastonsimone/vim-dokumentary' | |
Plug 'EinfachToll/DidYouMean' | |
Plug 'tpope/vim-surround' | |
Plug 'godlygeek/csapprox' | |
Plug 'tpope/vim-rails' | |
Plug 'vim-ruby/vim-ruby' | |
Plug 'KabbAmine/zeavim.vim' | |
Plug 'mustache/vim-mustache-handlebars' | |
Plug 'def-lkb/vimbufsync' | |
Plug 'mxw/vim-jsx' | |
Plug 'Shougo/neosnippet' | |
Plug 'Shougo/neosnippet-snippets' | |
Plug 'mattn/emmet-vim' | |
Plug 'lilydjwg/fcitx.vim' | |
Plug 'vim-scripts/a.vim' | |
Plug 'wannesm/wmgraphviz.vim' | |
Plug 'vim-scripts/matchit.zip' | |
Plug 'fatih/vim-go' | |
Plug 'Shougo/unite.vim' | |
Plug 'vim-scripts/gtags.vim' | |
Plug 'Shougo/deoplete.nvim' | |
"Plug 'Rip-Rip/clang_complete' | |
Plug 'xaizek/vim-inccomplete' | |
Plug 'Shougo/neco-vim' | |
Plug 'justmao945/vim-clang' | |
"Plug 'Rip-Rip/clang_complete' | |
Plug 'justinmk/vim-sneak' | |
"Plug 'lornix/vim-scrollbar' | |
Plug 'kassio/neoterm' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'haya14busa/incsearch.vim' | |
Plug 'haya14busa/incsearch-easymotion.vim' | |
Plug 'airblade/vim-rooter' | |
Plug 'jistr/vim-nerdtree-tabs' | |
Plug 'junegunn/rainbow_parentheses.vim' | |
call plug#end() " required | |
syntax on | |
set cursorline | |
au VimEnter * set lines=37 columns=141 | |
let g:rainbow#pairs = [['(', ')'], ['{', '}'], ['[', ']']] | |
autocmd FileType * RainbowParentheses | |
set timeout timeoutlen=3000 ttimeoutlen=100 | |
" detect file type | |
filetype on | |
filetype indent plugin on | |
colorscheme PerfectDark | |
" If using a dark background within the editing area and syntax highlighting | |
" turn on this option as well | |
set background=dark | |
" Uncomment the following to have Vim jump to the last position when | |
" reopening a file | |
if has("autocmd") | |
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif | |
"have Vim load indentation rules and plugins according to the detected filetype | |
filetype plugin indent on | |
endif | |
" The following are commented out as they cause vim to behave a lot | |
" differently from regular Vi. They are highly recommended though. | |
set autowrite | |
set autoindent | |
set smartindent | |
set tabstop=4 | |
set smarttab | |
set softtabstop=4 | |
set noexpandtab! | |
set cindent | |
set cinoptions={0,1s,t0,n0,p2s,(03s,=.5s,>1s,=1s,:1s,l1 | |
set showmatch | |
set linebreak | |
set whichwrap=b,s,<,>,[,] | |
set hidden " Hide buffers when they are abandoned | |
set mouse=a | |
set number | |
set history=50 " set command history to 50 | |
set laststatus=2 | |
set ruler | |
set showcmd | |
set showmode | |
"--find setting-- | |
set incsearch | |
set hlsearch | |
set guifont=CamingoCode\ 11 | |
let g:Guifont="CamingoCode\ 11" | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_theme='luna' | |
let NERDTreeMinimalUI=1 | |
let NERDTreeWinSize=25 | |
" Enable omni completion. | |
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS | |
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags | |
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS | |
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete | |
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags | |
autocmd FileType java setlocal omnifunc=javacomplete#Complete | |
set guioptions=Pra | |
let g:vimshell_split_command = "vsplit" | |
let g:vimshell_popup_command = "vsplit" | |
let g:ycm_confirm_extra_conf = 0 | |
let g:SingleCompile_showquickfixiferror = 1 | |
let g:SingleCompile_silentcompileifshowquickfix = 1 | |
" Key maps | |
noremap <F2> :NERDTreeTabsToggle<cr> | |
inoremap <F2> <C-o>:NERDTreeTabsToggle<cr> | |
nnoremap <F3> :Ttoggle<cr><C-w><C-w>A | |
inoremap <F3> <esc>:Ttoggle<cr><C-w><C-w>A | |
tnoremap <F3> <C-\><C-n>:Ttoggle<cr> | |
tnoremap <esc> <C-\><C-n> | |
tnoremap <C-w><C-w> <C-\><C-n><C-w><C-w> | |
noremap <F8> :Tagbar<cr> | |
inoremap <F8> <C-o>:Tagbar<cr> | |
noremap <F9> :SCCompile<cr> | |
inoremap <F9> <C-o>:SCCompile<cr> | |
noremap <S-F9> :make<cr> | |
inoremap <S-F9> <C-o>:make<cr> | |
noremap <C-F9> :SCCompileRun<cr> | |
inoremap <C-F9> <C-o>:SCCompileRun<cr> | |
noremap <F5> :!gnome-terminal -e 'bash -c %:p:r;read -p'<cr><cr> | |
inoremap <F5> <C-o>:!gnome-terminal -e 'bash -c %:p:r;read -p'<cr><cr> | |
noremap <C-F5> :!gnome-terminal -e 'bash -c "gdb %:p:r"'<cr><cr> | |
inoremap <C-F5> <C-o>:!gnome-terminal -e 'bash -c "gdb %:p:r"'<cr><cr> | |
noremap <F6> mpggvG$"+y`p | |
inoremap <F6> <C-o>mpggvG$"+y`p | |
noremap <A-n> :cnext<cr> | |
inoremap <A-n> <C-o>:cnext<cr> | |
noremap <A-p> :cprev<cr> | |
inoremap <A-p> <C-o>:cprev<cr> | |
noremap <A-h> :lcd %:h<cr> | |
inoremap <A-h> <left> | |
inoremap <A-j> <Down> | |
inoremap <A-k> <Up> | |
inoremap <A-l> <Right> | |
let g:syntastic_check_on_open = 1 | |
let g:jsx_ext_required = 0 | |
" Plugin key-mappings. | |
imap <C-k> <Plug>(neosnippet_expand_or_jump) | |
smap <C-k> <Plug>(neosnippet_expand_or_jump) | |
xmap <C-k> <Plug>(neosnippet_expand_target) | |
" For conceal markers. | |
if has('conceal') | |
set conceallevel=2 concealcursor=niv | |
endif | |
let g:cpp_class_scope_highlight = 1 | |
let g:startify_custom_header = map(split(system('fortune -s | cat'), '\n'), '" ". v:val') + ['',''] | |
let g:unite_source_grep_max_candidates = 200 | |
if executable('hw') | |
" Use hw (highway) | |
" https://github.com/tkengo/highway | |
let g:unite_source_grep_command = 'hw' | |
let g:unite_source_grep_default_opts = '--no-group --no-color' | |
let g:unite_source_grep_recursive_opt = '' | |
elseif executable('ag') | |
" Use ag (the silver searcher) | |
" https://github.com/ggreer/the_silver_searcher | |
let g:unite_source_grep_command = 'ag' | |
let g:unite_source_grep_default_opts = | |
\ '-i --vimgrep --hidden --ignore ' . | |
\ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr''' | |
let g:unite_source_grep_recursive_opt = '' | |
elseif executable('pt') | |
" Use pt (the platinum searcher) | |
" https://github.com/monochromegane/the_platinum_searcher | |
let g:unite_source_grep_command = 'pt' | |
let g:unite_source_grep_default_opts = '--nogroup --nocolor' | |
let g:unite_source_grep_recursive_opt = '' | |
elseif executable('ack-grep') | |
" Use ack | |
" http://beyondgrep.com/ | |
let g:unite_source_grep_command = 'ack-grep' | |
let g:unite_source_grep_default_opts = | |
\ '-i --no-heading --no-color -k -H' | |
let g:unite_source_grep_recursive_opt = '' | |
elseif executable('jvgrep') | |
" Use jvgrep | |
" https://github.com/mattn/jvgrep | |
let g:unite_source_grep_command = 'jvgrep' | |
let g:unite_source_grep_default_opts = | |
\ '-i --exclude ''\.(git|svn|hg|bzr)''' | |
let g:unite_source_grep_recursive_opt = '-R' | |
endif | |
nnoremap <leader>/ :Unite grep:.<cr> | |
vnoremap <leader>/ y:Unite grep:.::<c-r>"<cr> | |
nnoremap <leader>t :Unite tab<cr> | |
nnoremap <leader>b :Unite buffer<cr> | |
nnoremap <leader>f :Unite file_rec/async<cr> | |
nnoremap <leader>l :Unite file/async<cr> | |
nnoremap <leader>j :Unite jump<cr> | |
let g:weather#area = 'shanghai,china' | |
let g:weather#appid = '51d68f0bedef9cd292167c334e26802d' | |
let cscopeprg = 'gtags-cscope' | |
let g:deoplete#enable_at_startup = 1 | |
call deoplete#custom#set('_', 'matchers', ['matcher_head']) | |
"call deoplete#custom#set('_', 'ignore_filetype', ['c', 'cpp', 'python']) | |
inoremap <expr><C-h> | |
\ deoplete#mappings#smart_close_popup()."\<C-h>" | |
inoremap <expr><BS> | |
\ deoplete#mappings#smart_close_popup()."\<C-h>" | |
inoremap <silent> <esc> <esc>:silent! call s:my_cr_function()<cr> | |
let g:clang_complete_auto = 0 | |
let g:clang_auto_select = 0 | |
let g:clang_default_keymappings = 0 | |
let g:clang_use_library = 1 | |
let g:clang_close_preview = 1 | |
let g:clang_cpp_options = ' -std=c++14 -isystem /usr/include/c++/v1 -I/usr/include/c++/v1 ' | |
let g:clang_auto_user_options = 'compile_commands.json, .clang_complete, path' | |
let g:clang_user_options = ' -std=c++14 -I/usr/include/c++/v1 ' | |
let g:inccomplete_showdirs = 1 | |
"let g:deoplete#omni#input_patterns = {} | |
"let g:deoplete#omni#input_patterns.cpp = ['[^. *\t]\.\w*', '[^. *\t]\::\w*', '[^. *\t]\->\w*', '#include\s*[<"][^>"]*'] | |
let g:deoplete#omni_patterns = {} | |
let g:deoplete#omni_patterns.cpp = '[^. *\t]\.\w*|[^. *\t]\::\w*|[^. *\t]\->\w*|#include\s*[<"][^>"]*' | |
let g:deoplete#omni#input_patterns={} | |
let g:deoplete#omni#input_patterns.cpp = ['[^. *\t]\.\w*','[^. *\t]\::\w*','[^. *\t]\->\w*','#include\s*[<"][^>"]*'] | |
let g:clang_close_preview = 1 | |
let g:clang_auto = 0 | |
let g:clang_diagsopt = '' | |
let g:clang_verbose_pmenu = 1 | |
let g:clang_pwheight = 4 | |
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" | |
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<BS>" | |
let g:clang_c_completeopt = 'menuone,preview,noselect,noinsert' | |
let g:clang_cpp_completeopt = 'menuone,preview,noselect,noinsert' | |
let g:inccomplete_addclosebracket = "none" | |
let g:inccomplete_autoselect = 0 | |
autocmd BufWritePost * Neomake | |
"let g:scrollbar_thumb='|' | |
"let g:scrollbar_clear=' ' | |
"highlight Scrollbar_thumb guibg=#444444 | |
let g:neoterm_shell = "zsh" | |
let g:neoterm_position = "vertical" | |
let g:deoplete#enable_refresh_always = 1 | |
map / <Plug>(incsearch-forward) | |
map ? <Plug>(incsearch-backward) | |
map g/ <Plug>(incsearch-stay) | |
let g:incsearch#auto_nohlsearch = 1 | |
map n <Plug>(incsearch-nohl-n) | |
map N <Plug>(incsearch-nohl-N) | |
map * <Plug>(incsearch-nohl-*) | |
map # <Plug>(incsearch-nohl-#) | |
map g* <Plug>(incsearch-nohl-g*) | |
map g# <Plug>(incsearch-nohl-g#) | |
map z/ <Plug>(incsearch-easymotion-/) | |
map z? <Plug>(incsearch-easymotion-?) | |
map zg/ <Plug>(incsearch-easymotion-stay) | |
" Neovim-qt Guifont command | |
command -nargs=? Guifont call rpcnotify(0, 'Gui', 'SetFont', "<args>") | let g:Guifont="<args>" | |
" Set the font to DejaVu Sans Mono:h13 | |
Guifont DejaVu Sans Mono:h11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment