Giter Site home page Giter Site logo

file-templates's Introduction

file-templates's People

Contributors

arcath avatar rand0me avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

file-templates's Issues

Workspace.getActiveEditor is deprecated.

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)

Set cursor location

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.

Failed to load init file, process is not defined

Tried to add a custom macro to the init file with no success, even after switching to JS:

proccess.fileTemplates = {
  macros: {
    year: () => {
      return new Date().getYear() + 1900;
    }
  }
};

This fires the next error:

image

File name macro

It would be great to add a macro to insert the file name into the new file.

Can't create new template - Cannot read property 'getText' of undefined.

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.

Petition Placeholder

Hiyas i like this addon but it need a placeholder to add code when is used the template like snippets using ${1:NameHolder} thanks :)

Workspace.getActiveEditor is deprecated.

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)

List of templates doesn't show

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.

Workspace.getActiveEditor is deprecated.

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)

Uncaught TypeError: Cannot read property 'getText' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.11
System: Microsoft Windows 10 Education
Thrown From: file-templates package, v0.1.1

Stack Trace

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)

Commands

     -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)

Config

{
  "core": {
    "themes": [
      "atom-material-ui",
      "atom-dark-syntax"
    ],
    "autoHideMenuBar": true
  }
}

Installed Packages

# User
atom-material-ui, v0.6.0
file-templates, v0.1.1

# Dev
No dev packages

Uncaught TypeError: string.indexOf is not a function

[Enter steps to reproduce:]

  1. Right click and select "create files from template"
  2. Error pops up

Atom: 1.34.0 x64
Electron: 2.0.16
OS: Ubuntu 18.04.1
Thrown From: file-templates package 0.2.0

Stack Trace

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

Commands

     -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)

Non-Core Packages

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 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.