aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/fakevim
Commit message (Collapse)AuthorAgeFilesLines
* FakeVim: Fix GUI text for "Smart indentation" settinghjk2021-11-241-1/+1
| | | | | | Change-Id: Ib347a36dd10a6474aae4da7285f4374593d372f6 Fixes: QTCREATORBUG-26607 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* EditorManager: Remove QString openEditor(At) overloadsEike Ziller2021-11-021-6/+7
| | | | | | | | In favor of the FilePath/Link ones. Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
* Use QtcProcess inside fake vim handlerJarek Kobus2021-10-291-12/+5
| | | | | Change-Id: I14af193bbf9e7fda9e5b0ba0a1647e19069c40e2 Reviewed-by: hjk <hjk@qt.io>
* Fix qHash-related size compatibility warnings by MSVCOrgad Shaneh2021-10-201-1/+1
| | | | | | Change-Id: I3b7981ce78b67db4b996f99682284a0b911d8cd7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* FakeVim: Use setEnabler for the vimrc path aspecthjk2021-10-151-11/+2
| | | | | | | | | This fixes the enabling/disabling of the line edit and triggers the (re-)read of the .vimrc at the right times. Change-Id: I13a022aafc23ea761d3c1c4d0359cc5f137695d5 Reviewed-by: Lukas Holecek <hluk@email.cz> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* FakeVim: Only drop full-line commentshjk2021-10-131-5/+4
| | | | | | | | | | | This is not what real vim does, but :help comments looks scary, we don't support more complex scripts anyway, and full-line comments at least allow some commenting. Fixes: QTCREATORBUG-26254 Change-Id: I9018d06d2a929fad6d3d301240928b6a8b109710 Reviewed-by: Lukas Holecek <hluk@email.cz> Reviewed-by: hjk <hjk@qt.io>
* Revert "FakeVim: Also record NoVisualMode as last visual mode"hjk2021-10-111-2/+2
| | | | | | | | | This reverts commit e5dd24322fedb28592f5a741b42877da8253465c which caused QTCREATORBUG-26214. Fixes: QTCREATORBUG-26214 Change-Id: I0d285b4df8fa428201fb6c48bbbad81f8195a941 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Editor: multi cursor supportDavid Schulz2021-09-271-6/+28
| | | | | | | | | | | | | Adding a way to create multiple cursors that can insert/remove text at arbitrary positions in the document. Adding cursors is done by pressing alt + up/down or by clicking into the editor while holding the alt key. Fixes: QTCREATORBUG-16013 Change-Id: I495d27d95a3d277220946616ef30efc241da0120 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: pass AssistInterface to createProcessorDavid Schulz2021-09-161-2/+2
| | | | | | | | | The interface can be used for checking the context of a codeassist request to determine the correct processor that has to be created. Change-Id: I47ddb05c46399566e27bae21711f11a3a4132c3f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge CppTools into CppEditorChristian Kandeler2021-09-014-8/+6
| | | | | | | | | | | | | | | | There was no proper separation of responsibilities between these plugins. In particular, CppTools had lots of editor-related functionality, so it's not clear why it was separated out in the first place. In fact, for a lot of code, it seemed quite arbitrary where it was put (just one example: switchHeaderSource() was in CppTools, wheras switchDeclarationDefinition() was in CppEditor). Merging the plugins will enable us to get rid of various convoluted pseudo-abstractions that were only introduced to keep up the artificial separation. Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* FakeVim: Update visual marks when mark settings have changedhjk2021-07-211-0/+5
| | | | | | | To test: ":set sm", "ma", "<Down>", ":set nosm" Change-Id: I75d2c3ded04ddf3bc656574a3cff136db144df2b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* FakeVim: Also record NoVisualMode as last visual modehjk2021-06-181-2/+2
| | | | | | Fixes: QTCREATORBUG-25822 Change-Id: I9a63726d357e3ea3d92b05a5d77cad5221c03f93 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: filepathify file renamingDavid Schulz2021-06-171-11/+11
| | | | | | Change-Id: I3d4f39e34e65cde3df7b7c19570e3a54d0625d53 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* FakeVim: Don't create two handlers for one editorhjk2021-06-111-0/+8
| | | | | | | | Amends 206e9f95fb1. Fixes: QTCREATORBUG-25770 Change-Id: I4028a7c8257ee3985fd2198e789d98b25901d92d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* FakeVim: Use new IOptionsPage convenience functionshjk2021-04-011-96/+74
| | | | | Change-Id: I739fe152a4f642a19c90be71bbe5adbc8747f402 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Tests: Fix compileChristian Stenger2021-03-191-0/+3
| | | | | | | Amends 0f6d04ce34e2d683. Change-Id: Iee83ad5244bf1fa1ba47735ffab2154933d30460 Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Set settings page to manual applyhjk2021-03-171-0/+2
| | | | | | | | | | | The default is badly chosen, but it's what it is for now. Tested best with the "Show line numbers relative to cursor" option, which should have immediate effect on "Apply" - and only then. Change-Id: I78864457b44032810b78fdef9e4a5ac4c287dd50 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Avoid intermediate widgets when using LayoutBuilderhjk2021-03-161-3/+5
| | | | | | | | | | | | In most cases, the layout constructed in the builder was set on a widget which in turn was put into a vbox in the actual widget. This is not necessary, but needs some re-ordering. Also make sure that using not-yet-parented widgets during layout construction does not cause visible artifacts. Change-Id: I75727a571da093d3131ea6fba467c2c646cdb6f1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/4.15'Eike Ziller2021-03-162-2/+6
|\ | | | | | | Change-Id: If0dbebdf37b0ffea2528bf6ce6d34d88554f8dfb
| * FakeVim: Fix compilation with Qt 6Eike Ziller2021-03-162-2/+6
| | | | | | | | | | | | | | | | By using recursive QHash instead of recursive QMap, which has issues compiling under some circumstances with MSVC. Change-Id: I545a5eb9002f247a5015e7ea5e59cf74895b1e21 Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.15'Eike Ziller2021-03-111-0/+1
|\| | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qtcreator_ide_branding.pri Change-Id: I009308451e1c6276692412f498125d79a8f12a07
| * CMake build: Disable FakeVim and building with PCH with Qt 6Eike Ziller2021-03-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | FakeVim does not compile on MSVC because Qt 6 doesn't like meta types that are recursive maps with keys that have a custom operator==. Building with PCH has different issues on macOS and MSVC. Change-Id: Id1b9580f7347f1c8facade67fd74532a023af41f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | FakeVim: Fix Windows buildLukas Holecek2021-03-031-1/+2
| | | | | | | | | | | | | | | | | | | | Standalone FakeVim library fails to build on Windows due to missing operator+ for "QString" and "const char *" arguments. This is problem even if using `QT_RESTRICTED_CAST_FROM_ASCII`. Change-Id: I0ec13d7dfa8ef99d98fa737456d12f16facc5427 Reviewed-by: hjk <hjk@qt.io>
* | FakeVim: Fix backspace optionLukas Holecek2021-03-031-1/+1
| | | | | | | | | | Change-Id: I908ea8db7da0711de24c87b484893e1bbe3ced93 Reviewed-by: hjk <hjk@qt.io>
* | FakeVim: Fix default options in standalone libraryLukas Holecek2021-03-031-0/+1
| | | | | | | | | | Change-Id: I49eb9a4b05f155c986e514edf30bf01bacf83d05 Reviewed-by: hjk <hjk@qt.io>
* | FakeVim: Aspectify settingshjk2021-03-038-814/+400
|/ | | | | Change-Id: Ic73edce82e192779ed3efe86a5cb747a52d94d36 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix some compiler warnings about unused variablesChristian Kandeler2021-02-251-1/+1
| | | | | Change-Id: I9a9450eab68f53b08722adb9a5d33c4f318b2129 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix dot command for pasting with 'P' being 'p'Tom Praschan2021-02-222-1/+3
| | | | | Change-Id: Ic491f3a198a03fd08a680e044c4e8f2f5ebe2866 Reviewed-by: hjk <hjk@qt.io>
* Fix buildLeander Schulten2021-02-181-1/+1
| | | | | Change-Id: If4593342cd92716fb2238d633e5b25135a02ce57 Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Add emulation for vim-surround pluginTom Praschan2021-02-177-21/+325
| | | | | Change-Id: If450d04dd89a1707ab05806522fbf4cc987d454b Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Add emulation for argtextobj.vim pluginTom Praschan2021-02-127-3/+124
| | | | | Change-Id: I319d2b9fe9f0d145c2560cf03fecc50629c99006 Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Fix compileChristian Stenger2021-02-111-0/+2
| | | | | | | Amends f83eeb0548e. Change-Id: Ia709c45800c63375de0ef995ee8bd37d54c45d26 Reviewed-by: hjk <hjk@qt.io>
* Compile fix - use Utils::optionalJarek Kobus2021-02-111-1/+1
| | | | | | | Amends f83eeb0548e2d57446bdf2a533ce75a9819a53aa Change-Id: Iad1ca06bf546405873aaf8daebbdb76b79f4c0ff Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Add emulation of vim-exchange pluginTom Praschan2021-02-107-1/+110
| | | | | Change-Id: I844c9bf11231ab842cee020a0e7a29af8ed209eb Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Merge comments when joining lines with 'J'Tom Praschan2021-02-094-0/+32
| | | | | | | This is the default behavior in vim as well Change-Id: Ia4d56e3cfc7f91fc353078daefaabeada9a86bed Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Add emulation for ReplaceWithRegister pluginTom Praschan2021-02-097-24/+135
| | | | | Change-Id: Iaaeef6ff51fe858b759c10adaac582f5858b6210 Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Fix Qt6 buildLeander Schulten2021-02-041-4/+5
| | | | | | | Amends f626e27370bbc24b1750658dc3d7fd89116242f9 Change-Id: Id4681dc771a132bc6143b7e1f0b566a3930706e2 Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Add emulation for vim-commentaryTom Praschan2021-02-037-49/+234
| | | | | Change-Id: I34f222182835ae160e6c4c66ad0bada79d8abeff Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Fix dot command for pastingTom Praschan2021-02-032-0/+11
| | | | | | | Fixes: QTCREATORBUG-25281 Change-Id: Ic36b87672889442520941bcefa0f5ee14b77fbc6 Reviewed-by: Lukas Holecek <hluk@email.cz> Reviewed-by: hjk <hjk@qt.io>
* add special characters \u \U \l \L to fakevim substitute commandTimon Riedelbauch2021-02-032-4/+76
| | | | | | | | | vim substitute (:s/) hast the option to use special characters \u \U \l \L in the replacement part to change the case of the following letters. This was not present in fakevim. Change-Id: I13785db24018283c242d94fd7892765657570176 Reviewed-by: hjk <hjk@qt.io>
* Core: Signal duplicated editorshjk2021-01-141-0/+8
| | | | | | | | | | | FakeVim needs some notification even in cases where the duplication is triggered outside the EditorManager as in QmlDesigner's qml-editor. Fixes: QTCREATORBUG-22344 Change-Id: Ia4950ff4b02d3f89779f03ff4c106a07ccff2106 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* cmake build: Fix handling of test dependenciesEike Ziller2020-12-181-5/+2
| | | | | | | | | | | | | | Test dependencies are not "real" code dependencies, they just declare that for testing the plugin the other plugin has to be loaded, even though it is _not_ a code dependency. Add PLUGIN_TEST_DEPENDS to add_qtc_plugin. We cannot assume that the target exists at that point, so adapt the usual pattern. Fixes: QTCREATORBUG-25024 Change-Id: I4165ff8df762309e0be0bfe9e8bedef796a3bf17 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* FakeVim: Change shortcuts from Alt-V,X to Alt-Y,Xhjk2020-11-102-5/+12
| | | | | | | | | | Alt-V is taken by the Views menu nowadays. Also, fix the instruction to quit FakeVim on Mac. Fixes: QTCREATORBUG-24694 Change-Id: I5268760f45e34f973b3b38b19d2577c0c655b000 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Avoid more uses of non-explicit QChar(int) constructorhjk2020-11-101-1/+1
| | | | | | | | Will be gone in Qt6. Task-number: QTCREATORBUG-24098 Change-Id: Id76b15bb11879b2e8ff0f71af45acbfb1720f763 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* FakeVim: Fix use of implicit QChar(int) constructorhjk2020-11-061-2/+1
| | | | | | Change-Id: I79a778a1e32dae8b2c1f7d49d4c4e655cf51b1fb Reviewed-by: Lukas Holecek <hluk@email.cz> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* FakeVim: Fix deleting selection on search command-lineLukas Holecek2020-11-021-0/+2
| | | | | Change-Id: Ie01dd84cf87db2d999c10352285c0ee8366aadc1 Reviewed-by: hjk <hjk@qt.io>
* Revert "Editor: Make line spacing adjustable"David Schulz2020-10-201-1/+1
| | | | | | | | | | | This does not work with text wrapping since there are multiple QTextLines inside a block but we can not adjust the line hight inside a block. This needs to be addressed inside Qt. This reverts commit dc64f3207bdf6c0d295859e47791cb8193e67f4e. Change-Id: If6c28056da9891eeeb75f5939a42f08360013a80 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* FakeVim: Allow AltGr as modifier to produce normal key valueshjk2020-10-081-3/+8
| | | | | | Task-number: QTCREATORBUG-24673 Change-Id: I6d1aa5badd3077f0885d5b2470527c006096809d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Start replacing SavedActions by QAction or Utils::Aspecthjk2020-10-051-1/+1
| | | | | | | | First mechanical step here is to derive SavedActions from BaseAspect instead of QAction. Change-Id: I2ec95883b825462c1d867f83cc2b3bd2c2732055 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Editor: Make line spacing adjustableDavid Schulz2020-10-011-1/+1
| | | | | | Fixes: QTCREATORBUG-13727 Change-Id: I3dbc3277795b339bced81dc6c5a048c828183cb6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>