dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 5ee36595f2e33474e99737acd5a7637eff031ea7
parent 91986783d99bb856a392fefedc66e33da4d74f1b
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date:   Tue, 31 Mar 2020 12:53:19 +0200

Use different color scheme for csv and tsv files

Diffstat:
Avim/ftplugin/csv.vim | 1+
Avim/ftplugin/tsv.vim | 1+
Mvim/vimrc | 5+++++
3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/vim/ftplugin/csv.vim b/vim/ftplugin/csv.vim @@ -0,0 +1 @@ +let b:colors_name="obsidian" diff --git a/vim/ftplugin/tsv.vim b/vim/ftplugin/tsv.vim @@ -0,0 +1 @@ +let b:colors_name="obsidian" diff --git a/vim/vimrc b/vim/vimrc @@ -115,6 +115,11 @@ if has("autocmd") " automatically deletes all trailing whitespace on save autocmd BufWritePre * %s/\s\+$//e endif + +" Use specific colorscheme for buffer if b:colors_name is set +au BufEnter * if (exists("b:colors_name")) | let b:current_colors=colors_name + \| execute "colorscheme " . b:colors_name | endif +au BufLeave * if (exists("b:current_colors")) | execute "colorscheme " . b:current_colors | endif " }}} " Open vimrc {{{