Refactoring
Summary
Features that help update the structure of Dendron.
Features
Automatic Link Synchronization
- With refactoring, you can organize your notes without breaking links that exists to the notes you are organizing.
- When you are renaming a note, moving a note to another vault, refactoring an entire hierarchy, or even renaming / moving a header section of a note, refactor will ensure that all the affected link are updated accordingly.
Reorganize knowledge at any scale
- Refactor lets you reorganize your knowledge with a single command regardless of scale; You can refactor a header in a note, an entire note, or multiple notes.
- Beyond notes, entire hierarchies can be refactored by leveraging the power of regular expression to match and replace parts of the hierarchy.
Getting Started
Refactoring headers
See Dendron: Move Header and Dendron: Move Header for more information
Create a note called
foowith the following content:## One - Some content ## Two - More content ### Let's go deeper - Deep contentCreate a note called
barwith the following content:[[foo#two]]Go back to the note
foo, place the cursor anywhere on the line where the headerTwoisRun Dendron: Rename Header and type
SecondThe header is now renamed to
Second, and the link in the notebaris automatically updated to[[foo#second]]Position the cursor again on the header
Secondand run Dendron: Move HeaderType
bazin the lookup bar.A new note
bazis created and the headerSecondis moved to this note along with the child headerLet's go deeperNotice that the link in the note
barhas been updated to[[baz#second]]
Refactoring notes
Renaming a note
See Dendron: Rename Note for more information
- Create a note called
foowith any content - Create another note that contains a link to
foo - Go back to the note
fooand run Dendron: Rename Note - Type
bazin the lookup bar. - The note
foois now renamed tobaz, and the link in the note is also updated to[[baz]]
Moving a note or multiple notes
See Dendron: Move Note for more information
- Create notes called
foo,bar, andbazwith any content - Create a new local vault by running Create New Vault
- Create another note in any vault that links to any of these notes.
- Run Dendron: Move Note in the command palette
- Select note(s) you want to move to the new vault and hit enter. Clicking the square icon in the lookup bar will enable multi-select.
- You will be prompted to select the vault you want to move the selected note(s) to.
- Notice the notes have been moved to the selected vault and links to those notes have also been updated.
Merge one note with another note
See Dendron: Merge Note for more information
- Create notes called
source,dest, with any content, andrefwith wikilinks that point tosource. - Open the note
source. - Run Dendron: Merge Note in the command palette
- When prompted for the destination, select
dest. - Notice that the note
sourceis deleted, and the content ofsourceis appended at the end of notedest. - Also note that the wikilinks in
refthat used to point tosourceis now updated to point to the notedest.
Refactoring an entire hierarchy
See Dendron: Refactor Hierarchy for more information
- Create notes called
foo,foo.child, andfoo.child.grandchildrenwith any content. - Create another note that links to any of these notes.
- Run Dendron: Refactor Hierarchy fron the command palette.
- You will be prompted to enter a match text. Type
fooand hit enter. - You will be prompted again to enter a replace text. Type
barand hit enter. - A preview of all the affected notes will appear along with another prompt to confirm the changes.
- Hitting enter will rename all notes as listed in the preview, and links to all affected notes are also updated.
Children
- Commands: Refactoring Commands
Children
Backlinks