Git Product home page Git Product logo

snippetstore's Introduction

SnippetStore

πŸŽ‰ A snippet management app for developers πŸš€

⚠️ This project is no longer maintained, see #74 ⚠️

twitter

travis version total download stars forks

About this project

SnippetStore is an application for developers to store their snippets and quickly retrieve them when needed. SnippetStore mainly focus on storing code therefor its interface is small and simple, perfect for busy developers who doesn't care about small details.

Donate

There are many requests for macOS support and I'm sure many of you guys who are mac users will want SnippetStore to be available in homebrew and able to run on macOS too. But in order to do that, I need help from you guys to afford a mac to test & build this project and many more other projects in the future. It would be a huge help if you can buy me a coffee πŸ˜„

Buy Me A Coffee

SnippetStore is also available on issuehunt

Let's fund issues in this repository

A massive thank you to these donators

Trevor Robertson

Download

Currently SnippetStore only available for linux and windows.

If you're using MacOS, you can also build a version for you OS too (not guarantee it will work!)

npm run dist:mac

You can get the latest release of SnippetStore here

Theme

SnippetStore currently support 2 themes dark and light

Light theme Dark theme

Tag support

With SnippetStore you can assign multiple tags to your snippet and easy find them using the tag list on the right bar

Multi file snippet

Not satisfied with a single file snippet? With SnippetStore you can now store multiple files within a snippet

Snippet list layout

SnippetStore currently support 2 snippet list layout:

Original List and details

Internalization

SnippetStore currently support 2 languages:

  • English
  • Vietnamese

Shortcut

Action Key
Open create snippet modal ctrl + n
Open setting modal ctrl + ,
Toggle small sidebar mode ctrl + b
Close all modal esc
Save snippet ctrl + s
Discard snippet changes esc
Navigate in snippet list ctrl + pageup, ctrl + pagedown

Tech Stack

Contributing

Check out contributing.md

Author & Maintainer

License

snippetstore's People

Contributors

arcturus140 avatar bantya avatar dependabot[bot] avatar kant avatar vrumger avatar zerox-dg avatar

Stargazers

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

Watchers

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

snippetstore's Issues

[UI] Increase vertical space.

Current Behavior

There's always room for improvement even in already perfect things.

This is the case hare. The icons above the snippet name in details area take important vertical space.

Demonstration

image

The delete icon and other icons in the details area are separated with huge gap in between.

Expected Behavior

image

Shifting the icon group to right besides the delete icon will clear up space which can then be used to accommodate the snippet name.

This will free some important vertical space which then can be useful in displaying long snippets.

System Info

image

References

#42

[Improvement] enter edit mode

  1. would be nice be able to directly edit a snippet. I'd suggest to make a check mark icon appear once edits have been made to save them and discard (unintended) changes otherwise.
    Alternatively, a shortcut to enter edit mode could be handy.

  2. I really appreciate it that only an excerpt of the snippet is displayed. πŸ’― I'd like to toggle between excerpt and complete view with double-click on the snippet.

Error "crashing" app

Hi, i was going through your app and noticed a error causing the app to be unusable. I*m not sure if you are aware of this problem.

Steps to re-produce:

#1: Click at the "+" icon the create a new note and select "Multifile Snippet"
#2: Click on the "New file" area and create for example 3 of them.

Now try to delete all of them and on the way you will see the error causing this screen for the user:
error

I just though i tell you about this problem :)
But for a 17 year old i must say good job keep it going πŸ‘

Mac - Incorrect Tray Icon Size

On Mac, the tray icon is displaying at the full 512px.

I've used the following code on line 7 of app-tray.js to correct the issue:

  let icon
  if (process.platform === 'darwin') {
    icon = 'icon18.png'
  } else {
    icon = 'icon512.png'
  }

  tray = new Tray(
    nativeImage.createFromPath(
      path.join(__dirname, '..', 'resources', 'icon', icon)
    )
  )

icon18.png is an 18x18px image.

Editing Markdown in preview mode is broken.

Current Behavior

Clicking the edit button in current Markdown preview implementation does not work. It does not go to the edit mode, but shows the apply and cancel buttons. The preview area freezes. Clicking the apply edit button does nothing. Clicking the cancel edit button crashes the app. To make the app responsive again, had to reload it manually.

Demonstration

md_edit_problem

Expected Behavior

Editing the Markdown snippet during preview mode should take it directly to edit mode. All the editing and the buttons should work as normal.

System Info

sys_info

