diff options
author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2014-09-25 12:01:16 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2014-09-25 12:01:16 +0200 |
commit | df0075bccc56d2f16d2de64a7063f42a7c13418f (patch) | |
tree | d9d78d527ea99283b26a4a10263d9d59c905885c | |
parent | a71cb1e714e12d4cd6a8ab82de55ca00da3a0a5f (diff) |
[vim] Skeleton files
-rw-r--r-- | skel/c | 15 | ||||
-rw-r--r-- | skel/h | 20 | ||||
-rw-r--r-- | vimrc | 9 |
3 files changed, 44 insertions, 0 deletions
@@ -0,0 +1,15 @@ +/* + This file is a part of Qosmos ixEngine. + + Copyright Qosmos 2000-<+strftime("%Y")+> - All rights reserved + + This computer program and all its components are protected by + authors' rights and copyright law and by international treaties. + Any representation, reproduction, distribution or modification + of this program or any portion of it is forbidden without + Qosmos explicit and written agreement and may result in severe + civil and criminal penalties, and will be prosecuted + to the maximum extent possible under the law. +*/ + +<=CURSOR=> @@ -0,0 +1,20 @@ +/* + This file is a part of Qosmos ixEngine. + + Copyright Qosmos 2000-<+strftime("%Y")+> - All rights reserved + + This computer program and all its components are protected by + authors' rights and copyright law and by international treaties. + Any representation, reproduction, distribution or modification + of this program or any portion of it is forbidden without + Qosmos explicit and written agreement and may result in severe + civil and criminal penalties, and will be prosecuted + to the maximum extent possible under the law. +*/ + +#ifndef <+substitute(toupper(expand("%:t")), "\\.", "_", "g")+> +#define <+substitute(toupper(expand("%:t")), "\\.", "_", "g")+> + +<=CURSOR=> + +#endif /* <+substitute(toupper(expand("%:t")), "\\.", "_", "g")+> */ @@ -94,6 +94,15 @@ nmap <ESC>j :bn<CR> nmap <ESC>k :bN<CR> nmap <ESC>l :tabn<CR> +augroup skel + au! + " read in skeleton files + autocmd BufNewFile *.* silent! 0r ~/.vim/skel/%:e + autocmd BufNewFile * silent! %substitute#<+\(.\{-\}\)+>#\=eval(submatch(1))#ge + " get to cursor position + autocmd BufNewFile * silent! %substitute#<=CURSOR=>##g +augroup END + " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler " (happens when dropping a file on gvim). |