feat: refactor yasnippet

Put snippets in standard path
This commit is contained in:
Laurens Miers 2023-06-08 23:37:58 +02:00
parent ffcbf8ec41
commit 5ebe6422f8
4 changed files with 13 additions and 14 deletions

8
snippets/c-mode/fori Normal file
View file

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: for with loop variable
# key: fori
# --
for (${1:size_t i = 0}; ${2:i < N}; ${3:++i}) {
$0
}

10
snippets/c-mode/header Normal file
View file

@ -0,0 +1,10 @@
#name : #ifndef XXX; #define XXX; #endif
# key: header
# --
#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (or (buffer-file-name) ""))))`_H_}
#define $1
$0
#endif /* $1 */