0

I am using N++ text editor. I was wondering is there some plugin that will allow text template creating? I need something similar to PHP:

lorem ipsum blablabla
include(my_template);
lorem ipsum blablabla

Or even better some themplating with $variables and heredoc:

require_heredoc(mytemplate);
lorem ipsum blablabla
$chapter1;
lorem ipsum blablabla
$chapter2;
lorem ipsum blablabla
CoR
  • 3,826
  • 5
  • 35
  • 42

1 Answers1

1

As for N++, you might have a look at SnippetPlus or Snippets plugins.

Also you might consider the AutoHotKey, it will give you templating capability system-wide.

Example:

::.lipsum::Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque etc etc.

Now, if you type .lipsum in any application, it gets deleted and replaced by long text. (Period at beggining of .lipsum is only my way of prefixing to avoid replacement if I want to type lipsum without triggering replacement.)

You can make it work also with variables, but then your macro would be slightly more difficult - you might want to display input box for every variable etc. You can also create macro template(filename) which will paste content of given filename in your templates folder.

For more details on AutoHotKey setup, please check this answer.

Community
  • 1
  • 1
miroxlav
  • 11,796
  • 5
  • 58
  • 99