pajoma / vscode-journal

Lightweight journal and simple notes support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=pajoma.vscode-journal
GNU General Public License v3.0
233 stars 40 forks source link

Can't place items under correct heading #72

Closed lonix1 closed 2 years ago

lonix1 commented 3 years ago

I tried:

  "journal.tpl-memo-after": "## Notes",
  "journal.tpl-task-after": "## Tasks",

But that doesn't place items after those headings... everything ends up at the top of the file.

It also says:

This setting is outdated, please use the setting 'templates' instead

But there's no indication how to do so?

jfrome commented 3 years ago

I had the same issue as resolved it by editing the User settings.json and adding the setting in journal.templates like below:

    "journal.templates": [
        {
            "name": "task",
            "template": "- [ ] Task: ${input}",
            "after": "## Tasks"
        },

I also had to set the default journal.tpl-task to empty like this:

    "journal.tpl-task": "",

I think there is some issue where the defaults are not overidden by journal.templates.

lonix1 commented 3 years ago

Thanks, that helped, but only when using tasks.

Unfortunately it doesn't work when combined with notes. When I specify tasks AND notes using @jfrome's workaround, the stuff is added in the wrong places.

@pajoma How do we get this to work?

pajoma commented 3 years ago

I think there is some issue where the defaults are not overidden by journal.templates.

I have changed the order when looking up the configurations. The extension will now check if a templates section is configured, if it fails it will check the old style.

Unfortunately it doesn't work when combined with notes. When I specify tasks AND notes using @jfrome's workaround, the stuff is added in the wrong places.

I am not really sure why it doesn't work in the current version. Doesn't happen with my current build, should be fixed with the next release.

lonix1 commented 3 years ago

Cool, I can't wait to try it out!

sklarsa commented 3 years ago

What is the status of this? I installed the vscode-journal extension, made no configuration changes, but every item I enter using Cmd-Shift-J just gets sent to the top of the day's entry:

# Wednesday, April 21 2021

- MEMO: note test
- [ ] TASK: test

## Tasks

## Notes

I haven't overridden any default settings. Using version 0.11.2

NicolasHaeffner commented 3 years ago

Any update here? This does not work for me unfortunately..

pajoma commented 3 years ago

Currently working on it ;)

MatrixRanger98 commented 2 years ago

Any update on this? Same issue here.

sojkin commented 2 years ago

Hello, same issue here.

btw, great idea with this extension!

pajoma commented 2 years ago

Fixed in current release