# Make \[\[folder/file|file\]\] display text alias change optional

**URL:** <https://forum.obsidian.md/t/make-folder-file-file-display-text-alias-change-optional/59553>\
**Category:** Feature requests\
**Tags:** internal-links\
**Created:** [May 11, 2023, 10:50am UTC](https://forum.obsidian.md/t/make-folder-file-file-display-text-alias-change-optional/59553 "2023-05-11T10:50:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Helzibah](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/h/e480ec/32.png) [@Helzibah](https://forum.obsidian.md/u/Helzibah)\
**Post date:** [May 11, 2023, 10:50am UTC](https://forum.obsidian.md/t/make-folder-file-file-display-text-alias-change-optional/59553/1 "2023-05-11T10:50:13Z")

</div>

### Use case or problem

I use obsidian for work and my project structure leads to a lot of duplication in file names, so I use the full folder path to differentiate what I’m linking to. This change means I have to go and delete the auto-added `|file` off the end of every link I add so that I can tell the difference between e.g. `[[Projects/ABC/Go live plan]]` and `[[Projects/XYZ/Go live plan]]`.

I use the daily notes plugin to link tasks and focus day to day, it’s important to me to be able to tell at a glance which projects I was working on and what state they were in. I can see how the change is super helpful for a lot of people, but if you use Obsidian with a focus on folder structure over wiki-style linking then context is more important (and actually the ability to work folder-style rather than wiki-style is one of the reasons I gravitate to Obsidian over other tools)

### Proposed solution

Add a tickbox in the Files & Links section of the settings to toggle this behaviour. It would fit nicely next to `New link format`.

---

<div class="post-metadata">

**Author:** ![bquigley-hubs](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/d07c76/32.png) [@bquigley-hubs](https://forum.obsidian.md/u/bquigley-hubs)\
**Post date:** [May 11, 2023, 2:56pm UTC](https://forum.obsidian.md/t/make-folder-file-file-display-text-alias-change-optional/59553/2 "2023-05-11T14:56:33Z")

</div>

+1 [This thread](https://forum.obsidian.md/t/the-new-automatic-insertion-of-the-filename-alias-in-links-is-bugging-me-anybody-else/59051) has a few others chiming in about this behavior change.

Quoting my post:

> I rely on folders being part of the note’s display name.
> 
> For example, at work I’ve got folders for taking notes in my 1:1s with colleagues. The schema is something like `meetings/<person>/<date>`, so if I’m meeting with Bob and Sally on the same day, I’ll have:
> 
> - `meetings/bob/2023-05-10`
> - `meetings/sally/2023-05-10`
> 
> I consider that full path to be the note’s “name”, and want it displayed as such.
> 
> Given that there’s already a configuration option for “New link format”, surely the original behavior can be added as an option there?

---

<div class="post-metadata">

**Author:** ![Helzibah](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/h/e480ec/32.png) [@Helzibah](https://forum.obsidian.md/u/Helzibah)\
**Post date:** [May 22, 2023, 10:14am UTC](https://forum.obsidian.md/t/make-folder-file-file-display-text-alias-change-optional/59553/4 "2023-05-22T10:14:03Z")

</div>

I’ve found a temporary workaround. When you type in a link, if you use `<tab>` to select the page in the list rather than `<enter>` then it automatically selects the page title for you. This allows you to easily change/delete it with two keystrokes.

![image](https://forum.obsidian.md/uploads/default/original/3X/e/6/e630d0644821a92e23ca0abf98b481c30cecc917.png)

---

<div class="post-metadata">

**Author:** ![meskill](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/898d66/32.png) [@meskill](https://forum.obsidian.md/u/meskill)\
**Post date:** [June 14, 2023, 4:00pm UTC](https://forum.obsidian.md/t/make-folder-file-file-display-text-alias-change-optional/59553/5 "2023-06-14T16:00:39Z")

</div>

+1 for the option to turn if off.

Another problem I’ve faced with that feature that is shadows name of header I’m linking to and always adds alias to the filename.

I prefer to use extension [GitHub - scottwillmoore/obsidian-short-links: An Obsidian plugin to display short internal links.](https://github.com/scottwillmoore/obsidian-short-links) that can change the view of links without messing up with actual content.

---

<div class="post-metadata">

**Author:** ![chtx](https://forum.obsidian.md/user_avatar/forum.obsidian.md/chtx/32/16975_2.png) [@chtx](https://forum.obsidian.md/u/chtx)\
**Post date:** [January 9, 2024, 1:32pm UTC](https://forum.obsidian.md/t/make-folder-file-file-display-text-alias-change-optional/59553/6 "2024-01-09T13:32:47Z")

</div>

I’d also appreciate a setting where I can choose default behavior for displaying links: original file name or alias name. No matter if I typed the alias or original name after [[.

---

<div class="post-metadata">

**Author:** ![kodai](https://forum.obsidian.md/user_avatar/forum.obsidian.md/kodai/32/63368_2.png) [@kodai](https://forum.obsidian.md/u/kodai)\
**Post date:** [September 11, 2024, 1:29am UTC](https://forum.obsidian.md/t/make-folder-file-file-display-text-alias-change-optional/59553/7 "2024-09-11T01:29:38Z")

</div>

I kind of solved this issue using Obsidian Linter. Obsidian Linter makes us possible to modify texts automatically when we save.

ref. [Custom Rules - Linter](https://platers.github.io/obsidian-linter/settings/custom-rules/#custom-regex-replacements)

In Linter settings, you can configure like the following, and you can make sure that the alias (`|file`) is removed when you save a file.

label: `Remove alias` (or anything what you want)  
regex to find: `\[\[([^|]+)\|([^|]+)\]\]`  
flags: `gm`  
regex to replace: `[[$1]]`

 ![CleanShot 2024-09-11 at 10.27.24@2x](https://forum.obsidian.md/uploads/default/original/3X/e/8/e8f28bbfad67a95bcca2629e5b3681da8bfe0b8f.png)

---

<div class="post-metadata">

**Author:** ![parkeraddison](https://forum.obsidian.md/user_avatar/forum.obsidian.md/parkeraddison/32/81900_2.png) [@parkeraddison](https://forum.obsidian.md/u/parkeraddison)\
**Post date:** [June 28, 2025, 11:50am UTC](https://forum.obsidian.md/t/make-folder-file-file-display-text-alias-change-optional/59553/8 "2025-06-28T11:50:19Z")

</div>

Great idea to use Linter rules! Extending this, here’s a Linter replacement that only targets the auto-created `[[path/filename|filename]]` and turns it into `[[path/filename]]`.

It works by checking if the alias content is the same as the last chunk of the filepath. Hopefully someone finds it useful!

```yaml
regex to find: \[\[(.*?\/([^|]+))\|(\2)\]\]
flags: gm
regex to replace: [[$1]]

```

 ![image](https://forum.obsidian.md/uploads/default/original/3X/d/3/d3156bafe3963876b60c02f75e3169610fdf2b3f.png)
