Author Topic: newbie questions  (Read 5069 times)

Offline kateausten

  • Multiple posting newcomer
  • *
  • Posts: 19
newbie questions
« on: February 11, 2010, 03:09:29 pm »
hello,

It's the first time I'm using an IDE.
It seems cool.
I wondered if you could point me to a tutorial (preferably a video or a text with a decent amount of screenshots, so as to understand quicker) to get to know codeblocks quickly, without having to read the whole manual.
Also, I'm quite surprised that there is no auto completion. I thought it was one of the main advantages of IDEs. How to make it auto complete simple words such as #include{stdio.h} or printf ?
Finally, I played a little with it and noticed that there is auto indentation. That seems great. But how to get back to the same level as the last "}" as quickly as possible ? If I press the left arrow, it only goes back one blank instead of 4, so I have to press it 4 times. Any ohter quicker way ?
Similarly, is there or can I create a shortcut (such as ctrl+'{') that would write '{' and '}' and place the cursor in between ? (and, if '{' is at the beginning of a line, write '}' two lines beneath and place the cursor in between '{' and '}', with an auto indentation).
Same question for '[' and '('.

My questions have probably been answered a hundred of times, I'm sorry about that. I made a quick search but didn't find anything useful.

Thanks.

Offline Denro

  • Multiple posting newcomer
  • *
  • Posts: 28
  • Just dont ask me
    • search to find
Re: newbie questions
« Reply #1 on: February 11, 2010, 04:42:42 pm »
hello hewbie,
now we are two newbies :D

i figured out that there is a kind of auto completition ....
go to settings>editor>abbrevitations
there you can enter a new item with a short name... then you can edit the code of this item
if you press OK its safed, then you go to the editor and type the name of this item and press controll + J
it will insert your code .... at the place where the | (pipe) in the "template" will be your cursor in the editor ;)
you will see that there also are some predefinied abbrevitations... you can customize them as you like them

also i think that you maybe are interested in a newer build ... they call it somehow nightly builds... as i got it you have to install the MinGW compiler seperatly at maybe c:\minGW\ ... then you download the lastest nighly build which you can find in this forum or on the wiki page
you extract the codeblocks folder and replace your old codeblocks folder with it...
the only thing you will miss is the docs folder in the original codeblocks folder so back it up if you need it ... also back up your localization file if you use such a translation
replace the codeblocks folder with the new one and put localization and docs back
at the end there is also a dll with you have to download and replace you will find it in the nighly build update informations
see here, they did help me yesterday: http://forums.codeblocks.org/index.php/topic,12002.0.html

i think in the newer codeblocks the autocompletitions is maybe better
i did install it yesterday and since then yomehow every time i press " it makes "|" or when i press ( it makes (|) and so on ... i my self would like to turn this off ... but i think its exactly what your searching for ;)

i think the best tutorial you can get on all this is if you just click on everything and spend some time in it .... i am also sure that you will not disapointet ;)

Max 255; characters remaining: 221

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: newbie questions
« Reply #2 on: February 11, 2010, 05:54:56 pm »
i think in the newer codeblocks the autocompletitions is maybe better
i did install it yesterday and since then yomehow every time i press " it makes "|" or when i press ( it makes (|) and so on ... i my self would like to turn this off ... but i think its exactly what your searching for ;)

That feature is a 'brace/bracket autocomplete'  feature that was added a few months ago.   I've grown to love it personally.  The way it works is if you type an opening {, [, ( or quotation mark it will autoenter the closing mark after the cursor position.  If you are on a new line the closing mark will be placed on the next line to attempt to conform to your bracket style.

Code
if( blah ) { | }
Code
if( blah )
{
 |
}

I think what you're looking for the other question is in:
settings -> editor -> general settings -> tab options -> [check]Use tab character

If that is what you're referring to id suggest you also go through and set up the AStyle plugin to match your preferred indentation style.  That can be set up at:
settings -> editor -> source formatter
« Last Edit: February 11, 2010, 06:00:00 pm by Seronis »

Offline kateausten

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: newbie questions
« Reply #3 on: February 11, 2010, 10:20:18 pm »
Ok, I'll download the nightly build.
I've already removed codeblocks.
Now what do I have to do exactly to download gcc ? (please don't forward me to the codeblocks wiki, I've read the page but there's too much info there, I'm lost).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: newbie questions
« Reply #4 on: February 11, 2010, 10:24:05 pm »
Have you read this: http://forums.codeblocks.org/index.php/topic,3232.0.html ?

The easiest way to install gcc is to use the TDM package (this is the method I use on windows)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline kateausten

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: newbie questions
« Reply #5 on: February 12, 2010, 02:34:23 am »
yes now I have, but this wasn't a precise step by step with screenshots explaining how to install the night build with windows xp...

Offline Denro

  • Multiple posting newcomer
  • *
  • Posts: 28
  • Just dont ask me
    • search to find
Re: newbie questions
« Reply #6 on: February 13, 2010, 03:56:51 am »
just read here http://forums.codeblocks.org/index.php/topic,12002.msg81545.html#msg81545

you dont need screenshots just follow the three steps as described in the link above

i my self have no idea of all this nighly build and mingw and so on things ... but i did follow these 3 steps and it was no problem

to help you even more...
go to http://sourceforge.net/projects/tdm-gcc/files/TDM-MinGW%20Installer/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download
download this minGW (compiler)
run it with double click on it... install as recomented... i did try to install the older and it was not working but when i did select recomended instalation it did work
so open it, choose recomended installation, click next next next and at the end finish or close or what ever
now download this nightly build http://prdownload.berlios.de/codeblocks/CB_20100116_rev6088_win32.7z this should be the last one so the most updated one
its a 7z file you can open this with 7z unpacker
7z is similar to zip or rar or such things, if you dont have 7z get it here http://www.7-zip.org/download.html its free and good
so extract the codeblocks folder and replace your old codeblocks folder whith that
your old codeblocks folder should be at c:\programm files\codeblocks or where you have installed it
after replacing the old codeblocks with the new
you download wxWidgets here http://prdownload.berlios.de/codeblocks/wxmsw28u_gcc_cb_wx2810.7z
unpack it again with 7z and put it to your new codeblocks folder
and now you run codeblocks and you do a great application with it :D

for that you dont need screenshots its realy very simple!
download run select next next close, download ectract replace, download extract copy, run
Max 255; characters remaining: 221

Offline TerryP

  • Multiple posting newcomer
  • *
  • Posts: 26
    • My journal
Re: newbie questions
« Reply #7 on: February 13, 2010, 07:45:09 pm »
Also, I'm quite surprised that there is no auto completion. I thought it was one of the main advantages of IDEs.

The main advantage of an IDE, is incorporating your development tools inside one program with a shared interface. Normally the compiler, debugger, and an embedded editor; good IDEs should also mate with a profiler at a minimal.

Code completion is an editor feature, and is not related to an IDE in general; Vi IMproved can even be made to do code completion, yet it is not developed as an IDE.
Just Another Computer Geek