PlainTasks icon indicating copy to clipboard operation
PlainTasks copied to clipboard

Completion rules by tab do not work

Open daedaless opened this issue 8 years ago • 17 comments

Hi. I'm on macOS 10.12. I try to, for example, use the toggle completion rule by doing "tg" and then tab tab, but get no result.

A GIF of what I mean: https://media.giphy.com/media/l4FGGLzAtjVl3HHuo/giphy.gif

Thanks.

daedaless avatar Mar 28 '17 09:03 daedaless

Make sure "tab_completion": true in settings.

vovkkk avatar Mar 28 '17 09:03 vovkkk

I turned it on, but I get another issue where Sublime Text predicts what I'm going to type if I press TAB. "tg" works, but something like "c" won't.

daedaless avatar Mar 28 '17 09:03 daedaless

After you pressed tab and get wrong/unexpected result, you can press tab again to replace it with next match, or press ctrl+space to see list of all matches.

vovkkk avatar Mar 28 '17 10:03 vovkkk

No, I cannot. Pressing tab again just loads through the list of suggested words by Sublime Text, and ctrl+space launches Siri or asks if it can be enabled on macOS.

daedaless avatar Mar 28 '17 10:03 daedaless

Do you use some autocomplete plugins? they usually break sublime-completions file which is used in PT.

