call plug#begin('~/.vim/plugged') Plug 'Smirnov-O/nten16.vim' Plug 'sheerun/vim-polyglot' Plug 'jiangmiao/auto-pairs' Plug 'scrooloose/nerdtree' Plug 'w0rp/ale' call plug#end() "== General set termguicolors colorscheme nten16 " Line numbers set nu rnu " Line wrap set linebreak wrap " Tabs set tabstop=2 set shiftwidth=2 set softtabstop=2 set smarttab set expandtab set autoindent " Status line set ruler laststatus=0 " Maximux item in popup set pumheight=8 " Scroll set scrolloff=3 " Mouse set mouse=a set mousehide set cursorline " Encoding set encoding=utf-8 set fileencodings=utf-8 " Backup file & history set nobackup noswapfile noundofile set history=500 " Search set incsearch set ignorecase set smartcase " Enable mode line set modeline " Auto reload file set autoread " Buffer set hidden " Space/tab indicator set list listchars=tab:\|·,trail:~,space:· " Disable sound set visualbell t_vb= "== Aliases command! W :w command! Wq :wq command! Term :vs|wincmd L|set nonu nornu|startinsert|cd %:p:h|term command! Prettier :silent !prettier -w % command! Black :silent !black % command! ElmFmt :silent !elm-format % --yes "== Settings for specific languages autocmd FileType python,elm setlocal ex sw=4 ts=4 autocmd FileType javascript,javascriptreact setlocal et sw=2 ts=2 autocmd FileType html,css,json,yaml setlocal ex sw=2 ts=2 "== ALE let g:ale_disable_lsp = 1 let g:ale_echo_msg_format = '%severity%: %s' "== NERDTree let g:NERDTreeWinPos = "right" let g:NERDTreeMinimalUI = 1 let g:NERDTreeWinSize = 24 "== Mapping let mapleader=";" " NerdTree nnoremap e :NERDTreeToggle " Terminal tnoremap nnoremap t :Term " Alternative keys nnoremap :w nnoremap :tabnew nnoremap :noh " Window nnoremap :wincmd h nnoremap :wincmd j nnoremap :wincmd k nnoremap :wincmd l " Split nnoremap spv :vs nnoremap sph :sp nnoremap spk :wincmd K nnoremap spl :wincmd L " Tab nnoremap tn :tabnew noremap :tabn 1 noremap :tabn 2 noremap :tabn 3 noremap :tabn 4 noremap :tabn 5 noremap :tabn 6 noremap :tabn 7 noremap :tabn 8 noremap :tabn 9 " Buffers nnoremap j :bnext nnoremap k :bprev nnoremap w :bdele nnoremap b :buffers