Sublime Forum

SublimeClang code completion and opening angle brackets

#1

I realize that the development of SublimeClang has been stopped quite some time ago. However, as it still works fairly nice in Sublime Text 2 and even 3 according to some of my colleagues, I gave it a try. After overcoming some initial issues I got it running, but I am still facing one problem with its general usability. I hope that some of the people here that are still using SublimeClang might be able to help me:

When writing C++ code, a menu with suggested code completions pops up - just as expected. Now, as soon as I press <, the first element in this list is selected and my written text up to this point is replaced by this suggestion minus the < which is now part of the first argument of the suggestion. This is often very obstructive when trying to write something that is templated and clang doesn’t know about it (e.g. write std::list without the proper header included; when pressing < it is replaced by the first suggestion if there is any). And even when clang knows about it, the result is not what I expect (e.g. again writing std::list, now with the proper header included, after pressing < the output now reads std::list<< >). So my question would be, is there any option to disable that < triggers the first suggestion to be used?

And a second smaller question: From the suggested code completions, it gather that all options are listed that include the typed characters in the right order, but not necessarily in a single run (e.g. when typing std::vec, I see completions for move_if_noexecpet_cond as it contains “ve” and “c” in the right order). Can this behaviour be disabled, too?

0 Likes