I am a newbie to programming in C but not in Matlab.
One of the features I miss is the ability to automatically
indent the code en-masse. I select all the code, press
the keyboard shortcut and the indentation is complete.
It gives three different choices of indentaiton (as stated
from the Matlab help file);
No indent - No lines are indented. Use this is you want
lines to be aligned on the left or want to insert line
indents manually.Block indent - Indents a line the same amount as the
line above it.
*Smart indent - Automatically indents lines that start
with keyword functions or that follow certain keyword
functions.
Currently I have to maually enter spaces or tabs to what
I think looks legible.
Could you implement this feature into the next release?
Logged In: NO
you can indent an entired selected block with ctrl+shift+i
and ctrl+shift+u
to do these yourself easily...
no indent: select text, press ctrl+shift+u a few times, it
will move everything to the left
block indent: do no indent so they are all on the same left
margin, then press ctrl+shift+i a few times to make it move
right.
i can't think of an easy way to do smart indent. that does
not bother me because i do not like these anyways. however,
it's a legitmate request because most editors support it.
Logged In: NO
Thanks for the advice. I have tried what you suggested but
still find it awkward to use. It's better than manually inserting
spaces and tabs etc, but would still prefer a better way of
doing this.