No way to preview GitHub Flavoured Markdown snippets.

Current Behavior

The preview button does not show up for GitHub Flavoured Markdown. Thus can't preview GFM.

Demonstration

md_git_md_preview

Expected Behavior

The preview button should appear for GitHub Flavoured Markdown and should work normal as like simple Markdown.

System Info

image

[bug] snippet content not displayed correctly

Description

the following snippet is not displayed correctly:

<=

Steps to replicate

  1. create single snippet
    1.1 set Snippet language = ASN.1
  2. set snippet content = "<="
  3. observe snippet content = "<="
  4. set Snippet language = VHDL
  5. observe snippet content = "≀"

Expected behaviour

5a. observe snippet content = "<="

Category Support request

Very good application. I really like.
I have a suggestion. Category support would be good.
Snippets can be created for different platforms. For example, a PHP-based category for zend frameworks would be good.

[Improvement] Better add new snippet (file) feature

Hi buddy, this is my time opening issue in this awesome project. Thanks for this.

I am having some suggestions to improve the UX of the product.

β­• Currently creating a new snippet greets us with following dialog:

image

There is nothing to ask from here, but having to choose single file snippet or multi file snippet is somewhat cumbersome, especially if someone has to create a lot of snippets.

β­• Thus clicking create a new snippet button should open the create snippet dialog directly without having to go through above image:

image

β­• Creating a new file in the snippet directly from normal layout:

image

β­• And editing a snippet would be same as editing a multi file snippet:

image

[Imprevement] The tooltip styling

The edit snippet and save snippet button tooltips are bit off (font, font-size etc.) compared to other UI elements.

image

Please look into it.

πŸ™‚

Custom code highlighting

Hi, first thanks for this cool tool.

I am still exploring and testing it, but one thing that would benefit me is support for additional programming languages. I work in Progress 4GL (also known as OpenEdge ABL) and since it is a bit obscure I am not surprised that it is not supported. Are there any ways / plans to add extra languages?

Let the user choose save location for all snippets

I love this tool. I haven't used it for long, but I love a tool that currently only saves my snippets locally. :) However, something that would for me personally would be awesome to add is that I can choose in which folders it should save all my snippets. That way I could store it in my Dropbox, OneDrive, etc. and when I install it on a new PC just change it to load from that folder and all my snippets would show up on both my desktop and laptop.

Another even more awesome, but I think more complicated way, would be to add WebDav support, so I can set-up a WebDav connection to a folder where it syncs all my things. Kind of like how Joplin (Evernote replacement that is Open-Source does it). That way I could sync it through my own local NextCloud server and wouldn't have to worry about the privacy of Dropbox and such as well. Like I wrote though, I think that is more complicated, but still wanted to throw it out there.

Cloud storage of code snippets

My hard drive just experienced some issues and caused some of my files missing. Fortunately, most of my research notes are hosted on private Github repository or in BoostNote, which uses third party cloud service (like Dropbox) to store notes and make possible the multiple platform feature.

When I launched this app and took notes as usual today, it suddenly occurred to me that probably all of these code snippets are stored locally and not safe against broken storage.
Therefore, would it possible

  • At least the metadata could be retrieved and exported for regular backup on other devices.
  • Hopefully cloud storage feature is developed (as used in BoostNote).

Package cryptiles Insufficient Entropy

I am tring using npm audit to check if any discovered vulenity in dependency package, after I ran
"npm audit fix --force" ,It's still have this security issue:
OS: macOS 10.13.6
version:0.2.10

Mac :: ~/ProductiveTools/SnippetStore Β» npm audit

                   === npm audit security report ===

Run npm update cryptiles --depth 4 to resolve 1 vulnerability

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ High β”‚ Insufficient Entropy β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package β”‚ cryptiles β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ universal-analytics β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path β”‚ universal-analytics > request > hawk > cryptiles β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ More info β”‚ https://nodesecurity.io/advisories/720 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

found 1 high severity vulnerability in 42614 scanned packages
run npm audit fix to fix 1 of them.

Markdown preview is not consistent.

Current Behavior

When previewing a Markdown if another Markdown snippet is clicked, the preview does not update with the selected snippet. It just freezes and keeps showing the first selected snippet preview.

Demonstration

md_preview_freeze

Expected Behavior

While previewing a Markdown if another Markdown snippet is selected, the preview should update according to the content of selected Markdown snippet. For choosing a non-Markdown snippet in-between, it should open that one in normal mode.

System Info

image

