Skip to content

Commit

Permalink
Added '{current}' support to default Attachments location.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglev committed Jan 9, 2023
1 parent ba7d62d commit 882fd9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export default class PastetoIndentationPlugin extends Plugin {
const activeFile = this.app.workspace.getActiveFile();
const activeFilePath = activeFile?.path;

let filesTargetLocation = this.settings.saveFilesLocation;
let filesTargetLocation = this.settings.saveFilesLocation.replace('{current}', activeFile.parent.path);
let longestMatchingCursorFilePattern = 0;
this.settings.saveFilesOverrideLocations.forEach((location) => {
if (
Expand Down Expand Up @@ -910,7 +910,7 @@ class SettingTab extends PluginSettingTab {
new Setting(attachmentsEl)
.setName("Default attachment folder path")
.setDesc(
`When saving files from the clipboard, place them in this folder.`
`When saving files from the clipboard, place them in this folder. ("{current}" will insert the directory of the currently-open note.)`
)
.addText((text) => {
text
Expand Down

0 comments on commit 882fd9f

Please sign in to comment.