Commit Graph

14 Commits

Author SHA1 Message Date
Jonathon Hodges
fb62652847 Update initial-content.ts
Fixed typo in initial content

## Why
The area of a circle is pi times the radius squared (A = π r²), not the volume.
2024-01-09 00:27:00 +01:00
Florian Labarre
d0d8f872a6
Add key bindings for inserting new blocks at the end/top of the buffer, as well as before the current block (#85)
* Add functionality to insert new block after the last block

- Update key bindings in `initial-content.ts` to include `Alt + Enter` for adding a new block after the last block.
- Implement `getLastNoteBlock` function in `block.js` to retrieve the last block in the note.
- Add `addNewBlockAfterLast` command in `commands.js` to handle the insertion of a new block after the last one.
- Integrate `addNewBlockAfterLast` command into the keymap in `keymap.js`.

* Add block insertion before/after current, before first and after last. Also, tests.

- Added `getFirstNoteBlock` in `block.js` for accessing the first text block.
- Implemented new functions in `commands.js` like `addNewBlockBeforeCurrent` and `addNewBlockBeforeFirst`.
- Updated `keymap.js` with new key bindings to facilitate block creation.
- Introduced `block-creation.spec.js` for testing the new block manipulation features.

* Fix visual bug when inserting new block at the top

* Update help text and Readme

* Fix wrong cursor position after inserting new blocks at the top of the buffer, when the previous first block's delimiter is long (e.g. Markdown)

* Make RegEx more generic

* Fix import

* Auto-generate the README.md and initial-content documentation

- Add a documentation generator
- Add an option to force the initial content to be erased with an env variable

* Add more specific tests

* Fix Mod key on Mac in test

---------

Co-authored-by: Jonatan Heyman <jonatan@heyman.info>
2024-01-04 16:11:26 +01:00
Jonatan Heyman
d1ea17c197 Fix keyboard shortcut help text in the initial buffer text 2023-12-23 00:52:14 +01:00
Jonatan Heyman
8d261571b3 Improve help text of initial buffer content 2023-12-22 20:07:42 +01:00
Jonatan Heyman
49d3e5cd7d
Add Linux support (#6)
* Add linux AppImage build target
* Add ubuntu to Github Actions build matrix
* Show help text on how to open Menu, on Linux
2023-12-21 19:18:04 +01:00
Jonatan Heyman
6ec64ed3ee Add help text about showing menu with the Alt key, to the initial buffer text on windows 2023-12-12 15:39:01 +01:00
Jonatan Heyman
9b5c168b5f Tweak initial buffer content 2023-07-12 18:20:29 +02:00
Jonatan Heyman
0c567384ee Refresh Math blocks when new exchange rates are loaded 2023-07-04 14:01:59 +02:00
Jonatan Heyman
294b6eb2bc Add example Markup block to initial data 2023-03-07 22:46:08 +01:00
Jonatan Heyman
85a5bc95a7 Change key binding for format code 2023-03-03 13:28:51 +01:00
Jonatan Heyman
f3c5a49fbf Add ability to format code for JSON, JS, CSS, HTML and Markdown blocks 2023-03-03 00:57:33 +01:00
Jonatan Heyman
4d12404d77 Add support for Math blocks 2023-03-02 18:40:44 +01:00
Jonatan Heyman
aa628a4f08 Add new command for adding a new block after the current one, and moving the cursor to it. Change default Mod-Enter keybinding to use the new command, and added a new Mod-Shift-Enter keybinding to use the old command that inserts a new block separator at the cursor position (e.g. splits the current block).
#windows-build
2023-01-19 14:29:14 +01:00
Jonatan Heyman
14152fbede Implement persistent buffer 2023-01-19 00:20:50 +01:00