update vim.nix

This commit is contained in:
lassulus 2015-05-29 02:43:46 +02:00
parent bcd6a13478
commit 224c8965ee

View File

@ -13,8 +13,8 @@ let
in { in {
environment.systemPackages = with pkgs; [ environment.systemPackages = [
(vim_configurable.customize { (pkgs.vim_configurable.customize {
name = "vim"; name = "vim";
vimrcConfig.customRC = '' vimrcConfig.customRC = ''
@ -58,8 +58,6 @@ in {
"Tabwidth "Tabwidth
set ts=2 sts=2 sw=2 et 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 " create Backup/tmp/undo dirs
function! InitBackupDir() function! InitBackupDir()
@ -90,12 +88,24 @@ in {
set viminfo='20,<1000,s100,h,n~/.vim/tmp/info set viminfo='20,<1000,s100,h,n~/.vim/tmp/info
set undodir=$HOME/.vim/undo set undodir=$HOME/.vim/undo
set undofile set undofile
" highlight whitespaces
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
"ft specific stuff
autocmd BufRead *.js,*.json set ts=2 sts=2 sw=2 et
autocmd BufRead *.hs set ts=4 sts=4 sw=4 et
''; '';
vimrcConfig.vam.knownPlugins = vimPlugins // customPlugins; vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // customPlugins;
vimrcConfig.vam.pluginDictionaries = [ vimrcConfig.vam.pluginDictionaries = [
{ names = [ "Gundo" "commentary" "vim-addon-nix" ]; } { names = [ "Gundo" "commentary" "mustang2" ]; }
{ name = "mustang2"; } { names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; }
]; ];
}) })