Performance issue if there're too many snippets

There're a performance issues in original layout when there're too many snippets in list. With the list and details layout, everything look good but also there're some minor performance issue when resizing the left menu bar.

Add app to Homebrew cask

I think a lot of Developers use homebrew to install software so this would be a nice addition.

[Improvement] Code indentation problem

Everything is good and there's a code indentation problem.

2019-01-20_13-44-32

Looks like this is an issue related to CodeMirror.

Thanks in advance for solving this.

πŸ‘πŸΌ

Launch app maximized on first load

Just another super small thing, but I noticed that on first load SnippetStore doesn't launch fully maximized. I know other Electron apps used to have that issue, but don't seem to any more. Would this part of the API fix that? https://electronjs.org/docs/api/browser-window#winmaximize

PS, thank you for the big donation credit. I really appreciate your work on this app though, especially the VS Code integration, which is key! All around an awesome productivity tool!

Multi-file Snippet creation bug

When Trying to create a multi-part snippet on Windows, when clicking in the Snippet content "new file" area it opens up a blank screen. With no way back, Dev tools shows an error in main.js on this page.

Filtering for languages with more than one word

First of all I would like to thank you for this application!

I have found a small filtering bug. If the language name contains more than 1 word (e.g. "Common List", "Plain Text" etc.) application returns empty snippet list.

snippetstore 2018-08-26 10-55-21
snippetstore 2018-08-26 10-54-57

Markdown support for description and title

I am a heavy user of BoostNote, which I think is the best note taking app I have ever used. Supposedly I think this app will inherit some major features of BoostNote.

I am not sure, but it seems that this feature is not directly supported by this software. It would be great if this is supported since I often need to insert mathematical formulas into the description box.
Additionally, it could be great that links could be made clickable just like BoosteNote.

Can't open links from Markdown preview area.

Current Behavior

Clicking the links in current Markdown preview implementation does not work. Upon clicking, the preview area goes blank and nothing happens.

Demonstration

md_link_not_opening

Expected Behavior

Clicking on the link should open that link in the default browser.

System Info

image

[Improvement] multiple (programming) languages

Would be nice to assign multiple languages for a snippet.

Context: My snippets are used for multiple languages, e.g., C, C++, C#. My text editor triggers the snippet based on the active scope.

Check for update not accurate

I'm running 0.2.11 and using the "Check for Updates" features tells me I'm on the latest version. However, 0.2.12 is now out so it should be alerting me to that right? Although the .exe download link on https://zerox-dg.github.io/SnippetStoreWeb/ still points to 0.2.11 so maybe this isn't an issue after all.

On a side note, it would be cool if there could be an option to have the check for update run automatically every so often and automatically alert you to a new version.

Reduced performance for large collection of snippets.

Current Behavior

As the snippets collection grows, it seriously hampers the performance of the app! Simple usage of app feels sluggish.

Expected Behavior

The app should run relatively with same speed/performance no matter how many snippets are loaded.

Suggestions

According to the reason mentioned in #13, as the large number of CodeMirror instances make the app less performant.

For just previewing all the snippets, the lightweight solutions like Prism, HighlightJs should be used.

The HighlightJs looks promising. It supports multiple languages (185 as of now), it also renders the view in multiple themes (89 as of now).

The CodeMirror instance should be created only for editing the snippet. If the snippet is saved/edit cancelled/focus is lost, the instance should be destroyed.

System Info

image

References

#13

Exporting snippets improvement

Current Behavior

image

Currently the Export JSON button exports the snippet in .json format and not really in the actual snippet filetype. The expoerted snippet json does contain the actual snippet however, it also holds the metadata such as created_date, updated_date, name, tags etc.

Demonstration

This is what an exported snippet looks like:

2019-02-23_18-38-32

I know it is pulled from the snippets.json file:

2019-02-23_18-38-39

Expected Behavior

Upon exporting a snippet, as per #46 (comment), only the snippet content (withput \n, metadata) should be exported as the snippet file name along with snippet file type.

e.g. Here a snippet name is git-issue-draft.md and filetype is markdown, thus the snippet should be exported as git-issue-draft.md filename.

2019-02-23_18-38-46

For multi-file snippets, user should be able to export desired files only.

System Info

image

References

#46 (comment) and #46 (comment)

PHP snippets without PHP tags - no code highlighting

I noticed that if you have PHP snippets that don't have the PHP tags around them, then you lose the code highlighting. This is definitely needed in some cases where you know that is code that always goes into an open PHP section. See below:

