Hi! I'm a new user to CodeLite and like the IDE so far. Switched over from Code::Blocks and I definitely found it worth the effort of converting all my projects.
I have one thing that I don't like so much and couldn't find an option for it. When I hit <enter> at the beginning of a line containing indentation, it removes the indentation. I can see why it makes sense, but it's just that I'm so used to editors not doing that. I would really like an option for this.
Some pictures to explain better. Starting situation:
After pressing enter, this is what CodeLite does:
After pretting enter, this is what I would like as an option:
Thanks!
-- Sandman
PS: I'm using v2.9.0.4684
Enter at beginning of line removes indentation
-
- CodeLite Curious
- Posts: 7
- Joined: Wed Apr 06, 2011 1:37 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Enter at beginning of line removes indentation
the fact that the 'int' in your sample is colored with black suggests that you are not using c++ lexer.
Did you try the above code on a file with a .cpp/c extension?
Anyways, this seems to work in trunk version of codelite.
Hopefully, sometime next week, I will find time to release new version of codelite
Eran
Did you try the above code on a file with a .cpp/c extension?
Anyways, this seems to work in trunk version of codelite.
Hopefully, sometime next week, I will find time to release new version of codelite
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 7
- Joined: Wed Apr 06, 2011 1:37 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Enter at beginning of line removes indentation
I noticed it using a .cpp file, I should have mentioned. The example is just a new unsaved file.
Good it's already working, looking forward to the new release. Thanks!
Good it's already working, looking forward to the new release. Thanks!
-- Sandman
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Enter at beginning of line removes indentation
Your unsaved file is *not* of type .cpp (which changes how codelite's handle the indentation) - If it were a .cpp file, the 'int' would have been colored in blue (unless you changed it, and in that case ignore what I wrote)Sandman wrote: The example is just a new unsaved file.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 7
- Joined: Wed Apr 06, 2011 1:37 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Enter at beginning of line removes indentation
I'm trying to say that I noticed it when editing a different file, namely a .cpp file. I made this unsaved file just for the example. The behaviour is the same.
-- Sandman
-
- CodeLite Enthusiast
- Posts: 32
- Joined: Tue Nov 11, 2008 12:06 am
- Contact:
Re: Enter at beginning of line removes indentation
I also saw this behavior, and the attached patch fixes it for me.
You do not have the required permissions to view the files attached to this post.
-
- CodeLite Curious
- Posts: 7
- Joined: Wed Apr 06, 2011 1:37 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Enter at beginning of line removes indentation
I just wanted to let you know that this is fixed for C++ files, but not for plain text files nor for Python files and maybe more. Using v4.1.5770.
Thanks,
Thanks,
-- Sandman
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Enter at beginning of line removes indentation
There are no rules for text files indentationSandman wrote:I just wanted to let you know that this is fixed for C++ files, but not for plain text files nor for Python files and maybe more. Using v4.1.5770.
Thanks,
About python etc: codelite does not support indentation for languages other than c++/c and PHP
Patches for other languages are welcomed
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 7
- Joined: Wed Apr 06, 2011 1:37 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Enter at beginning of line removes indentation
I don't want it to do any auto indenting things, I just want it to not change the indentation I have there. Look at the example: I would never expect it to remove the tab character there. If I am at the start of a line and I hit enter, I expect that line to move down and an empty line to be insert before it. I do not expect the line to be altered in any way.
Thanks,
Thanks,
-- Sandman