I want to use "FileTemplates" plugin in Sublime Text 2. I installed it with Package Controller, but when I use "Create file from template" and select something, nothing happens! It doesn't even create a file.
How can I make it work? Any ideas?
You need to find you current user's packages folder. Here you will find where the FileTemplates package has been installed. On my Windows system it is %APPDATA%\Roaming\Sublime Text 2\Packages\FileTemplates. You may also get to this folder from the Preferences menu by selecting Browse Packages...
Inside this folder there is a Templates folder. Inside this folder you will find the pre-canned file templates. You may create your own by copying and pasting the existing files to create the templates you like. You will need to create a .file-template file in the FileTemplates folder. This file is an xml file which tells sublime where to find the actual template and what parameters to the file creation the user may pass into the template. For instance $name is the parameter that the user is prompted for which will be used to name the file created from the template. Hope this helps.
Related
see file structure in screenshot atachment
Hello Friends,
I see in smarty template version3 two plugin directory.
one into project folder and other into libs.
In libs folder we have plugins and sysplugins directory.
My question is I need to create a custom function so I need to put new
file into which
directory is best way?
Both way working I checked but which is the best way to put custom plugin file in which directory?
You can put plugins in any directory that has been added to the Smarty plugins_dir, but looking at your screenshot, it appears that the "other" plugins directory you are looking at is part of the demo application included in the Smarty distribution. You should just remove the demo directory entirely and put your plugins in the smarty/libs/plugins directory.
Is there is any way to make files/folders hidden during or install files action in install4j.
Like similar to .install4j folder in Installation folder.I am working on CentOS platform.
When install4j action replaces installer variables in files those are replaced as it is in text format,is there is any way to replace encrypted values or hide those replaced variables in shell script as it might contain sensitive information.
As of install4j 8, there is no action to make files hidden
Call context.registerHiddenVariable("<variable name>") in a script to tell install4j that an installer variable contains sensitive information. Its contents will not be written to the log file.
I am working on a project which requires me to open an HTML file and use its contents. I added it to Resource files but when I try to open it lie this:
std::ifstream templateFile;
templateFile.open("filename.html", std::ifstream::in);
The operation fails. I checked it by using templateFile.fail().
The above operation works when I provide the full path. The file lies in the project folder along with other files. I tried setting build action to content but still it doesnt work. Please Help.
Output directory, where your executable is compiled and put into differs from the source directory, where you create all your .cpp/.hpp files (I assume there is filename.html file). Local path filename.html is supposed to be local for your executable file, not the source file.
Read more about changing the output directory here: https://msdn.microsoft.com/en-us/library/ms165410.aspx
Under Configuration Properties / Debugging, see what your Working Directory is using the macros dialog box. Move your file into this folder.
Click the button shown in the figure. There, click either Edit or Browse. Browse will take you to the working directory. Edit will expose the link to open the macros box
What is exactly the .cproject file?
I didn't add any new files to my project.
I didn't change any project properties.
Is it auto-generated?
Is it safe to take the remote version if I didn't touch this file explicitly?
add this file to your git ignore so it will not be added to the repository.
You can use this online tool for that:
http://gitignore.io/
or simply edit (or create) '.gitignore' it in your root folder with the following content:
.cproject
This file is auto-generated, which contains your project setting information. you can use a notepad to open it. Without this, you need to re-configure your project.
I am trying to add a new project template for an often used pattern. Starting from the class library template I have done the following (it still does not show up in the new project window):
opened the .vstemplate file
changed name and description to 'hard coded' values (my template). The values in there pulled from the csharpui.dll resources.
changed the TemplateID, DefaultName, and ProjectItems included.
saved these to the ProjectemplatesCache folder and as a zip in the ProjectTemplates folder.
restarted VS2010 and checked the new project location which should have shown my new template.
specifically, the folders I saved to were..
C:\program files\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache\CSharp\Windows\1033\HostComm.zip (the zip is the folder name, not a zip file)
and
C:\program files\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\Windows\1033 (this folder has a HostComm.zip file in it)
Has anyone else done this? Can it be done? If it can then what did I miss?
Doing this by hand is pretty courageous. Having a folder name with an extension .zip sounds wrong, I don't see a similar one in the existing templates. Watch out for the shell's habit of turning .zip archives into folders.
Best thing to do is to use the documented procedure to create a project template and verify what effects it has so you can repro them accurately yourself. Create a new project, using one of the existing templates as a starter. You might as well make it look as close as possible to the ultimate template you want to end up with, add project items as desired.
Then use File + Export Template. Next. Fill in the text boxes, note the Output location. Finish. Have a look-see at the generated .zip file.