Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set nocompatible
- if empty(glob('~/.config/nvim/autoload/plug.vim'))
- silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
- \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- endif
- call plug#begin('~/.config/nvim/autoload/plugged')
- Plug 'jiangmiao/auto-pairs'
- Plug 'neoclide/coc.nvim'
- Plug 'Yggdroot/indentLine'
- Plug 'voldikss/vim-floaterm'
- Plug 'tpope/vim-commentary'
- Plug '907th/vim-auto-save'
- Plug 'overcache/NeoSolarized'
- Plug 'sheerun/vim-polyglot'
- call plug#end()
- colo NeoSolarized
- set bg=light
- set list lcs=tab:\|\
- set noshowmode
- set number
- set cursorline
- set termguicolors
- set autoread
- syntax on
- set updatetime=300
- set mouse=a
- set nowrap
- set noswapfile
- set hlsearch
- set showmatch
- set expandtab
- set shiftwidth=2
- set nobackup
- set hidden
- set ai
- set shortmess+=c
- set ruler
- let g:rainbow_active = 1
- let g:auto_save = 1
- let g:auto_save_events = ["InsertLeave", "TextChanged","CursorHoldI","CursorHold"]
- autocmd filetype java nnoremap <F5> :w <bar> :FloatermNew --autoclose=0 java % -o %< <CR>
- autocmd filetype cpp nnoremap <F5> :w <bar> :FloatermNew --autoclose=0 g++ % && ./a.out %< <CR>
- inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
- nmap <silent> gd <Plug>(coc-definition)
- nmap <silent> gy <Plug>(coc-type-definition)
- nmap <silent> gi <Plug>(coc-implementation)
- nmap <silent> gr <Plug>(coc-references)
- autocmd CursorHold * silent call CocActionAsync('highlight')
- xmap <leader>f <Plug>(coc-format-selected)
- nmap <leader>f <Plug>(coc-format-selected)
- if has('nvim')
- inoremap <silent><expr> <c-space> coc#refresh()
- else
- inoremap <silent><expr> <c-@> coc#refresh()
- endif
- function! CheckBackspace() abort
- let col = col('.') - 1
- return !col || getline('.')[col - 1] =~# '\s'
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement