Skip to content

Commit

Permalink
Split c and cpp snippets.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thierry Delafontaine committed Mar 3, 2022
1 parent 8256745 commit c73c660
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ encounter them.
Install the extension from the extension market.

### Vim/Neovim

This plugin only provides snippets. Therefore, you need a plugin that provides
snippet features and supports loading VSCode snippets.

Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@
"contributes": {
"snippets": [
{
"language": "vhdl",
"path": "./snippets/vhdl.json"
"language": "c",
"path": "./snippets/c.json"
},
{
"language": ["c", "cpp"],
"language": "cpp",
"path": "./snippets/cpp.json"
},
{
"language": "vhdl",
"path": "./snippets/vhdl.json"
}
]
}
Expand Down
26 changes: 26 additions & 0 deletions snippets/c.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"InES Header": {
"prefix": "inesh",
"body": [
"${BLOCK_COMMENT_START}*------------------------------------------------------------------",
" * -- _____ ______ _____ --",
" * -- |_ _| | ____|/ ____| --",
" * -- | | _ __ | |__ | (___ Institute of Embedded Systems --",
" * -- | | | '_ \\\\| __| \\___ \\ Zurich University of --",
" * -- _| |_| | | | |____ ____) | Applied Sciences --",
" * -- |_____|_| |_|______|_____/ 8401 Winterthur, Switzerland --",
" * ------------------------------------------------------------------",
" * @file ${TM_FILENAME}",
" * @author ${1:<author>} <${2:<email>}@zhaw.ch>",
" * @copyright ${CURRENT_YEAR} ZHAW Institute of Embedded Systems",
" * @date ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}",
" * @brief ${3:<brief description>}",
" *",
" * ${4}",
" * ------------------------------------------------------------------",
" ${BLOCK_COMMENT_END}",
"$0"
],
"description": "The InES file header"
}
}

0 comments on commit c73c660

Please sign in to comment.