Created
March 28, 2016 14:05
-
-
Save watiko/9998af831e3d37c70b2c to your computer and use it in GitHub Desktop.
Vim cmdline autoload variable completion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/eval.c b/src/eval.c | |
index ea7f909..2ced3b6 100644 | |
--- a/src/eval.c | |
+++ b/src/eval.c | |
@@ -3399,6 +3399,12 @@ set_context_for_expression( | |
got_eq = TRUE; | |
xp->xp_context = EXPAND_EXPRESSION; | |
} | |
+ else if ((c == '#') | |
+ && xp->xp_context == EXPAND_EXPRESSION) | |
+ { | |
+ /* Autoload function/variable contains '#'. */ | |
+ break; | |
+ } | |
else if ((c == '<' || c == '#') | |
&& xp->xp_context == EXPAND_FUNCTIONS | |
&& vim_strchr(xp->xp_pattern, '(') == NULL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment