Closed stefan-w closed 2 years ago
Or maybe even group filetypes in different groups, that would be even cooler.
I'm iffy on this. I'll think about it some more, but I'm not sold yet.
It would be nice being able to disable this completely, or define it in a map: e.g. use "html", "js", "css", "php" and "smarty" filetypes in "smarty" buffers (Smarty is a PHP template language).
Custom groups would be good, example, ruby: [".rb", ".erb"]
Any news on this issue? Especially with web development there are a lot of different filetypes involved (html, scss/sass/css, ...) and it would be very useful to get completion across them.
I think this should not be implemented in YCM, but rather in the vim core. It namely doesn't only affect completion, but also syntax highlighting, indentation, formatting etcetera. The best solution would be one that is provided by vim itself.
I also have this problem autocompleting in commit messages with fugitive.
Anyway, as a workaround, you can always fall back on prefix-based completion. To use vim's standard prefix-based completers C-N
and C-P
, simply do a C-X
first: so, C-X C-N
and C-X C-P
.
No idea if this is the right place to mention it, but I implemented a completer for LaTeX that completes \cite{} and \ref{} commands. https://github.com/bjoernd/vim-ycm-tex
@bjoernd
Sorry. My fault.
@szw Can you please provide your fix for this in a separate branch / pull request?
Hi @blueyed!
Well, that wasn't tought out as a pull request at all. As I remember my intention was to propose a temporary workaround for that issue. Of course, I could try to come back to this (6 months!), but I rather doubt that @Valloric likes that proposal ;).
Notice also, that being inpired by YCM I have created my own Ruby-based solution and henceforth I don't follow YCM. Therefore, it's quite possible my workaround won't work with the current codebase of YCM.
i'd also love to have this feature. e.g. while writing docs, it would be awesome to have identifiers from source code available.
hope to have this feature. i work with .py and .sh a lot, wish to have ycm work with different filetypes
Happy YouCompleteMe user here. I installed it years ago and never touched it again because it just works great. Except for identifier completion across latex and bibtex. It's not a big deal, but still +1 for this feature request.
This issue is nearly 10 years old now and it's highly likely that tit will be implemented.
For the identifier-based engine, the identifiers are put into per-filetype groups. This is annoying when dealing with projects that cover multiple filetypes, e.g. bibtex and latex (typing reference identifiers is a pain with ycm, much easier with plain vim). I guess for example CSS/HTML would benefit from this too. So, an option to disable the grouping would be nice.