[Github-comments] [geany/geany] Auto-indent to opening delimiter (#1535)

Vasiliy Faronov notifications at xxxxx
Fri Jul 7 14:55:52 UTC 2017


In many languages, under many coding styles, given the following line:

```
some_var = some_function_name(long_argument_name, another_one,
```

the next line should begin at column 30 — right after the opening parenthesis:

```
some_var = some_function_name(long_argument_name, another_one,
                              more_stuff, even_more_stuff)
```

(same for brackets and braces).

At the very least, this is true for Python according to [PEP 8](https://www.python.org/dev/peps/pep-0008/).

Many popular editors (for example, Emacs and Sublime Text) do this indentation automatically, but Geany does not, leaving the user to insert a long string of spaces manually, which is quite a nuisance (also runs the risk of forgetting to press *Insert Alternative White Space* instead of just Tab).

It should not be too hard to do the right thing in [`get_indent_size_after_line`](https://github.com/geany/geany/blob/master/src/editor.c), at least for Python, which already has a dedicated `get_python_indent`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1535
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170707/4ed946b5/attachment.html>


More information about the Github-comments mailing list