I think they don't... :) This is why there were several posts to the
users mailing list, for which the reply was to change to the mapping
of [Enter] to the alternate action.
But I think it goes beyond this. Since this behavior really seems to
be appropriate for various modes, and not appropriate for other modes,
I think this behavior should be mode-dependent, without requiring the
user to re-map the [Enter] key when switching from shell scripts to
xml.
And above all this, for users like me (I know I'm not the only one
with this habit) - this should be configurable globally, for all
modes.
Shlomy
On Mon, Jun 7, 2010 at 12:41 PM, Matthieu Casanova
<chocolat.mou@...> wrote:
> I don't know, but the two first actions already exists, how people
> know about them ?
>
> 2010/6/7 Shlomy Reinstein <sreinst1@...>:
>> Everybody would be happy if they knew about these actions and what to
>> do if they don't like the default. A check-box option, I think, is
>> much more user-visible. How would a user know about the actions?
>>
>> Shlomy
>>
>> On Sun, Jun 6, 2010 at 10:34 PM, Matthieu Casanova
>> <chocolat.mou@...> wrote:
>>> Hi,
>>> in fact an easier method would be to add a new action.
>>> We already have an action "Insert Newline" and "Insert Newline and
>>> Indent", adding an action that would indent before inserting the new
>>> line is easy and everybody would be happy isn't it ?
>>>
>>>
>>> 2010/6/6 Shlomy Reinstein <sreinst1@...>:
>>>> Hi Vampire,
>>>>
>>>> First, thanks for reverting your change. While the trunk is not
>>>> supposed to be stable, we should still try to keep it stable by fixing
>>>> problems caused by new commits as soon as possible. With the daily
>>>> builds, there may be many users of the latest trunk version.
>>>>
>>>> If your suggested fix is to avoid the re-indentation if the user
>>>> changed it manually, please note that this is NOT a sufficient fix for
>>>> me (and for other developers). I NEVER go to the next line before
>>>> ensuring that the indentation of the current line is correct. If the
>>>> initial auto-indent of the line is okay, I will not change it manually
>>>> before pressing [Enter], and I expect that it won't change when I
>>>> press [Enter]. Note that this has been my habit for years, and is not
>>>> specific to jEdit - I use this habit for all editors I use. The other
>>>> editors I use do not automatically re-indent when I press [Enter], and
>>>> I expect the same from jEdit.
>>>>
>>>> Hence, if you want to implement your suggest fix, please still make it
>>>> configurable. Preferably, this configuration should be a checkbox
>>>> ("Auto-indent on [Enter]") in Global Options -> Editing, but it can
>>>> also be configurable using a key binding where I can bind [Enter] to
>>>> another action which will insert a newline without re-indenting, or a
>>>> mode property that I can change by creating a local mode file.
>>>>
>>>> Thanks,
>>>> Shlomy
>>>>
>>>>
>>>> On Sat, Jun 5, 2010 at 1:32 AM, Vampire (jEdit) <Vampire0@...> wrote:
>>>>> As I said, I'm aware of exactly this "problem" and already suggested a fix
>>>>> for it. I thought Alan was implementing this in the meantime but obviously
>>>>> he wasn't. With the fix I suggested, this wouldn't happen.
>>>>>
>>>>>
>>>>> Matthieu Casanova schrieb:
>>>>>
>>>>> Hi,
>>>>> I see your problem, but it doesn't work in every languages.
>>>>> the difference with electric char is that it will indent the current
>>>>> line, and I can revert it quickly in the case it is not what I want
>>>>> since my caret is still on the line.
>>>>> If you indent the previous line you cannot cancel the unexpected
>>>>> indentation without moving the caret.
>>>>> In python type
>>>>> "if true:<return>print "hello"<return>print "not in if"<shift+tab>"
>>>>>
>>>>> you'll get
>>>>> if true:
>>>>> print "hello"
>>>>> print "not in if"
>>>>>
>>>>> then press return again you'll get
>>>>> if true:
>>>>> print "hello"
>>>>> print "not in if"
>>>>>
>>>>> your code is broken
>>>>>
>>>>> In html or xml you can indent what you want while coding, you will get
>>>>> no indentation at all in the end because all indentation will be
>>>>> cancelled by that feature
>>>>>
>>>>> Matthieu
>>>>>
>>>>> 2010/6/2 Vampire (jEdit) <Vampire0@...>:
>>>>>
>>>>>
>>>>> Hi there,
>>>>>
>>>>> in my opinion it was not a major change of funtionality but a minor
>>>>> improvement of functionality. In a lot of modes, you have cases like in
>>>>> shellscript control structures. If you type "if true;
>>>>> then<RETURN>a=1<RETURN>fi<RETURN>", without the change you get
>>>>>
>>>>> if true; then
>>>>> a=1
>>>>> fi
>>>>>
>>>>> if you then mark all and press C+i, you get the correct form
>>>>>
>>>>> if true; then
>>>>> a=1
>>>>> fi
>>>>>
>>>>> this is inconsistent behaviour, because both versions should be identical.
>>>>> One way to achieve this is to re-indent the current line before inserting
>>>>> the newline and calculating the indentation of the next line. Another way
>>>>> would be e. g. to add "i", "e" and "c" to the "electricKeys" property. Which
>>>>> in turn would cause a reindentation of the current line each time one of
>>>>> those keys is pressed which would even be more annoying and also a
>>>>> performance penalty.
>>>>>
>>>>> I think I see the problem you mean. You speak about manually modifying the
>>>>> indentation and then pressing <RETURN> re-indents the line and thus makes
>>>>> the manual indentation correction gone away. This is also true for any other
>>>>> electric key - which <RETURN> simply is in this context - and I already
>>>>> suggested a solution for this that just no-one did implement yet in this
>>>>> thread: http://old.nabble.com/Indentation-problems-in-Python-to26660260.html
>>>>> which should also work fine here.
>>>>>
>>>>> [quote]
>>>>> Additionally instead of disabling the colon as electric key in python, I
>>>>> suggest another way to deal with different coding habits, what do you think
>>>>> about this Alan, and also Nick or anyone else. The improvement idea that
>>>>> doesn't destroy the user experience with the input habit described above
>>>>> while allowing Nicks input habit without annoying him anymore is, that the
>>>>> electric keys are only effective for the line if the indentation was not
>>>>> changed manually, either by some indenting action like S+Tab, or by writing
>>>>> or deleting whitespaces in the "indentation area". What do you think guys?
>>>>> This way the electric key is non-effective as soon as the user adjusted the
>>>>> indentation level to his liking, but does still work if the user does the
>>>>> indentation correction after typing the line and jEdit was not able to
>>>>> determine the correct indentation level.
>>>>> [/quote]
>>>>>
>>>>> Regards
>>>>> Vampire
>>>>>
>>>>> Matthieu Casanova schrieb:
>>>>>
>>>>> Hello,
>>>>> I also think that it should not be a default option and cannot work
>>>>> for all edit modes.
>>>>> Some modes do not support auto indentation with jEdit and this feature
>>>>> breaks things (python, html, xml)
>>>>>
>>>>> Matthieu
>>>>>
>>>>> 2010/6/1 Shlomy Reinstein <sreinst1@...>:
>>>>>
>>>>>
>>>>> Hi <Vampire>,
>>>>>
>>>>> The log of version 17929 in SVN: Improve indentation settings of the
>>>>> shellscript edit mode and re-indent the current line before inserting
>>>>> a newline in insert-newline-indent action. (bug #3005463)
>>>>>
>>>>> Why was this done? Auto-indenting the current line is terribly
>>>>> annoying. This is a major change of functionality of jEdit. The
>>>>> indentation should take place for the next (new) line, not for the
>>>>> current line - am I wrong?
>>>>>
>>>>> Thanks,
>>>>> Shlomy
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>> --
>>>>> -----------------------------------------------
>>>>> jEdit Developers' List
>>>>> jEdit-devel@...
>>>>> https://lists.sourceforge.net/lists/listinfo/jedit-devel
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>>>>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>>>>> lucky parental unit. See the prize list and enter to win:
>>>>> http://p.sf.net/sfu/thinkgeek-promo
>>>>> --
>>>>> -----------------------------------------------
>>>>> jEdit Developers' List
>>>>> jEdit-devel@...
>>>>> https://lists.sourceforge.net/lists/listinfo/jedit-devel
>>>>>
>>>>>
>>>>
>>>
>>
>
|