From 9be7edaead53a2d10ecd09a0a9dca6e5819e8e64 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Tue, 24 May 2016 15:05:22 +0200 Subject: [PATCH] Improving highlight of lines which are too long in vim. --- vimrc | 14 +++++++++++++- zshrc | 15 ++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/vimrc b/vimrc index f23f3dc..c113c83 100644 --- a/vimrc +++ b/vimrc @@ -76,7 +76,19 @@ au FileType python :imap au FileType tex :map :! if [ -f Makefile ]; then; make; else; pdflatex %:t; rm *.aux; rm *.log; fi "Highlight chars after column 80 -match ErrorMsg '\%>80v.\+' +let s:activatedh=0 +highlight OverLength ctermbg=darkred guibg=#ffd9d9 +function! ToggleH() + if s:activatedh == 0 + let s:activatedh = 1 + match OverLength '\%>80v.\+' + else + let s:activatedh = 0 + match none + endif +endfunction +nnoremap :call ToggleH() +call ToggleH() "Map ctrl+f to ClangFormat :nnoremap :ClangFormat diff --git a/zshrc b/zshrc index b18db3a..97f8474 100644 --- a/zshrc +++ b/zshrc @@ -48,12 +48,13 @@ alias m='make' alias cmake='cmake -G Ninja' alias wlan='sudo netctl-auto list' alias adb-connect='adb connect 192.168.1.138:5555' -if test -f "$(which nvim)" -then - alias v='nvim' -else - alias v='vim' -fi +#if test -f "$(which nvim)" +#then +# alias v='nvim' +#else +# alias v='vim' +#fi +alias v='vim' if [ -f .zsh_environment ] then source ~/.zsh_environment @@ -76,7 +77,7 @@ alias rbtv='livestreamer twitch.tv/rocketbeanstv &' alias taketv='livestreamer twitch.tv/taketv &' alias ls='ls --color=auto' export ASPROOT=~/.asp -export PATH=$PATH:/home/fab/bin:/home/fab/.gem/ruby/2.3.0/bin +export PATH=$PATH:/home/fab/bin:/home/fab/.gem/ruby/2.3.0/bin:~/.local/bin export LFS=/mnt/lfs #vi mode