ZeroX-DG / SnippetStore

:tada: A snippet management app for developers :rocket:

Home Page:https://zerox-dg.github.io/SnippetStoreWeb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

enter language as text input

arcturus140 opened this issue · comments

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

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

Demonstration:

2019-02-23_01-05-17

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]

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

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