Custom Insert
A sublime 2 /3 plugin that can easily insert custom content.
Details
Installs
- Total 573
- Win 384
- Mac 120
- Linux 69
May 9 | May 8 | May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
sublime-custominsert
A Sublime plugin that can easily insert custom content.It can insert 'copyright',code template,signature,date time or anything else as you want.
Now Sublime 3
is supported.
install
- You can use Package Control to install.
configuration
Custominsert.sublime-keymap:
{
/*Default data*/
"data":{},
/*Default content*/
"content":"Nohting to insert",
/*Default date_format,see https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior*/
"date_format":"%Y-%m-%d %H:%M:%S",
/*Default insert position*/
"position":"cursor",
/*custom actions you can define*/
"actions":{
"datetime":{
"content":"{%datetime%}"
},
"copyright":{
"content": {
"default": "/*{{author}}*/",
"php": "<?php{{author}}?>",
"py": "#php{{author}}",
},
"data":{
"author":"yanni4night",
"version":"0.0.1"
}
}
}
}
Default (OSX).sublime-keymap:
[
{ "keys": ["ctrl+c"], "command": "custominsert", "args": {"action":"copyright"} },
{ "keys": ["ctrl+t"], "command": "custominsert", "args": {"action":"datetime"} }
]
syntax
- {%var%}:pre-defined variables.
- {{var}}:custom defined variables in data dict.
pre-defined vars
- year : current year
- filename : file name with ext
- dirname : absolute directory path
- filepath : absolute file path
- datetime : date&time
- platform : 'osx','linux' or 'windows'
- arch : 'x32' or 'x64'
- ext : file ext(without '.',may be empty)
- ip : IP address(may be 'localhost')
- encoding : file encoding(may be Undefined),you can use 'default_encoding' to override Undefined value
- user : name of the user logged in
changelog
- 2015-11-06:content by file ext is supported,'year' supported
- 2015-01-12:sublime 3 is supported
- 2014-09-13:generate menus&commands automatically
- 2014-06-21:modified settings
- 2013-12-30:default_encoding supported
- 2013-11-19:menus supported.
- 2013-11-15:{{}} syntax supported;position custom define supported;multiple actions&position insert supported,more pre-defined supported.
- 2013-11-14:{%%} syntax supported.