diff options
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 33 |
1 files changed, 28 insertions, 5 deletions
@@ -1,20 +1,43 @@ set number set relativenumber +set title +set bg=dark +set go=a +set mouse=a +set nohlsearch +set clipboard+=unnamedplus +set noshowmode +set noruler +set laststatus=0 +set noshowcmd set nocompatible +set autoindent +set nocindent +set smartindent + execute pathogen#infect() syntax on filetype plugin indent on +" Automatically updates server after server files have been modified +autocmd BufWritePost ~/website/*.html !bash ~/.local/bin/update_website +autocmd BufWritePost ~/website/*.css !bash ~/.local/bin/update_website + +" Automatically source .vimrc after saving +autocmd BufWritePost ~/.vimrc source $MYVIMRC + +" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position +autocmd BufWritePre * let currPos = getpos(".") +autocmd BufWritePre * %s/\s\+$//e +autocmd BufWritePre * %s/\n\+\%$//e +autocmd BufWritePre * cal cursor(currPos[1], currPos[2]) + nnoremap <silent> <F7> :tabnew ~/.vimrc<CR> nnoremap <silent> <F8> :TlistToggle<CR> nnoremap <silent> <F9> :NERDTree<CR> -inoremap <Space><Space> <Esc>/<++><CR>"_c4l - -set autoindent -set nocindent -set smartindent +inoremap <Space><Space> <Esc>/<++><CR>"_c4l " show existing tab with 4 spaces width set tabstop=4 |