Heynote

A dedicated scratchpad for developers

README

Heynote


Heynote is a dedicated scratchpad for developers. It functions as a large persistent text buffer where you can write down anything you like. Works great for that Slack message you don't want to accidentally send, a JSON response from an API you're working with, notes from a meeting, your daily to-do list, etc.

The Heynote buffer is divided into blocks, and each block can have its own Language set (e.g. JavaScript, JSON, Markdown, etc.). This gives you syntax highlighting and lets you auto-format that JSON response.

Available for Mac, Windows, and Linux.

Features


-   Persistent text buffer
-   Block-based
-   Syntax highlighting:

    C++, C#, Clojure, CSS, Erlang, Go, Groovy, HTML, Java, JavaScript, JSX, Kotlin, TypeScript, TOML, TSX, JSON, Lezer, Markdown, PHP, Python, Ruby, Rust, Shell, SQL, Swift, XML, YAML
    
-   Language auto-detection
-   Auto-formatting
-   Math/Calculator mode
-   Currency conversion
-   Multi-cursor editing
-   Dark & Light themes
-   Option to set a global hotkey to show/hide the app
-   Default or Emacs-like key bindings


Installation


Download the appropriate (Mac, Windows or Linux) version from the latest Github release (or from heynote.com). The Windows build is not signed, so you might see some scary warning (I can not justify paying a yearly fee for a certificate just to get rid of that).

Notes on Linux installation


It's been reported (#48) that ChromeOS's Debian VM need the following packages installed to run the Heynote AppImage:

  1. ```
  2. libfuse2
  3. libnss3
  4. libnspr4
  5. ```

Development


To develop Heynote you need Node.js and you should (hopefully) just need to check out the code and then run:

  1. ```
  2. > npm install
  3. > npm run dev
  4. ```

Run Tests


To run the tests:

  1. ```
  2. > npm run test
  3. ```

To run the tests in the Playwright UI:

  1. ```
  2. > npm run test:ui
  3. ```


Contributions


I'm happy to merge contributions that fit my vision for the app. Bug fixes are always welcome.

Math Blocks


Heynote's Math blocks are powered by Math.js expressions. Checkout their documentation to see what syntax, functions, and constants are available.

Accessing the previous result


The variable prev can be used to access the previous result. For example:

  1. ```
  2. 128
  3. prev * 2 # 256
  4. ```

Changing how the results of Math blocks are formatted?


You can define a custom format function within the Math block like this:

  1. ```
  2. _format = format # store reference to the built in format
  3. format(x) = _format(x, {notation:"exponential"})
  4. ```

See the Math.js format() function for more info on what's supported.


FAQ


Where is the buffer data stored?


The default paths for the buffer data for the respective OS are:

-   Mac: ~/Library/Application Support/Heynote/buffer.txt
-   Windows: %APPDATA%\Heynote\buffer.txt
-   Linux: ~/.config/Heynote/buffer.txt

From version >=1.5.0, symlinks will be supported and you'll be able to configure the path where buffer.txt is stored.

Can you make a mobile app?


No, at the moment this is out of scope, sorry.

Can you add a feature for naming blocks and/or adding tags? (#44)


Currently, I'm not planning on adding this. The main reason is that it goes against the scratchpadness of the program.

I can totally see the usefulness of such a feature, and it's definitely something that I would expect from a more traditional Notes app. However a large part of Heynote's appeal is it's simplicity, and if that is to remain so, I'm going to have to say no to a lot of actually useful features.

What are the default keyboard shortcuts?


On Mac

  1. ```
  2. + Enter           Add new block below the current block
  3. + Enter           Add new block before the current block
  4. + Shift + Enter   Add new block at the end of the buffer
  5. + Shift + Enter   Add new block at the start of the buffer
  6. + + Enter       Split the current block at cursor position
  7. + L               Change block language
  8. + Down            Goto next block
  9. + Up              Goto previous block
  10. + A               Select all text in a note block. Press again to select the whole buffer
  11. + + Up/Down     Add additional cursor above/below
  12. + Shift + F       Format block content (works for JSON, JavaScript, HTML, CSS and Markdown)
  13. ```

On Windows and Linux

  1. ```
  2. Ctrl + Enter           Add new block below the current block
  3. Alt + Enter            Add new block before the current block
  4. Ctrl + Shift + Enter   Add new block at the end of the buffer
  5. Alt + Shift + Enter    Add new block at the start of the buffer
  6. Ctrl + Alt + Enter     Split the current block at cursor position
  7. Ctrl + L               Change block language
  8. Ctrl + Down            Goto next block
  9. Ctrl + Up              Goto previous block
  10. Ctrl + A               Select all text in a note block. Press again to select the whole buffer
  11. Ctrl + Alt + Up/Down   Add additional cursor above/below
  12. Alt + Shift + F        Format block content (works for JSON, JavaScript, HTML, CSS and Markdown)
  13. Alt                    Show menu
  14. ```

Thanks!


Heynote is built upon CodeMirror, Vue, Electron, Math.js, Prettier and other great open-source projects.