Skip to content

Instantly share code, notes, and snippets.

@koron
Created May 31, 2013 14:04
Show Gist options
  • Save koron/5685200 to your computer and use it in GitHub Desktop.
Save koron/5685200 to your computer and use it in GitHub Desktop.
Vim, can't complete commands which starting `py3` by typing `:py3<tab>` in command line.
# HG changeset patch
# Parent 76ef40f7a249190dc660329a65de22ad7a1326f7
diff -r 76ef40f7a249 src/ex_docmd.c
--- a/src/ex_docmd.c Fri May 31 22:30:34 2013 +0900
+++ b/src/ex_docmd.c Fri May 31 23:03:49 2013 +0900
@@ -3249,6 +3249,9 @@
/* check for non-alpha command */
if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
++p;
+ /* for python 3.x: ":py3*" commands completion */
+ if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3')
+ ++p;
len = (int)(p - cmd);
if (len == 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment