Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "cliboard-setting
- set clipboard=unnamed
- set ruler
- "font
- "set gfn=SauceCodePro\ NFM:h10
- "set gfn=consolas:h15
- "set gfn=FiraCode\ Nerd\ Font\ Mono:h9.5
- "set gfn=JetBrainsMono\ Nerd\ Font\ Mono:h10
- "set gfn=FixedsysExcelsiorIIIb_NFM:h12
- "set gfn=Consolas\ NF:h9.75
- "set gfn=UbuntuMono\ Nerd\ Font\ Mono:h11
- set gfn=Hack\ Nerd\ Font\ Mono:h9.5
- "set gfn=MesloLGSDZ\ Nerd\ Font\ Mono:h9.5
- "set gfn=MesloLGL\ Nerd\ Font\ Mono:h9
- "set gfn=MesloLGMDZ\ Nerd\ Font\ Mono:h9
- "set gfn=MesloGLDS\ Nerd\ Font\ Mono:h9
- "set gfn=MesloLGS\ Nerd\ Font\ Mono:h9.5
- "filesetting
- set hidden
- set backspace=2
- set noswapfile
- set nobackup
- set hlsearch
- "set nocompatible
- set nocp
- set encoding=utf-8
- "set cursorline
- set nu
- set splitbelow
- "set relativenumber
- "syntax
- syntax on
- "indent
- set autoindent
- set smartindent
- set cindent
- "set cursorline
- set expandtab
- set smarttab
- "tab
- set ts=4
- set sw=4
- "set auto-pairs
- inoremap { {}<Left>
- inoremap {<CR> {<CR>}<Esc>O
- inoremap {{ {
- inoremap {} {}
- inoremap } <c-r>=ClosePair('}')<CR>
- inoremap ( ()<ESC>i
- inoremap ) <c-r>=ClosePair(')')<CR>
- inoremap [ []<ESC>i
- inoremap ] <c-r>=ClosePair(']')<CR>
- function! ClosePair(char)
- if getline('.')[col('.') - 1] == a:char
- return "\<Right>"
- else
- return a:char
- endif
- endfunction
- "Compile
- func! Comp()
- exec "w"
- if &filetype == "cpp"
- exec "!g++ -O2 -std=c++17 -Wall -Wfatal-errors % -o %<"
- elseif &filetype == "cc"
- exec "!g++ -O2 -std=c++17 -Wall -Wfatal-errors % -o %<"
- elseif &filetype == "java"
- exec "!javac %"
- endif
- endfunc
- set guioptions -=T
- func! Run()
- exec "w"
- if &filetype == "java"
- exec "!java %<"
- elseif &filetype == "cc"
- exec "!%<.exe"
- elseif &filetype == "cpp"
- exec "!%<.exe"
- endif
- endfunc
- call plug#begin('~/vimfiles/plugged')
- Plug 'dawikur/base16-vim-airline-themes'
- Plug 'doums/darcula'
- Plug 'vim-airline/vim-airline'
- Plug 'vim-airline/vim-airline-themes'
- " Plug 'itchyny/lightline.vim'
- Plug 'christoomey/vim-tmux-navigator'
- Plug 'fenetikm/falcon'
- Plug 'octol/vim-cpp-enhanced-highlight'
- Plug 'neoclide/coc.nvim', {'branch': 'release'}
- Plug 'sonph/onehalf', { 'rtp': 'vim' }
- Plug 'altercation/vim-colors-solarized'
- Plug 'morhetz/gruvbox'
- Plug 'Yggdroot/indentLine'
- Plug 'tinted-theming/base16-vim'
- Plug 'sainnhe/gruvbox-material'
- Plug 'echasnovski/mini.base16'
- Plug 'vim-airline/vim-airline-themes'
- Plug 'junegunn/seoul256.vim'
- Plug 'lifepillar/vim-solarized8'
- Plug 'lifepillar/vim-gruvbox8'
- Plug 'sainnhe/sonokai'
- Plug 'ryanoasis/vim-devicons'
- Plug 'joshdick/onedark.vim'
- Plug 'tomasiser/vim-code-dark'
- Plug 'preservim/nerdtree'
- Plug 'preservim/tagbar'
- Plug 'frazrepo/vim-rainbow'
- "Plug 'mengelbrecht/lightline-bufferline'
- Plug 'chriskempson/vim-tomorrow-theme'
- call plug#end()
- set cursorline
- set background=light
- "colorscheme gruvbox-material
- "colorscheme base16-google-dark
- "colorscheme base16-gruvbox-material-dark-hard
- "colorscheme base16-gruvbox-dark-hard
- "colorscheme base16-outrun-dark
- colorscheme solarized8_flat
- "colorscheme base16-blueforest
- "colorscheme base16-lime
- "colorscheme base16-gruvbox-material-light-soft
- "colorscheme base16-solarized-dark
- "colorscheme base16-solarized-light
- "colorscheme base16-tokyo-night-storm
- "colorscheme base16-tokyo-night-terminal-light
- "colorscheme base16-kanagawa
- "colorscheme base16-spaceduck
- "colorscheme base16-eighties
- "colorscheme base16-tube
- "colorscheme base16-spacemacs
- "colorscheme base16-selenized-light
- "colorscheme base16-selenized-black
- "colorscheme base16-windows-highcontrast
- "colorscheme base16-windows-nt
- "colorscheme base16-windows-95-light
- "let g:seoul256_background = 256
- "colorscheme seoul256
- "colorscheme solarized8_flat
- "colorscheme sonokai
- "colorscheme onedark
- "colorscheme codedark
- "colorscheme onehalflight
- "colorscheme solarized8_flat
- "colorscheme gruvbox8
- "colorscheme Tomorrow
- "colorscheme base16-monokai
- "AirlineTheme base16_vim
- noremap x :bd<CR>
- augroup VIMRC
- au!
- au BufWritePost .vimrc so %
- augroup END
- "set keymaps
- noremap <F2> :NERDTreeToggle<CR>
- noremap L :bn<CR>
- noremap H :bp<CR>
- noremap <F4> :w<CR>
- noremap <F5> :CocRestart<CR>
- noremap <F6> :set hlsearch<CR>:/
- noremap <F7> :noh<CR>
- noremap <F8> :TagbarToggle<CR>
- noremap J :u<CR>
- noremap <F9> :call Comp()<CR>
- noremap <F11> :call Run()<CR>
- noremap <F12> :!%<.exe <
- "background
- hi NONTEXT ctermbg=NONE
- hi NORMAL ctermbg=NONE
- "template
- set laststatus=2 "永远显示状态栏
- let g:airline_powerline_fonts = 1 " 支持 powerline 字体
- let g:airline#extensions#tabline#enabled = 1
- let g:airline#extensions#whitespace#enabled = 0
- "syntax setting
- let g:cpp_class_scope_highlight = 1
- let g:cpp_member_variable_highlight = 1
- let g:cpp_class_decl_highlight = 1
- let g:cpp_posix_standard = 1
- let g:cpp_experimental_simple_template_highlight = 1
- let g:cpp_concepts_highlight = 1
- set updatetime=300
- inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
- \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
- inoremap <silent><expr> <TAB>
- \ coc#pum#visible() ? coc#_select_confirm() :
- \ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
- \ CheckBackspace() ? "\<TAB>" :
- \ coc#refresh()
- function! CheckBackspace() abort
- let col = col('.') - 1
- return !col || getline('.')[col - 1] =~# '\s'
- endfunction
- let g:coc_snippet_next = '<tab>'
- "indentline
- let g:indentLine_setColors = 0
- "airline
- let g:airline#extensions#tabline#fnamemod = ':t'
- let g:airline#extensions#tabline#show_tab_type = 0
- set guioptions-=m "menu bar
- set guioptions-=T "toolbar
- set guioptions-=r "scrollbar
- au FileType c,cpp,objc,objcpp call rainbow#load()
- let g:rainbow_active = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement