51 lines
1.3 KiB
VimL
51 lines
1.3 KiB
VimL
set nocompatible
|
|
filetype on
|
|
filetype plugin on
|
|
filetype indent on
|
|
syntax on
|
|
set number
|
|
set cursorline
|
|
set cursorcolumn
|
|
set shiftwidth=4
|
|
set tabstop=4
|
|
set expandtab
|
|
set incsearch
|
|
set ignorecase
|
|
set smartcase
|
|
set showcmd
|
|
set showmode
|
|
set showmatch
|
|
set hlsearch
|
|
set wildmenu
|
|
set wrap
|
|
set linebreak
|
|
set autoread
|
|
set colorcolumn=100
|
|
|
|
# Plugin bootstrap
|
|
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
|
if empty(glob(data_dir . '/autoload/plug.vim'))
|
|
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
endif
|
|
|
|
# Plugin install
|
|
call plug#begin('~/.vim/plugged')
|
|
Plug 'tpope/vim-surround'
|
|
Plug 'scrooloose/nerdtree'
|
|
Plug 'airblade/vim-gitgutter'
|
|
Plug 'vim-airline/vim-airline'
|
|
Plug 'prabirshrestha/vim-lsp'
|
|
Plug 'prabirshrestha/asyncomplete.vim'
|
|
Plug 'prabirshrestha/asyncomplete-lsp.vim'
|
|
Plug 'mattn/vim-lsp-settings'
|
|
Plug 'vim-syntastic/syntastic'
|
|
call plug#end()
|
|
|
|
# Tab complete from vim-lsp
|
|
let g:asyncomplete_auto_popup = 0
|
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
|
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
|
|
|
|
colorscheme torte
|