arcath / file-templates Goto Github PK
View Code? Open in Web Editor NEWAn Atom package for working with file templates.
An Atom package for working with file templates.
When creating a new file with a template, allow for passing in parameters that set the value of macros.
Call ::getActiveTextEditor instead
Workspace.getActiveEditor (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:1022:12)
<unknown> (/Users/renzotrigoso/.atom/packages/file-templates/lib/views/new-file-view.coffee:14:23)
_fulfilled (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:794:54)
self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:823:30)
A good feature will be use some shortcode to set cursor points like this:
Template.%1.rendered = ->
vm = new Vue
el : "#%2",
data : {%3},
methods : {
%4 : (%5) ->
%6
}
The %.* is a suggestion not the best syntax.
It would be great to add a macro to insert the file name into the new file.
When I try to create a new template, which I named "html5", I receive the following error message:
Uncaught TypeError: Cannot read property 'getText' of undefined.
Unfortunately I can't create an issue or see the stack trace in Atom as the modal dialog "New Template" is still open. The error seems to occur in:
.atom\packages\file-templates\lib\views\new-template-view.coffee:34
I'm using version 0.1.1 of the file-templates package in Atom 1.0.2 on a PC running Windows 7.
This seems a Good Thing to have.
Hiyas i like this addon but it need a placeholder to add code when is used the template like snippets using ${1:NameHolder} thanks :)
Call ::getActiveTextEditor instead
Workspace.getActiveEditor (/usr/share/atom/resources/app.asar/src/workspace.js:1022:12)
<unknown> (/home/arch/.config/atom/packages/file-templates/lib/views/new-file-view.coffee:14:23)
_fulfilled (/usr/share/atom/resources/app.asar/node_modules/q/q.js:794:54)
self.promiseDispatch.done (/usr/share/atom/resources/app.asar/node_modules/q/q.js:823:30)
@timestamp@ is work.
when i exec git config -l, there were
user.name=้้
[email protected]
env: atom 1.12.7
file-templates 0.2.0
Templates are not synched with sync-settings package
I install the package and when trigger New File it doesn't list the templates on the directory. Path for templates was set correctly in the settings.
Call ::getActiveTextEditor instead
Workspace.getActiveEditor (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:1022:12)
<unknown> (/Users/renzotrigoso/.atom/packages/file-templates/lib/views/new-file-view.coffee:16:25)
_fulfilled (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:794:54)
self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:823:30)
[Enter steps to reproduce below:]
Atom Version: 1.0.11
System: Microsoft Windows 10 Education
Thrown From: file-templates package, v0.1.1
Uncaught TypeError: Cannot read property 'getText' of undefined
At C:\Users\Danny\.atom\packages\file-templates\lib\views\new-template-view.coffee:75
TypeError: Cannot read property 'getText' of undefined
at NewTemplateView.module.exports.NewTemplateView.onConfirm (C:\Users\Danny\.atom\packages\file-templates\lib\views\new-template-view.coffee:34:54)
at HTMLButtonElement.<anonymous> (C:\Users\Danny\.atom\packages\file-templates\lib\views\new-template-view.coffee:23:37)
at HTMLButtonElement.jQuery.event.dispatch (C:\Users\Danny\.atom\packages\file-templates\node_modules\space-pen\vendor\jquery.js:4676:9)
at HTMLButtonElement.elemData.handle (C:\Users\Danny\.atom\packages\file-templates\node_modules\space-pen\vendor\jquery.js:4360:46)
-0:57.7.0 command-palette:toggle (div.settings-view.pane-item)
-0:54.5.0 core:backspace (atom-text-editor.editor.mini.is-focused)
-0:51.1.0 file-templates:new-template (div.settings-view.pane-item)
-0:49.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
{
"core": {
"themes": [
"atom-material-ui",
"atom-dark-syntax"
],
"autoHideMenuBar": true
}
}
# User
atom-material-ui, v0.6.0
file-templates, v0.1.1
# Dev
No dev packages
I can't seem to find any plugin like this for Vim. Is there one, or could this be ported to vim/neovim?
[Enter steps to reproduce:]
Atom: 1.34.0 x64
Electron: 2.0.16
OS: Ubuntu 18.04.1
Thrown From: file-templates package 0.2.0
Uncaught TypeError: string.indexOf is not a function
At /home/tianxing/.atom/packages/file-templates/node_modules/fuzzaldrin/lib/scorer.js:60
TypeError: string.indexOf is not a function
at Object.exports.score (/packages/file-templates/node_modules/fuzzaldrin/lib/scorer.js:60:31)
at module.exports (/packages/file-templates/node_modules/fuzzaldrin/lib/filter.js:25:24)
at filter (/packages/file-templates/node_modules/fuzzaldrin/lib/fuzzaldrin.js:21:14)
at MySelectListView.module.exports.SelectListView.populateList (/packages/open-in-browsers/node_modules/atom-space-pen-views/lib/select-list-view.js:195:25)
at /packages/open-in-browsers/node_modules/atom-space-pen-views/lib/select-list-view.js:350:26
-1:02.2.0 atom-smart-template:open-temlates-folder (ul.list-inline.tab-bar.inset-panel)
-0:59.5.0 core:save (ul.list-inline.tab-bar.inset-panel)
-0:50.6.0 atom-smart-template:open-temlates-folder (ul.list-inline.tab-bar.inset-panel)
-0:46.1.0 atom-smart-template:open-temlates-folder-in-atom (ul.list-inline.tab-bar.inset-panel)
-0:24.7.0 atom-smart-template:create-files-from-template (span.name.icon.icon-file-directory)
atom-smart-template 0.3.2
autoclose-html 0.23.0
file-templates 0.2.0
indent-guide-improved 1.4.13
open-in-browsers 0.0.30
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.