News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

How to invoke autocomplete 'keywords' (variables) on save?

Started by zkey, October 26, 2006, 12:37:04 PM

Previous topic - Next topic

zkey

Hi,

Is it possible to configure C::B to invoke autocomplete for all keywords (or a subset of them) contained within the file when that file is saved?
(I want to make C::B autocomplete e.g. the 'today' or 'now' keyword on save)

Thanks in advance :)

zkey

p.s. The keywords I mean are those defined in Settings > Editor > Abbreviations. Maybe it can be done a different way ..

Using: C::B Version 1.0 revision 3145 (2006-10-25 18:03:49) gcc 3.4.5 Windows/unicode

Pecan

http://forums.next.codeblocks.org/index.php?topic=4110.msg32396#msg32396

Here is a case where searching for anything with a $ in it will get you nowhere.
Searching for today or now will get you everything.

Anyway, maybe the above link will help

MortenMacFly

Enter the WiKi, type in "shortcuts" in the search field, press search and the first hit is this:
http://wiki.codeblocks.org/index.php?title=Keyboard_Shortcuts
Scroll down and see... you'll find CTRL+J.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

thomas

I think what he is asking for is something different... he wants those keywords to be magically replaced when a file is saved, every time. Much in the sense of what a source control system does when you update.

The only keyword substitution that is supported by Code::Blocks is the one described by Pecan and Morten, and it only works for the current word (thus, you cannot simply type 3 dozen keywords and hit Ctrl-J once, it doesn't work that way). This is deliberate, too, as it might otherwise terribly mess up your sources.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

zkey

I exactly ment what Thomas said. One solution I found in one of the links you posted is the ability to use svn-vars which are autoreplaced on commit, it's something that I will probably use. Anyway, thank you all :)

zkey