#3783 Smarter autoindentation

minor bug

I have to work with different projects, some do indentation with soft tabs and others use hard tabs. The way autoindentation works now, if the file indentation char isn't the same as in my preferences i get a mix of soft and hard tabs everytime I add or edit a line.

Jedit does a good job by copying the indentation chars in the previous line but fails when adding whitespace based in preference settings. While I guess this is done to preserve existing mixes in soft and hard tabs to the best, I think that's not the most frequent case, normally projects uses one style or the other.

If Jedit got this working well by automatically guessing the indentation style it would be great, I wouldn't need to remind changing preferences when switching projects. If there was a way to select that preference based on directories (or even projects) then it would be a lot better because new files would get the right indentation without manual interaction.

Could this be implemented in Jedit or maybe there's something already available that I don't know about?


  • Bernat

    Bernat - 2013-03-13

    I just found EditorConfig, how did I don't find it before? Yikes.

    Anyway, it would be nice that JEdit did not mix tab and spaces but instead used whatever indentation style is being already used in the file. IMHO, using the last whitespace found in the previous line would be more correct most of the time.

  • Alan Ezust

    Alan Ezust - 2014-02-11
    • status: open --> closed-invalid
    • Group: --> minor bug
  • Alan Ezust

    Alan Ezust - 2014-02-11

    This particular ticket is confusing. I am not sure what you are requesting for. But in general, the WhiteSpace plugin does conversions to the buffer options of your tab preferences if you have a mixed situation. You can configure whitespace to do this on save.
    EditorConfig is how you configure different edit modes on a per-directory basis as you figured out. If you have issues with either plugin, please report a plugin bug or feature request.
    I am closing this ticket because it is not a specific bug in jEdit.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks