" " minimal vimrc with no (extra) plugins " "load defaults if available if filereadable(expand('$VIMRUNTIME/defaults.vim')) unlet! g:skip_defaults_vim source $VIMRUNTIME/defaults.vim endif " ui set number set ruler set wildmenu set showcmd set showmatch " encoding/format set encoding=utf-8 set fileformats=unix,dos,mac " searching set hlsearch set incsearch set ignorecase set smartcase " indent set shiftwidth=4 set tabstop=4 set softtabstop=4 set autoindent " allow syntax and filetype plugins syntax enable filetype plugin indent on runtime macros/matchit.vim " key timeout values set esckeys set ttimeoutlen=20 set timeoutlen=1000 " autocmds augroup general autocmd! "keep equal proportions when windows resized autocmd VimResized * wincmd = "save cursor position in a file autocmd BufReadPost * if line("'\"") > 1 && line("'\"") \ <= line("$") | exe "normal! g'\"" | endif augroup END augroup languages autocmd! "shell autocmd BufNewFile,BufRead *bash* set syntax=sh "python autocmd FileType python xnoremap r :'<,'>:w !python3 "go autocmd FileType go set expandtab! "go uses real tabs "html autocmd FileType html :syntax sync fromstart "filestypes where tabs should = 2 spaces autocmd FileType html,javascript,css,json,yaml,sh \ setlocal ts=2 sts=2 sw=2 expandtab augroup END