From ad59db816b2acad3baf5c9efc3071db78162b4d1 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Fri, 23 Oct 2020 12:47:19 +0200 Subject: [PATCH] Add movement map, make map, clean VimLeave --- dotfiles/vim/vimrc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dotfiles/vim/vimrc b/dotfiles/vim/vimrc index 320c3ab..9efc39b 100644 --- a/dotfiles/vim/vimrc +++ b/dotfiles/vim/vimrc @@ -20,6 +20,9 @@ imap :wi " global copy/paste nmap y "*yy nmap p "*p + +" compile +nmap c :w:!make " }}} " VIM-PLUG {{{ call plug#begin('~/.vim/plugged') @@ -129,6 +132,10 @@ nnoremap za " move vertically by visual line (don't jump wrapped lines) nnoremap j gj nnoremap k gk +map h +map j +map k +map l " }}} " AUTOGROUPS {{{ augroup configgroup @@ -146,8 +153,8 @@ augroup configgroup autocmd BufWritePre * :StripWhitespace " Run Flake8 on write in python files autocmd BufWritePost *.py call flake8#Flake8() - " Run make on write in LaTeX files if Makefile exists in directory - autocmd BufWritePost *.tex ![ -f ./Makefile ] && make || echo "No Makefile" + " Run make clean when leaving a LaTeX file if Makefile exists in directory + autocmd VimLeave *.tex ![ -f ./Makefile ] && make clean || echo "No Makefile" " Toggle relative number and absolute number according to focus and insert autocmd BufEnter,FocusGained,InsertLeave * set relativenumber