added .vimrc
This commit is contained in:
parent
c0d9b18939
commit
97d24082d4
1 changed files with 81 additions and 0 deletions
81
.vimrc
Normal file
81
.vimrc
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
set nocompatible
|
||||
filetype on
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
|
||||
set wrap
|
||||
set showbreak=+++
|
||||
set showmatch
|
||||
|
||||
set number relativenumber
|
||||
set hidden
|
||||
|
||||
set tabstop=2 softtabstop=2
|
||||
set shiftwidth=2
|
||||
set expandtab
|
||||
set smartindent
|
||||
|
||||
set noswapfile
|
||||
set nobackup
|
||||
set undodir=~/.vim/undodir
|
||||
set undofile
|
||||
|
||||
set hlsearch
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
set incsearch
|
||||
|
||||
set termguicolors
|
||||
set scrolloff=8
|
||||
set cursorline
|
||||
set cursorcolumn
|
||||
set splitright
|
||||
|
||||
set spell
|
||||
hi clear SpellBad
|
||||
|
||||
|
||||
" Plugins
|
||||
call plug#begin()
|
||||
|
||||
" List your plugins here
|
||||
Plug 'tpope/vim-sensible'
|
||||
Plug 'honza/vim-snippets'
|
||||
Plug 'morhetz/gruvbox'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'neoclide/coc-snippets'
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'fatih/vim-go'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
|
||||
call plug#end()
|
||||
|
||||
" Gruvbox
|
||||
set background=dark
|
||||
let g:gruvbox_contrast_dark='hard'
|
||||
|
||||
augroup my_colours
|
||||
autocmd!
|
||||
autocmd ColorScheme gruvbox hi SpellBad cterm=underline ctermfg=grey
|
||||
augroup END
|
||||
|
||||
colorscheme gruvbox
|
||||
"
|
||||
function! CheckBackSpace() abort
|
||||
let col = col('. ') - 1
|
||||
return !col || getline('. ')[col - 1] =~ '\s'
|
||||
endfunction
|
||||
|
||||
" coc vim config
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ coc#pum#visible() ? coc#pum#next(1):
|
||||
\ CheckBackSpace() ? "\<Tab>" :
|
||||
\ coc#refresh()
|
||||
inoremap <silent><expr> <cr> coc#pum#visible() && coc#pum#info()['index'] != -1 ? coc#pum#confirm() :
|
||||
\ "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
||||
" Airline
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue