Using Auto-indent efficiently

Tips and tricks to get the most out of using Editra

Using Auto-indent efficiently

Postby cody » Sun Jun 03, 2007 2:41 am

Auto-indentation is a useful feature but can sometime be an annoyance when you want to add an unindented line or want the new line to be indented at a different level. Here are some small hints to get the most out of the Auto-indentation.

    1) If you want to add a new line that is unindented use Ctrl+L to insert a new line instead of Return.

    2) If you already hit enter and want to backup to the beginning of the line Ctrl+Shift+Backspace will delete back to the beginning of the line.

    3) If you add a new line and want it to be one level of indentation less than the last one hit Shift+Tab after adding the new line to back the cursor up one level of indentation.

User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Using Auto-indent efficiently

Postby dremer » Thu Oct 21, 2010 4:58 pm

Hi Cody,

I was wondering where should I put my question, but here we go: I don't want the second curly brace to appear in in a different from the first one. For example,

when I type

{

and then type the closing brace in another line, it takes some space .. }

{

..... }

How can I solve this problem without hitting Shift+Tab every time?
dremer
User
 
Posts: 6
Joined: Tue Oct 19, 2010 4:39 am

Re: Using Auto-indent efficiently

Postby cody » Thu Oct 21, 2010 5:24 pm

dremer wrote:Hi Cody,

I was wondering where should I put my question, but here we go: I don't want the second curly brace to appear in in a different from the first one. For example,

when I type

{

and then type the closing brace in another line, it takes some space .. }

{

..... }

How can I solve this problem without hitting Shift+Tab every time?


I don' t know what programming language your referring to (C, CPP, Java, something else), but no special handling has been implemented for autocompletion features in those languages. An completer object would need to be implemented to provide the behavior of aligning a closing '}' to the right level after it was typed. Probably not very hard but just hasn't been done yet.


Cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to Usage Tips

Who is online

Users browsing this forum: No registered users and 1 guest

cron