Skip to content

tonychg/MagicTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic Template

Insert template file on new BuffEnter or Edit

Author: TonyChG License: MIT URL: https://github.com/tonychg/

Demo

asciicast

Usage

Default templates directory you can change it with:

let g:templatesDirectory = $HOME."/Templates/"

Template rely on the filename/filetype of the current buffer.

For filename related:

Create a LICENSE file in the templates directory
When you open a new LICENSE file, MagicTemplate write the file LICENSE in
the current buffer.

For filetype related:

Create a javascript file
Template are write when vim enter a new javascript file

Template Variables

You can configure substitution of template varaiables in MagicTempalte.vim
In the function WriteTemlate() execute your substitute command.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published