call plug#begin('~/.vim/plugged') Plug 'Smirnov-O/nten16.vim' Plug 'sheerun/vim-polyglot' Plug 'jiangmiao/auto-pairs' call plug#end() "== General set termguicolors colorscheme nten16 " Line numbers set number set relativenumber " Line wrap set linebreak wrap " Tabs set tabstop=4 set shiftwidth=4 set softtabstop=4 set smarttab set expandtab set autoindent " Status line set laststatus=0 set ruler " Maximux item in popup set pumheight=9 " 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,go,json setlocal et sw=4 ts=4 autocmd FileType css,javascript,javascriptreact,yaml setlocal noet sw=2 ts=2 "== Aliases command! W :w 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 % "== Mapping let mapleader=";" inoremap ii " Alternative keys nnoremap :w nnoremap :tabnew nnoremap :nohl " 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 nnoremap tc :tabclose nnoremap :tabn 1 nnoremap :tabn 2 nnoremap :tabn 3 nnoremap :tabn 4 nnoremap :tabn 5 nnoremap :tabn 6 nnoremap :tabn 7 nnoremap :tabn 8 nnoremap :tabn 9 " Buffer nnoremap j :bnext nnoremap k :bprev nnoremap h :bdele " Work with system clipboard noremap c "*yy noremap v "+p " Terminal tnoremap