Hello, If I understand well, you are looking for a template. On my side, I used yatemplate coupled with auto-insert. Here is the part of configuration I have: (use-package yatemplate :ensure t :after yasnippet :config ;; Define template directory (setq yatemplate-dir (concat config-basedir "/third_parties/templates")) ;; Coupling with auto-insert (setq auto-insert-alist nil) (yatemplate-fill-alist) (add-hook 'find-file-hook 'auto-insert) ) I use a template like the one attached which is place on the directory "/third_parties/templates". I let you adapt but technically it should work with many adaptations. Kind regards, Sébastien