call plug#begin("~/.vim/plugged") Plug 'Smirnov-O/nten16.vim' Plug 'sheerun/vim-polyglot' Plug 'jiangmiao/auto-pairs' Plug 'scrooloose/nerdtree' call plug#end() "== General set termguicolors colorscheme nten16 " Line numbers set nu rnu " Line wrap set linebreak wrap " Tabs set tabstop=4 set shiftwidth=4 set softtabstop=4 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:~,extends:>,precedes:<,space:· " Disable sound set visualbell t_vb= "== Settings for specific files autocmd FileType python,json setlocal ex sw=4 ts=4 autocmd FileType go setlocal noex sw=4 ts=4 autocmd FileType javascript,javascriptreact setlocal et sw=2 ts=2 autocmd FileType css,yaml setlocal ex sw=4 ts=4 "== Aliases command! WQ :wq command! Wq :wq command! Wiki :e ~/doc/index.md command! Prettier :silent !prettier % --write command! ESlint :!eslint % command! Flake8 :!flake8 % command! Black :silent !black % command! AutoPep8 :silent !autopep8 % --in-place command! GoFmt :silent !gofmt -w % "== NERDTree let g:NERDTreeWinPos = "right" let g:NERDTreeMinimalUI = 1 let g:NERDTreeWinSize = 24 "== Mapping let mapleader=";" " NerdTree nnoremap e :NERDTreeToggle " Alternative keys nnoremap :w nnoremap :tabnew nnoremap :noh " Window nnoremap :wincmd h nnoremap :wincmd j nnoremap :wincmd k nnoremap :wincmd l " Split nnoremap spv :vsp nnoremap sph :sp nnoremap spj :wincmd K nnoremap spk :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 " Buffer nnoremap j :bnext nnoremap k :bprev nnoremap h :bdele " Working with system clipboard noremap c "+y noremap v "+p " Terminal tnoremap