[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indenting text bugs.
From: |
Defacta |
Subject: |
Re: Indenting text bugs. |
Date: |
Tue, 04 May 2010 15:41:22 -0000 |
User-agent: |
G2/1.0 |
On 3 mar, 17:32, Stefan Monnier <monn...@iro.umontreal.ca> wrote:
> >> Normally, `M-TAB' (hence `ESC TAB') will complete text
> >> (e.g. a function name) at point. It is bound by default to
> >> `complete-symbol', `lisp-complete-symbol', `completion-at-point', or
> >> something similar, depending on the current mode and your
> >> Emacs version.
> > Isn't that a very inconvenient default? Almost every window manager across
> > platforms intercept that to switch windows...
>
> Yes, that's a problem. Here's the way I see the situation:
> - Emacs used M-TAB for completion long before window managers ;-)
> - TAB is used for completion in the Emacs minibuffer as well as in many
> other applications, so it makes sense to bind in-buffer completion to
> a key similar to TAB.
> - In a buffer, TAB normally does indentation rather than completion.
> - S-TAB would not be a good default because it usually cannot be
> distinguished from TAB when run in a terminal(emulator) or in
> a console.
> - so we're currently stuck with M-TAB which can be used either as ESC
> TAB, or by distinguishing Meta from Alt, or by reconfiguring your
> window-manager to use another key.
>
> In Emacs-23.2, the default TAB command has been changed so that by
> setting tab-always-indent to `complete', you can have it do both
> indentation and completion (it first tries to re-indent and if the line
> was already properly indented, then it tries completion), but it's not
> a perfect solution: it's a bit too DWIM in some cases, it fails when
> tab-indentation cycles among various indentations (as is the case in
> haskell-mode), and it only works for those modes that use the new
> completion-at-point-functions functionality (very few do as of now).
>
> Stefan
Hello there,
Actually I have this problem really often and I have to find a
solution better than by closing a file and reopening it. I have
functions in my code with long names looking like this:
JS_dis_create_Account() so, I do need the completion to work, that's
so much useful...
I use ALT+tab to complete functions names, but after a while instead
of completing it writes "Indenting region...done", and if I go in
another buffer, and try ALT-tab it will complete my function name.
Maybe I should try to set another shortcut for completion. How do I
set for exemple CTRL-f for completion instead of having CTRL-f to go
to the next character.
Thanks,
Vincent.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Indenting text bugs.,
Defacta <=