From 09379b3ff65e79bbe9dab1357f040afc2f4f1620 Mon Sep 17 00:00:00 2001 From: Alexandre Fonseca Date: Thu, 6 Mar 2014 17:43:44 +0100 Subject: [PATCH] Allow '*' in ycm_filetype_specific_completion_to_disable. I love YCM's auto popup with keyword completion when power typing but would rather not have semantic completion activate unless I really want it to (most semantic completers are somewhat slow and sometimes end up breaking my flow). When in API exploration mode, I don't mind having to press C-Space to force completion and wait a bit more. Unless I'm mistaken, the current code does not allow wildcards in the specification of filetypes on which to disable automatic semantic completion. This change allows the use of '*' to disable automatic semantic completion in all files. --- python/ycm/youcompleteme.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index c3f07aed..a64c2ba5 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -332,7 +332,10 @@ class YouCompleteMe( object ): filetypes = vimsupport.CurrentFiletypes() filetype_to_disable = self._user_options[ 'filetype_specific_completion_to_disable' ] - return not all([ x in filetype_to_disable for x in filetypes ]) + if '*' in filetype_to_disable: + return False + else: + return not all([ x in filetype_to_disable for x in filetypes ]) def _AddSyntaxDataIfNeeded( self, extra_data ):