From 17dcb6d38c44ee058abbb331d3415f5dc9913500 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 6 Jun 2013 15:15:33 +0200 Subject: [PATCH] FakeVim: Move .vimrc related options closer to each other Task-number: QTCREATORBUG-9406 Change-Id: I61333e3105e8d8edb03edecdfdac9d9f11dfc3b5 Reviewed-by: Eike Ziller --- src/plugins/fakevim/fakevimoptions.ui | 37 +++++++++++---------------- src/plugins/fakevim/fakevimplugin.cpp | 4 ++- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/src/plugins/fakevim/fakevimoptions.ui b/src/plugins/fakevim/fakevimoptions.ui index b19a21a5ff7..f1988ad3bd5 100644 --- a/src/plugins/fakevim/fakevimoptions.ui +++ b/src/plugins/fakevim/fakevimoptions.ui @@ -7,7 +7,7 @@ 0 0 580 - 479 + 474 @@ -137,13 +137,6 @@ - - - - Read .vimrc - - - @@ -248,9 +241,9 @@ - QFormLayout::AllNonFixedFieldsGrow + QFormLayout::ExpandingFieldsGrow - + Backspace: @@ -260,10 +253,10 @@ - + - + Keyword characters: @@ -273,26 +266,26 @@ - + - - + + - Location of .vimrc: - - - lineEditVimRcPath + Read .vimrc, from location: - - + + Keep empty to use the default path, i.e. %USERPROFILE%\_vimrc on Windows, ~/.vimrc otherwise. + + + @@ -379,12 +372,12 @@ checkBoxWrapScan checkBoxShowMarks checkBoxPassControlKey - checkBoxReadVimRc spinBoxShiftWidth spinBoxTabStop spinBoxScrollOff lineEditBackspace lineEditIsKeyword + checkBoxReadVimRc lineEditVimRcPath pushButtonVimRcPath pushButtonCopyTextEditorSettings diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 3d9c30356a8..852f447d0b9 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -270,6 +270,9 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent) { QWidget *w = new QWidget(parent); m_ui.setupUi(w); + m_ui.lineEditVimRcPath->setPlaceholderText( + Utils::HostOsInfo::isAnyUnixHost() ? tr("Default: $HOME/.vimrc") + : tr("Default: %USERPROFILE%\\_vimrc")); m_group.clear(); m_group.insert(theFakeVimSetting(ConfigUseFakeVim), @@ -417,7 +420,6 @@ void FakeVimOptionPage::openVimRc() void FakeVimOptionPage::updateVimRcWidgets() { bool enabled = m_ui.checkBoxReadVimRc->isChecked(); - m_ui.labelVimRcPath->setEnabled(enabled); m_ui.lineEditVimRcPath->setEnabled(enabled); m_ui.pushButtonVimRcPath->setEnabled(enabled); }