1

I am looking around to try and understand a line of code via latest snipMate plugin source.

The statement appears at the autoload section of the plugin

for expr in s:snippet_filenames(scope,escape(a:trigger, "*[]?{}`'$|#%")) for path in g:snipMate.snippet_dirs for file in s:Glob(path, expr) source `=file` <----- endfor endfor endfor 

The above code iterates over all files found in the snippet folder and executes the source statement - but what exactly does it do? what does =file means?

2
  • 2
    soruce? Are you sure that's correct? Commented Mar 9, 2016 at 8:00
  • @Carpetsmoker: you're correct, just a typo... Commented Mar 9, 2016 at 8:27

1 Answer 1

2

See :help `=. Basically, it will evaluate file as a VimL expression, then insert the result into the command line. E.g. echo `="file" . "name"` will expand to echo filename, and will print the value of the variable filename.

In your case, for example, if file is ticks.txt, source `=file` will execute source ticks.txt.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.