" Essential set nocompatible filetype plugin indent on set encoding=utf-8 " Settings let mapleader=" " set noswapfile set number relativenumber set ruler set noerrorbells set laststatus=2 set showmode set showcmd set wildmenu set splitbelow splitright set hidden " Indentation set expandtab set smartindent set shiftwidth=4 set tabstop=4 set softtabstop=4 set list set listchars="lead:·,tab:··" " Search set ignorecase set smartcase set hlsearch set incsearch set showmatch set wildignore="**/node_modules/**,*.o,*.class" set path=".,**" " Keybindings imap JJ nnoremap :bnext nnoremap :bprevious nnoremap x :bd! nnoremap :bnext nnoremap h :noh nnoremap :Exp " Commands " Set indent style for current buffer. function! s:SetIndent(size, use_spaces) abort let l:size = a:size ==# "" ? 4 : str2nr(a:size) if l:size <= 0 let l:size = 4 endif let &l:shiftwidth = l:size let &l:tabstop = l:size let &l:softtabstop = l:size let &l:expandtab = l:size endfunction command! -nargs=? Tabs call s:SetIndent(, 0) command! -nargs=? Spaces call s:SetIndent(, 1) " Autocmd augroup Custom autocmd! autocmd FileType typescript,typescriptreact compiler tsc autocmd FileType go Tabs 4 augroup END