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 nolinebreak set nowrap " Tabs set tabstop=4 set shiftwidth=4 set softtabstop=4 set smarttab set expandtab set autoindent " Status line set laststatus=0 set ruler " Folding set foldmethod=manual " Maximux item in popup set pumheight=9 " Scroll set scrolloff=4 " 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 html,css,javascript,javascriptreact,yaml setlocal et sw=2 ts=2 "== Aliases command! W :w command! WQ :wq command! Wq :wq command! Wiki :e ~/doc/index.md command! Prettier :!prettier % --write command! ESlint :!eslint % command! Flake8 :!flake8 % command! Black :!black % command! AutoPep8 :!autopep8 % --in-place "== Mapping let mapleader=";" " Alternative keys noremap :w noremap :tabnew noremap :nohl noremap zc " Window noremap :wincmd h noremap :wincmd j noremap :wincmd k noremap :wincmd l " Split noremap spv :vsp noremap sph :sp noremap spk :wincmd K noremap spl :wincmd L " Tab noremap tn :tabnew noremap tc :tabclose 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 noremap j :bnext noremap k :bprev " Work with system clipboard noremap c "*yy noremap v "+p " Kill terminal tnoremap :q