From 224c8965eef21b3f003d1ffd28cd0643765545d8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 29 May 2015 02:43:46 +0200 Subject: [PATCH] update vim.nix --- modules/lass/vim.nix | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/modules/lass/vim.nix b/modules/lass/vim.nix index 56a20c383..1000b8da6 100644 --- a/modules/lass/vim.nix +++ b/modules/lass/vim.nix @@ -13,8 +13,8 @@ let in { - environment.systemPackages = with pkgs; [ - (vim_configurable.customize { + environment.systemPackages = [ + (pkgs.vim_configurable.customize { name = "vim"; vimrcConfig.customRC = '' @@ -58,8 +58,6 @@ in { "Tabwidth set ts=2 sts=2 sw=2 et - autocmd BufRead *.js,*.json set ts=2 sts=2 sw=2 et - autocmd BufRead *.hs set ts=4 sts=4 sw=4 et " create Backup/tmp/undo dirs function! InitBackupDir() @@ -90,12 +88,24 @@ in { set viminfo='20,<1000,s100,h,n~/.vim/tmp/info set undodir=$HOME/.vim/undo set undofile + + " highlight whitespaces + highlight ExtraWhitespace ctermbg=red guibg=red + match ExtraWhitespace /\s\+$/ + autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ + autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@