foambubble/foam

Link manipulations

Open

#1,319 opened on Jan 11, 2024

View on GitHub
 (2 comments) (1 reaction) (0 assignees)TypeScript (14,407 stars) (623 forks)batch import
enhancementgood first issuehelp wanted

Description

Is your feature request related to a problem? Please describe.

Wikilinks are convenient where they are supported, but if I need to keep the document compatible - I'd like to have an option to convert them to equivalent Markdown links. Currently there seems to be no way to do it automatically and brackets autocompletion fights me when I try to do it manually.

Describe the solution you'd like

Introduce commands/refactorings to change between link types. Refactorings for individual links, commands for whole document.

For example, Obsidian plugin that does the same thing: https://github.com/mii-key/obsidian-links (Not all of it might be necessary in context of Foam)

Describe alternatives you've considered

  • Separate vscode extension
    • I can't find any vscode extension that would do the same thing;
    • If there were such extension - it most likely introduces its own wikilink support, that might lead to conflicts;
  • Text replace
    • Manually writing regex every time I need this feature - is a chore that should be avoidable;
  • Text replace rules extensions
    • Extension example: https://github.com/bhughes339/vscode-replacerules
    • Should allow to write replace rules once;
    • General purpose find-and-replace, not aware of any context (can't use document title for example);
    • Might not support all scenarios (runs on full document, not individual links).

Screenshots or Videos

No response

Contributor guide