Rebind ctrl+space to some other keys in user keybindings files:

	{ "keys": ["ctrl+space"], "command": "auto_complete" },
	{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
		[
			{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
			{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
			{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
		]
	},

vovkkk avatar Mar 28 '17 10:03 vovkkk

I don't think I am using any autocomplete plugins. image These are my plugins.

I rebinded it to ctrl+I and get this pop-up when I use it. image

daedaless avatar Mar 28 '17 11:03 daedaless

You are definitely using some plugin which mess up completions, because ST does not show file names, it shows trigger on the left and result on the right

default

vovkkk avatar Mar 28 '17 11:03 vovkkk

It's probably All Autocomplete, I had the same problem.

Add in the All Autocomplete settings:

"exclude_from_completion": [
     "todo"
]

mg979 avatar Apr 15 '17 15:04 mg979

I confirming the same problem on SublimeText for Windows:

  1. After reloading Sublime during 2-3 second I still can use autocomplete, but after then it's breaking.
  2. Also I can't see autocompletes on Ctrl+Space after 2-3 seconds.

On the GIF showns:

  1. Loading SublimeText
  2. After loading I press TAB key some times.
  3. At the first time TAB works fine - used autocomplete
  4. After then it works simply as tab symbol

gif

GIF url: https://media.giphy.com/media/l0IyeX8sclM7SqWwE/giphy.gif

I think ther is problem on PlainTasks plugin, because on Console window I see that this is the last plugin that's loaded in SublimeText:

reloading plugin PlainTasks.APlainTasksCommon
reloading plugin PlainTasks.PlainTasks
reloading plugin PlainTasks.PlainTasksDates
reloading plugin PlainTasks.PlainTasksToHTML
reloading plugin PlainTasks.plist_parser
plugins loaded

aeperfilev avatar May 04 '17 12:05 aeperfilev

I have no All Autocomplete plugin, as pointed above.

Full list of packages on my SublimeText in order of loading (from console):

ignored_packages: ["AppleScript", "CodeFormatter", "EasyMotion", "Emmet", "Emmet Css Snippets", "Javatar", "Markdown", "MarkdownTOC", "Pretty JSON", "Python Flake8 Lint", "REPL", "SideBarEnhancements", "SqlBeautifier", "sublime-markdown-extended", "SublimeHttpRequester", "Table Editor", "TodoReview", "Vintage"]
...
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.comment
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.01-pygments
reloading plugin 0_package_control_loader.02-bz2
reloading plugin 0_package_control_loader.50-backrefs
reloading plugin 0_package_control_loader.50-dateutil
reloading plugin 0_package_control_loader.50-pytz
reloading plugin 0_package_control_loader.50-pyyaml
reloading plugin Base Encoder.Base Encoder
reloading plugin BracketHighlighter.bh_core
reloading plugin BracketHighlighter.bh_logging
reloading plugin BracketHighlighter.bh_plugin
reloading plugin BracketHighlighter.bh_regions
reloading plugin BracketHighlighter.bh_remove
reloading plugin BracketHighlighter.bh_rules
reloading plugin BracketHighlighter.bh_search
reloading plugin BracketHighlighter.bh_swapping
reloading plugin BracketHighlighter.bh_wrapping
reloading plugin HTML5.encode_html_entities
reloading plugin HTML5.html_completions
reloading plugin InsertDate.insert_date
reloading plugin LESS.less_completions
reloading plugin Markdown Preview.helper
reloading plugin Markdown Preview.markdown_settings
reloading plugin Markdown Preview.markdown_wrapper
reloading plugin Markdown Preview.MarkdownPreview
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin SmartMarkdown.headline
reloading plugin SmartMarkdown.headline_level
reloading plugin SmartMarkdown.headline_move
reloading plugin SmartMarkdown.pandoc_render
reloading plugin SmartMarkdown.smart_folding
reloading plugin SmartMarkdown.smart_list
reloading plugin SmartMarkdown.smart_table
reloading plugin SmartMarkdown.table
reloading plugin SmartMarkdown.utilities
reloading plugin SublimeTmpl.sublime-tmpl
reloading plugin Tag.Edit
reloading plugin Tag.Tag
reloading plugin Tag.tag_classes
reloading plugin Tag.tag_close_tag
reloading plugin Tag.tag_close_tag_on_slash
reloading plugin Tag.tag_indent
reloading plugin Tag.tag_insert_as_tag
reloading plugin Tag.tag_lint
reloading plugin Tag.tag_remove
reloading plugin Tag.tag_remove_attributes
reloading plugin AdvancedNewFile.AdvancedNewFile
reloading plugin Anaconda.anaconda
reloading plugin Anaconda.setup
reloading plugin Anaconda.version
reloading plugin BracketHighlighter.ure
reloading plugin cheatsheet.cheatsheet
reloading plugin Codec.codec_base64
reloading plugin Codec.codec_hex
reloading plugin Codec.codec_json
reloading plugin Codec.codec_quopri
reloading plugin Codec.codec_xml
reloading plugin Codec.sublime_codec
reloading plugin ColorPicker.sublimecp
reloading plugin Cucumber.GherkinAutoComplete
reloading plugin Cucumber.table_cleaner
reloading plugin Cucumber.table_commons
reloading plugin Cucumber.table_import
reloading plugin DjangoCommands.django-commands
reloading plugin FavoriteFiles.favorite_files
reloading plugin FavoriteFiles.favorites
reloading plugin FileDiffs.file_diffs
reloading plugin IndentXml.indentxml
reloading plugin PlainTasks.APlainTasksCommon
reloading plugin PlainTasks.PlainTasks
reloading plugin PlainTasks.PlainTasksDates
reloading plugin PlainTasks.PlainTasksToHTML
reloading plugin PlainTasks.plist_parser
plugins loaded

May be you have idea about which plugin can influence on autocomplete.

aeperfilev avatar May 04 '17 13:05 aeperfilev

In console execute sublime.log_commands(True) then try in some PT doc:

c, tab output in console must be

command: insert_best_completion {"default": "\t", "exact": false}

ctrl+space

command: replace_completion_with_auto_complete

enter, enter, ctrl+space

command: auto_complete

vovkkk avatar May 04 '17 17:05 vovkkk

@vovkkk

Console output is:

command: plain_tasks_new
command: insert_best_completion {"default": "\t", "exact": false}
command: auto_complete
command: insert {"characters": "\n"}
command: insert {"characters": "\n"}
command: auto_complete

But still not work.

aeperfilev avatar May 05 '17 10:05 aeperfilev

I cannot find Tag package on Package Control, where you got it?

Please, show output of execution in console

import sublime_plugin, pprint; pprint.pprint(sublime_plugin.all_callbacks.get('on_query_completions'))

vovkkk avatar May 05 '17 10:05 vovkkk

@vovkkk,

>>> import sublime_plugin, pprint; pprint.pprint(sublime_plugin.all_callbacks.get('on_query_completions'))
[<CSS.css_completions.CSSCompletions object at 0x0000000003DF4198>,
 <HTML.html_completions.HtmlTagCompletions object at 0x0000000003DF74A8>,
 <HTML5.html_completions.HtmlTagCompletions object at 0x00000000039FAA20>,
 <LESS.less_completions.LESSCompletions object at 0x0000000004117F28>,
 <Anaconda.listeners.completion.AnacondaCompletionEventListener object at 0x00000000044C0160>,
 <Cucumber.GherkinAutoComplete.GherkinAutoComplete object at 0x0000000004AC2C50>]

aeperfilev avatar May 05 '17 11:05 aeperfilev

@vovkkk

It was Cucumber package conflict.

I disabled this plugin and all work fine now.

aeperfilev avatar May 05 '17 11:05 aeperfilev

I know it's an old topic, but in my case the package that caused the completion to break was Typescript​Completion. Replacing it with TypeScript solved my issue!

MormonJesus69420 avatar Oct 16 '19 07:10 MormonJesus69420

Thanks for these exchanges. I had a similar problem and it was the Citer package that was in conflict. Removing it solved my problem.

davdent avatar Dec 06 '19 15:12 davdent