0

Question is simple:

Is there any way how yasnippet can be triggered at one place in the buffer, and executed in another place of the buffer, while returning to original position at the end of expand?

Typical situation is e.g. when coding Verilog design. One needs to define a new signal at the beginning of the module. So ideal would be to trigger the snippet, it goes to the top of the module, executes there, and reverts back to original position.

Thanks

David Belohrad
  • 458
  • 5
  • 19
  • 1
    You can call functions inside back ticks in a snippet. Have you tried using this to modify the position in the buffer? With save-excursion around it would return to the original location. But I have never tried, if this actually works. – Martin Sep 14 '22 at 14:50

0 Answers0