diff --git a/dots/vimrc b/dots/vimrc new file mode 100644 index 0000000..5309e17 --- /dev/null +++ b/dots/vimrc @@ -0,0 +1,77 @@ +filetype plugin indent on +filetype on + +" options +set nu +set rnu + +set mouse+=a +set linebreak +set shiftwidth=2 +set tabstop=2 +set softtabstop=2 +set expandtab +set smarttab +set shiftround +set autoindent +set textwidth=80 +set colorcolumn=80 +set list +set nowrap + +set undofile nohlsearch incsearch + +set scrolloff=7 + +autocmd FileType tex,text set nosmarttab autoindent +autocmd Filetype python set textwidth=0 formatprg=autopep8 shiftwidth=4 tabstop=4 softtabstop=4 +autocmd FileType c,cpp,slang set nosmarttab autoindent +autocmd Filetype markdown set nosmarttab shiftwidth=4 tabstop=4 softtabstop=4 autoindent + +" Remaps + +let g:mapleader=" " +nnoremap j gj +nnoremap k gk + +nnoremap , h +nnoremap , j +nnoremap , k +nnoremap , l + +nnoremap h +nnoremap j +nnoremap k +nnoremap l + +inoremap ā +inoremap ē +inoremap ī +inoremap ō +inoremap ū + +nnoremap :w:!texbld run compile +nnoremap :w:!./test.sh + +vnoremap J :m '>+1gv=gv +vnoremap K :m '<-2gv=gv + +nnoremap J mzJ`z +nnoremap zz +nnoremap zz +nnoremap n nzzzv +nnoremap N Nzzzv + +xnoremap p _dP +vnoremap y +y +nnoremap y +y +nnoremap Y +Y +nnoremap x :!chmod +x %:p +nnoremap X :!chmod -x % +nnoremap e :! %:p + + +" Status Line +" https://www.tdaly.co.uk/projects/vim-statusline-generator/ +" +