{"action":"created","issue":{"url":"https://api.github.com/repos/maralla/completor.vim/issues/88","repository_url":"https://api.github.com/repos/maralla/completor.vim","labels_url":"https://api.github.com/repos/maralla/completor.vim/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/maralla/completor.vim/issues/88/comments","events_url":"https://api.github.com/repos/maralla/completor.vim/issues/88/events","html_url":"https://github.com/maralla/completor.vim/issues/88","id":218208756,"number":88,"title":"Toggling completor On/Off","user":{"login":"chew-z","id":2264679,"avatar_url":"https://avatars3.githubusercontent.com/u/2264679?v=3","gravatar_id":"","url":"https://api.github.com/users/chew-z","html_url":"https://github.com/chew-z","followers_url":"https://api.github.com/users/chew-z/followers","following_url":"https://api.github.com/users/chew-z/following{/other_user}","gists_url":"https://api.github.com/users/chew-z/gists{/gist_id}","starred_url":"https://api.github.com/users/chew-z/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chew-z/subscriptions","organizations_url":"https://api.github.com/users/chew-z/orgs","repos_url":"https://api.github.com/users/chew-z/repos","events_url":"https://api.github.com/users/chew-z/events{/privacy}","received_events_url":"https://api.github.com/users/chew-z/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-30T14:05:38Z","updated_at":"2017-03-31T00:53:05Z","closed_at":null,"body":"What is the proper way to toggle this plugin On/Off completely? I have been trying to get through your code but couldn't grasp it.\r\n\r\nMy use case is that I find autocompletion distracting 90% of the time and super useful 10% of the time. I am using completor only for Python with Jedi and don't need file or buffer completion.\r\n\r\nNow for some reason completor  doesn't seem to work when I set autocomplete on Tab as per README - which would be a solution. It works on Tab with buffers but with Jedi only when I have auto trigger set to 1.\r\n\r\n`let g:completor_auto_trigger = 1`\r\n\r\nConstant autocompletion is an overkill for me. I have been trying to move this option to ftplugin/python.vim but that has obvious side-effects of re-enabling completor in other buffers as well.\r\n\r\nSo I have created small function using completor#disable() and completor#enable()\r\n\r\n```\r\nlet g:completor_toggle = 1\r\nfunction! ToggleAutocomplete()\r\n    if g:completor_toggle == 1\r\n        let g:completor_toggle = 0\r\n        call completor#disable()\r\n    else\r\n        let g:completor_auto_toggle = 1\r\n        call completor#enable()\r\n    endif\r\nendfunction\r\n```\r\n\r\nit seems to work but completor automagically re-enables itself after few keystrokes. I do not understand why and how. "},"comment":{"url":"https://api.github.com/repos/maralla/completor.vim/issues/comments/290585880","html_url":"https://github.com/maralla/completor.vim/issues/88#issuecomment-290585880","issue_url":"https://api.github.com/repos/maralla/completor.vim/issues/88","id":290585880,"user":{"login":"chew-z","id":2264679,"avatar_url":"https://avatars3.githubusercontent.com/u/2264679?v=3","gravatar_id":"","url":"https://api.github.com/users/chew-z","html_url":"https://github.com/chew-z","followers_url":"https://api.github.com/users/chew-z/followers","following_url":"https://api.github.com/users/chew-z/following{/other_user}","gists_url":"https://api.github.com/users/chew-z/gists{/gist_id}","starred_url":"https://api.github.com/users/chew-z/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chew-z/subscriptions","organizations_url":"https://api.github.com/users/chew-z/orgs","repos_url":"https://api.github.com/users/chew-z/repos","events_url":"https://api.github.com/users/chew-z/events{/privacy}","received_events_url":"https://api.github.com/users/chew-z/received_events","type":"User","site_admin":false},"created_at":"2017-03-31T00:53:05Z","updated_at":"2017-03-31T00:53:05Z","body":"I have made it work as I like it with SuperTab without even remapping <Tab> . It took me some time reading through small print in SuperTab docs. \r\n\r\nThe trick is in setting buffer option in ftplugin/python.vim\r\n\r\n`let b:SuperTabContextDefaultCompletionType = '<C-x><C-u>'`\r\n\r\nwhich makes SuperTab trying to call completition with Completor in Python.\r\n\r\nFor the posterity my .vimrc [all SuperTab options are default.]\r\n\r\n```\r\nlet g:completor_auto_trigger = 0\r\n\" Supertab\r\nlet g:SuperTabDefaultCompletionType = \"<C-p>\"\r\nlet g:SuperTabDefaultCompletionType = 'context'\r\nlet g:SuperTabContextTextOmniPrecedence = ['&completefunc', '&omnifunc']\r\nlet g:SuperTabMappingForward = \"<Tab>\"\r\nlet g:SuperTabCrMapping = 1\r\n```\r\n\r\nMy question - how to toggle Completor On/Off still remains relevant I think but less urgent."}}
{"actor":{"display_login":"chew-z"}}