Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions starting with uppercase letter #19

Closed
dsawardekar opened this issue Oct 4, 2013 · 2 comments
Closed

Functions starting with uppercase letter #19

dsawardekar opened this issue Oct 4, 2013 · 2 comments

Comments

@dsawardekar
Copy link
Contributor

@luke-gru Is there a way to create riml function equivalent to Vim's uppercased function. I'm not sure there is a scope name for it. Basically the equivalent of the following function,

function! MyFunction()
endfunction

The generated code if I try to compile this with riml has the default scope specifier like s:MyFunction.

I was doing some preliminary work on a Syntastic plugin for riml. The Syntastic api relies on these type of functions which appear to work like global scoped functions.

function! SyntaxCheckers_riml_riml_IsAvailable()
endfunction

They are used like callbacks by Syntastic. Is there a way of writing this without resorting to a :function workaround?

Thanks.

@luke-gru
Copy link
Owner

luke-gru commented Oct 5, 2013

Hey, there is actually :) You can use the n: scope modifier, and this will leave off the scope modifier in the compiled output. This works for all constructs that take a scope modifier (functions, variables of all kinds).

@dsawardekar
Copy link
Contributor Author

Nice! I knew I was missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants