Cursor placement when creating new note from shortcut

Hello all.

I don’t remember this being a thing in previous versions of Obsidian (maybe it was?)… but, when I create a new note from shortcut (on Mac: Command+N), the cursor is placed in the first space of the main field by default. To title the note, I must click to select “Untitled” in the title line.

I would much prefer that the cursor be placed with “Untitled” selected by default, so that I can type a title without having to click and then “tab” to reach the main field.

Are others experiencing the same thing? Any way to fix this? I am working off the core new notes shortcut in Obsidian 1.0.0. Thanks in advance.

I’m on 1.0.0 also, and when I create a new note with CMD N it highlights the entire inline title (when enabled in Appearance settings) of “Untitled”, and I can just type the new title name.

Except when I’m using a Templater template with a tp.file.cursor(n) in the template.

My solution or work around I guess, is to simply prompt for a title name using Templater

let title = tp.file.title
if (title.startsWith("Untitled")) {
    title = await tp.system.prompt("Title") ?? "Untitled"
    console.log("Renaming note to: " + title)
    await tp.file.rename(title)
1 Like

Looking at the code, I see a small bug…this will throw an error on the rename if no title is entered, as “Untitled” will already exist.

The forum won’t let me edit it, so I’ll post a correction once I test it, in a bit.

1 Like

Ah, I have inline title disabled. Maybe I just have to re-enable it to get to work again?

However, I would suggest to the devs that highlighting “Untitled” in the title line should be the default behavior with inline title disabled!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.