From 0e74f81be03781e86773c4a99557cc1de370ca64 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sat, 27 May 2017 11:01:31 +0100 Subject: [PATCH] Adding template files and configuring template plugin. --- .vimrc.local | 8 ++++++++ _.cpp => templates/_.cpp | 0 templates/_.py | 10 ++++++++++ 3 files changed, 18 insertions(+) rename _.cpp => templates/_.cpp (100%) create mode 100644 templates/_.py diff --git a/.vimrc.local b/.vimrc.local index ff63af6..49639a1 100644 --- a/.vimrc.local +++ b/.vimrc.local @@ -1,4 +1,12 @@ +" Setup templates. +" +let g:git_root=system("git rev-parse --show-toplevel | tr -d '\\n'") +let g:templates_no_autocmd = 0 +let g:templates_directory=[ g:git_root . '/templates' ] +let g:templates_global_name_prefix='_' +let g:templates_debug=1 + let s:vimrc=expand(':p:r') let s:host=hostname() diff --git a/_.cpp b/templates/_.cpp similarity index 100% rename from _.cpp rename to templates/_.cpp diff --git a/templates/_.py b/templates/_.py new file mode 100644 index 0000000..d022a82 --- /dev/null +++ b/templates/_.py @@ -0,0 +1,10 @@ +#VIM: let b:lcppflags="-std=c++11 -O2 -pthread" + +#import + +def myfunction(): + #some code here + print( "kuku" ) + +if __name__ == "__main__": + myfunction()