Thread: RE: [Dev-C++] How to configure auto-indent?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Mark S. <mar...@li...> - 2004-08-27 08:50:51
|
when all else fails use astyle http://astyle.sourceforge.net/ a code beautifier & set it up in tools (this is what I do 'cause I can't get the auto indenting to work how I want it either. regards mark -----Original Message----- From: Len Philpot [mailto:le...@ph...] Sent: 27 August 2004 06:09 To: dev...@li... Subject: [Dev-C++] How to configure auto-indent? I'm using Dev-C++ 4.9.9.0 (phenomenal product, by the way!) and have a question about the behavior of autoindent and how to adjust it. Maybe I'm just overlooking something, but... First off, I'm using spaces, not tabs (although, I'd /prefer/ tabs, more below [1]), a tab size of 4, no SmartTabs, Autoindent enabled, cursor past EOL/EOF both disabled, trim trailing spaces enabled. Let's say I have this : case WM_COMMAND: { Right after the {, I hit Enter and the cursor goes down one line and over 4 spaces, out in "virtual space". If I type a character, the leading space is filled with spaces, as expected. If I backspace, and then tab over to the column of the opening brace and type a character, it appears in colum one and I have to "tab it over" to the right column. Apparently, hitting Tab after an autoindent has taken place often doesn't insert anything into the file, tab or space. It just moves over in virtual space. Apparently there are two things at play here, maybe just something I don't understand, but - 1) tabs aren't (always) treated as whitespace and 2) the autoindent doesn't go where I'd /prefer/[2] it go. Is there any way to modify this? [1] I'd really rather use real tabs, with the value still at 4, but that causes the enhanced home key behavior to break, since apparently it doesn't see the tabs as whitespace over which to "cycle" (for lack of a better term). The cursor just sits on the first non-space character regardless of how many time you hit Home. What I'd like is fairly simple - 1. Hitting Tab just inserts n (4 in my case) spaces (or preferably a real tab character) from the current column, adjusted to line up as you'd expect, backfilling to start-of-line if the cursor wasn't at column 1 when the Tab key was hit. and... 2. Hitting Enter simply inserts a line and tabs the cursor over to the column of the first non-whitespace character on the line above. That's all... [2] I realize we all have preferences, which is why I'm looking for a way to customize this, rather than simply complain about it. :-) OR --- Is there way to use an external editor? I know, that kinda defeats the purpose of an IDE, but I thought I'd at least ask... Thanks! -- Len Philpot ><> le...@ph... http://philpot.org/ ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.737 / Virus Database: 491 - Release Date: 11/08/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.737 / Virus Database: 491 - Release Date: 11/08/2004 The information contained in this e-mail message (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an addressee, any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited. If you have received this communication in error, please contact us immediately so that we can correct the error. |
|
From: Len P. <le...@ph...> - 2004-09-09 23:10:59
|
> you need to click on tools, editor options, the general tab, > uncheck the auto tab and and set the tab size on the left center > area. It should a tab size of 4 at this time. I've already done this. The behavior still persists. I don't think it's anything specific to SynEdit (I /think/ DevCPP uses SynEdit, right?). I also use ConTEXT as well as a few other SynEdit-based editors and they don't behave this way. > > len trying going to tools, editor options and then look in the > general tab. There will be an auto indent that is checked. uncheck > the autoindent to solve your problem. I'll may end up just turning autoindent off, but that's a bit like curing dandruff by decapitation... :-) I /want/ auto indent, but I just want it to indent "properly" (according to my definition of properly). Thanks. -- Len Philpot ><> le...@ph... http://philpot.org/ |
|
From: Scott S. <age...@co...> - 2004-09-09 23:50:49
|
This is probably defeating the purpose too, but you could just use Emacs or some other decent text editor. -- --Scott Simontis-- Len Philpot wrote: >>you need to click on tools, editor options, the general tab, >>uncheck the auto tab and and set the tab size on the left center >>area. It should a tab size of 4 at this time. >> >> > >I've already done this. The behavior still persists. I don't think >it's anything specific to SynEdit (I /think/ DevCPP uses SynEdit, >right?). I also use ConTEXT as well as a few other SynEdit-based >editors and they don't behave this way. > > > > >>>len trying going to tools, editor options and then look in the >>> >>> >>general tab. There will be an auto indent that is checked. uncheck >>the autoindent to solve your problem. >> >> > >I'll may end up just turning autoindent off, but that's a bit like >curing dandruff by decapitation... :-) I /want/ auto indent, but I >just want it to indent "properly" (according to my definition of >properly). > >Thanks. > > > |