-
-
Notifications
You must be signed in to change notification settings - Fork 689
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve/simplify filetype handling for buffers (#745)
* Improve/simplify filetype handling for buffers There is no need to have a FileType autocmd anymore, which for some odd reason even had to be in "ftdetect"?! Now it will just use the `&filetype` property from buffers, instead of updating it on FileType events. This allows for easier lazy-loading of UltiSnips; without this patch it would not have updated the list of filetypes for the buffer after just being triggered (e.g. through NeoBundle's lazy-loading). I am using the following currently: NeoBundleLazy 'SirVer/ultisnips', { \ 'on_funcs': ['UltiSnips#ExpandSnippetOrJump']} inoremap <silent> <c-j> <C-R>=UltiSnips#ExpandSnippetOrJump()<cr> By manually defining the mapping for the trigger, I can invoke it and NeoBundle will trigger the loading of the plugin.
- Loading branch information
Showing
4 changed files
with
14 additions
and
44 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
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
8d77e89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blueyed From this commit, the integration with YouCompleteMe is broken, and the complete menu doesn't contains any snips. Could you re-review the code of this PR to resolve the issue of working together with YCM?
commit: dfde9b0

commit: 8d77e89

8d77e89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #748.
The PR for YCM is pending.
8d77e89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit cause following errors:
8d77e89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noscripter
The function has been removed, because it is not required anymore.
Are you defining the
autocmd
yourself, or is it defined from another plugin?8d77e89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I searched in all my
$HOME/.vim/bundle
and find nothing calledUltiSnips#FileTypeChanged
. Everything is fine after I reset from this commit.8d77e89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noscripter
What does
:verb au FileType *
say?