This extension allows you to initialise files of various formats with snippets of code.
Currently tested for Sublime Text 3 on Windows 10, Ubuntu 14.04-LTS.
Since I do not use an IDE while doing competitive programming, I would constantly write obvious code like int main()
and
public static void main(String[] args)
. This is an attempt to reduce that effort by doing the same task with a single command.
- Clone the repo
- Go to The Sublime Text Packages Directory (
/Packages
) and paste this folder over there.
Basically it should be like this/Packages/CodeIniter/
- The config file is stored in the Sublime Text 3's cache directory.
Open the console in Sublime Text and type
import sublime
print(sublime.cache_path())
- The config.json file can be found in
*cache_path*/CodeIniter/config.json
- Here you can add your own snippets for various file formats. The format is the key and the snippet is the value.
- After doing this, open a file in Sublime of one of the formats.
- Open the command palette (
Ctrl + Shift + P
) and type initialise, select the optionFile: Initialise
. Alternatively, use the console to writeview.run_command('initialise')
. - Voila! Your file has been initialised with your custom snippet.
Plugin is still in testing and this page will soon be updated with any changes for OS X.
After proper testing I plan to upload this plugin at Package Control for public use.