liamcain / obsidian-creases Goto Github PK
View Code? Open in Web Editor NEW👕 Tools for effectively folding markdown sections in Obsidian
License: MIT License
👕 Tools for effectively folding markdown sections in Obsidian
License: MIT License
Hi Liamcain,
Thank you for bringing us the great plugin Creases. It's very handy to be able to fold/unfold all by different heading levels, especially when we are working on a long document.
I would like to suggest extending such handy function to list rather than only heading.
Sometimes a document can only have a few heading levels but multiple deeply nested lists. If there is a way to quickly fold/unfold, say all level 2, or 3 list, it could make the document more readable.
Best,
Jake
Folding doesn't seem to be honored in transcludes.
On note A
I have an H2 with nested H3s, some of which are folded. The H3s show as folded on note A
(edit and preview mode).
When I transclude ![[A#H2]]
on note B
, every H3 is visible by default in the preview.
Source: Discord
I notice that some time after putting on the heading, I can delete characters, but i cannot type additional character into that heading
Nothing happen when i try typing
Unless i delete the , then i can type again
Nothing show up in ctrl+shift+I too
0.11.0
The creases-in-templates work perfectly when creating new documents with 'Create new note' > 'Insert Template'. But they don't work when templates are automatically applied by Templater's 'Folder Templates' function, which automatically applies a template to new notes created in a certain folder. These contain the creases, but don't fold them.
Here is a small bug report:
Anytime I open a certain file, its first section (which starts at the top-most line) always starts folded, which is annoying.
Just in case this is useful:
%%…%%
mark).Thanks!
I have a relatively large file which I want to structure. To do this I use the multi-column plugin.
At the end of my file, I still have some sections which I now want to automatically fold, so I want to this plugin.
Normally, in every other file, my creases are folding. But in this file, the creases are not folding.
For context:
I tried to reproduce this behaviour with smaller files, but only this file, which is pretty big and takes about 1 second to completely load, has this problem.
Hi,
adding creases on sections that end with a block-id reference should add creases before (and not after) the block id, otherwise the block-id won't work anymore and the block reference break.
Thanks!
When using the <% tp.file.cursor() %>
option of templater Creases will always start unfolded (no matter what settings you have, or how creases are setup on the template).
Let me know if you would like additional details, I'm using the latest version of Obsidian on Mac, and of all plugins.
Sorry, bad ideas
Would it be possible to add an option in the settings to change the lucide icon used for creases. I'm not a fan of having shirt icons throughout my notes, and wanted to change it to something a little more minimal.
Really great plugin. Thx a lot :)
just recognized the command "Iron Out Creases" leaves a rogue space at the end of the line with a crease.
if you circle through commands "Toggle Crease" and "Iron Out Creases" you keep adding spaces.
cheers and thx again :)
Hello,
Thanks a lot for this great plugin. It's such a neat little helper!
is it possible to hide the appended syntax for %% fold %%
of headings in the outline pane of Obsidian?
That would change it from … :
… to:
This significantly decreases visual clutter and therefore increases legibility.
Alternatively or optionally, the "👕" could be appended.
Thanks a lot in advance.
I saw that there is a toggle crease command but it seems that it toggles the presence of a marker without toggling the fold state of a section. It could be nice if it was possible to toggle between fold more and fold less depending on wheter or not the text is folded like za
in vim.
When Creases is installed, a second title/navigation bar is created in the second horizontal half of the screen (as if the screen was split down). It doesn't show the title, but the navigation arrows are synced with the note. If I click back and forth, it navigates to the previous or next note as if I clicked on the buttons on the top of the tab.
No needs need to be present in the document for the behaviour to occur. In this freshly created vault, I simply installed the plugin and didn't add any creases to documents.
I reproduced the issue on a freshly created vault with no other plugins installed. (Below is a screenshot).
SYSTEM INFO:
Obsidian version: v1.3.3
Installer version: v1.1.9
Operating system: Windows 10 Home 10.0.22621
Login status: logged in
Catalyst license: insider
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: light
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Creases v0.6.6
It would be amazing if we could write %% folded %%
and have the heading always fold whenever we open the file, regardless of its previous state.
Say you have the following note
# 1.
## 1.1
blabla
## 1.2
blabla
# 2.
## 2.1
## 2.2
This will prevent the plugin from decreasing the heading fold level to heading level 1
I came across this looking for a specific solution to my folding issue: I want the content following some folds to stay, denoted by some character. Here's an example, where in my journal I fold timestamps thorughout the day and want to leave the journal footnote intact:
I installed this plugin hoping the %% fold %%
function would help me do this. Does this plugin do that or am I doing this wrong? I love the workflows with folding this enables nonetheless, so ty.
There's a discussion ongoing on guopenghui/obsidian-quiet-outline#23
Hi,
I've been using and loving the bidirectional syncing between the outline view and the editor. But today, that functionality seems to have stopped working.
If I fold something in the editor, the outline will fold as well, but if I fold something in the outline, the content in the editor doesn't fold.
I haven't installed any new plugins but I did update Obsidian to v0.15.9.
Did the new version of Obsidian break the outline syncing?
I'd love it transcludes could also be collapsed with a <!-- fold -->
tag!
I frequently have sections where I transclude things like:
Would love to be able to hide them by default 😄
Being able to keep the outline's folding synced with the note would be great.
I can think of a couple different ways to control the sync that would be very practical:
keep folding synchronized
flag (and associated command to toggle it)copy note folding to outline
or copy outline folding to note
, which could be used when the sync is offIt would be convenient if you could indicate in the yaml frontmatter of a note that this particular note should always start folded at a certain headline level....
I can't seem to get it to work
It sounds like a very interesting plugin but I have no idea how to install it as it is not in the community plugin
I just installed the latest version of Creases via BRAT and have been testing it out. Is it designed to be compatible with Live Preview, the legacy editor, or both? I am currently using the legacy editor, and have found that the plugin commands only run when I am in editing view as opposed to reading view.
Also, none of Creases' commands show up in the command palette—which means the only way for me to run any commands with this plugin is to go into the hotkeys section of Obsidian's settings, set a hotkey for the command I want to run, and then press that hotkey (while making sure I am in editing mode). I like the convenience of hotkeys, but it would also be great to run commands straight from the command palette.
In the latest version of obsidian v1.4.16, creases plugin fails to load
Hello and thank you for a great plugin i love!
Unfortunately, I discovered today that the plugin somehow interferes with the outline pane, so that it is impossible to drag and drop in order to rearrange a note.
There is this option, but I don't like it.
https://forum.obsidian.md/t/css-for-showing-heading-levels-in-gutter/72244/2
Is it possible to sync the creases folding state across devices through Obsidian sync? Currently this doesn't seem to work. Here is a related post on the forum for regular collapsing.
Would be happy to sponsor.
# Heading 1
## 1. Heading 2
## 2. Heading 2
## 3. Heading 2
The entries to have the same spacing as other entries
Entries have very big spacing
I love the fact that Creases renders headings in MarkDown, actually! I have many headings with embedded links, and without Creases they all look ugly and unreadable. Seeing them rendered in the Outline with Creases is awesome! I'm not hoping to see this functionality disabled, just to have the margin/padding adjusted!
Ive tested it in the Sandbox vault with only creases plugin enabled it still doesnt work.
Same when i disable all plugins that might have similar functionality.
SYSTEM INFO:
Obsidian version: v1.4.16
Installer version: v1.4.16
Operating system: Windows 10 Home 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: Everforest v0.0.0
Snippets enabled: 8
Restricted mode: off
Plugins installed: 84
Plugins enabled: 41
1: Excalidraw v2.0.7
2: Advanced Tables v0.19.1
3: cMenu v1.1.2
4: Admonition v10.1.1
5: AutoMOC v1.3.4
6: Buttons v0.4.19
7: Google Calendar v1.10.14
8: Calendar v1.5.10
9: Surfing v0.8.16
10: Citations v0.4.5
11: Copy button for code blocks v0.1.0
12: Dataview v0.5.64
13: Dictionary v2.22.0
14: Editor Syntax Highlight v0.1.3
15: Excel to Markdown Table v0.4.0
16: Find orphaned files and broken links v1.9.1
17: Footnote Shortcut v0.1.3
18: Kanban v1.5.3
19: Markdown Formatting Assistant v0.4.1
20: Outliner v4.8.0
21: Pandoc Plugin v0.4.1
22: Recent Files v1.3.8
23: Tag Wrangler v0.6.1
24: Zotero Integration v3.0.12
25: Diagrams.net v1.0.4
26: Diagrams v1.5.0
27: Templater v1.18.3
28: Image Toolkit v1.4.1
29: Mousewheel Image zoom v1.0.19
30: Periodic Notes v0.0.17
31: Heatmap Calendar v0.6.0
32: Icon Shortcodes v0.9.7
33: Remember cursor position v1.0.8
34: Show Current File Path v0.5.2
35: MathLive v1.0.1
36: Extended MathJax v0.4.1
37: Go To Heading v0.2.1
38: Export To TeX v0.4.2
39: Quick Latex for Obsidian v2.6.3
40: Completr v3.2.0
41: Latex Suite v1.8.10
New increase fold level by 1
and decrease fold level by 1
(akin to vim
's zm
and zr
) would be invaluable (especially once coupled to hotkeys)
An extension to the creases syntax could include a non-unique "nickname" so that you can fold sections even more easily.
Say I have a list of H3s that all correspond to Projects. Instead of paying attention the the heading level (I could add creases to them and say "Fold all Projects."
This could allow different crease types in the same document that could allow for more folding options.
I'm using a templater command that replace - [x]
with - [ ]
, here is the code
<%*
const text = tp.file.content
const output = text.replaceAll('- [x]','- [ ]')
const file = tp.file.find_tfile(tp.file.title)
await app.vault.modify(file, output)
_%>
And when I execute this command, (because the text being replaced is underneath a folded heading with a crease) it automatically unfolds the heading.
Is the plugin supposed to behave this way ? Is there a way to make it stay folded even when executing the templater command ?
Great plugin!
Would it be possible to crease the front matter? Doesn't seem to work at the moment. Would also be handy if there were a setting that allowed you to crease front matter by default, without having to add the comment.
Sorry for the dumb question but I can’t get folded by default to work and given that the plug-in is quite new I’m not sure if this is a known issue (everything else works great). I have a crease in a section of my daily template and creating the note via the calendar plugin creates a new crease but it’s not folded.
Hi!
lets say I have a text under H1 with a link to H2. I then add %% fold %%
to the H2 heading-text.
What happens is a non-working link to a heading that doesn't exit anymore, since Obsidian can't change my link automatically after the heading was renamed.
My Idea was, that for heading the %% fold %%
should go under the heading instead of at the end.
Of course this causes a lot of problems, but maybe someone else comes up with a better solution? :D
Another idea of mine was to add it to the yaml instead of the heading-text. But not sure if the crease-plugin could take care of heading-renames in yaml... So yaml could look like this:
---
crease:
- ## H2
---
I love the concept of this plugin. It helps keep focus, especially with long notes.
Unfortunately, the "fold-all" option seems to stop working after some time.
Disabling/re-enabling seems to bring the plugin "back to life."
I tried reproducing by testing many common things I do, reloading other plugins, folding/un-folding manually, etc. But nothing seemed to reproduce the issue.
The only thing that seems to cause the issue is leaving Obsidian open for some time. When I return, every "crease" is no longer "folded."
PS- I had been looking for something like this and only found "creases" recently. However, I have searched the community plugins for this "auto-fold" feature multiple times in the past year. It might be worth updating the description to include some more common keywords (or add "fold" to the name) so others might have an easier time finding this useful plugin.
🌴
Try this
# The %% fold %%
- Số: 002758/EV
N0
Mã: E23067558245
- Số: 06077/EV
N0
Mã: E238347558272
Extend this feature to bullet points so that they fold automatically on the marked places like how Headings do fold right now.
Thanks.
Thanks a lot for your plugin at the begining. If a page contains both creases and embeded page or block, in several seconds after opening this page in edit mode on Android mobile app, after scrolling down the page, the page goes back to the cursor's position, which is the begining of the page by default.
To reproduce this issue no other plugins need to be installed, and the problem is solved after the plugin is turned off. Maybe the plugin is doing something in the editor at the cursor's position when the page contains both embeds and creases.
Creases: 0.6.6
Obsidian Android App: 1.4.3
I take for an example of the Admonition plugin.
I have a note on the left (fixed).
Through the links on it, I open notes.
Every time I do it, all headlines (marked %% fold %%) are folded in the fixed note.
Also, this happens if several notes are open.
Is it possible to make headers not turn on those notes that are already open / fixed?
So it behaves initially plugin admonition. If you reveal the block, it will remain open until you reboot the note.
I have some note, like this
# Сhapter 1 %% fold %%
Text of chapter 1.
Another text.
## Section 1.1
Text of section 1.1
Another text.
## Section 1.2
Text of section 1.2
Another text.
When I run the command "Iron out the creases" it break my note like this:
# Сhapter 1Text of chapter 1.
Another text.
## Section 1.1
Text of section 1.1
Another text.
## Section 1.2
Text of section 1.2
Another text.
The header first line subtext join to the header.
It look like deteting the line break char on ending of header.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.