feat: add file templates
This commit is contained in:
parent
60aea94875
commit
aa3a983db3
10
.config/nvim/templates/c.template
Normal file
10
.config/nvim/templates/c.template
Normal file
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @author : {{NAME}} ({{EMAIL}})
|
||||
* @file : {{FILE}}
|
||||
* @license : {{LICENSE}}
|
||||
* @created : {{TIMESTAMP}}
|
||||
*/
|
||||
|
||||
#include "{{FILE}}.h"
|
||||
|
||||
{{CURSORS}}
|
17
.config/nvim/templates/cpp.template
Normal file
17
.config/nvim/templates/cpp.template
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @author : {{NAME}} ({{EMAIL}})
|
||||
* @file : {{FILE}}
|
||||
* @license : {{LICENSE}}
|
||||
* @created : {{TIMESTAMP}}
|
||||
*/
|
||||
|
||||
#include "{{FILE}}.hpp"
|
||||
|
||||
{{CAMEL_CLASS}}::{{CAMEL_CLASS}}()
|
||||
{
|
||||
{{CURSOR}}
|
||||
}
|
||||
|
||||
{{CAMEL_CLASS}}::~{{CAMEL_CLASS}}()
|
||||
{
|
||||
}
|
15
.config/nvim/templates/h.template
Normal file
15
.config/nvim/templates/h.template
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @author : {{NAME}} ({{EMAIL}})
|
||||
* @file : {{FILE}}
|
||||
* @license : {{LICENSE}}
|
||||
* @created : {{TIMESTAMP}}
|
||||
*/
|
||||
|
||||
#ifndef {{MACRO_GUARD}}
|
||||
|
||||
#define {{MACRO_GUARD}}
|
||||
|
||||
{{CURSOR}}
|
||||
|
||||
|
||||
#endif /* end of include guard {{MACRO_GUARD}} */
|
22
.config/nvim/templates/hpp.template
Normal file
22
.config/nvim/templates/hpp.template
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @author : {{NAME}} ({{EMAIL}})
|
||||
* @file : {{FILE}}
|
||||
* @license : {{LICENSE}}
|
||||
* @created : {{TIMESTAMP}}
|
||||
*/
|
||||
|
||||
#ifndef {{MACRO_GUARD}}
|
||||
|
||||
#define {{MACRO_GUARD}}
|
||||
|
||||
|
||||
class {{CAMEL_CLASS}}
|
||||
{
|
||||
public:
|
||||
{{CAMEL_CLASS}}({{CURSOR}});
|
||||
virtual ~{{CAMEL_CLASS}}();
|
||||
private:
|
||||
/* private data */
|
||||
};
|
||||
|
||||
#endif /* end of include guard {{MACRO_GUARD}} */
|
14
.config/nvim/templates/main.c.template
Normal file
14
.config/nvim/templates/main.c.template
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @author : {{NAME}} ({{EMAIL}})
|
||||
* @file : {{FILE}}
|
||||
* @license : {{LICENSE}}
|
||||
* @created : {{TIMESTAMP}}
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
{{CURSOR}}
|
||||
return 0;
|
||||
}
|
14
.config/nvim/templates/main.cpp.template
Normal file
14
.config/nvim/templates/main.cpp.template
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @author : {{NAME}} ({{EMAIL}})
|
||||
* @file : {{FILE}}
|
||||
* @license : {{LICENSE}}
|
||||
* @created : {{TIMESTAMP}}
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
{{CURSOR}}
|
||||
return 0;
|
||||
}
|
28
.config/nvim/templates/makefile.template
Normal file
28
.config/nvim/templates/makefile.template
Normal file
@ -0,0 +1,28 @@
|
||||
######################################################################
|
||||
# @author : {{NAME}} ({{EMAIL}})
|
||||
# @file : {{FILE}}
|
||||
# @license : {{LICENSE}}
|
||||
# @created : {{TIMESTAMP}}
|
||||
######################################################################
|
||||
|
||||
IDIR =./include
|
||||
CC=gcc
|
||||
CFLAGS=-I$(IDIR)
|
||||
|
||||
ODIR=obj
|
||||
|
||||
LIBS=
|
||||
|
||||
_OBJ = main.o {{CURSOR}}
|
||||
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
|
||||
|
||||
$(ODIR)/%.o: %.c
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
main: $(OBJ)
|
||||
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -f $(ODIR)/*.o
|
11
.config/nvim/templates/py.template
Normal file
11
.config/nvim/templates/py.template
Normal file
@ -0,0 +1,11 @@
|
||||
#! /usr/bin/env python
|
||||
#
|
||||
# @author : {{NAME}} ({{EMAIL}})
|
||||
# @file : {{FILE}}
|
||||
# @license : {{LICENSE}}
|
||||
# @created : {{TIMESTAMP}}
|
||||
#
|
||||
|
||||
"""
|
||||
{{CURSOR}}
|
||||
"""
|
12
.config/nvim/templates/sh.template
Normal file
12
.config/nvim/templates/sh.template
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
######################################################################
|
||||
# @author : {{NAME}} ({{EMAIL}})
|
||||
# @file : {{FILE}}
|
||||
# @license : {{LICENSE}}
|
||||
# @created : {{TIMESTAMP}}
|
||||
#
|
||||
# @description : {{CURSOR}}
|
||||
######################################################################
|
||||
|
||||
|
4
.config/nvim/templates/vim.template
Normal file
4
.config/nvim/templates/vim.template
Normal file
@ -0,0 +1,4 @@
|
||||
" Author : {{NAME}}
|
||||
" Created : {{TODAY}}
|
||||
" License : {{LICENSE}}
|
||||
" Description : {{CURSOR}}
|
Reference in New Issue
Block a user