Skip to content

Paste at cursor position #126

@micangl

Description

@micangl

The plugin doesn't allow the user to select a position where the template should be inserted.

For example, if I set:

          template = "$FILE_NAME",

and I executed the paste command in the middle of a line of text, the file name would still be pasted in a new line.

The plugin should at least provide an option to let the result of the template expansion be inserted at the current position of the cursor.

Even better, there could be another lua api function, in addition to paste_image, which could also take the insertion position as an argument and return a table containing some data about the pasting operation (for example, the result of the template expansion, the path to the image, and so on).

One of the reasons, I think, this is quite important is that there isn't an easy way to handle multiple templates. For example, I use multiple types of figure in Latex; types of figure whose snippets are already handled by my snippet manager. It wouldn't make a lot of sense to try to find a way to manage multiple templates with this plugin, and the additional function would allow someone to integrated this plugin with their already existent snippets.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions