2020-02-16 12:41:12 +01:00
|
|
|
" General config
|
|
|
|
" ______________________________
|
|
|
|
"
|
|
|
|
set encoding=utf-8
|
|
|
|
set laststatus=2
|
|
|
|
set nowrap
|
|
|
|
set smarttab
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
set ttyfast
|
|
|
|
set timeout timeoutlen=1000 ttimeoutlen=50
|
|
|
|
set clipboard=unnamed "use p to paste clipboard
|
|
|
|
set history=1000
|
|
|
|
set undolevels=1000
|
|
|
|
set nobackup
|
|
|
|
set nowritebackup
|
|
|
|
set noswapfile
|
|
|
|
set viminfo='20,\"100 "max 100 lines in registers
|
|
|
|
set visualbell
|
|
|
|
set noerrorbells
|
|
|
|
set nomodeline
|
|
|
|
|
|
|
|
" Keybindings
|
|
|
|
" ______________________________
|
|
|
|
"
|
|
|
|
" no arrow keys
|
2020-02-16 09:45:55 +01:00
|
|
|
map <Up> <NOP>
|
|
|
|
map <Down> <NOP>
|
|
|
|
map <Left> <NOP>
|
|
|
|
map <Right> <NOP>
|
|
|
|
|
2020-02-16 13:15:17 +01:00
|
|
|
" quick normal mode
|
|
|
|
inoremap jk <Esc>
|
|
|
|
|
|
|
|
" quick-quit
|
2020-02-16 12:41:12 +01:00
|
|
|
:ca Q q
|
2020-02-16 13:15:17 +01:00
|
|
|
:ca Q! q!
|
|
|
|
|
|
|
|
" quick help
|
|
|
|
:ca htab :tab h
|
2020-02-16 12:41:12 +01:00
|
|
|
|
|
|
|
" 2x scrolling
|
|
|
|
nnoremap <C-e> 2<C-e>
|
|
|
|
nnoremap <C-y> 2<C-y>
|
|
|
|
|
|
|
|
" Plugins
|
|
|
|
" ______________________________
|
|
|
|
|
2020-02-16 09:45:55 +01:00
|
|
|
call plug#begin()
|
|
|
|
Plug 'arcticicestudio/nord-vim'
|
|
|
|
Plug 'scrooloose/nerdtree'
|
|
|
|
Plug 'maxmellon/vim-jsx-pretty'
|
|
|
|
Plug 'ryanoasis/vim-devicons'
|
|
|
|
Plug 'junegunn/fzf', { 'do': './install --bin' }
|
|
|
|
Plug 'junegunn/fzf.vim'
|
|
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
|
|
Plug 'leafgarland/typescript-vim'
|
|
|
|
Plug 'peitalin/vim-jsx-typescript'
|
2020-02-16 13:22:47 +01:00
|
|
|
Plug 'prettier/vim-prettier', {
|
|
|
|
\ 'do': 'yarn install',
|
|
|
|
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] }
|
2020-02-16 09:45:55 +01:00
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
" NERDTree
|
|
|
|
let g:NERDTreeShowHidden = 1
|
|
|
|
let g:NERDTreeMinimalUI = 1
|
|
|
|
let g:NERDTreeIgnore = []
|
|
|
|
let g:NERDTreeStatusline = ''
|
|
|
|
|
|
|
|
" fzf - use silversearcher-ag to respect .gitignore
|
|
|
|
let $FZF_DEFAULT_COMMAND = 'ag -g ""'
|
|
|
|
|
2020-02-16 13:37:24 +01:00
|
|
|
" prettier
|
|
|
|
let g:prettier#quickfix_enabled = 0
|
|
|
|
autocmd TextChanged,InsertLeave *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
|
|
|
|
|
2020-02-16 09:45:55 +01:00
|
|
|
" plugin keybindings
|
|
|
|
nnoremap <silent> <C-b> :NERDTreeToggle<CR>
|
|
|
|
nnoremap <C-p> :FZF<CR>
|
|
|
|
let g:fzf_action = {
|
|
|
|
\ 'ctrl-t': 'tab split',
|
|
|
|
\ 'ctrl-s': 'split',
|
|
|
|
\ 'ctrl-v': 'vsplit'
|
|
|
|
\}
|
2020-02-16 12:41:12 +01:00
|
|
|
|
|
|
|
" Theme
|
|
|
|
" ______________________________
|
|
|
|
|
|
|
|
colorscheme nord
|
|
|
|
|