Блог пользователя diego_v1

Автор diego_v1, 12 лет назад, По-английски

I recently installed Linux with the latest version of Code::Blocks, and the way it auto formats and indents the code is HORRIBLE. I can't possibly code efficiently with an IDE like that. It worked perfectly under Windows, but its behaviour under Linux is disastrous. I tried tweaking all the options of the editor, and none of them fixes the issue.

The issue is like this...

Let's suppose I type if(k==0), press Enter, and then press the open brace key. Under Windows, it would auto format itself to this...

if(k==0)
{
    |
}

NOTE: character '|' marks the position of the cursor.

But under Linux, it auto formats into this useless thing...

if(k==0)
{|}

Which means I need to press Enter, then Up, then Right, then Enter, and finally Tab to format it correctly...

if(k==0)
{
    |
}

Basically, I have to press FIVE freaking keys after opening the braces to format the code correctly, whereas under Windows, I had to press NONE. And that's a lot of wasted time if you're in a contest.

If anyone knows how to correct Code::Blocks behaviour under Linux, please let me know. I'll greatly appreciate it.

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

»
12 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Looks like the Gnome of Downvoting is back to mischief...

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

i suggest u use Sublime Text editor instead of Code::Blocks. its formatting, indentation, and text auto-completion tools are very good, and it works very well on all (Windows, Linux, and Mac) platforms.
however, AFAIK it does not have options to compile/run ur code. but since u are working on Linux, u can always use the Terminal for this.

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Have you installed codeblocks-contrib package along with others? It's a contrib plugins package, and as far as I know, some indentation plugins are also put there.