Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kwrite C++ Indentation
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
orangeman12
Apprentice
Apprentice


Joined: 19 Dec 2004
Posts: 283
Location: Chair

PostPosted: Sun Jun 11, 2006 7:32 pm    Post subject: kwrite C++ Indentation Reply with quote

I have been using kwrite as my c++ editor and when ever i use a : kwrite aglins the text all the way to the left even if i am doing some thing like this
Code:
 cout << "The value of a: " << a;


so
Code:

void printA ()
{
       cout << "The value of a: " << a;
}


becomes

Code:

void printA ()
{
cout << "The value of a: " << a;
}

_________________
Orangeman
Back to top
View user's profile Send private message
TemplarKnight
Guru
Guru


Joined: 14 Jun 2005
Posts: 311
Location: Greece/patras/

PostPosted: Sun Jun 11, 2006 10:53 pm    Post subject: Reply with quote

Just go:
tools->Indentation and select the C style. However i dont know how to keep it after kwrite exit :?
Back to top
View user's profile Send private message
bergo
n00b
n00b


Joined: 20 May 2006
Posts: 66
Location: Lodz, Poland

PostPosted: Sun Jun 11, 2006 11:55 pm    Post subject: Reply with quote

Personnaly I think that kate is much better to do such a things like writing source code - I know this from my experience.

And if You want to apply some coding style to your files consider using indent.

Regards,
B.
_________________
where do you want Gentoo today?

btw: feel free to correct my English.
Back to top
View user's profile Send private message
orangeman12
Apprentice
Apprentice


Joined: 19 Dec 2004
Posts: 283
Location: Chair

PostPosted: Tue Jun 13, 2006 9:41 pm    Post subject: Reply with quote

I am using the C style indentation which use the colon correctly if doing public: but applies that indentation inside quotes
_________________
Orangeman
Back to top
View user's profile Send private message
bergo
n00b
n00b


Joined: 20 May 2006
Posts: 66
Location: Lodz, Poland

PostPosted: Tue Jun 13, 2006 9:55 pm    Post subject: Reply with quote

Indent is a program that can apply various styles to your code: http://www.gnu.org/software/indent/

Regards,
B
_________________
where do you want Gentoo today?

btw: feel free to correct my English.
Back to top
View user's profile Send private message
Devrethman
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2005
Posts: 141
Location: Phoenix, AZ

PostPosted: Wed Jun 14, 2006 12:08 am    Post subject: Reply with quote

Just mess with different indentation styles. some of them have wierd quirks like that. I'd also use kate, in my experience it's a lot better, though I personally use emacs.
_________________
Signature is out for lunch. Feel free to talk to its empty desk.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum