From c2c05a9bbe2ace52285a2ce57ef470bf60a611b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= <henrik@grepit.se>
Date: Sat, 22 Jan 2022 11:12:57 +0100
Subject: [PATCH] Add filetype to Pijul-changemsg

---
 .vimrc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/.vimrc b/.vimrc
index 22a7898..03380de 100644
--- a/.vimrc
+++ b/.vimrc
@@ -444,10 +444,18 @@ set nobackup
 filetype plugin indent on
 
 if has('autocmd')
+    " Search for 'message =' AND search if '# Hunks' exists in file
+    " set filetype to "pijul" and change colorscheme
+    autocmd BufNewFile,BufRead /tmp/.tmp*
+        \ if search('message =', 'nw') && search ('# Hunks', 'nw') |
+            \ setlocal filetype=pijul | endif
+    " Further matches on now set Filetype also possible
+    " autocmd FileType pijul colorscheme desert
     autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4
     autocmd FileType json syntax match Comment +\/\/.\+$+
 endif
 
+
 "au BufNewFile,BufRead *.py set tabstop=4
             "\ softtabstop=4
             "\ shiftwidth=4
-- 
GitLab