From 0b1ca6b5bbe18f7c879aaf9b0ebcf8a731a5a012 Mon Sep 17 00:00:00 2001 From: filip <“filip.rabiega@gmail.com”> Date: Sat, 8 Feb 2025 18:52:00 +0100 Subject: updated dotfiles --- .vimrc | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 28ee556..400c504 100644 --- a/.vimrc +++ b/.vimrc @@ -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 :tabnew ~/.vimrc nnoremap :TlistToggle nnoremap :NERDTree -inoremap /<++>"_c4l - -set autoindent -set nocindent -set smartindent +inoremap /<++>"_c4l " show existing tab with 4 spaces width set tabstop=4 -- cgit v1.2.3