[Qt-creator] Change keys for indent/unindent lines
Stephen Chu
stephen at ju-ju.com
Thu Mar 17 14:36:32 CET 2011
In article <4D81D242.9000307 at nokia.com>,
"Leandro T. C. Melo" <leandro.melo at nokia.com> wrote:
> This seems to be the default behavior in IDEs like Visual Studio,
> Eclipse, CodeBlocks, and NetBeans. However, I noticed a variation for
> the case in which the selection is only within a single line.
> Coincidentally, yesterday I merged into master a request (#252) that is
> related to that.
>
> Considering the tools mentioned above, whenever the selection contains
> multiple-lines the code is indented (just like Creator already does).
> For the one line selection, excepting for NetBeans, all others by
> default will replace the selected content with a tab, as you describe.
> But in Eclipse I found an interesting behavior: It will only indent the
> single line if the selection covers the entire line. Otherwise, it will
> replace it by a tab.
>
> Since yesterday, Creator handles the single line selection case just
> like Eclipse. I tried looking into other IDEs/editors to check for a
> "common" way of handling this... I hope the approach is satisfying, but
> if not, we can re-evaluate. But at first, I don't think that creating a
> option for that would be necessary.
Thanks. I am fine with the current behavior. Just wonder if the keys can
be customized. I just think using different keys other than tab make it
clear that I want to indent the code, not replacing the text with one
tab character.
Right now when I do want to replace the selection with a tab character,
I have to delete it than hit the tab key. Making it work with other key
combo will make it less ambiguous. It will also not require selection to
indent a line. See BBEdit on Mac for the example.
Thanks.
PS. I also notice shift-clicking doesn't extend the selection any more.
Filed a bug here: http://bugreports.qt.nokia.com/browse/QTCREATORBUG-4080
--
Stephen Chu
More information about the Qt-creator-old
mailing list