User forums > General (but related to Code::Blocks)

First thoughts on C::B

<< < (2/2)

TPJ:

--- Quote ---Make sure to check out a Nightly Build if you haven't already.
--- End quote ---

Well... The first thing I read about the Nightly Builds was "The nightly builds are for the moment created only for the windows platform (...)". Since I'm in 99.99% a GNU/Linux user, I'm not interested.

For now I've been working with the SVN version of C::B. The RC2 available on sourceforge is very outdated.


--- Quote ---The good thing about open source projects is that if you hate the translation, you can help making it better.
--- End quote ---

Perhaps I will help you with the Polish translation in the future. But the translation is not my priority. My priority is to get some IDE, that will suit my needs - even if it's in English. (Take a look at the further part of this post.)


--- Quote ---Yes, it is a C/C++ IDE above all else. It does support a few other languages, and it does allow you to edit a few other file formats. But it is still not a Python IDE.
--- End quote ---

Well, we'll see, what it is possible to achieve with plugins, then! :)


--- Quote ---Well, use Eclipse or Visual Studio then. You'll never complain again
--- End quote ---

:lol:

You're right. But there's also a different point of view. Try Geany - it's much faster, than C::B. :twisted:

I think, that the speed of C::B is the price of using the wxWidgets library. It's just slow.

@squizzz: Thanks for all your tips. It has helped. But the startup time is a small problem - all in all, the program is run only once a day (in my case, at least).


Now, let's get to some more constructive points. What I'd like to do with C::B:

1) Indentation

I'd like to make C::B behave like my gVim. Since it's a C/C++ IDE, I'll explain it on a C code snippets:


--- Code: ---int some_func( int some_arg )
{ // there
  return 0;
}
--- End code ---

When the cursor is "there", and user presses the enter key, the next line will be indented - and that's OK.

But consider the following code:


--- Code: ---for ( i=0; i<MAX; ++i ) // there
  some_action( i );
--- End code ---

When the cursor is "there", and user presses the enter key, the next line won't be indented - and, in my opinion, that's wrong. Why? Well... The simplest answer is: because I'm used to it - and I like it. But that's not all. Let's consider one more piece of C code:


--- Code: ---some_statement
another_statement;
--- End code ---

The error is obvious: there's no ; character after the first statement. And what does C::B behave like with such a code? It does nothing. If the next line had been indented, user would have known, that something's wrong... That's why the incompleted statements should cause indentation of the following lines (in my opinion).


But the truth is that I'm not interested in developing any C/C++ code (perhaps I'll have to, but that's another story). I'm interested in developing Python, Pyrex, Bash, Java and Oz code. None of these languages is supported by C::B. Yet...

When I found C::B yesterday, I was looking for some good IDE I could use. It should have been faster, than Eclipse or Eric3. It should have been written in C++ (I can code C++, but I won't do any high-level application development in pure C - I'm not a masochist ;) ). It should have been extensible - with some scripting language (the best possibility).

I think, that C::B might be what I was looking for. I just have to change it in order to meet my needs.

The question is: how can I change the way the indentation in C::B works? (I just hope it's a programming language-independent code...)


2) Auto-completion of some code patterns.

That's my request. I have noticed, that after writing the code:


--- Code: ---int some_func( int some_arg )
--- End code ---

I can press the Enter key, and nothing happens - the cursor just comes to the next line. In my opinion, it would have been better, if the following code had been inserted:


--- Code: ---int some_func( int some_arg ) // this has been written
{ // and this...
  _ (the cursor is here)
} // ...and this has been inserted by C::B
--- End code ---

Don't you think?

But it is only one example of some code patterns, that could have been automatically inserted in some situations. And I'm not thinking about C/C++ development only.


I suppose, that such a changes will require modifying the source code. Well, it would be great, if all these changes were possible to implement with some plugin, written in some scripting language (Python? :D)...


Anyway, so far I have added the lexer files for Bash scripting. I wanted to check, how difficult it is - and it was really, really easy.

But I have failed to add the support for code folding by modifying the Scintilla code. I would appreciate any tips on which files should I look for. The information in Wiki is not enough for me.

killerbot:

--- Quote from: TPJ on August 09, 2006, 04:24:34 pm ---
--- Code: ---for ( i=0; i<MAX; ++i ) // there
  some_action( i );
--- End code ---

--- End quote ---

a) bad code : always put braces, that's good practice ;-)  even if 1 line
b) try this when you start typing type forb and press ctrl-j  (or for and press ctrl-j)


--- Quote from: TPJ on August 09, 2006, 04:24:34 pm ---
--- Code: ---some_statement
another_statement;
--- End code ---

--- End quote ---

might be interesting, but more is needed

--- Code: ---     void my_function( int arg1,
                              int arg2)  //<------------ I want a nice steady indent here, no extra indent, or maybe I won't

--- End code ---
and others
case MYCASE:  //<- won't end in just nothing, and what if there are comments past it

So it's a bit more complex. But as said : could be interesting.

Navigation

[0] Message Index

[*] Previous page

Go to full version