Trilium: Tab does not work in text docs

Created on 18 Feb 2019  路  14Comments  路  Source: zadam/trilium

Hi

I cant seem to be able to use tab to indent in text notes. It works in markdown

Create a text note
Start typing
Go back to beginning of a line try to use tab to indent

App version:    0.29.1
DB version: 124
Sync version:   4
Build date: 2019-02-12T20:30:07+01:00
Hard Under Debate Bug

Most helpful comment

@zadam

Is it possible to get shotcuts for those indenting functions?

All 14 comments

Tab indentation doesn't really exist in HTML (apart from pre element) and I don't know any good way to emulate it. Example you created looks like a table so you might want to use that instead.

Ok I did not know that it was a limitation.

Is there any update to this? Could it be possible in any way?

I'm not aware of any way to do this ATM.

For a different project we had the following flow (we also did not use textarea):

function onTabPress() {
    const lineLength = cursor.getCurrentColumn()
    cursor.insert(' ' * (4 - Math.floor(lineLength % 4)))
}

Which would align to the next multiple of four with spaces.

I'm also very interested in this feature

@popey456963

Thanks for the workaround, this could be a total improvement. How do I use that addition in Trilium?

@zadam, it seems like the text notes are actually not simple txt files. I can see the issue in that way. Why not also add a purely barebones .txt type that does not employ html?

thanks

The code note without type (just click on "code" note type) is actually plain text (MIME text/plain) although it's not easily discoverable ...

Is it possible to add option to globally map TAB to 4 spaces ? Ability to indent when taking notes is so essential that I may give up TAB for other functionalities such as tabbing tables, etc ...

I think it's necessary to distinguish between a traditional TAB key which has quite special behavior and the need for indentation.

I don't think the traditional TAB key will ever be supported with its table-like alignment feature (as visible in the original issue comment), but there is a standard indent function:

image

@zadam

Is it possible to get shotcuts for those indenting functions?

@gerroon Yes, would you mind creating an issue for that specifically for better visibility?

tab and shift-tab for indent have been added in 0.43.2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zadam picture zadam  路  4Comments

sambbaron picture sambbaron  路  3Comments

thbkrshw picture thbkrshw  路  4Comments

lanslans picture lanslans  路  3Comments

MrEliptik picture MrEliptik  路  5Comments