User forums > Using Code::Blocks

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

(1/1)

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.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.

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.

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

Navigation

[0] Message Index

Go to full version