forked from qt-creator/qt-creator
fakevim: add IsKeyword configuration option
This commit is contained in:
@@ -204,6 +204,11 @@ FakeVimSettings *theFakeVimSettings()
|
|||||||
item->setSettingsKey(group, _("Backspace"));
|
item->setSettingsKey(group, _("Backspace"));
|
||||||
instance->insertItem(ConfigBackspace, item, _("backspace"), _("bs"));
|
instance->insertItem(ConfigBackspace, item, _("backspace"), _("bs"));
|
||||||
|
|
||||||
|
item = new SavedAction(instance);
|
||||||
|
item->setDefaultValue(_("@,48-57,_,192-255"));
|
||||||
|
item->setSettingsKey(group, _("IsKeyword"));
|
||||||
|
instance->insertItem(ConfigIsKeyword, item, _("iskeyword"), _("isk"));
|
||||||
|
|
||||||
item = new SavedAction(instance);
|
item = new SavedAction(instance);
|
||||||
item->setText(QCoreApplication::translate("FakeVim::Internal",
|
item->setText(QCoreApplication::translate("FakeVim::Internal",
|
||||||
"FakeVim properties..."));
|
"FakeVim properties..."));
|
||||||
|
|||||||
@@ -60,6 +60,9 @@ enum FakeVimSettingsCode
|
|||||||
// stop once at the start of insert.
|
// stop once at the start of insert.
|
||||||
ConfigBackspace,
|
ConfigBackspace,
|
||||||
|
|
||||||
|
// @,48-57,_,192-255
|
||||||
|
ConfigIsKeyword,
|
||||||
|
|
||||||
// other actions
|
// other actions
|
||||||
SettingsDialog,
|
SettingsDialog,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -687,11 +687,11 @@ FakeVimHandler::Private::Mappings FakeVimHandler::Private::m_mappings;
|
|||||||
|
|
||||||
FakeVimHandler::Private::Private(FakeVimHandler *parent, QWidget *widget)
|
FakeVimHandler::Private::Private(FakeVimHandler *parent, QWidget *widget)
|
||||||
{
|
{
|
||||||
//static PythonHighlighterRules pythonRules;
|
static PythonHighlighterRules pythonRules;
|
||||||
q = parent;
|
q = parent;
|
||||||
m_textedit = qobject_cast<QTextEdit *>(widget);
|
m_textedit = qobject_cast<QTextEdit *>(widget);
|
||||||
m_plaintextedit = qobject_cast<QPlainTextEdit *>(widget);
|
m_plaintextedit = qobject_cast<QPlainTextEdit *>(widget);
|
||||||
//new Highlighter(EDITOR(document()), &pythonRules);
|
new Highlighter(EDITOR(document()), &pythonRules);
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -163,6 +163,16 @@
|
|||||||
<widget class="QLineEdit" name="lineEditBackspace"/>
|
<widget class="QLineEdit" name="lineEditBackspace"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="labelIsKeyword">
|
||||||
|
<property name="text">
|
||||||
|
<string>Keyword characters:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="1" colspan="2">
|
||||||
|
<widget class="QLineEdit" name="lineEditIsKeyword"/>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0">
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@@ -178,7 +188,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0" colspan="3">
|
<item row="11" column="0" colspan="3">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButtonCopyTextEditorSettings">
|
<widget class="QPushButton" name="pushButtonCopyTextEditorSettings">
|
||||||
|
|||||||
@@ -176,6 +176,8 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
|
|||||||
m_ui.spinBoxTabStop);
|
m_ui.spinBoxTabStop);
|
||||||
m_group.insert(theFakeVimSetting(ConfigBackspace),
|
m_group.insert(theFakeVimSetting(ConfigBackspace),
|
||||||
m_ui.lineEditBackspace);
|
m_ui.lineEditBackspace);
|
||||||
|
m_group.insert(theFakeVimSetting(ConfigIsKeyword),
|
||||||
|
m_ui.lineEditIsKeyword);
|
||||||
|
|
||||||
m_group.insert(theFakeVimSetting(ConfigAutoIndent),
|
m_group.insert(theFakeVimSetting(ConfigAutoIndent),
|
||||||
m_ui.checkBoxAutoIndent);
|
m_ui.checkBoxAutoIndent);
|
||||||
|
|||||||
Reference in New Issue
Block a user