From 167e1ad6d641d14a812077bbdb3c6b7c8fdcdef9 Mon Sep 17 00:00:00 2001 From: filip <“filip.rabiega@gmail.com”> Date: Mon, 10 Feb 2025 11:57:31 +0100 Subject: updated dotfiles --- .vimrc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 400c504..bfa3417 100644 --- a/.vimrc +++ b/.vimrc @@ -12,31 +12,48 @@ set laststatus=0 set noshowcmd set nocompatible set autoindent -set nocindent +set cindent set smartindent +set nowrap execute pathogen#infect() syntax on +filetype plugin 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 use black on a Python file +autocmd BufWritePost *.py !black % + " Automatically source .vimrc after saving autocmd BufWritePost ~/.vimrc source $MYVIMRC +"Automatically source .inputrc after saving +autocmd BufWritePost ~/.inputrc !bind -f ~/.inputrc + " 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]) +map dB +map s o +map S ok +map Y y$ +map Z o nnoremap :tabnew ~/.vimrc nnoremap :TlistToggle nnoremap :NERDTree +" Keybindings to simulate system shortcuts +:nnoremap "+yy +:nnoremap "+p + inoremap /<++>"_c4l " show existing tab with 4 spaces width -- cgit v1.2.3