From aaf252cf3ad9a2db668984b6e9a9e24bdb971907 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:13:07 +0100 Subject: tv vim: colorize nix --- tv/2configs/vim.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 9fb0759..ba0060b 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -107,6 +107,25 @@ let cmap w!! w!sudo tee % >/dev/null + au BufRead,BufNewFile *.nix so ${pkgs.writeText "nix.vim" '' + setf nix + + " Ref + syn match INT /[0-9]\+/ + syn match PATH /[a-zA-Z0-9\.\_\-\+]*\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/ + syn match HPATH /\~\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/ + syn match SPATH /<[a-zA-Z0-9\.\_\-\+]\+\(\/[a-zA-Z0-9\.\_\-\+]\+\)*>/ + syn match URI /[a-zA-Z][a-zA-Z0-9\+\-\.]*:[a-zA-Z0-9\%\/\?\:\@\&\=\+\$\,\-\_\.\!\~\*\']\+/ + hi link INT Constant + hi link PATH Constant + hi link HPATH Constant + hi link SPATH Constant + hi link URI Constant + + syn match String /"\([^"]\|\\\"\)*"/ + syn match Comment /\s#.*/ + ''} + nmap q :buffer nmap :buffer -- cgit v1.2.3