capture-php

OSX hotkey issue

I built a mac os package and everything seems to run fine but instead of CmD+N to create a new snippet the app opens a new snippet dialog every time you press just "N" key.

-> Thus cannot type anything that includes the character N

Some Suggestions

Hello. First of all really nice app ;)
I have installed SnipetStore and I found it really simple to use. I am still in the search for the my "perfect" code snippet tool. I am currently using Boostnote but I prefer the simpler organization into tags and languages of SnippetStore.

Here are some suggestions from a couple of days using it:

  • Markdown files preview. (like Boostnote)
  • Allow adding tags on "Create snippet" dialog.
  • Save changes on "enter key" and cancel on "Esc" key instead of having to click on respective icons.
  • Full screen mode
  • Tags autocomplete
  • Snippets backup / sync (using GItHub gist for example)
  • Integration with editors / IDEΒ΄s

I would say the first 3 would already be a great improvement in the general usage of the application.

Thank you..

Installer warning on Windows

When installing v0.2.8 on Windows you get the following warning:

Windows Defender SmartScreen prevented an unrecognised app from starting. Running this app might put your PC at risk.

[UI] Ability to add custom styles.

Current Behavior

I am on 1366x768 sized laptop screen. Though this is a very common laptop screen size and I can get many of my jobs done using it. The SnippetStore app works well and has a beautiful layout, but I think (my opinion πŸ‘‰) it applies a little bit more spacing to some elements.

Demonstration

image

1. The padding to the left and right of smaller sidebar is a bit much. The sidebar can be much thinner.
2. The space between snippet name and dates in snippet details area is also much bigger.
3 and 4. No matter how many tags one snippet can have, in snippets list only some of the first tags are being displayed. Thus it holds a lot of space to the right and bottom of a snippet list name.

The app is maximized to occupy full screen space.

Expected Behavior

The above mentioned issues can be solved with an update. But the issues can be relevant according to ones taste. One may like it, other may not!
Thus having a custom css file for the personal customizations will be of huge help.

Pseudo Code

  1. The application will check for custom styles at the startup.
  2. If such custom styles are found, then render the app with it.
  3. If not found, then render the app with default styles.

System Info

image

Where's the Mac version ?

Hi Guys,

This is a fantastic Idea, it can even be more powerful combined with VS Code plugin to directly put a snippet in the App while coding.

The issue is that I don't see the Mac version... or it's not available for Mac users ?

Tags

Hi,
maybe it is just a user problem but:
How do I add any Tag to my snippet?

how to uninstall SnippetStore in Linux

I installed the app via appimage. How can I remove it from my system?

I removed it from Ubuntu Software manager but the config files in ~/.config are still there...
I am using Ubuntu 16.04.

  1. uninstall via software manager
  2. rm -rf ~/.config/Snippetstore
  3. rm -rf ~/.config/snippetstore
  4. rm ~/.local/share/applications/appimagekit-snippetstore.desktop

Exporting/Importing database of snippet

When we want to switch computers, we can't find all the snippets saved. Even if it's not online or anything, exporting the DB could be a great feature. Or for sharing with others (in a team)

Blank Screen?

Added my 4th snippet, a plaintext snippet for Lorem Ipsum, and the screen just went blank. Opening the devtool shows some js issues. Really like this program, hoping it's a simple fix! Tried reloading the application and the using the "Reload Window" option and still blank.
snippetstore

Running v.0.2.6 on Windows 10 Pro.

Icon issues when using two different DPI monitors (Windows)

Super small, very minor issue, but I noticed that when I have both my monitors connected, one scaled at 200%, the other 100%, the Snippet Store icon doesn't look very good in these two locations. If I log out and log back in with just my high DPI (200% scaled) laptop connect, it looks great though, perfectly crisp!

capture - notification icons
capture

enter language as text input

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

Ctrl+S not working properly

Current Behavior

The keyboard combo Ctrl+S does not work consistently for all use cases. For creating a snippet, it works randomly and not guaranteed to work next time. For saving an edited snippet, it simply does not work.

Expected Behavior

The aforementioned key-combo should work the same for both the cases:

  1. While creating a brand new snippet and,
  2. While editing an existing snippet.

System Info

image

[Suggestion] Add About SnippetStore menu

β­• Please add a About SnippetStore menu item to the Help menu.

image

e.g. which may contain something like:

image

β­• Also having Check for updates menu item certainly would not hurt. πŸ˜‰

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.