Author Topic: indentation for class and function  (Read 2703 times)

Offline atulshanbhag

  • Single posting newcomer
  • *
  • Posts: 2
indentation for class and function
« on: August 01, 2015, 08:44:31 am »
Is there any way to indent function and classes like this ->

data-type function() {
    ....
    ....
    ....
}


Instead of
data-type function()
{
    ....
    ....
    ....
}


It doesn't make an empty line to type in code when I use newline after opening brace

Offline marcelinux

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: indentation for class and function
« Reply #1 on: August 01, 2015, 02:46:52 pm »
I just need learn a little bit more. Thank you for your help.

Offline atulshanbhag

  • Single posting newcomer
  • *
  • Posts: 2
Re: indentation for class and function
« Reply #2 on: August 01, 2015, 09:13:30 pm »
That indents all right but not while actually coding. When i create say 'void function() { ' and press enter i get a '}' but on immediate next line where i cannot type. this does not happen for if/else and while/for

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: indentation for class and function
« Reply #3 on: August 02, 2015, 10:40:38 am »
So you want to type { and cb to output the } on the next line?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: indentation for class and function
« Reply #4 on: August 03, 2015, 11:19:21 pm »
Have you looked at the abbreviations plugin? You can create your own to do that and more. (settings->editor->abbreviations)