Skip to content

Monetary Symbol Tab Events interfere with Yasnippet #60

@reteov

Description

@reteov

Every time a tab event occurs on a line with an account, the monetary symbol appears at the end (in my case, it's the US dollar sign: "$"). By itself, it's nothing major, and can be convenient. However, when using Yasnippet, every line seems to act as if the tab is pressed. For the main line (with the transaction name and date), this does not seem to be a problem.

Additionally, every account line will cause the monetary symbol to swap (the symbol is added to lines that don't have it, and removed from lines that do have it). Again, no big deal, in the snippet, I just place the symbol on those lines that I do not want the symbol to appear, and all is fine.

However, the problem happens when I have a line that, in the yasnippet, ends with a placeholder and a monetary symbol. When the symbol is removed, it is replaced with nothing, and Yasnippet complains because it can't find the placeholder anymore, because the search regex ends with [:space:], and that space was removed.

I'm thinking that it might be helpful to, when removing a monetary symbol using a tab event, at least put a space in its place, to ensure such regular expressions don't fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions