Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: vladtarniceru on October 14, 2013, 05:27:37 pm

Title: C::B code-completion without press Ctrl-J
Post by: vladtarniceru on October 14, 2013, 05:27:37 pm
Hi there.

I already asked this question on stackoverflow but it seems that no one from there knew the answer, so I'm asking here.

Is it possible to make codeblocks to complete the code without pressing Ctrl-J ? For example, everytime I write ifb it should complete with

Code
if (|)
{

}

even if I don't press Ctrl-J after.

Thanks in advance!

PS: I'm using linux, ubuntu 12.10, even if I don't think it has any relevance.
Title: Re: C::B code-completion without press Ctrl-J
Post by: scarphin on October 14, 2013, 05:42:49 pm
I don't think that's possible because of reasons that someone might have a variable and/or function as 'ifbooted', 'forbilliontimes' etc... Might be odd but possible and that someone would then end up with unexpected code.
Title: Re: C::B code-completion without press Ctrl-J
Post by: vladtarniceru on October 14, 2013, 05:45:19 pm
I was already thinking at this and I changed ifb with _IF. Maybe I will find _IF in some other variable, but for now I'm coding only algorithms in C++ and I don't use any variable names starting with _.
Title: Re: C::B code-completion without press Ctrl-J
Post by: oBFusCATed on October 14, 2013, 06:10:49 pm
At the moment the abbreviations and code completion are two separate subsystems and they need to be merged in order to provide this feature.
Probably this could be possible in the future when we finish our CC API redesign.
Title: Re: C::B code-completion without press Ctrl-J
Post by: vladtarniceru on October 14, 2013, 06:13:05 pm
Okay, thank you very much for your answers!
Title: Re: C::B code-completion without press Ctrl-J
Post by: ouch on October 14, 2013, 08:22:00 pm
In the mean time you could always use Autohotkey or some other macro software to do this.