Finally found some minutes on it...
Firstly the CB contrib-plugin EditorConfig and the
EditorConfig project have nothing in common besides the name. The contrib-plugin shares its settings in the CB project file wheareas EditorConfig requires a third party plugin (called "
EditorConfig Code::Blocks" to make it even more confusing) and uses a file named ".editorconfig" for settings which many editors support (looks quite handy).
------
Concerning the issue of this thread, there was indeed a clash between project-wide settings of the contrib plugin and global settings if EOL mode was set globally to AUTO (see
post 4).
The fix is as easy as adding a new item to the combobox named "Use global settings"
This will store value 3 for eol_mode in the project.
We can do this because EditorConfig just ignores the new value on apply (to the active editor), which is exactly what we want because of the clash with global settings:
bool EditorConfig::ApplyEditorSettings(EditorBase* eb)
{
...
if (m_ECSettings[prj].eol_mode == wxSCI_EOL_CRLF)
control->SetEOLMode(wxSCI_EOL_CRLF);
else if (m_ECSettings[prj].eol_mode == wxSCI_EOL_CR)
control->SetEOLMode(wxSCI_EOL_CR);
else if (m_ECSettings[prj].eol_mode == wxSCI_EOL_LF)
control->SetEOLMode(wxSCI_EOL_LF);
...
}
Backward combatiblity (open newer projects with older CB) is given, the plugin will just fall back to mode CRLF in case of value 3 for eol.
------
I opened a
ticket but I'm not awfully interested of having this fixed in the main branch (not going to use CB very much though its a great IDE) but also didn't want to hold this back.
I doubt this is required but I include a tiny git patch, there is no use for me to set-up a inferior VCS (mmv) for this and the
diff-to-svn-patch script didn't work for me.