Skip to content
This repository was archived by the owner on Jan 14, 2022. It is now read-only.
This repository was archived by the owner on Jan 14, 2022. It is now read-only.

enter language as text input #46

Description

@arcturus140

Snippet language can be chosen when clicking with the cursor in the selection box. Would be nice if it accepts text input directly, as well.

Steps to replicate

  1. Create -> Single-file snippet
  2. type "name" for snippet name -> press tap to next input field
  3. type "Brainfuck" -> press tap
  4. type "tag" -> press tap, press tap
  5. press tap
  6. press tap
  7. press "Create" button -> Error message appears: "Please specify at least snippet name and language"
  8. click into "Snippet language" input field
  9. press "Create" button -> success

Activity

  1. bantya commented on Feb 22, 2019

    @bantya
    Contributor

    @arcturus140 I was about to report this issue and you did it!

    Demonstration:

    2019-02-23_01-05-17

  2. bantya commented on Feb 22, 2019

    @bantya
    Contributor

    Ideally, there should be no Snippet language drop-down for single file snippet.

    Instead there should be a Snippet filename input to enter the filename for the snippet (same as Multi file Snippet 👇) along with the Snippet name input.

    image

    The Snippet name should be required to identify the snippet from the snippets list (current behavior).

    The Snippet language should be guessed according to the file extension provided in Snippet filename. This will help mitigate the aforementioned issue.

    e.g.
    ❌

    [Snippet name]:        [A test md file]
    [Snippet language]:    [Markdown 🔽]

    ✔

    [Snippet name]:        [A test md file]
    [Snippet filename]:    [test-file.md]
  3. bantya commented on Feb 22, 2019

    @bantya
    Contributor

    The Snippet filename can then be used to export the snippet content (just content w/o metadata) to a file with provided filename.

  4. ZeroX-DG commented on Mar 4, 2019

    @ZeroX-DG
    Owner

    Snippet filename is a good idea, I'll do it.....when I have the time 😢 so many things to do at uni.

  5. changed the title [-]Cannot enter language as text input[/-] [+]enter language as text input[/+] on Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions