Closed ali-bahjati closed 10 years ago
Thank you for trying Diakonos.
Please provide some samples of expected indentation. Either in Markdown code blocks in a comment, or in a gist.
Here you go : ( this is almost all I need! :D ) https://gist.github.com/ali-bahjati/b44fe8d999d912560234
@ali-bahjati By the way, until I improve this, you can manually indent using Alt-I
and Alt-Shift-I
. This is what I use when the smart indentation doesn't do what I want.
@ali-bahjati Okay, I have made a number of fixes to indentation. Please try the latest master branch, including updates to the default diakonos.conf file. When I tried it, it indented everything just like in your sample file, except for one or two things. Please confirm.
Many thanks for what you've done! There are few things that are not fixed (as you mentioned!); First of all, when I type a closing brace (}), I should press tab for applying indentation! It'll be good when it become automated! The other thing is that following sample (picture) still doesn't work:
(but it is not really important)
Many Thanks...!
@ali-bahjati I have added a feature so that typing }
at the end of the line triggers indentation. Try it out (master branch). I will work on that other bug shown by your sample.
The reason this else
is not indented far left (0th column) is because it is the else
of the if
. If it were any other text, it would not be indented. This is starting to get into lexing and parsing, something I wanted to avoid in Diakonos for a while now. I think I will leave this as unimplemented, and just ask that you use Alt-I in these special cases.
It's now great! Thanks...
I really love diakonos! :D
But there is a problem annoying me , and that's C++ indentation in it, it's so bad
when I use "{" right after my if,for,function def, .... there's no indentation
and if I have a single "if" statement without "{}" next line should be indented (It could be a bit complicated by the way ) , see image below (from VIM) :
diakonos would be perfect with this!
Many thanks...!