This is a tool that can be installed and used in linux to create and load templates in sublime text.
Just execute the install.sh script with root permissions
sudo ./install.shTo create a template just use:
sublime create <template_name> <template_file>
# Eg sublime create cpp file.cppTo load templates:
sublime --<template_name> files....
# All given files will be loaded with the template
#Eg. sublime --cpp 1.cpp 2.cpp 3.cpp {5..8}.cppTo make multiple files with executable permissions:
sublime +x files....
# All files will be created with executable permissions
# Eg. sublime +x 1.sh 2.sh 3.shTo modify already made template:
sublime modify < template_name > < modification_type > < value >template_name = name of the template
modification_type:
-f : Modify the template file.
Value is path to the new file
Eg. sublime modify cpp -f new_template.cpp
Changes the contents of template cpp to contents of new_template file-j : Jump to a certain line when the file is opened in sublime.
Value is line:character jump to given 'character' number in given 'line'
Eg. sublime modify cpp -j 42:2 jumps to 2nd character in 42nd line
To show all the templates:
sublime listTo delete a template:
sublime delete < template_name >To update your script download the new files and execute
sudo ./update.shTo uninstall temlate for a user, execute
./uninstall.shTo remove for all users, execute
sudo rm /usr/local/bin/sublime