colorscheme gruvbox set background=dark let mapleader=" " set visualbell set laststatus=2 set ruler " use 4-wide hard tabs by default set autoindent set shiftwidth=4 set tabstop=4 " enable filetype settings filetype plugin indent on syntax on set smartindent " line wrapping set wrap set breakindent " scroll by visual lines without breaking (j|k) " nnoremap j v:count?'j':'gj' nnoremap k v:count?'k':'gk' vnoremap j v:count?'j':'gj' vnoremap k v:count?'k':'gk' " command line tab completion set wildmenu set wildignorecase " search settings set ignorecase set smartcase set incsearch set wrapscan " highlight on search, clear on redraw set hlsearch nnoremap :nohl " center screen when going to next or previous match nnoremap n nzz nnoremap N Nzz " adjustments to other builtin commands set tildeop set whichwrap=b,s,<,>,[,] " setup whitespace display but leave it off set listchars=eol:$,tab:→\ ,space:· set nolist " open new files in insert mode autocmd BufNewFile * startinsert " easier access to escape inoremap jj " window splitting nnoremap s :vsplitl nnoremap h h nnoremap j j nnoremap k k nnoremap l l " format json with =j nnoremap =j :%!python -m json.tool " sudo write with w!! cnoremap w!! execute 'silent! write !sudo /usr/bin/tee % >/dev/null' edit! " windows settings if has('win64') || has('win32unix') " yank to system clipboard set clipboard=unnamed " prefer unix format for new files even on windows machines set fileformats=unix,dos " fix cursor in conemu if !empty($ConEmuBuild) let &t_SI="\e[6 q" " insert mode line let &t_EI="\e[2 q" " normal mode block let &t_SR="\e[4 q" " replace mode underscore endif endif