void cbStyledTextCtrl::OnKeyDown(wxKeyEvent& event)
{
switch (event.GetKeyCode())
{
case WXK_TAB:
{
if (m_tabSmartJump && !(event.ControlDown() || event.ShiftDown() || event.AltDown()))
{
if (!AutoCompActive() && m_bracePosition != wxSCI_INVALID_POSITION)
{
m_lastPosition = GetCurrentPos();
GotoPos(m_bracePosition);
// Need judge if it's the final brace
HighlightRightBrace();
if (!m_tabSmartJump && CallTipActive())
CallTipCancel();
return;
}
}
}
break;
case WXK_BACK:
{
if (m_tabSmartJump)
{
if (!(event.ControlDown() || event.ShiftDown() || event.AltDown()))
{
const int pos = GetCurrentPos();
const int index = s_leftBrace.Find((wxChar)GetCharAt(pos - 1));
if (index != wxNOT_FOUND && (wxChar)GetCharAt(pos) == s_rightBrace.GetChar(index))
{
CharRight();
DeleteBack();
}
}
else if (m_lastPosition != wxSCI_INVALID_POSITION && event.ControlDown())
{
GotoPos(m_lastPosition);
m_lastPosition = wxSCI_INVALID_POSITION;
return;
}
}
}
break;
case WXK_RETURN:
case WXK_ESCAPE:
{
if (m_tabSmartJump)
m_tabSmartJump = false;
}
break;
}
event.Skip();
}
... And an advanced version, showing a dialog to enter a value.This sounds like an additional feature that would be quite useful. Would you suggest I try to add this dialog to the core application, or as a plugin?
For example I want to be able to wrap strings in wxT("...."), _("...."),
so if I type in the dialog wxT, or _ the plugin will wrap it automatically.
You can have a look at the file "sdk\cbstyledtextctrl.cpp"Yes, I think this is exactly what I was looking for.
...
Here, the "tab smart jump" was implemented, that is mostly the same place you can implement your feature. Right?
Most people will expect that if they have a text selected and press a key such as {, then the selection will be erased and replaced with a single character. That's how it works in pretty much every editor, anywhere.I know that I would find it most efficient to have this bound to the actual key, however others (I assume) would prefer it as a shortcut, or not at all. It is in my plan to have some sort of setting to choose between these - and I will do some reading on vi and emacs to find out what their key combination(s) is (are).
vi probably has a key for such a thing, and if vi doesn't, then emacs probably does (they have a keys for every crap, just I can't remember any of them). Might be worthwile to look there, and use that combination, so it's "somewhat standards compliant".
There's a lot of code here that might help you intercept/insert keys and characters.Thanks, I will take a look at that.
KeyMacs
http://forums.codeblocks.org/index.php/topic,9980.msg70445.html#msg70445
This sounds like an additional feature that would be quite useful. Would you suggest I try to add this dialog to the core application, or as a plugin?Your priority should be this:
OK; I probably will not work on this until I have completed the original modification though.This sounds like an additional feature that would be quite useful. Would you suggest I try to add this dialog to the core application, or as a plugin?Your priority should be this:
0. script <--biggest priority here
1. plugin
2. core
Alt + Bracket_Type sounds like another good option; I will try it as well.
It also allows you to comment/uncomment by selecting something and typing either / or *.This is pretty annoying feature. 50% of the time it was deleting my selection.
But "full configurability" should be a part of every feature not just this one.This is definitely the wrong philosophy. Features should just work. Because it makes life easier.
But that's my point exactly - just because you think it is annoying or it indeed annoys you - fair enough - everyone has their own preferences, and likings, and here is the crux - everyone's preferences should be respected - not just yours. Because it is not annoying to me and I really like it. So what I'm saying is that everyone, you, me and other users should be able to set this feature the way suits them best. So it also means that you should be able to disable this if it does annoy you. It wouldn't be fair on you to not allow you to disable this, right? So why do you think it's fair on others not to be able to enable this? It's two way street. And that's good.
The strive should be for non-annoying implementations of the features, like the manual commenting/uncommenting in C::B.
And I don't like to have to setup my C::B for 30 minutes every time I install new OS.
Most of the things I do is disable this, this, this and this.
Index: src/sdk/cbstyledtextctrl.cpp
===================================================================
--- src/sdk/cbstyledtextctrl.cpp (revision 7568)
+++ src/sdk/cbstyledtextctrl.cpp (working copy)
@@ -123,6 +123,148 @@
void cbStyledTextCtrl::OnKeyDown(wxKeyEvent& event)
{
+ wxString selectedText = GetSelectedText();
+ if (selectedText != wxEmptyString && !(event.AltDown() || event.ControlDown()))
+ {
+ switch (event.GetKeyCode())
+ {
+ case _T('\''): // ' "
+ {
+ BeginUndoAction();
+ DeleteBack();
+ if (event.ShiftDown())
+ {
+ InsertText(GetCurrentPos(), wxT("\"") + selectedText + wxT("\""));
+ }
+ else
+ {
+ InsertText(GetCurrentPos(), wxT("'") + selectedText + wxT("'"));
+ }
+ SetEmptySelection(GetCurrentPos() + selectedText.Length() + 2);
+ EndUndoAction();
+ return;
+ }
+#ifdef __WXMSW__
+ case _T('9'): // ( for wxMSW
+ {
+ if (!event.ShiftDown())
+ {
+ break;
+ }
+ }
+#else
+ case _T('('): // ( for wxGTK
+#endif
+ {
+ BeginUndoAction();
+ DeleteBack();
+ InsertText(GetCurrentPos(), wxT("(") + selectedText + wxT(")"));
+ EndUndoAction();
+ return;
+ }
+#ifdef __WXMSW__
+ case _T('0'): // ) for wxMSW
+ {
+ if (!event.ShiftDown())
+ {
+ break;
+ }
+ }
+#else
+ case _T(')'): // ) for wxGTK
+#endif
+ {
+ BeginUndoAction();
+ DeleteBack();
+ InsertText(GetCurrentPos(), wxT("(") + selectedText + wxT(")"));
+ SetEmptySelection(GetCurrentPos() + selectedText.Length() + 2);
+ EndUndoAction();
+ return;
+ }
+ case _T(','): // <
+ {
+ if (!event.ShiftDown())
+ {
+ break;
+ }
+ BeginUndoAction();
+ DeleteBack();
+ InsertText(GetCurrentPos(), wxT("<") + selectedText + wxT(">"));
+ EndUndoAction();
+ return;
+ }
+ case _T('.'): // >
+ {
+ if (!event.ShiftDown())
+ {
+ break;
+ }
+ BeginUndoAction();
+ DeleteBack();
+ InsertText(GetCurrentPos(), wxT("<") + selectedText + wxT(">"));
+ SetEmptySelection(GetCurrentPos() + selectedText.Length() + 2);
+ EndUndoAction();
+ return;
+ }
+ case _T('['): // [ {
+ {
+ BeginUndoAction();
+ if (event.ShiftDown())
+ {
+ int startLine = LineFromPosition(GetSelectionStart());
+ int endLine = LineFromPosition(GetSelectionEnd());
+ if(startLine == endLine)
+ {
+ Home();
+ }
+ Tab();
+ SetEmptySelection(GetLineEndPosition(endLine));
+ NewLine();
+ BackTab();
+ InsertText(GetCurrentPos(), wxT("}"));
+ SetEmptySelection(GetLineEndPosition(startLine - 1));
+ NewLine();
+ InsertText(GetCurrentPos(), wxT("{"));
+ }
+ else
+ {
+ DeleteBack();
+ InsertText(GetCurrentPos(), wxT("[") + selectedText + wxT("]"));
+ }
+ EndUndoAction();
+ return;
+ }
+ case _T(']'): // ] }
+ {
+ BeginUndoAction();
+ if (event.ShiftDown())
+ {
+ int startLine = LineFromPosition(GetSelectionStart());
+ int endLine = LineFromPosition(GetSelectionEnd());
+ if(startLine == endLine)
+ {
+ Home();
+ }
+ Tab();
+ SetEmptySelection(GetLineEndPosition(startLine - 1));
+ NewLine();
+ InsertText(GetCurrentPos(), wxT("{"));
+ SetEmptySelection(GetLineEndPosition(endLine + 1));
+ NewLine();
+ BackTab();
+ InsertText(GetCurrentPos(), wxT("}"));
+ }
+ else
+ {
+ DeleteBack();
+ InsertText(GetCurrentPos(), wxT("[") + selectedText + wxT("]"));
+ SetEmptySelection(GetCurrentPos() + selectedText.Length() + 2);
+ }
+ EndUndoAction();
+ return;
+ }
+ }
+ }
switch (event.GetKeyCode())
{
case WXK_TAB:
Index: src/sdk/cbeditor.cpp
===================================================================
--- src/sdk/cbeditor.cpp (revision 7582)
+++ src/sdk/cbeditor.cpp (working copy)
@@ -3022,6 +3022,134 @@
static int autoUnIndentValue = -1;
static int autoUnIndentLine = -1;
+ if (!control->GetLastSelectedText().IsEmpty())
+ {
+ wxString selectedText = control->GetLastSelectedText();
+ switch (ch)
+ {
+ case _T('\''):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ selectedText.Replace(wxT("\\'"), wxT("'"));
+ selectedText.Replace(wxT("'"), wxT("\\'"));
+ control->InsertText(pos - 1, wxT("'") + selectedText + wxT("'"));
+ control->SetEmptySelection(pos + selectedText.Length() + 1);
+ control->EndUndoAction();
+ return;
+ }
+ case _T('"'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ selectedText.Replace(wxT("\\\""), wxT("\""));
+ selectedText.Replace(wxT("\""), wxT("\\\""));
+ control->InsertText(pos - 1, wxT("\"") + selectedText + wxT("\""));
+ control->SetCurrentPos(pos + selectedText.Length() + 1);
+ control->EndUndoAction();
+ return;
+ }
+ case _T('('):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, wxT("(") + selectedText + wxT(")"));
+ control->EndUndoAction();
+ return;
+ }
+ case _T(')'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, wxT("(") + selectedText + wxT(")"));
+ control->SetEmptySelection(pos + selectedText.Length() + 1);
+ control->EndUndoAction();
+ return;
+ }
+ case _T('['):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, wxT("[") + selectedText + wxT("]"));
+ control->EndUndoAction();
+ return;
+ }
+ case _T(']'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, wxT("[") + selectedText + wxT("]"));
+ control->SetEmptySelection(pos + selectedText.Length() + 1);
+ control->EndUndoAction();
+ return;
+ }
+ case _T('<'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, wxT("<") + selectedText + wxT(">"));
+ control->EndUndoAction();
+ return;
+ }
+ case _T('>'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, wxT("<") + selectedText + wxT(">"));
+ control->SetEmptySelection(pos + selectedText.Length() + 1);
+ control->EndUndoAction();
+ return;
+ }
+ case _T('{'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, selectedText);
+ control->SetSelectionVoid(pos - 1, pos + selectedText.Length() - 1);
+ int startLine = control->LineFromPosition(control->GetSelectionStart());
+ int endLine = control->LineFromPosition(control->GetSelectionEnd());
+ if(startLine == endLine)
+ {
+ control->Home();
+ }
+ control->Tab();
+ control->SetEmptySelection(control->GetLineEndPosition(endLine));
+ control->NewLine();
+ control->BackTab();
+ control->InsertText(control->GetCurrentPos(), wxT("}"));
+ control->SetEmptySelection(control->GetLineEndPosition(startLine - 1));
+ control->NewLine();
+ control->InsertText(control->GetCurrentPos(), wxT("{"));
+ control->EndUndoAction();
+ return;
+ }
+ case _T('}'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, selectedText);
+ control->SetSelectionVoid(pos - 1, pos + selectedText.Length() - 1);
+ int startLine = control->LineFromPosition(control->GetSelectionStart());
+ int endLine = control->LineFromPosition(control->GetSelectionEnd());
+ if(startLine == endLine)
+ {
+ control->Home();
+ }
+ control->Tab();
+ control->SetEmptySelection(control->GetLineEndPosition(startLine - 1));
+ control->NewLine();
+ control->InsertText(control->GetCurrentPos(), wxT("{"));
+ control->SetEmptySelection(control->GetLineEndPosition(endLine + 1));
+ control->NewLine();
+ control->BackTab();
+ control->InsertText(control->GetCurrentPos(), wxT("}"));
+ control->CharRight();
+ control->EndUndoAction();
+ return;
+ }
+ }
+ }
+
// indent
if (ch == _T('\n'))
{
Index: src/sdk/cbstyledtextctrl.cpp
===================================================================
--- src/sdk/cbstyledtextctrl.cpp (revision 7582)
+++ src/sdk/cbstyledtextctrl.cpp (working copy)
@@ -123,6 +123,8 @@
void cbStyledTextCtrl::OnKeyDown(wxKeyEvent& event)
{
+ m_lastSelectedText = GetSelectedText();
+
switch (event.GetKeyCode())
{
case WXK_TAB:
Index: src/include/cbstyledtextctrl.h
===================================================================
--- src/include/cbstyledtextctrl.h (revision 7582)
+++ src/include/cbstyledtextctrl.h (working copy)
@@ -22,6 +22,7 @@
cbStyledTextCtrl(wxWindow* pParent, int id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
virtual ~cbStyledTextCtrl();
wxDateTime GetLastFocusTime() const {return m_lastFocusTime;}
+ wxString GetLastSelectedText() const {return m_lastSelectedText;}
void EnableTabSmartJump(bool enable = true);
bool IsCharacter(int style);
@@ -52,6 +53,7 @@
int m_bracePosition;
int m_lastPosition;
bool m_tabSmartJump;
+ wxString m_lastSelectedText;
static std::map<int, std::set<int> > CharacterLexerStyles, StringLexerStyles, PreprocessorLexerStyles, CommentLexerStyles;
Index: src/sdk/editorconfigurationdlg.cpp
===================================================================
--- src/sdk/editorconfigurationdlg.cpp (revision 7582)
+++ src/sdk/editorconfigurationdlg.cpp (working copy)
@@ -20,7 +20,7 @@
#include <wx/stattext.h>
#include <wx/textdlg.h>
#include <wx/xrc/xmlres.h>
-
+
#include "manager.h"
#include "configmanager.h"
#include "pluginmanager.h"
@@ -118,6 +118,7 @@
XRCCTRL(*this, "chkUseChangebar", wxCheckBox)->SetValue(m_EnableChangebar);
XRCCTRL(*this, "chkShowIndentGuides", wxCheckBox)->SetValue(cfg->ReadBool(_T("/show_indent_guides"), false));
XRCCTRL(*this, "chkBraceSmartIndent", wxCheckBox)->SetValue(cfg->ReadBool(_T("/brace_smart_indent"), true));
+ XRCCTRL(*this, "chkSelectionBraceCompletion", wxCheckBox)->SetValue(cfg->ReadBool(_T("/selection_brace_completion"), false));
XRCCTRL(*this, "chkTabIndents", wxCheckBox)->SetValue(cfg->ReadBool(_T("/tab_indents"), true));
XRCCTRL(*this, "chkBackspaceUnindents", wxCheckBox)->SetValue(cfg->ReadBool(_T("/backspace_unindents"), true));
XRCCTRL(*this, "chkWordWrap", wxCheckBox)->SetValue(cfg->ReadBool(_T("/word_wrap"), false));
@@ -795,6 +796,7 @@
cfg->Write(_T("/use_tab"), XRCCTRL(*this, "chkUseTab", wxCheckBox)->GetValue());
cfg->Write(_T("/show_indent_guides"), XRCCTRL(*this, "chkShowIndentGuides", wxCheckBox)->GetValue());
cfg->Write(_T("/brace_smart_indent"), XRCCTRL(*this, "chkBraceSmartIndent", wxCheckBox)->GetValue());
+ cfg->Write(_T("/selection_brace_completion"), XRCCTRL(*this, "chkSelectionBraceCompletion", wxCheckBox)->GetValue());
cfg->Write(_T("/tab_indents"), XRCCTRL(*this, "chkTabIndents", wxCheckBox)->GetValue());
cfg->Write(_T("/backspace_unindents"), XRCCTRL(*this, "chkBackspaceUnindents", wxCheckBox)->GetValue());
cfg->Write(_T("/word_wrap"), XRCCTRL(*this, "chkWordWrap", wxCheckBox)->GetValue());
Index: src/sdk/cbeditor.cpp
===================================================================
--- src/sdk/cbeditor.cpp (revision 7582)
+++ src/sdk/cbeditor.cpp (working copy)
@@ -2897,7 +2897,7 @@
wxTreeItemId sel = Manager::Get()->GetProjectManager()->GetTreeSelection();
if (sel.IsOk())
tree->SelectItem(sel, false);
-
+
const wxTreeItemId &itemId = m_pProjectFile->GetTreeItemId();
if (itemId.IsOk())
{
@@ -3022,6 +3022,104 @@
static int autoUnIndentValue = -1;
static int autoUnIndentLine = -1;
+ bool SelectionBraceCompletion = Manager::Get()->GetConfigManager(_T("editor"))->ReadBool(_T("/selection_brace_completion"), false);
+ if (SelectionBraceCompletion && !control->GetLastSelectedText().IsEmpty())
+ {
+ wxString selectedText = control->GetLastSelectedText();
+ switch (ch)
+ {
+ case _T('\''):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ selectedText.Replace(wxT("\\'"), wxT("'"));
+ selectedText.Replace(wxT("'"), wxT("\\'"));
+ control->InsertText(pos - 1, wxT("'") + selectedText + wxT("'"));
+ control->SetEmptySelection(pos + selectedText.Length() + 1);
+ control->EndUndoAction();
+ return;
+ }
+ case _T('"'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ selectedText.Replace(wxT("\\\""), wxT("\""));
+ selectedText.Replace(wxT("\""), wxT("\\\""));
+ control->InsertText(pos - 1, wxT("\"") + selectedText + wxT("\""));
+ control->SetCurrentPos(pos + selectedText.Length() + 1);
+ control->EndUndoAction();
+ return;
+ }
+ case _T('('):
+ case _T(')'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, wxT("(") + selectedText + wxT(")"));
+ if(ch == _T(')'))
+ {
+ control->SetEmptySelection(pos + selectedText.Length() + 1);
+ }
+ control->EndUndoAction();
+ return;
+ }
+ case _T('['):
+ case _T(']'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, wxT("[") + selectedText + wxT("]"));
+ if(ch == _T(']'))
+ {
+ control->SetEmptySelection(pos + selectedText.Length() + 1);
+ }
+ control->EndUndoAction();
+ return;
+ }
+ case _T('<'):
+ case _T('>'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, wxT("<") + selectedText + wxT(">"));
+ if(ch == _T('>'))
+ {
+ control->SetEmptySelection(pos + selectedText.Length() + 1);
+ }
+ control->EndUndoAction();
+ return;
+ }
+ case _T('{'):
+ case _T('}'):
+ {
+ control->BeginUndoAction();
+ control->DeleteBack();
+ control->InsertText(pos - 1, selectedText);
+ control->SetSelectionVoid(pos - 1, pos + selectedText.Length() - 1);
+ int startLine = control->LineFromPosition(control->GetSelectionStart());
+ int endLine = control->LineFromPosition(control->GetSelectionEnd());
+ if(startLine == endLine)
+ {
+ control->Home();
+ }
+ control->Tab();
+ control->SetEmptySelection(control->GetLineEndPosition(endLine));
+ control->NewLine();
+ control->BackTab();
+ control->InsertText(control->GetCurrentPos(), wxT("}"));
+ control->SetEmptySelection(control->GetLineEndPosition(startLine - 1));
+ control->NewLine();
+ control->InsertText(control->GetCurrentPos(), wxT("{"));
+ if(ch == _T('}'))
+ {
+ control->SetEmptySelection(control->GetLineEndPosition(endLine + 2));
+ }
+ control->EndUndoAction();
+ return;
+ }
+ }
+ }
+
// indent
if (ch == _T('\n'))
{
Index: src/sdk/cbstyledtextctrl.cpp
===================================================================
--- src/sdk/cbstyledtextctrl.cpp (revision 7582)
+++ src/sdk/cbstyledtextctrl.cpp (working copy)
@@ -123,6 +123,8 @@
void cbStyledTextCtrl::OnKeyDown(wxKeyEvent& event)
{
+ m_lastSelectedText = GetSelectedText();
+
switch (event.GetKeyCode())
{
case WXK_TAB:
Index: src/sdk/resources/editor_configuration.xrc
===================================================================
--- src/sdk/resources/editor_configuration.xrc (revision 7582)
+++ src/sdk/resources/editor_configuration.xrc (working copy)
@@ -154,7 +154,7 @@
</object>
<object class="sizeritem">
<object class="wxStaticBoxSizer">
- <label>End-of-line options</label>
+ <label>Highlight occurrences</label>
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxFlexGridSizer">
@@ -162,64 +162,54 @@
<vgap>4</vgap>
<hgap>4</hgap>
<object class="sizeritem">
- <object class="wxCheckBox" name="chkShowEOL">
- <label>Show end-of-line chars</label>
+ <object class="wxCheckBox" name="chkHighlightOccurrences">
+ <label>Highlight occurrences</label>
+ <checked>1</checked>
</object>
<flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
</object>
<object class="sizeritem">
- <object class="wxCheckBox" name="chkStripTrailings">
- <label>Strip trailing blanks</label>
+ <object class="wxCheckBox" name="chkHighlightOccurrencesCaseSensitive">
+ <label>Case sensitive</label>
<checked>1</checked>
</object>
- <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxLEFT|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>10</border>
</object>
<object class="sizeritem">
- <object class="wxCheckBox" name="chkEnsureFinalEOL">
- <label>End files with blank line</label>
+ <object class="wxCheckBox" name="chkHighlightOccurrencesWholeWord">
+ <label>Whole words only</label>
+ <checked>1</checked>
</object>
- <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxLEFT|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>10</border>
</object>
<object class="sizeritem">
- <object class="wxCheckBox" name="chkEnsureConsistentEOL">
- <label>Ensure consistent EOLs</label>
- </object>
- <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
- </object>
- <object class="sizeritem">
<object class="wxBoxSizer">
<object class="sizeritem">
- <object class="wxStaticText" name="ID_STATICTEXT2">
- <label>End-of-line mode:</label>
+ <object class="wxStaticText" name="stHighlightColour">
+ <label>Highlight colour</label>
</object>
- <flag>wxTOP|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
- <border>4</border>
+ <flag>wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL</flag>
+ <border>5</border>
</object>
<object class="sizeritem">
- <object class="wxComboBox" name="cmbEOLMode">
- <content>
- <item>CR LF</item>
- <item>CR</item>
- <item>LF</item>
- </content>
- <style>wxCB_READONLY</style>
+ <object class="wxButton" name="btnHighlightColour">
+ <label>...</label>
+ <bg>#FF0000</bg>
</object>
- <flag>wxLEFT|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
- <border>16</border>
- <option>1</option>
+ <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
</object>
</object>
- <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
- <option>1</option>
+ <flag>wxLEFT|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>10</border>
</object>
</object>
<flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
<border>4</border>
- <option>1</option>
</object>
</object>
<flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
- <border>4</border>
<option>1</option>
</object>
<object class="sizeritem">
@@ -260,17 +250,23 @@
<flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
</object>
<object class="sizeritem">
- <object class="wxCheckBox" name="chkShowIndentGuides">
- <label>Show indentation guides</label>
+ <object class="wxCheckBox" name="chkBraceSmartIndent">
+ <label>Brace Smart Indent</label>
</object>
<flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
</object>
<object class="sizeritem">
- <object class="wxCheckBox" name="chkBraceSmartIndent">
- <label>Brace Smart Indent</label>
+ <object class="wxCheckBox" name="chkSelectionBraceCompletion">
+ <label>Selection brace completion</label>
</object>
<flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
</object>
+ <object class="sizeritem">
+ <object class="wxCheckBox" name="chkShowIndentGuides">
+ <label>Show indentation guides</label>
+ </object>
+ <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
+ </object>
</object>
<flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
<border>4</border>
@@ -281,7 +277,7 @@
</object>
<object class="sizeritem">
<object class="wxStaticBoxSizer">
- <label>Highlight occurrences</label>
+ <label>End-of-line options</label>
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxFlexGridSizer">
@@ -289,54 +285,64 @@
<vgap>4</vgap>
<hgap>4</hgap>
<object class="sizeritem">
- <object class="wxCheckBox" name="chkHighlightOccurrences">
- <label>Highlight occurrences</label>
- <checked>1</checked>
+ <object class="wxCheckBox" name="chkShowEOL">
+ <label>Show end-of-line chars</label>
</object>
<flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
</object>
<object class="sizeritem">
- <object class="wxCheckBox" name="chkHighlightOccurrencesCaseSensitive">
- <label>Case sensitive</label>
+ <object class="wxCheckBox" name="chkStripTrailings">
+ <label>Strip trailing blanks</label>
<checked>1</checked>
</object>
- <flag>wxLEFT|wxALIGN_LEFT|wxALIGN_TOP</flag>
- <border>10</border>
+ <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
</object>
<object class="sizeritem">
- <object class="wxCheckBox" name="chkHighlightOccurrencesWholeWord">
- <label>Whole words only</label>
- <checked>1</checked>
+ <object class="wxCheckBox" name="chkEnsureFinalEOL">
+ <label>End files with blank line</label>
</object>
- <flag>wxLEFT|wxALIGN_LEFT|wxALIGN_TOP</flag>
- <border>10</border>
+ <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
</object>
<object class="sizeritem">
+ <object class="wxCheckBox" name="chkEnsureConsistentEOL">
+ <label>Ensure consistent EOLs</label>
+ </object>
+ <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
+ </object>
+ <object class="sizeritem">
<object class="wxBoxSizer">
<object class="sizeritem">
- <object class="wxStaticText" name="stHighlightColour">
- <label>Highlight colour</label>
+ <object class="wxStaticText" name="ID_STATICTEXT2">
+ <label>End-of-line mode:</label>
</object>
- <flag>wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL</flag>
- <border>5</border>
+ <flag>wxTOP|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>4</border>
</object>
<object class="sizeritem">
- <object class="wxButton" name="btnHighlightColour">
- <label>...</label>
- <bg>#FF0000</bg>
+ <object class="wxComboBox" name="cmbEOLMode">
+ <content>
+ <item>CR LF</item>
+ <item>CR</item>
+ <item>LF</item>
+ </content>
+ <style>wxCB_READONLY</style>
</object>
- <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxLEFT|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>16</border>
+ <option>1</option>
</object>
</object>
- <flag>wxLEFT|wxALIGN_LEFT|wxALIGN_TOP</flag>
- <border>10</border>
+ <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <option>1</option>
</object>
</object>
<flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
<border>4</border>
+ <option>1</option>
</object>
</object>
<flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>4</border>
<option>1</option>
</object>
</object>
Out of curiosity, has anyone had the chance to try this?Its on my ToDo list, but I'm afraid I didn't find the time yet...
Its on my ToDo list, but I'm afraid I didn't find the time yet...OK, that is fine.