Closed VaiOnko closed 1 year ago
I would also appreciate such a feature. It's always hard to read / edit a note at the end of the screen.
In Visual Studio Code there are a lot of settings available to configure such a behavior. Maybe this can be a inspiration for Trilium. For example to enable (this is the default is VSCode):
"editor.scrollBeyondLastLine": true
would lead to:
I can scroll beyond the last line of the document...
Hello, I think that the only thing that is needed is some padding in the end of the document, I'd like to work on it but I don't have time to do it I only added some padding as you can see
@pingumen96 it's actually more complex than that. There are other panes/view which can appear there if there's available space (e.g. children overview, mermaid preview etc.). Having artificial padding there would disrupt this.
A hacky solution that works for me; this just adds some padding (suboptimal solution as identified above) to the bottom of text and code notes. It definitely does put a weird gap in before the children overview, but I can deal with that minor inconvenience for the huge quality-of-life improvement it brings me.
Create a CSS code note with attribute appCss
and the following content:
/*
Allow overscrolling the text & code note editors
*/
.note-detail-editable-text-editor, .note-detail-readonly-text {
padding-bottom: 5em !important;
}
.CodeMirror-code {
/* This slightly breaks the vscroll bar, but idc */
padding-bottom: 5em;
}
@mechanarchy yes this works reasonably well, the vscroll bar is not broken for me (at least doesn't seem to be). Thank you, this has been bothering me for a while.
It would be also cool to have an option to have the last line in the middle or in the last 2/3 of the screen always (i.e. when I add a new line, it autoscrolls and pads in such a way, that the new line will be in the same place as the line before was). VSCode and Joplin for example has this, and it is super nice on for example big or vertical screens, where looking at the bottom of the screen can be a bit annoying. But at least the autoscroll feature would be excellent (= keep the cursor at the same "place" on the screen, not the document (move the document around the cursor, not the other way around))
You can now scroll to half the editor pane height beyond the end of the content, like this:
Will be in 0.62.
Is there any easy way to disable this new feature, for example with a CSS rule in a theme?
Edit: forgot that the dev tools are available, I found an easy solution:
.scroll-padding-widget {
display: none;
}
Describe feature
Now, when adding math at the end of a long document, the math box goes off screen and can't be seen. The workaround is to add a few empty lines after, but this issue could be easily fixed by adding the ability to scroll further, like for example getting the last line of the text to the middle of the screen, like Joplin does it.
Doesn't sound too hard to implement to me, but hard enough that I can't do it.
Additional Information
No response