mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-17 16:31:45 +02:00
Compare commits
129 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
aa75245d79 | ||
![]() |
e8c97ba6bf | ||
![]() |
27bbae3ccd | ||
![]() |
305c03458a | ||
![]() |
8143114a86 | ||
![]() |
a39a56cd39 | ||
![]() |
c1c076830a | ||
![]() |
d3d63395b3 | ||
![]() |
5a9a53d235 | ||
![]() |
b7e37aeb20 | ||
![]() |
a86ef05d52 | ||
![]() |
1be2d9affc | ||
![]() |
43e9469546 | ||
![]() |
23bb0679dd | ||
![]() |
04c41414da | ||
![]() |
3490d83ce6 | ||
![]() |
13fc780287 | ||
![]() |
f0c234a5de | ||
![]() |
7f8050e645 | ||
![]() |
e8b27724c9 | ||
![]() |
327cd2c524 | ||
![]() |
1366e859be | ||
![]() |
17b779b494 | ||
![]() |
7e30b7c7a7 | ||
![]() |
b1b8c49c43 | ||
![]() |
876c35c212 | ||
![]() |
e758e3d457 | ||
![]() |
91e7bfce1d | ||
![]() |
2e6c53fb52 | ||
![]() |
510edeb9a6 | ||
![]() |
8566e7bf46 | ||
![]() |
7dfea2feb6 | ||
![]() |
fcb9de1930 | ||
![]() |
2c7a3b877c | ||
![]() |
e4ae7f8566 | ||
![]() |
94f8544dfa | ||
![]() |
0159155e1c | ||
![]() |
b45e32dd3f | ||
![]() |
f3d66b3356 | ||
![]() |
f21190cb24 | ||
![]() |
9554eb0990 | ||
![]() |
9c04525df8 | ||
![]() |
26555c6ad6 | ||
![]() |
d6ee29dc91 | ||
![]() |
e6dacd0b84 | ||
![]() |
acf75ad080 | ||
![]() |
92067b2577 | ||
![]() |
24f197ce99 | ||
![]() |
39cc7db50b | ||
![]() |
510a6d12a7 | ||
![]() |
cb8c1ea4b5 | ||
![]() |
3284102dde | ||
![]() |
4a5457ad49 | ||
![]() |
39ed9265d7 | ||
![]() |
2fc721f220 | ||
![]() |
28c658810f | ||
![]() |
2f2ecc252e | ||
![]() |
9f2613c56a | ||
![]() |
a58929d4fb | ||
![]() |
fa13be1e15 | ||
![]() |
7a4d900b06 | ||
![]() |
421ce832dd | ||
![]() |
987781f826 | ||
![]() |
d85a41ea98 | ||
![]() |
42f86a3f73 | ||
![]() |
0241b58777 | ||
![]() |
97a2c73efe | ||
![]() |
5f1e46ca82 | ||
![]() |
805779144e | ||
![]() |
c65e21708c | ||
![]() |
08e546b677 | ||
![]() |
11cf8454ad | ||
![]() |
c3494803dc | ||
![]() |
c84496b942 | ||
![]() |
c4eb8e5752 | ||
![]() |
7702d3a695 | ||
![]() |
fbff8ed2c0 | ||
![]() |
5b5b6188da | ||
![]() |
6a1707a7e6 | ||
![]() |
b625fd3df9 | ||
![]() |
ffaf2cc451 | ||
![]() |
dcc9b5a37e | ||
![]() |
1b4a51f770 | ||
![]() |
f8d2ee2dd7 | ||
![]() |
348d88d543 | ||
![]() |
38b859e555 | ||
![]() |
ca8026f612 | ||
![]() |
befcf4298f | ||
![]() |
2e0bbcc75d | ||
![]() |
2204fe6451 | ||
![]() |
12bc68bc02 | ||
![]() |
290370f744 | ||
![]() |
79acef46ce | ||
![]() |
0054eb5279 | ||
![]() |
e0eb919e51 | ||
![]() |
7c3d5a7946 | ||
![]() |
38cb20d1bd | ||
![]() |
505fcf5b31 | ||
![]() |
d744d45ccd | ||
![]() |
2e2e7a7df6 | ||
![]() |
db5ff05bb3 | ||
![]() |
566273fe83 | ||
![]() |
decb17e665 | ||
![]() |
46c27bbd10 | ||
![]() |
72f98cef14 | ||
![]() |
0f8cfa289d | ||
![]() |
0cb420c557 | ||
![]() |
79df0b0594 | ||
![]() |
dfbddb4050 | ||
![]() |
0f88495f29 | ||
![]() |
2b31ef3f16 | ||
![]() |
8fa6bc1b69 | ||
![]() |
f485b1eb50 | ||
![]() |
8515eac900 | ||
![]() |
d9e068f794 | ||
![]() |
ed5358a6d6 | ||
![]() |
7b6163c968 | ||
![]() |
c4927372ec | ||
![]() |
f3cd21009b | ||
![]() |
a71c75b53e | ||
![]() |
d95f67748c | ||
![]() |
e11bf264b5 | ||
![]() |
db382816f5 | ||
![]() |
01732eb443 | ||
![]() |
fc9605565a | ||
![]() |
7d018760ca | ||
![]() |
d52679eae8 | ||
![]() |
aa9c317831 | ||
![]() |
44b280962f |
19
AUTHORS.md
19
AUTHORS.md
@@ -3,24 +3,25 @@ IdeaVim Authors
|
|||||||
|
|
||||||
The original author:
|
The original author:
|
||||||
|
|
||||||
* Rick Maddy <rmaddy@maddyhome.com>
|
* [Rick Maddy](mailto:rmaddy@maddyhome.com)
|
||||||
|
|
||||||
The current maintainer:
|
The current maintainer:
|
||||||
|
|
||||||
* Andrey Vlasovskikh <andrey.vlasovskikh@gmail.com>
|
* [Andrey Vlasovskikh](mailto:andrey.vlasovskikh@gmail.com)
|
||||||
|
|
||||||
Previous maintainers:
|
Previous maintainers:
|
||||||
|
|
||||||
* Oleg Shpynov <oleg.shpynov@jetbrains.com>
|
* [Oleg Shpynov](mailto:oleg.shpynov@jetbrains.com)
|
||||||
|
|
||||||
Contributors:
|
Contributors:
|
||||||
|
|
||||||
* Dmitry Jemerov <yole@jetbrains.com>
|
* [Dmitry Jemerov](mailto:yole@jetbrains.com)
|
||||||
* Marquis Wang <marquis@marquiswang.com>
|
* [Marquis Wang](mailto:marquis@marquiswang.com)
|
||||||
* Julien Hoarau <madgnome@gmail.com>
|
* [Julien Hoarau](mailto:madgnome@gmail.com)
|
||||||
* Masanobu Imai <masanobu.imai@gmail.com>
|
* [Masanobu Imai](mailto:masanobu.imai@gmail.com)
|
||||||
* poxu <poxvuibr@gmail.com>
|
* [poxu](mailto:poxvuibr@gmail.com)
|
||||||
* Alexander Zolotov <alexander.zolotov@jetbrains.com>
|
* [Alexander Zolotov](mailto:alexander.zolotov@jetbrains.com)
|
||||||
|
* [John Lindquist](mailto:johnlindquist@gmail.com)
|
||||||
|
|
||||||
If you are a contributor and your name is not listed here, feel free to
|
If you are a contributor and your name is not listed here, feel free to
|
||||||
contact the maintainer.
|
contact the maintainer.
|
||||||
|
104
CHANGES.md
104
CHANGES.md
@@ -4,8 +4,110 @@ The Changelog
|
|||||||
History of changes in IdeaVim for the IntelliJ platform.
|
History of changes in IdeaVim for the IntelliJ platform.
|
||||||
|
|
||||||
|
|
||||||
|
0.32, 2013-11-15
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Fixed API compatibility with IntelliJ platform builds 132.1052+.
|
||||||
|
|
||||||
|
|
||||||
|
0.31, 2013-11-12
|
||||||
|
----------------
|
||||||
|
|
||||||
|
A bugfix release.
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* VIM-582 Fixed line comment and reformat commands with no visual selection
|
||||||
|
|
||||||
|
|
||||||
|
0.30, 2013-11-11
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Added support for a separate `.ideavimrc` config file. Fixed long-standing
|
||||||
|
issues with merged undo/redo commands and `<Esc>` during code completion.
|
||||||
|
Various bug fixes.
|
||||||
|
|
||||||
|
Features:
|
||||||
|
|
||||||
|
* VIM-425 Read config from .ideavimrc if available
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* VIM-98 Invoke actions in separate commands for better undo/redo
|
||||||
|
* VIM-193 Launch Vim action handler for `<Esc>` in completion windows
|
||||||
|
* VIM-440 Fixed `:e` open file dialog
|
||||||
|
* VIM-550 `:put` creates a new line
|
||||||
|
* VIM-551 Argument of `:put` is optional
|
||||||
|
* Fixed several reported exceptions
|
||||||
|
|
||||||
|
|
||||||
|
0.29, 2013-05-15
|
||||||
|
----------------
|
||||||
|
|
||||||
|
A bugfix release.
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* VIM-482 Fixed repeat buffer limits
|
||||||
|
* VIM-91 Enable normal `<Enter>` handling for one-line editors
|
||||||
|
* VIM-121 Don't move cursor while scrolling
|
||||||
|
|
||||||
|
|
||||||
|
0.28, 2013-04-06
|
||||||
|
----------------
|
||||||
|
|
||||||
|
A bugfix release.
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* VIM-478 Fixed reconfigure Vim keymap for user-defined base keymaps
|
||||||
|
* VIM-479 Don't try to activate insert mode for diff view
|
||||||
|
|
||||||
|
|
||||||
|
0.27, 2013-04-03
|
||||||
|
----------------
|
||||||
|
|
||||||
|
New Vim keymap generator creates better keymaps, especially for Mac OS X.
|
||||||
|
Restart after reconfiguring the keymap is no longer required.
|
||||||
|
|
||||||
|
Features:
|
||||||
|
|
||||||
|
* VIM-92 Better Vim keymaps for Mac OS X
|
||||||
|
* VIM-286 Ask if the plugin should enable repeating keys in Mac OS X
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* VIM-42 Fixed code completion for the `.` command
|
||||||
|
* VIM-421 Fixed `cw` on the last character in line
|
||||||
|
* VIM-419 Fixed resetting cursor position after 'gt' and 'gT'
|
||||||
|
* VIM-233 Fixed code completion for edits in visual block mode
|
||||||
|
* VIM-404 Fixed `O` command at the first line
|
||||||
|
* VIM-472 Fixed right selection in visual mode to be one char more
|
||||||
|
* Fixed command window font size to match editor font size
|
||||||
|
|
||||||
|
|
||||||
|
0.26, 2012-12-26
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Added support for paste in the command mode: from a register using `<C-R>`,
|
||||||
|
from the clipboard using `<S-Insert>` or `<M-V>`. Added support for the last
|
||||||
|
change position mark (the dot `.` mark). New shortcuts for Go to declaration
|
||||||
|
`<C-]>` and Navigate back `<C-T>`. Various bug fixes.
|
||||||
|
|
||||||
|
Features:
|
||||||
|
|
||||||
|
* VIM-262 Support for paste from register in command mode
|
||||||
|
* VIM-214 Key bindings for paste into command line
|
||||||
|
* VIM-43 Added support for the last change position mark
|
||||||
|
* VIM-177 Added `<C-]>` and `<C-T>` to the keymap
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* VIM-302 Fixed tab switching order for `gt` and `gT`
|
||||||
|
|
||||||
|
|
||||||
0.25, 2012-12-19
|
0.25, 2012-12-19
|
||||||
------------------
|
----------------
|
||||||
|
|
||||||
A bugfix release.
|
A bugfix release.
|
||||||
|
|
||||||
|
27
README.md
27
README.md
@@ -2,25 +2,26 @@ IdeaVim
|
|||||||
=======
|
=======
|
||||||
|
|
||||||
IdeaVim is a Vim emulation plug-in for IDEs based on the IntelliJ platform.
|
IdeaVim is a Vim emulation plug-in for IDEs based on the IntelliJ platform.
|
||||||
IdeaVim can be used with IntelliJ IDEA, RubyMine, PyCharm, PhpStorm, WebStorm
|
IdeaVim can be used with IntelliJ IDEA, RubyMine, PyCharm, PhpStorm, WebStorm,
|
||||||
and AppCode.
|
AppCode and Android Studio.
|
||||||
|
|
||||||
Resources:
|
Resources:
|
||||||
|
|
||||||
* [Plugin homepage](http://plugins.intellij.net/plugin/?id=164)
|
* [Plugin homepage](http://plugins.jetbrains.com/plugin/164)
|
||||||
* [Changelog](https://github.com/JetBrains/ideavim/blob/master/CHANGES.md)
|
* [Changelog](https://github.com/JetBrains/ideavim/blob/master/CHANGES.md)
|
||||||
* [Bug tracker](http://youtrack.jetbrains.com/issues/VIM)
|
* [Bug tracker](http://youtrack.jetbrains.com/issues/VIM)
|
||||||
* [Continuous integration builds](http://teamcity.jetbrains.com/project.html?projectId=project55)
|
* [Continuous integration builds](http://teamcity.jetbrains.com/project.html?projectId=IdeaVim)
|
||||||
|
* [@IdeaVim](http://twitter.com/ideavim) in Twitter
|
||||||
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Use the IDE's plugin manager to install the latest version of the plugin.
|
Use the IDE's plugin manager to install the latest version of the plugin.
|
||||||
Start the IDE normally and enable the Vim emulation using "Tools | VIM
|
Start the IDE normally and enable the Vim emulation using "Tools | Vim
|
||||||
Emulator" menu item. At this point you must use Vim keystrokes in all editors.
|
Emulator" menu item. At this point you must use Vim keystrokes in all editors.
|
||||||
|
|
||||||
If you wish to disable the plugin, select the "Tools | VIM Emulator" menu so
|
If you wish to disable the plugin, select the "Tools | Vim Emulator" menu so
|
||||||
it is unchecked. At this point IDE will work with it's regular keyboard
|
it is unchecked. At this point IDE will work with it's regular keyboard
|
||||||
shortcuts.
|
shortcuts.
|
||||||
|
|
||||||
@@ -31,7 +32,7 @@ Summary of Supported Vim Features
|
|||||||
Supported:
|
Supported:
|
||||||
|
|
||||||
* Motion keys
|
* Motion keys
|
||||||
* Deletion/Changing
|
* Deletion/changing
|
||||||
* Insert mode commands
|
* Insert mode commands
|
||||||
* Marks
|
* Marks
|
||||||
* Registers
|
* Registers
|
||||||
@@ -48,9 +49,9 @@ Supported:
|
|||||||
Not supported (yet):
|
Not supported (yet):
|
||||||
|
|
||||||
* Key mappings
|
* Key mappings
|
||||||
* Various less used commands
|
|
||||||
* Jump lists
|
|
||||||
* Window commands
|
* Window commands
|
||||||
|
* Jump lists
|
||||||
|
* Various less used commands
|
||||||
|
|
||||||
Please see the file [index.txt](https://github.com/JetBrains/ideavim/blob/master/index.txt)
|
Please see the file [index.txt](https://github.com/JetBrains/ideavim/blob/master/index.txt)
|
||||||
for a list of commands covered with tests.
|
for a list of commands covered with tests.
|
||||||
@@ -67,12 +68,6 @@ Vim. Vim compatibility of undo/redo may be improved in the future releases.
|
|||||||
|
|
||||||
### Escape
|
### Escape
|
||||||
|
|
||||||
In the IDE, the `<Esc>` key is used during editing to cancel code completion
|
|
||||||
windows, dialog windows, and parameter tooltips. While in the Vim insert mode,
|
|
||||||
`<Esc>` is used to return back to the normal mode. If you are typing in the
|
|
||||||
insert mode and a code completion window is popped up, pressing `<Esc>` cancel
|
|
||||||
the window without exiting the insert mode.
|
|
||||||
|
|
||||||
Using `<Esc>` in dialog windows remains problematic. For most dialog windows
|
Using `<Esc>` in dialog windows remains problematic. For most dialog windows
|
||||||
the Vim emulator is put into the insert mode without the possibility to switch to
|
the Vim emulator is put into the insert mode without the possibility to switch to
|
||||||
the normal mode. In some dialog windows the normal mode is on by default. The
|
the normal mode. In some dialog windows the normal mode is on by default. The
|
||||||
@@ -135,7 +130,7 @@ Development
|
|||||||
|
|
||||||
1. Fork IdeaVim on GitHub and clone the repository on your local machine.
|
1. Fork IdeaVim on GitHub and clone the repository on your local machine.
|
||||||
|
|
||||||
2. Open the project in IntelliJ IDEA 11+ (Community or Ultimate) using "File |
|
2. Open the project in IntelliJ IDEA 12+ (Community or Ultimate) using "File |
|
||||||
Open... | /path/to/ideavim".
|
Open... | /path/to/ideavim".
|
||||||
|
|
||||||
3. Set up a JDK if you haven't got it yet. Use "File | Project Structure | SDKs
|
3. Set up a JDK if you haven't got it yet. Use "File | Project Structure | SDKs
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
version-id:0.25
|
version-id:0.32
|
||||||
platform-version:110.0
|
platform-version:120.0
|
||||||
idea.download.url=http://download.jetbrains.com/idea/ideaIU-12.0.zip
|
idea.download.url=http://download.jetbrains.com/idea/ideaIU-12.1.zip
|
||||||
build.number=x
|
build.number=x
|
||||||
|
18
index.txt
18
index.txt
@@ -26,6 +26,8 @@ tag char action in Insert mode ~
|
|||||||
enter digraph
|
enter digraph
|
||||||
|i_CTRL-O| CTRL-O execute a single command and return to insert
|
|i_CTRL-O| CTRL-O execute a single command and return to insert
|
||||||
mode
|
mode
|
||||||
|
|i_CTRL-R| CTRL-R {0-9a-z"%#*:=}
|
||||||
|
insert the contents of a register
|
||||||
|i_CTRL-W| CTRL-W delete word before the cursor
|
|i_CTRL-W| CTRL-W delete word before the cursor
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
@@ -63,6 +65,8 @@ tag char note action in Normal mode ~
|
|||||||
|count| 9 "
|
|count| 9 "
|
||||||
|F| F{char} 1 cursor to the Nth occurrence of {char} to
|
|F| F{char} 1 cursor to the Nth occurrence of {char} to
|
||||||
the left
|
the left
|
||||||
|
|O| O 2 begin a new line above the cursor and
|
||||||
|
insert text, repeat N times
|
||||||
|P| ["x]P 2 put the text [from buffer x] before the
|
|P| ["x]P 2 put the text [from buffer x] before the
|
||||||
cursor N times
|
cursor N times
|
||||||
|T| T{char} 1 cursor till after Nth occurrence of {char}
|
|T| T{char} 1 cursor till after Nth occurrence of {char}
|
||||||
@@ -159,6 +163,20 @@ tag command note action in Visual mode ~
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|v_y| y yank the highlighted area
|
|v_y| y yank the highlighted area
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
4. Command-line editing *ex-edit-index*
|
||||||
|
|
||||||
|
Get to the command-line with the ':', '!', '/' or '?' commands.
|
||||||
|
Normal characters are inserted at the current cursor position.
|
||||||
|
"Completion" below refers to context-sensitive completion. It will complete
|
||||||
|
file names, tags, commands etc. as appropriate.
|
||||||
|
|
||||||
|
tag command action in Command-line editing mode ~
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|c_CTRL-R| CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A}
|
||||||
|
insert the contents of a register or object
|
||||||
|
under the cursor as if typed
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
5. EX commands *ex-cmd-index*
|
5. EX commands *ex-cmd-index*
|
||||||
|
|
||||||
|
@@ -1,352 +1,377 @@
|
|||||||
<idea-plugin url="http://plugins.intellij.net/plugin/?id=164">
|
<idea-plugin url="http://plugins.jetbrains.com/plugin/164">
|
||||||
<name>IdeaVIM</name>
|
<name>IdeaVim</name>
|
||||||
<id>IdeaVIM</id>
|
<id>IdeaVIM</id>
|
||||||
<description><![CDATA[
|
<change-notes>
|
||||||
<p>Vim emulation plug-in for IDEs based on the IntelliJ platform. IdeaVim can be used with IntelliJ IDEA, RubyMine, PyCharm, PhpStorm, WebStorm and AppCode.</p>
|
<![CDATA[
|
||||||
<p>Supported functionality:</p>
|
<p>0.32:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Motion keys</li>
|
<li>Fixed API compatibility with IntelliJ platform builds 132.1052+</li>
|
||||||
<li>Deletion/Changing</li>
|
</ul>
|
||||||
<li>Insert mode commands</li>
|
<p>0.31:</p>
|
||||||
<li>Marks</li>
|
<ul>
|
||||||
<li>Registers</li>
|
<li>Various bug fixes</li>
|
||||||
<li>Undo/redo</li>
|
</ul>
|
||||||
<li>Visual mode commands</li>
|
<p>0.30:</p>
|
||||||
<li>Some Ex commands</li>
|
<ul>
|
||||||
<li>Some :set options</li>
|
<li>Support for a separate <code>.ideavimrc</code> config file</li>
|
||||||
<li>Full Vim regexps for search and search/replace</li>
|
<li>Fixed long-standing issues with merged undo/redo commands and <code><Esc></code> during completion</li>
|
||||||
<li>Macros</li>
|
<li>Various bug fixes</li>
|
||||||
<li>Digraphs</li>
|
</ul>
|
||||||
<li>Command line and search history</li>
|
<p>0.29:</p>
|
||||||
<li>Vim web help</li>
|
<ul>
|
||||||
</ul>
|
<li>Fixed repeat buffer limits</li>
|
||||||
]]></description>
|
<li>Enable normal <code><Enter></code> handling for one-line editors</li>
|
||||||
<version>@VERSION@</version>
|
<li>Don't move cursor while scrolling</li>
|
||||||
<vendor logo="/icons/vim16x16.png">Rick Maddy, JetBrains</vendor>
|
</ul>
|
||||||
|
<p>0.28:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Fixed reconfigure Vim keymap for user-defined base keymaps</li>
|
||||||
|
</ul>
|
||||||
|
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
||||||
|
]]>
|
||||||
|
</change-notes>
|
||||||
|
<description>
|
||||||
|
<![CDATA[
|
||||||
|
<p>Vim emulation plug-in for IDEs based on the IntelliJ platform. IdeaVim can be used with IntelliJ IDEA, RubyMine, PyCharm, PhpStorm, WebStorm, AppCode and Android Studio.</p>
|
||||||
|
<p>Supported functionality:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Motion keys</li>
|
||||||
|
<li>Deletion/Changing</li>
|
||||||
|
<li>Insert mode commands</li>
|
||||||
|
<li>Marks</li>
|
||||||
|
<li>Registers</li>
|
||||||
|
<li>Undo/redo</li>
|
||||||
|
<li>Visual mode commands</li>
|
||||||
|
<li>Some Ex commands</li>
|
||||||
|
<li>Some :set options</li>
|
||||||
|
<li>Full Vim regexps for search and search/replace</li>
|
||||||
|
<li>Macros</li>
|
||||||
|
<li>Digraphs</li>
|
||||||
|
<li>Command line and search history</li>
|
||||||
|
<li>Vim web help</li>
|
||||||
|
</ul>
|
||||||
|
]]>
|
||||||
|
</description>
|
||||||
|
<version>@VERSION@</version>
|
||||||
|
<vendor logo="/icons/vim16x16.png">JetBrains</vendor>
|
||||||
|
|
||||||
<helpset file="help.jar" path="/VimHelp.hs"/>
|
<idea-version since-build="@SINCE-VERSION@"/>
|
||||||
<idea-version since-build="@SINCE-VERSION@"/>
|
|
||||||
|
|
||||||
<!-- Mark the plugin as compatible with RubyMine and other products based on the IntelliJ platform -->
|
<!-- Mark the plugin as compatible with RubyMine and other products based on the IntelliJ platform -->
|
||||||
<depends>com.intellij.modules.lang</depends>
|
<depends>com.intellij.modules.lang</depends>
|
||||||
<resource-bundle xmlns="">messages</resource-bundle>
|
<resource-bundle xmlns="">messages</resource-bundle>
|
||||||
|
|
||||||
<application-components>
|
<application-components>
|
||||||
<component>
|
<component>
|
||||||
<implementation-class>com.maddyhome.idea.vim.VimPlugin</implementation-class>
|
<implementation-class>com.maddyhome.idea.vim.VimPlugin</implementation-class>
|
||||||
</component>
|
</component>
|
||||||
</application-components>
|
</application-components>
|
||||||
|
|
||||||
<extensions defaultExtensionNs="com.intellij">
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
<errorHandler implementation="com.intellij.diagnostic.ITNReporter"/>
|
<errorHandler implementation="com.intellij.diagnostic.ITNReporter"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|
||||||
<actions>
|
<actions>
|
||||||
<action id="VimPluginToggle" class="com.maddyhome.idea.vim.VimPluginToggleAction" text="VIM Emulator" description="Toggle the Vim Plugin On/Off">
|
<action id="VimPluginToggle" class="com.maddyhome.idea.vim.VimPluginToggleAction" text="Vim Emulator" description="Toggle the Vim Plugin On/Off">
|
||||||
<keyboard-shortcut first-keystroke="control alt V" keymap="$default"/>
|
<keyboard-shortcut first-keystroke="control alt V" keymap="$default"/>
|
||||||
<add-to-group group-id="ToolsMenu" anchor="last"/>
|
<add-to-group group-id="ToolsMenu" anchor="last"/>
|
||||||
</action>
|
</action>
|
||||||
<action id="VimReconfigureKeymap" class="com.maddyhome.idea.vim.VimReconfigureKeymapAction" text="Reconfigure VIM Keymap" description="Reconfigure VIM keymap">
|
<action id="VimReconfigureKeymap" class="com.maddyhome.idea.vim.VimReconfigureKeymapAction" text="Reconfigure Vim Keymap" description="Reconfigure Vim keymap">
|
||||||
<add-to-group group-id="ToolsMenu" order="after VimPluginToggle"/>
|
<add-to-group group-id="ToolsMenu" relative-to-action="after VimPluginToggle"/>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<!-- Motions -->
|
<!-- Motions -->
|
||||||
<action id="VimMotionPreviousTab" class="com.maddyhome.idea.vim.action.motion.tabs.MotionPreviousTabAction" text="Move to Previous Tab"/>
|
<action id="VimMotionPreviousTab" class="com.maddyhome.idea.vim.action.motion.tabs.MotionPreviousTabAction" text="Move to Previous Tab"/>
|
||||||
<action id="VimMotionNextTab" class="com.maddyhome.idea.vim.action.motion.tabs.MotionNextTabAction" text="Move to Next Tab"/>
|
<action id="VimMotionNextTab" class="com.maddyhome.idea.vim.action.motion.tabs.MotionNextTabAction" text="Move to Next Tab"/>
|
||||||
<!-- Left/Right -->
|
<!-- Left/Right -->
|
||||||
<action id="VimMotionColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionColumnAction" text="Move to Column"/>
|
<action id="VimMotionColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionColumnAction" text="Move to Column"/>
|
||||||
<action id="VimMotionFirstColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstColumnAction" text="Start of Line"/>
|
<action id="VimMotionFirstColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstColumnAction" text="Start of Line"/>
|
||||||
<action id="VimMotionFirstScreenColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstScreenColumnAction" text="Start of Screen Line"/>
|
<action id="VimMotionFirstScreenColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstScreenColumnAction" text="Start of Screen Line"/>
|
||||||
<action id="VimMotionFirstNonSpace" class="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstNonSpaceAction" text="First Character of Line"/>
|
<action id="VimMotionFirstNonSpace" class="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstNonSpaceAction" text="First Character of Line"/>
|
||||||
<action id="VimMotionFirstScreenNonSpace" class="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstScreenNonSpaceAction" text="First Character of Screen Line"/>
|
<action id="VimMotionFirstScreenNonSpace" class="com.maddyhome.idea.vim.action.motion.leftright.MotionFirstScreenNonSpaceAction" text="First Character of Screen Line"/>
|
||||||
<action id="VimMotionLastColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLastColumnAction" text="End of Line"/>
|
<action id="VimMotionLastColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLastColumnAction" text="End of Line"/>
|
||||||
<action id="VimMotionLastScreenColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLastScreenColumnAction" text="End of Screen Line"/>
|
<action id="VimMotionLastScreenColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLastScreenColumnAction" text="End of Screen Line"/>
|
||||||
<action id="VimMotionLastMatchChar" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLastMatchCharAction" text="Repeat Last Character Match"/>
|
<action id="VimMotionLastMatchChar" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLastMatchCharAction" text="Repeat Last Character Match"/>
|
||||||
<action id="VimMotionLastMatchCharReverse" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLastMatchCharReverseAction" text="Repeat Last Character Match in Reverse"/>
|
<action id="VimMotionLastMatchCharReverse" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLastMatchCharReverseAction" text="Repeat Last Character Match in Reverse"/>
|
||||||
<action id="VimMotionLastNonSpace" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLastNonSpaceAction" text="Last Character of Line"/>
|
<action id="VimMotionLastNonSpace" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLastNonSpaceAction" text="Last Character of Line"/>
|
||||||
<action id="VimMotionLeft" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftAction" text="Left"/>
|
<action id="VimMotionLeft" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftAction" text="Left"/>
|
||||||
<action id="VimMotionLeftWrap" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftWrapAction" text="Left"/>
|
<action id="VimMotionLeftWrap" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftWrapAction" text="Left"/>
|
||||||
<action id="VimMotionLeftMatchChar" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftMatchCharAction" text="Move Left to Character"/>
|
<action id="VimMotionLeftMatchChar" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftMatchCharAction" text="Move Left to Character"/>
|
||||||
<action id="VimMotionLeftTillMatchChar" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftTillMatchCharAction" text="Move Left till Character"/>
|
<action id="VimMotionLeftTillMatchChar" class="com.maddyhome.idea.vim.action.motion.leftright.MotionLeftTillMatchCharAction" text="Move Left till Character"/>
|
||||||
<action id="VimMotionMiddleColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionMiddleColumnAction" text="Middle of Screen"/>
|
<action id="VimMotionMiddleColumn" class="com.maddyhome.idea.vim.action.motion.leftright.MotionMiddleColumnAction" text="Middle of Screen"/>
|
||||||
<action id="VimMotionRight" class="com.maddyhome.idea.vim.action.motion.leftright.MotionRightAction" text="Right"/>
|
<action id="VimMotionRight" class="com.maddyhome.idea.vim.action.motion.leftright.MotionRightAction" text="Right"/>
|
||||||
<action id="VimMotionRightWrap" class="com.maddyhome.idea.vim.action.motion.leftright.MotionRightWrapAction" text="Right"/>
|
<action id="VimMotionRightWrap" class="com.maddyhome.idea.vim.action.motion.leftright.MotionRightWrapAction" text="Right"/>
|
||||||
<action id="VimMotionRightMatchChar" class="com.maddyhome.idea.vim.action.motion.leftright.MotionRightMatchCharAction" text="Move Right to Character"/>
|
<action id="VimMotionRightMatchChar" class="com.maddyhome.idea.vim.action.motion.leftright.MotionRightMatchCharAction" text="Move Right to Character"/>
|
||||||
<action id="VimMotionRightTillMatchChar" class="com.maddyhome.idea.vim.action.motion.leftright.MotionRightTillMatchCharAction" text="Move Right till Character"/>
|
<action id="VimMotionRightTillMatchChar" class="com.maddyhome.idea.vim.action.motion.leftright.MotionRightTillMatchCharAction" text="Move Right till Character"/>
|
||||||
<!-- Up/Down -->
|
<!-- Up/Down -->
|
||||||
<action id="VimMotionDown" class="com.maddyhome.idea.vim.action.motion.updown.MotionDownAction" text="Down"/>
|
<action id="VimMotionDown" class="com.maddyhome.idea.vim.action.motion.updown.MotionDownAction" text="Down"/>
|
||||||
<action id="VimMotionDownFirstNonSpace" class="com.maddyhome.idea.vim.action.motion.updown.MotionDownFirstNonSpaceAction" text="Down to First non-Space"/>
|
<action id="VimMotionDownFirstNonSpace" class="com.maddyhome.idea.vim.action.motion.updown.MotionDownFirstNonSpaceAction" text="Down to First non-Space"/>
|
||||||
<action id="VimMotionDownLess1FirstNonSpace" class="com.maddyhome.idea.vim.action.motion.updown.MotionDownLess1FirstNonSpaceAction" text="Down to First non-Space"/>
|
<action id="VimMotionDownLess1FirstNonSpace" class="com.maddyhome.idea.vim.action.motion.updown.MotionDownLess1FirstNonSpaceAction" text="Down to First non-Space"/>
|
||||||
<action id="VimMotionGotoLineFirst" class="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineFirstAction" text="Goto Line"/>
|
<action id="VimMotionGotoLineFirst" class="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineFirstAction" text="Goto Line"/>
|
||||||
<action id="VimMotionGotoLineLast" class="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineLastAction" text="Goto Line"/>
|
<action id="VimMotionGotoLineLast" class="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineLastAction" text="Goto Line"/>
|
||||||
<action id="VimMotionGotoLineLastEnd" class="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineLastEndAction" text="Goto Line End"/>
|
<action id="VimMotionGotoLineLastEnd" class="com.maddyhome.idea.vim.action.motion.updown.MotionGotoLineLastEndAction" text="Goto Line End"/>
|
||||||
<action id="VimMotionPercentOrMatch" class="com.maddyhome.idea.vim.action.motion.updown.MotionPercentOrMatchAction" text="Percent Down or Match"/>
|
<action id="VimMotionPercentOrMatch" class="com.maddyhome.idea.vim.action.motion.updown.MotionPercentOrMatchAction" text="Percent Down or Match"/>
|
||||||
<action id="VimMotionUp" class="com.maddyhome.idea.vim.action.motion.updown.MotionUpAction" text="Up"/>
|
<action id="VimMotionUp" class="com.maddyhome.idea.vim.action.motion.updown.MotionUpAction" text="Up"/>
|
||||||
<action id="VimMotionUpFirstNonSpace" class="com.maddyhome.idea.vim.action.motion.updown.MotionUpFirstNonSpaceAction" text="Up to First non-Space"/>
|
<action id="VimMotionUpFirstNonSpace" class="com.maddyhome.idea.vim.action.motion.updown.MotionUpFirstNonSpaceAction" text="Up to First non-Space"/>
|
||||||
<!-- Text -->
|
<!-- Text -->
|
||||||
<action id="VimMotionCamelEndLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionCamelEndLeftAction" text="Camel Word End Left"/>
|
<action id="VimMotionCamelEndLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionCamelEndLeftAction" text="Camel Word End Left"/>
|
||||||
<action id="VimMotionCamelEndRight" class="com.maddyhome.idea.vim.action.motion.text.MotionCamelEndRightAction" text="Camel Word End Right"/>
|
<action id="VimMotionCamelEndRight" class="com.maddyhome.idea.vim.action.motion.text.MotionCamelEndRightAction" text="Camel Word End Right"/>
|
||||||
<action id="VimMotionCamelLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionCamelLeftAction" text="Camel Word Left"/>
|
<action id="VimMotionCamelLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionCamelLeftAction" text="Camel Word Left"/>
|
||||||
<action id="VimMotionCamelRight" class="com.maddyhome.idea.vim.action.motion.text.MotionCamelRightAction" text="Camel Word Right"/>
|
<action id="VimMotionCamelRight" class="com.maddyhome.idea.vim.action.motion.text.MotionCamelRightAction" text="Camel Word Right"/>
|
||||||
<action id="VimMotionNthCharacter" class="com.maddyhome.idea.vim.action.motion.text.MotionNthCharacterAction" text="Nth Character"/>
|
<action id="VimMotionNthCharacter" class="com.maddyhome.idea.vim.action.motion.text.MotionNthCharacterAction" text="Nth Character"/>
|
||||||
<action id="VimMotionWordEndLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionWordEndLeftAction" text="Word End Left"/>
|
<action id="VimMotionWordEndLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionWordEndLeftAction" text="Word End Left"/>
|
||||||
<action id="VimMotionBigWordEndLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionBigWordEndLeftAction" text="BigWord End Left"/>
|
<action id="VimMotionBigWordEndLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionBigWordEndLeftAction" text="BigWord End Left"/>
|
||||||
<action id="VimMotionWordEndRight" class="com.maddyhome.idea.vim.action.motion.text.MotionWordEndRightAction" text="Word End Right"/>
|
<action id="VimMotionWordEndRight" class="com.maddyhome.idea.vim.action.motion.text.MotionWordEndRightAction" text="Word End Right"/>
|
||||||
<action id="VimMotionBigWordEndRight" class="com.maddyhome.idea.vim.action.motion.text.MotionBigWordEndRightAction" text="BigWord End Right"/>
|
<action id="VimMotionBigWordEndRight" class="com.maddyhome.idea.vim.action.motion.text.MotionBigWordEndRightAction" text="BigWord End Right"/>
|
||||||
<action id="VimMotionWordLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionWordLeftAction" text="Word Left"/>
|
<action id="VimMotionWordLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionWordLeftAction" text="Word Left"/>
|
||||||
<action id="VimMotionBigWordLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionBigWordLeftAction" text="BigWord Left"/>
|
<action id="VimMotionBigWordLeft" class="com.maddyhome.idea.vim.action.motion.text.MotionBigWordLeftAction" text="BigWord Left"/>
|
||||||
<action id="VimMotionWordRight" class="com.maddyhome.idea.vim.action.motion.text.MotionWordRightAction" text="Word Right"/>
|
<action id="VimMotionWordRight" class="com.maddyhome.idea.vim.action.motion.text.MotionWordRightAction" text="Word Right"/>
|
||||||
<action id="VimMotionBigWordRight" class="com.maddyhome.idea.vim.action.motion.text.MotionBigWordRightAction" text="BigWord Right"/>
|
<action id="VimMotionBigWordRight" class="com.maddyhome.idea.vim.action.motion.text.MotionBigWordRightAction" text="BigWord Right"/>
|
||||||
<action id="VimMotionSentenceStartNext" class="com.maddyhome.idea.vim.action.motion.text.MotionSentenceNextStartAction" text="Next Sentence Start"/>
|
<action id="VimMotionSentenceStartNext" class="com.maddyhome.idea.vim.action.motion.text.MotionSentenceNextStartAction" text="Next Sentence Start"/>
|
||||||
<action id="VimMotionSentenceStartPrevious" class="com.maddyhome.idea.vim.action.motion.text.MotionSentencePreviousStartAction" text="Previous Sentence Start"/>
|
<action id="VimMotionSentenceStartPrevious" class="com.maddyhome.idea.vim.action.motion.text.MotionSentencePreviousStartAction" text="Previous Sentence Start"/>
|
||||||
<action id="VimMotionSentenceEndNext" class="com.maddyhome.idea.vim.action.motion.text.MotionSentenceNextEndAction" text="Next Sentence End"/>
|
<action id="VimMotionSentenceEndNext" class="com.maddyhome.idea.vim.action.motion.text.MotionSentenceNextEndAction" text="Next Sentence End"/>
|
||||||
<action id="VimMotionSentenceEndPrevious" class="com.maddyhome.idea.vim.action.motion.text.MotionSentencePreviousEndAction" text="Previous Sentence End"/>
|
<action id="VimMotionSentenceEndPrevious" class="com.maddyhome.idea.vim.action.motion.text.MotionSentencePreviousEndAction" text="Previous Sentence End"/>
|
||||||
<action id="VimMotionParagraphNext" class="com.maddyhome.idea.vim.action.motion.text.MotionParagraphNextAction" text="Next Paragraph"/>
|
<action id="VimMotionParagraphNext" class="com.maddyhome.idea.vim.action.motion.text.MotionParagraphNextAction" text="Next Paragraph"/>
|
||||||
<action id="VimMotionParagraphPrevious" class="com.maddyhome.idea.vim.action.motion.text.MotionParagraphPreviousAction" text="Previous Paragraph"/>
|
<action id="VimMotionParagraphPrevious" class="com.maddyhome.idea.vim.action.motion.text.MotionParagraphPreviousAction" text="Previous Paragraph"/>
|
||||||
<action id="VimMotionUnmatchedBraceClose" class="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedBraceCloseAction" text="Unmatched }"/>
|
<action id="VimMotionUnmatchedBraceClose" class="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedBraceCloseAction" text="Unmatched }"/>
|
||||||
<action id="VimMotionUnmatchedBraceOpen" class="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedBraceOpenAction" text="Unmatched {"/>
|
<action id="VimMotionUnmatchedBraceOpen" class="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedBraceOpenAction" text="Unmatched {"/>
|
||||||
<action id="VimMotionUnmatchedParenClose" class="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedParenCloseAction" text="Unmatched )"/>
|
<action id="VimMotionUnmatchedParenClose" class="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedParenCloseAction" text="Unmatched )"/>
|
||||||
<action id="VimMotionUnmatchedParenOpen" class="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedParenOpenAction" text="Unmatched ("/>
|
<action id="VimMotionUnmatchedParenOpen" class="com.maddyhome.idea.vim.action.motion.text.MotionUnmatchedParenOpenAction" text="Unmatched ("/>
|
||||||
<action id="VimMotionSectionBackwardEnd" class="com.maddyhome.idea.vim.action.motion.text.MotionSectionBackwardEndAction" text="Section End Backward"/>
|
<action id="VimMotionSectionBackwardEnd" class="com.maddyhome.idea.vim.action.motion.text.MotionSectionBackwardEndAction" text="Section End Backward"/>
|
||||||
<action id="VimMotionSectionBackwardStart" class="com.maddyhome.idea.vim.action.motion.text.MotionSectionBackwardStartAction" text="Section Start Backward"/>
|
<action id="VimMotionSectionBackwardStart" class="com.maddyhome.idea.vim.action.motion.text.MotionSectionBackwardStartAction" text="Section Start Backward"/>
|
||||||
<action id="VimMotionSectionForwardEnd" class="com.maddyhome.idea.vim.action.motion.text.MotionSectionForwardEndAction" text="Section End Forward"/>
|
<action id="VimMotionSectionForwardEnd" class="com.maddyhome.idea.vim.action.motion.text.MotionSectionForwardEndAction" text="Section End Forward"/>
|
||||||
<action id="VimMotionSectionForwardStart" class="com.maddyhome.idea.vim.action.motion.text.MotionSectionForwardStartAction" text="Section Start Forward"/>
|
<action id="VimMotionSectionForwardStart" class="com.maddyhome.idea.vim.action.motion.text.MotionSectionForwardStartAction" text="Section Start Forward"/>
|
||||||
<action id="VimMotionMethodBackwardEnd" class="com.maddyhome.idea.vim.action.motion.text.MotionMethodPreviousEndAction" text="Previous Method End"/>
|
<action id="VimMotionMethodBackwardEnd" class="com.maddyhome.idea.vim.action.motion.text.MotionMethodPreviousEndAction" text="Previous Method End"/>
|
||||||
<action id="VimMotionMethodBackwardStart" class="com.maddyhome.idea.vim.action.motion.text.MotionMethodPreviousStartAction" text="Previous Method Start"/>
|
<action id="VimMotionMethodBackwardStart" class="com.maddyhome.idea.vim.action.motion.text.MotionMethodPreviousStartAction" text="Previous Method Start"/>
|
||||||
<action id="VimMotionMethodForwardEnd" class="com.maddyhome.idea.vim.action.motion.text.MotionMethodNextEndAction" text="Next Method End"/>
|
<action id="VimMotionMethodForwardEnd" class="com.maddyhome.idea.vim.action.motion.text.MotionMethodNextEndAction" text="Next Method End"/>
|
||||||
<action id="VimMotionMethodForwardStart" class="com.maddyhome.idea.vim.action.motion.text.MotionMethodNextStartAction" text="Next Method Start"/>
|
<action id="VimMotionMethodForwardStart" class="com.maddyhome.idea.vim.action.motion.text.MotionMethodNextStartAction" text="Next Method Start"/>
|
||||||
<!-- Text Objects -->
|
<!-- Text Objects -->
|
||||||
<action id="VimMotionTextOuterWord" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterWordAction" text="Select outer word"/>
|
<action id="VimMotionTextOuterWord" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterWordAction" text="Select outer word"/>
|
||||||
<action id="VimMotionTextOuterBigWord" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBigWordAction" text="Select outer WORD"/>
|
<action id="VimMotionTextOuterBigWord" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBigWordAction" text="Select outer WORD"/>
|
||||||
<action id="VimMotionTextInnerWord" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerWordAction" text="Select inner word"/>
|
<action id="VimMotionTextInnerWord" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerWordAction" text="Select inner word"/>
|
||||||
<action id="VimMotionTextInnerBigWord" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBigWordAction" text="Select inner WORD"/>
|
<action id="VimMotionTextInnerBigWord" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBigWordAction" text="Select inner WORD"/>
|
||||||
<action id="VimMotionInnerBlockAngle" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockAngleAction" text="Select inner < block"/>
|
<action id="VimMotionInnerBlockAngle" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockAngleAction" text="Select inner < block"/>
|
||||||
<action id="VimMotionInnerBlockBrace" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBraceAction" text="Select inner { block"/>
|
<action id="VimMotionInnerBlockBrace" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBraceAction" text="Select inner { block"/>
|
||||||
<action id="VimMotionInnerBlockBracket" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBracketAction" text="Select inner [ block"/>
|
<action id="VimMotionInnerBlockBracket" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBracketAction" text="Select inner [ block"/>
|
||||||
<action id="VimMotionInnerBlockParen" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockParenAction" text="Select inner ( block"/>
|
<action id="VimMotionInnerBlockParen" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockParenAction" text="Select inner ( block"/>
|
||||||
<action id="VimMotionInnerBlockDoubleQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockDoubleQuoteAction" text="Select inner double quote block"/>
|
<action id="VimMotionInnerBlockDoubleQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockDoubleQuoteAction" text="Select inner double quote block"/>
|
||||||
<action id="VimMotionInnerBlockSingleQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockSingleQuoteAction" text="Select inner single quote block"/>
|
<action id="VimMotionInnerBlockSingleQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockSingleQuoteAction" text="Select inner single quote block"/>
|
||||||
<action id="VimMotionInnerBlockBackQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBackQuoteAction" text="Select inner back quote block"/>
|
<action id="VimMotionInnerBlockBackQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerBlockBackQuoteAction" text="Select inner back quote block"/>
|
||||||
<action id="VimMotionOuterBlockAngle" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockAngleAction" text="Select outer < block"/>
|
<action id="VimMotionOuterBlockAngle" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockAngleAction" text="Select outer < block"/>
|
||||||
<action id="VimMotionOuterBlockBrace" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBraceAction" text="Select outer { block"/>
|
<action id="VimMotionOuterBlockBrace" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBraceAction" text="Select outer { block"/>
|
||||||
<action id="VimMotionOuterBlockBracket" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBracketAction" text="Select outer [ block"/>
|
<action id="VimMotionOuterBlockBracket" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBracketAction" text="Select outer [ block"/>
|
||||||
<action id="VimMotionOuterBlockParen" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockParenAction" text="Select outer ( block"/>
|
<action id="VimMotionOuterBlockParen" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockParenAction" text="Select outer ( block"/>
|
||||||
<action id="VimMotionOuterBlockDoubleQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockDoubleQuoteAction" text="Select outer double quote block"/>
|
<action id="VimMotionOuterBlockDoubleQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockDoubleQuoteAction" text="Select outer double quote block"/>
|
||||||
<action id="VimMotionOuterBlockSingleQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockSingleQuoteAction" text="Select outer single quote block"/>
|
<action id="VimMotionOuterBlockSingleQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockSingleQuoteAction" text="Select outer single quote block"/>
|
||||||
<action id="VimMotionOuterBlockBackQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBackQuoteAction" text="Select outer back quote block"/>
|
<action id="VimMotionOuterBlockBackQuote" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterBlockBackQuoteAction" text="Select outer back quote block"/>
|
||||||
<action id="VimMotionInnerParagraph" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerParagraphAction" text="Select Inner Paragraph"/>
|
<action id="VimMotionInnerParagraph" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerParagraphAction" text="Select Inner Paragraph"/>
|
||||||
<action id="VimMotionOuterParagraph" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterParagraphAction" text="Select Outer Paragraph"/>
|
<action id="VimMotionOuterParagraph" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterParagraphAction" text="Select Outer Paragraph"/>
|
||||||
<action id="VimMotionInnerSentence" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerSentenceAction" text="Select Inner Sentence"/>
|
<action id="VimMotionInnerSentence" class="com.maddyhome.idea.vim.action.motion.object.MotionInnerSentenceAction" text="Select Inner Sentence"/>
|
||||||
<action id="VimMotionOuterSentence" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterSentenceAction" text="Select Outer Sentence"/>
|
<action id="VimMotionOuterSentence" class="com.maddyhome.idea.vim.action.motion.object.MotionOuterSentenceAction" text="Select Outer Sentence"/>
|
||||||
<!-- Marks -->
|
<!-- Marks -->
|
||||||
<action id="VimMotionMark" class="com.maddyhome.idea.vim.action.motion.mark.MotionMarkAction" text="Mark"/>
|
<action id="VimMotionMark" class="com.maddyhome.idea.vim.action.motion.mark.MotionMarkAction" text="Mark"/>
|
||||||
<action id="VimMotionGotoFileMark" class="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkAction" text="Goto Mark"/>
|
<action id="VimMotionGotoFileMark" class="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkAction" text="Goto Mark"/>
|
||||||
<action id="VimMotionGotoFileMarkLine" class="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkLineAction" text="Goto Mark Line"/>
|
<action id="VimMotionGotoFileMarkLine" class="com.maddyhome.idea.vim.action.motion.mark.MotionGotoFileMarkLineAction" text="Goto Mark Line"/>
|
||||||
<action id="VimMotionGotoMark" class="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkAction" text="Goto Mark"/>
|
<action id="VimMotionGotoMark" class="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkAction" text="Goto Mark"/>
|
||||||
<action id="VimMotionGotoMarkLine" class="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkLineAction" text="Goto Mark Line"/>
|
<action id="VimMotionGotoMarkLine" class="com.maddyhome.idea.vim.action.motion.mark.MotionGotoMarkLineAction" text="Goto Mark Line"/>
|
||||||
<action id="VimMotionJumpNext" class="com.maddyhome.idea.vim.action.motion.mark.MotionJumpNextAction" text="Goto Next Jump"/>
|
<action id="VimMotionJumpNext" class="com.maddyhome.idea.vim.action.motion.mark.MotionJumpNextAction" text="Goto Next Jump"/>
|
||||||
<action id="VimMotionJumpPrevious" class="com.maddyhome.idea.vim.action.motion.mark.MotionJumpPreviousAction" text="Goto Previous Jump"/>
|
<action id="VimMotionJumpPrevious" class="com.maddyhome.idea.vim.action.motion.mark.MotionJumpPreviousAction" text="Goto Previous Jump"/>
|
||||||
<action id="VimForward" class="com.maddyhome.idea.vim.action.motion.mark.MotionJumpNextAction" text="Forward"/>
|
<action id="VimForward" class="com.maddyhome.idea.vim.action.motion.mark.MotionJumpNextAction" text="Forward"/>
|
||||||
<action id="VimBack" class="com.maddyhome.idea.vim.action.motion.mark.MotionJumpPreviousAction" text="Back"/>
|
<action id="VimBack" class="com.maddyhome.idea.vim.action.motion.mark.MotionJumpPreviousAction" text="Back"/>
|
||||||
<!-- Screen -->
|
<!-- Screen -->
|
||||||
<action id="VimMotionFirstScreenLine" class="com.maddyhome.idea.vim.action.motion.screen.MotionFirstScreenLineAction" text="First Screen Line"/>
|
<action id="VimMotionFirstScreenLine" class="com.maddyhome.idea.vim.action.motion.screen.MotionFirstScreenLineAction" text="First Screen Line"/>
|
||||||
<action id="VimMotionLastScreenLine" class="com.maddyhome.idea.vim.action.motion.screen.MotionLastScreenLineAction" text="Last Screen Line"/>
|
<action id="VimMotionLastScreenLine" class="com.maddyhome.idea.vim.action.motion.screen.MotionLastScreenLineAction" text="Last Screen Line"/>
|
||||||
<action id="VimMotionLastScreenLineEnd" class="com.maddyhome.idea.vim.action.motion.screen.MotionLastScreenLineEndAction" text="Last Screen Line End"/>
|
<action id="VimMotionLastScreenLineEnd" class="com.maddyhome.idea.vim.action.motion.screen.MotionLastScreenLineEndAction" text="Last Screen Line End"/>
|
||||||
<action id="VimMotionMiddleScreenLine" class="com.maddyhome.idea.vim.action.motion.screen.MotionMiddleScreenLineAction" text="Middle Screen Line"/>
|
<action id="VimMotionMiddleScreenLine" class="com.maddyhome.idea.vim.action.motion.screen.MotionMiddleScreenLineAction" text="Middle Screen Line"/>
|
||||||
<!-- Scroll -->
|
<!-- Scroll -->
|
||||||
<action id="VimMotionScrollFirstScreenLinePageStart" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLinePageStartAction" text="Scroll Line to Top"/>
|
<action id="VimMotionScrollFirstScreenLinePageStart" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLinePageStartAction" text="Scroll Line to Top"/>
|
||||||
<action id="VimMotionScrollFirstScreenLineStart" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLineStartAction" text="Scroll Line to Top"/>
|
<action id="VimMotionScrollFirstScreenLineStart" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLineStartAction" text="Scroll Line to Top"/>
|
||||||
<action id="VimMotionScrollFirstScreenLine" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLineAction" text="Scroll Line to Top"/>
|
<action id="VimMotionScrollFirstScreenLine" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenLineAction" text="Scroll Line to Top"/>
|
||||||
<action id="VimMotionScrollHalfPageDown" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfPageDownAction" text="Scroll Half Page Down"/>
|
<action id="VimMotionScrollHalfPageDown" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfPageDownAction" text="Scroll Half Page Down"/>
|
||||||
<action id="VimMotionScrollHalfPageUp" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfPageUpAction" text="Scroll Half Page Up"/>
|
<action id="VimMotionScrollHalfPageUp" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollHalfPageUpAction" text="Scroll Half Page Up"/>
|
||||||
<action id="VimMotionScrollLastScreenLine" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLineAction" text="Scroll Line to Bottom"/>
|
<action id="VimMotionScrollLastScreenLine" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLineAction" text="Scroll Line to Bottom"/>
|
||||||
<action id="VimMotionScrollLastScreenLinePageStart" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLinePageStartAction" text="Scroll Line to Bottom"/>
|
<action id="VimMotionScrollLastScreenLinePageStart" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLinePageStartAction" text="Scroll Line to Bottom"/>
|
||||||
<action id="VimMotionScrollLastScreenLineStart" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLineStartAction" text="Scroll Line to Bottom"/>
|
<action id="VimMotionScrollLastScreenLineStart" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenLineStartAction" text="Scroll Line to Bottom"/>
|
||||||
<action id="VimMotionScrollLineDown" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLineDownAction" text="Scroll Line Down"/>
|
<action id="VimMotionScrollLineDown" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLineDownAction" text="Scroll Line Down"/>
|
||||||
<action id="VimMotionScrollLineUp" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLineUpAction" text="Scroll Line Up"/>
|
<action id="VimMotionScrollLineUp" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLineUpAction" text="Scroll Line Up"/>
|
||||||
<action id="VimMotionScrollMiddleScreenLine" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollMiddleScreenLineAction" text="Scroll Line to Middle"/>
|
<action id="VimMotionScrollMiddleScreenLine" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollMiddleScreenLineAction" text="Scroll Line to Middle"/>
|
||||||
<action id="VimMotionScrollMiddleScreenLineStart" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollMiddleScreenLineStartAction" text="Scroll Line to Middle"/>
|
<action id="VimMotionScrollMiddleScreenLineStart" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollMiddleScreenLineStartAction" text="Scroll Line to Middle"/>
|
||||||
<action id="VimMotionScrollPageDown" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageDownAction" text="Scroll Page Down"/>
|
<action id="VimMotionScrollPageDown" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageDownAction" text="Scroll Page Down"/>
|
||||||
<action id="VimMotionScrollPageUp" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageUpAction" text="Scroll Page Up"/>
|
<action id="VimMotionScrollPageUp" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollPageUpAction" text="Scroll Page Up"/>
|
||||||
<action id="VimMotionScrollFirstScreenColumn" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenColumnAction" text="Scroll Column to first column"/>
|
<action id="VimMotionScrollFirstScreenColumn" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollFirstScreenColumnAction" text="Scroll Column to first column"/>
|
||||||
<action id="VimMotionScrollLastScreenColumn" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenColumnAction" text="Scroll Column to last column"/>
|
<action id="VimMotionScrollLastScreenColumn" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollLastScreenColumnAction" text="Scroll Column to last column"/>
|
||||||
<action id="VimMotionScrollColumnLeft" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollColumnLeftAction" text="Scroll Column Left"/>
|
<action id="VimMotionScrollColumnLeft" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollColumnLeftAction" text="Scroll Column Left"/>
|
||||||
<action id="VimMotionScrollColumnRight" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollColumnRightAction" text="Scroll Column Right"/>
|
<action id="VimMotionScrollColumnRight" class="com.maddyhome.idea.vim.action.motion.scroll.MotionScrollColumnRightAction" text="Scroll Column Right"/>
|
||||||
<!-- Visual -->
|
<!-- Visual -->
|
||||||
<action id="VimVisualExitMode" class="com.maddyhome.idea.vim.action.motion.visual.VisualExitModeAction" text="Exit Visual Mode"/>
|
<action id="VimVisualExitMode" class="com.maddyhome.idea.vim.action.motion.visual.VisualExitModeAction" text="Exit Visual Mode"/>
|
||||||
<action id="VimVisualToggleCharacterMode" class="com.maddyhome.idea.vim.action.motion.visual.VisualToggleCharacterModeAction" text="Toggle Character Selection"/>
|
<action id="VimVisualToggleCharacterMode" class="com.maddyhome.idea.vim.action.motion.visual.VisualToggleCharacterModeAction" text="Toggle Character Selection"/>
|
||||||
<action id="VimVisualToggleLineMode" class="com.maddyhome.idea.vim.action.motion.visual.VisualToggleLineModeAction" text="Toggle Line Selection"/>
|
<action id="VimVisualToggleLineMode" class="com.maddyhome.idea.vim.action.motion.visual.VisualToggleLineModeAction" text="Toggle Line Selection"/>
|
||||||
<action id="VimVisualToggleBlockMode" class="com.maddyhome.idea.vim.action.motion.visual.VisualToggleBlockModeAction" text="Toggle Block Selection"/>
|
<action id="VimVisualToggleBlockMode" class="com.maddyhome.idea.vim.action.motion.visual.VisualToggleBlockModeAction" text="Toggle Block Selection"/>
|
||||||
<action id="VimVisualSwapEnds" class="com.maddyhome.idea.vim.action.motion.visual.VisualSwapEndsAction" text="Swap Visual Selection Ends"/>
|
<action id="VimVisualSwapEnds" class="com.maddyhome.idea.vim.action.motion.visual.VisualSwapEndsAction" text="Swap Visual Selection Ends"/>
|
||||||
<action id="VimVisualSwapEndsBlock" class="com.maddyhome.idea.vim.action.motion.visual.VisualSwapEndsBlockAction" text="Swap Visual Selection Ends"/>
|
<action id="VimVisualSwapEndsBlock" class="com.maddyhome.idea.vim.action.motion.visual.VisualSwapEndsBlockAction" text="Swap Visual Selection Ends"/>
|
||||||
<action id="VimVisualSelectPrevious" class="com.maddyhome.idea.vim.action.motion.visual.VisualSelectPreviousAction" text="Swap Visual Selection Ends"/>
|
<action id="VimVisualSelectPrevious" class="com.maddyhome.idea.vim.action.motion.visual.VisualSelectPreviousAction" text="Swap Visual Selection Ends"/>
|
||||||
<action id="VimVisualSwapSelections" class="com.maddyhome.idea.vim.action.motion.visual.VisualSwapSelectionsAction" text="Swap Visual Selection Ends"/>
|
<action id="VimVisualSwapSelections" class="com.maddyhome.idea.vim.action.motion.visual.VisualSwapSelectionsAction" text="Swap Visual Selection Ends"/>
|
||||||
|
|
||||||
<!-- Insert -->
|
<!-- Insert -->
|
||||||
<action id="VimInsertAfterCursor" class="com.maddyhome.idea.vim.action.change.insert.InsertAfterCursorAction" text="Insert After Cursor"/>
|
<action id="VimInsertAfterCursor" class="com.maddyhome.idea.vim.action.change.insert.InsertAfterCursorAction" text="Insert After Cursor"/>
|
||||||
<action id="VimInsertAfterLineEnd" class="com.maddyhome.idea.vim.action.change.insert.InsertAfterLineEndAction" text="Insert After Line End"/>
|
<action id="VimInsertAfterLineEnd" class="com.maddyhome.idea.vim.action.change.insert.InsertAfterLineEndAction" text="Insert After Line End"/>
|
||||||
<action id="VimInsertAtPreviousInsert" class="com.maddyhome.idea.vim.action.change.insert.InsertAtPreviousInsertAction" text="Insert Before Cursor"/>
|
<action id="VimInsertAtPreviousInsert" class="com.maddyhome.idea.vim.action.change.insert.InsertAtPreviousInsertAction" text="Insert Before Cursor"/>
|
||||||
<action id="VimInsertBeforeCursor" class="com.maddyhome.idea.vim.action.change.insert.InsertBeforeCursorAction" text="Insert Before Cursor"/>
|
<action id="VimInsertBeforeCursor" class="com.maddyhome.idea.vim.action.change.insert.InsertBeforeCursorAction" text="Insert Before Cursor"/>
|
||||||
<action id="VimInsertBeforeFirstNonBlank" class="com.maddyhome.idea.vim.action.change.insert.InsertBeforeFirstNonBlankAction" text="Insert Before First non-Blank"/>
|
<action id="VimInsertBeforeFirstNonBlank" class="com.maddyhome.idea.vim.action.change.insert.InsertBeforeFirstNonBlankAction" text="Insert Before First non-Blank"/>
|
||||||
<action id="VimInsertCharacterAboveCursor" class="com.maddyhome.idea.vim.action.change.insert.InsertCharacterAboveCursorAction" text="Insert Character Above Cursor"/>
|
<action id="VimInsertCharacterAboveCursor" class="com.maddyhome.idea.vim.action.change.insert.InsertCharacterAboveCursorAction" text="Insert Character Above Cursor"/>
|
||||||
<action id="VimInsertCharacterBelowCursor" class="com.maddyhome.idea.vim.action.change.insert.InsertCharacterBelowCursorAction" text="Insert Character Below Cursor"/>
|
<action id="VimInsertCharacterBelowCursor" class="com.maddyhome.idea.vim.action.change.insert.InsertCharacterBelowCursorAction" text="Insert Character Below Cursor"/>
|
||||||
<action id="VimInsertDeleteInsertedText" class="com.maddyhome.idea.vim.action.change.insert.InsertDeleteInsertedTextAction" text="Delete Inserted Text"/>
|
<action id="VimInsertDeleteInsertedText" class="com.maddyhome.idea.vim.action.change.insert.InsertDeleteInsertedTextAction" text="Delete Inserted Text"/>
|
||||||
<action id="VimInsertDeletePreviousWord" class="com.maddyhome.idea.vim.action.change.insert.InsertDeletePreviousWordAction" text="Delete Previous Word"/>
|
<action id="VimInsertDeletePreviousWord" class="com.maddyhome.idea.vim.action.change.insert.InsertDeletePreviousWordAction" text="Delete Previous Word"/>
|
||||||
<action id="VimInsertEnter" class="com.maddyhome.idea.vim.action.change.insert.InsertEnterAction" text="Enter"/>
|
<action id="VimInsertEnter" class="com.maddyhome.idea.vim.action.change.insert.InsertEnterAction" text="Enter"/>
|
||||||
<action id="VimInsertExitMode" class="com.maddyhome.idea.vim.action.change.insert.InsertExitModeAction" text="Exit Insert Mode"/>
|
<action id="VimInsertExitMode" class="com.maddyhome.idea.vim.action.change.insert.InsertExitModeAction" text="Exit Insert Mode"/>
|
||||||
<action id="VimInsertHelp" class="com.maddyhome.idea.vim.action.change.insert.InsertHelpAction" text="Help"/>
|
<action id="VimInsertHelp" class="com.maddyhome.idea.vim.action.change.insert.InsertHelpAction" text="Help"/>
|
||||||
<action id="VimInsertLineStart" class="com.maddyhome.idea.vim.action.change.insert.InsertLineStartAction" text="Insert at Line Start"/>
|
<action id="VimInsertLineStart" class="com.maddyhome.idea.vim.action.change.insert.InsertLineStartAction" text="Insert at Line Start"/>
|
||||||
<action id="VimInsertNewLineAbove" class="com.maddyhome.idea.vim.action.change.insert.InsertNewLineAboveAction" text="Insert New Line Above"/>
|
<action id="VimInsertNewLineAbove" class="com.maddyhome.idea.vim.action.change.insert.InsertNewLineAboveAction" text="Insert New Line Above"/>
|
||||||
<action id="VimInsertNewLineBelow" class="com.maddyhome.idea.vim.action.change.insert.InsertNewLineBelowAction" text="Insert New Line Below"/>
|
<action id="VimInsertNewLineBelow" class="com.maddyhome.idea.vim.action.change.insert.InsertNewLineBelowAction" text="Insert New Line Below"/>
|
||||||
<action id="VimInsertPreviousInsert" class="com.maddyhome.idea.vim.action.change.insert.InsertPreviousInsertAction" text="Insert Previous Text"/>
|
<action id="VimInsertPreviousInsert" class="com.maddyhome.idea.vim.action.change.insert.InsertPreviousInsertAction" text="Insert Previous Text"/>
|
||||||
<action id="VimInsertPreviousInsertExit" class="com.maddyhome.idea.vim.action.change.insert.InsertPreviousInsertExitAction" text="Insert Previous Text"/>
|
<action id="VimInsertPreviousInsertExit" class="com.maddyhome.idea.vim.action.change.insert.InsertPreviousInsertExitAction" text="Insert Previous Text"/>
|
||||||
<action id="VimInsertRegister" class="com.maddyhome.idea.vim.action.change.insert.InsertRegisterAction" text="Insert Register"/>
|
<action id="VimInsertRegister" class="com.maddyhome.idea.vim.action.change.insert.InsertRegisterAction" text="Insert Register"/>
|
||||||
<action id="VimInsertReplaceToggle" class="com.maddyhome.idea.vim.action.change.insert.InsertInsertAction" text="Toggle Insert/Replace"/>
|
<action id="VimInsertReplaceToggle" class="com.maddyhome.idea.vim.action.change.insert.InsertInsertAction" text="Toggle Insert/Replace"/>
|
||||||
<action id="VimInsertSingleCommand" class="com.maddyhome.idea.vim.action.change.insert.InsertSingleCommandAction" text="Execute Command"/>
|
<action id="VimInsertSingleCommand" class="com.maddyhome.idea.vim.action.change.insert.InsertSingleCommandAction" text="Execute Command"/>
|
||||||
<action id="VimVisualBlockInsert" class="com.maddyhome.idea.vim.action.change.insert.VisualBlockInsertAction" text="Visual Block Insert"/>
|
<action id="VimVisualBlockInsert" class="com.maddyhome.idea.vim.action.change.insert.VisualBlockInsertAction" text="Visual Block Insert"/>
|
||||||
<action id="VimVisualBlockAppend" class="com.maddyhome.idea.vim.action.change.insert.VisualBlockAppendAction" text="Visual Block Append"/>
|
<action id="VimVisualBlockAppend" class="com.maddyhome.idea.vim.action.change.insert.VisualBlockAppendAction" text="Visual Block Append"/>
|
||||||
|
|
||||||
<!-- Delete -->
|
<!-- Delete -->
|
||||||
<action id="VimDeleteCharacter" class="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterAction" text="Delete Character"/>
|
<action id="VimDeleteCharacter" class="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterAction" text="Delete Character"/>
|
||||||
<action id="VimDeleteCharacterLeft" class="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterLeftAction" text="Delete Character Left"/>
|
<action id="VimDeleteCharacterLeft" class="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterLeftAction" text="Delete Character Left"/>
|
||||||
<action id="VimDeleteCharacterRight" class="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterRightAction" text="Delete Character Right"/>
|
<action id="VimDeleteCharacterRight" class="com.maddyhome.idea.vim.action.change.delete.DeleteCharacterRightAction" text="Delete Character Right"/>
|
||||||
<action id="VimDeleteEndOfLine" class="com.maddyhome.idea.vim.action.change.delete.DeleteEndOfLineAction" text="Delete End-of-Line"/>
|
<action id="VimDeleteEndOfLine" class="com.maddyhome.idea.vim.action.change.delete.DeleteEndOfLineAction" text="Delete End-of-Line"/>
|
||||||
<action id="VimDeleteJoinLines" class="com.maddyhome.idea.vim.action.change.delete.DeleteJoinLinesAction" text="Delete Join Lines"/>
|
<action id="VimDeleteJoinLines" class="com.maddyhome.idea.vim.action.change.delete.DeleteJoinLinesAction" text="Delete Join Lines"/>
|
||||||
<action id="VimDeleteJoinLinesSpaces" class="com.maddyhome.idea.vim.action.change.delete.DeleteJoinLinesSpacesAction" text="Delete Join Lines"/>
|
<action id="VimDeleteJoinLinesSpaces" class="com.maddyhome.idea.vim.action.change.delete.DeleteJoinLinesSpacesAction" text="Delete Join Lines"/>
|
||||||
<action id="VimDeleteJoinVisualLines" class="com.maddyhome.idea.vim.action.change.delete.DeleteJoinVisualLinesAction" text="Delete Join Lines"/>
|
<action id="VimDeleteJoinVisualLines" class="com.maddyhome.idea.vim.action.change.delete.DeleteJoinVisualLinesAction" text="Delete Join Lines"/>
|
||||||
<action id="VimDeleteJoinVisualLinesSpaces" class="com.maddyhome.idea.vim.action.change.delete.DeleteJoinVisualLinesSpacesAction" text="Delete Join Lines"/>
|
<action id="VimDeleteJoinVisualLinesSpaces" class="com.maddyhome.idea.vim.action.change.delete.DeleteJoinVisualLinesSpacesAction" text="Delete Join Lines"/>
|
||||||
<action id="VimDeleteLine" class="com.maddyhome.idea.vim.action.change.delete.DeleteLineAction" text="Delete Line"/>
|
<action id="VimDeleteLine" class="com.maddyhome.idea.vim.action.change.delete.DeleteLineAction" text="Delete Line"/>
|
||||||
<action id="VimDeleteMotion" class="com.maddyhome.idea.vim.action.change.delete.DeleteMotionAction" text="Delete Motion"/>
|
<action id="VimDeleteMotion" class="com.maddyhome.idea.vim.action.change.delete.DeleteMotionAction" text="Delete Motion"/>
|
||||||
<action id="VimDeleteVisual" class="com.maddyhome.idea.vim.action.change.delete.DeleteVisualAction" text="Delete Selection"/>
|
<action id="VimDeleteVisual" class="com.maddyhome.idea.vim.action.change.delete.DeleteVisualAction" text="Delete Selection"/>
|
||||||
<action id="VimDeleteVisualLines" class="com.maddyhome.idea.vim.action.change.delete.DeleteVisualLinesAction" text="Delete Selected Lines"/>
|
<action id="VimDeleteVisualLines" class="com.maddyhome.idea.vim.action.change.delete.DeleteVisualLinesAction" text="Delete Selected Lines"/>
|
||||||
<action id="VimDeleteVisualLinesEnd" class="com.maddyhome.idea.vim.action.change.delete.DeleteVisualLinesEndAction" text="Delete Selected Lines"/>
|
<action id="VimDeleteVisualLinesEnd" class="com.maddyhome.idea.vim.action.change.delete.DeleteVisualLinesEndAction" text="Delete Selected Lines"/>
|
||||||
|
|
||||||
<!-- Change -->
|
<!-- Change -->
|
||||||
<action id="VimChangeCaseLowerMotion" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseLowerMotionAction" text="Change Motion to Lower Case"/>
|
<action id="VimChangeCaseLowerMotion" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseLowerMotionAction" text="Change Motion to Lower Case"/>
|
||||||
<action id="VimChangeCaseLowerVisual" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseLowerVisualAction" text="Change Motion to Lower Case"/>
|
<action id="VimChangeCaseLowerVisual" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseLowerVisualAction" text="Change Motion to Lower Case"/>
|
||||||
<action id="VimChangeCaseToggleCharacter" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleCharacterAction" text="Change Toggle Case"/>
|
<action id="VimChangeCaseToggleCharacter" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleCharacterAction" text="Change Toggle Case"/>
|
||||||
<action id="VimChangeCaseToggleMotion" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleMotionAction" text="Change Motion Toggle Case"/>
|
<action id="VimChangeCaseToggleMotion" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleMotionAction" text="Change Motion Toggle Case"/>
|
||||||
<action id="VimChangeCaseToggleVisual" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleVisualAction" text="Change Motion Toggle Case"/>
|
<action id="VimChangeCaseToggleVisual" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseToggleVisualAction" text="Change Motion Toggle Case"/>
|
||||||
<action id="VimChangeCaseUpperMotion" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseUpperMotionAction" text="Change Motion to Upper Case"/>
|
<action id="VimChangeCaseUpperMotion" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseUpperMotionAction" text="Change Motion to Upper Case"/>
|
||||||
<action id="VimChangeCaseUpperVisual" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseUpperVisualAction" text="Change Motion to Upper Case"/>
|
<action id="VimChangeCaseUpperVisual" class="com.maddyhome.idea.vim.action.change.change.ChangeCaseUpperVisualAction" text="Change Motion to Upper Case"/>
|
||||||
<action id="VimChangeCharacter" class="com.maddyhome.idea.vim.action.change.change.ChangeCharacterAction" text="Change Character"/>
|
<action id="VimChangeCharacter" class="com.maddyhome.idea.vim.action.change.change.ChangeCharacterAction" text="Change Character"/>
|
||||||
<action id="VimChangeCharacters" class="com.maddyhome.idea.vim.action.change.change.ChangeCharactersAction" text="Change Characters"/>
|
<action id="VimChangeCharacters" class="com.maddyhome.idea.vim.action.change.change.ChangeCharactersAction" text="Change Characters"/>
|
||||||
<action id="VimChangeEndOfLine" class="com.maddyhome.idea.vim.action.change.change.ChangeEndOfLineAction" text="Change to End-of-Line"/>
|
<action id="VimChangeEndOfLine" class="com.maddyhome.idea.vim.action.change.change.ChangeEndOfLineAction" text="Change to End-of-Line"/>
|
||||||
<action id="VimChangeLine" class="com.maddyhome.idea.vim.action.change.change.ChangeLineAction" text="Change Line"/>
|
<action id="VimChangeLine" class="com.maddyhome.idea.vim.action.change.change.ChangeLineAction" text="Change Line"/>
|
||||||
<action id="VimChangeMotion" class="com.maddyhome.idea.vim.action.change.change.ChangeMotionAction" text="Change Motion"/>
|
<action id="VimChangeMotion" class="com.maddyhome.idea.vim.action.change.change.ChangeMotionAction" text="Change Motion"/>
|
||||||
<action id="VimChangeNumberInc" class="com.maddyhome.idea.vim.action.change.change.ChangeNumberIncAction" text="Increment Number"/>
|
<action id="VimChangeNumberInc" class="com.maddyhome.idea.vim.action.change.change.ChangeNumberIncAction" text="Increment Number"/>
|
||||||
<action id="VimChangeNumberDec" class="com.maddyhome.idea.vim.action.change.change.ChangeNumberDecAction" text="Decrement Number"/>
|
<action id="VimChangeNumberDec" class="com.maddyhome.idea.vim.action.change.change.ChangeNumberDecAction" text="Decrement Number"/>
|
||||||
<action id="VimChangeReplace" class="com.maddyhome.idea.vim.action.change.change.ChangeReplaceAction" text="Replace"/>
|
<action id="VimChangeReplace" class="com.maddyhome.idea.vim.action.change.change.ChangeReplaceAction" text="Replace"/>
|
||||||
<action id="VimChangeVisual" class="com.maddyhome.idea.vim.action.change.change.ChangeVisualAction" text="Change Motion"/>
|
<action id="VimChangeVisual" class="com.maddyhome.idea.vim.action.change.change.ChangeVisualAction" text="Change Motion"/>
|
||||||
<action id="VimChangeVisualCharacter" class="com.maddyhome.idea.vim.action.change.change.ChangeVisualCharacterAction" text="Change Motion"/>
|
<action id="VimChangeVisualCharacter" class="com.maddyhome.idea.vim.action.change.change.ChangeVisualCharacterAction" text="Change Motion"/>
|
||||||
<action id="VimChangeVisualLines" class="com.maddyhome.idea.vim.action.change.change.ChangeVisualLinesAction" text="Change Motion"/>
|
<action id="VimChangeVisualLines" class="com.maddyhome.idea.vim.action.change.change.ChangeVisualLinesAction" text="Change Motion"/>
|
||||||
<action id="VimChangeVisualLinesEnd" class="com.maddyhome.idea.vim.action.change.change.ChangeVisualLinesEndAction" text="Change Motion"/>
|
<action id="VimChangeVisualLinesEnd" class="com.maddyhome.idea.vim.action.change.change.ChangeVisualLinesEndAction" text="Change Motion"/>
|
||||||
<action id="VimFilterMotion" class="com.maddyhome.idea.vim.action.change.change.FilterMotionAction" text="Filter Lines"/>
|
<action id="VimFilterMotion" class="com.maddyhome.idea.vim.action.change.change.FilterMotionAction" text="Filter Lines"/>
|
||||||
<action id="VimFilterCountLines" class="com.maddyhome.idea.vim.action.change.change.FilterCountLinesAction" text="Filter Lines"/>
|
<action id="VimFilterCountLines" class="com.maddyhome.idea.vim.action.change.change.FilterCountLinesAction" text="Filter Lines"/>
|
||||||
<action id="VimFilterVisualLines" class="com.maddyhome.idea.vim.action.change.change.FilterVisualLinesAction" text="Filter Visual Lines"/>
|
<action id="VimFilterVisualLines" class="com.maddyhome.idea.vim.action.change.change.FilterVisualLinesAction" text="Filter Visual Lines"/>
|
||||||
<action id="VimAutoIndentVisual" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Auto Indent Selection"/>
|
<action id="VimAutoIndentVisual" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Auto Indent Selection"/>
|
||||||
<action id="VimReformatVisual" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Reformat Selection"/>
|
<action id="VimReformatVisual" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Reformat Selection"/>
|
||||||
<action id="VimCommentByBlockComment" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Block Comment"/>
|
<action id="VimCommentByBlockComment" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Block Comment"/>
|
||||||
<action id="VimCommentByLineComment" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Line Comment"/>
|
<action id="VimCommentByLineComment" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Line Comment"/>
|
||||||
<action id="VimSurroundWith" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Surround With"/>
|
<action id="VimSurroundWith" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Surround With"/>
|
||||||
<action id="VimSurroundWithLiveTemplate" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Surround With Live Template"/>
|
<action id="VimSurroundWithLiveTemplate" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Surround With Live Template"/>
|
||||||
<action id="VimMoveStatementDown" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Move Statement Down"/>
|
<action id="VimMoveStatementDown" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Move Statement Down"/>
|
||||||
<action id="VimMoveStatementUp" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Move Statement Up"/>
|
<action id="VimMoveStatementUp" class="com.maddyhome.idea.vim.action.visual.VisualOperatorDelegateAction" text="Move Statement Up"/>
|
||||||
|
|
||||||
<!-- Shift -->
|
<!-- Shift -->
|
||||||
<action id="VimAutoIndentLines" class="com.maddyhome.idea.vim.action.change.shift.AutoIndentLinesAction" text="Auto Indent Lines"/>
|
<action id="VimAutoIndentLines" class="com.maddyhome.idea.vim.action.change.shift.AutoIndentLinesAction" text="Auto Indent Lines"/>
|
||||||
<action id="VimShiftLeftLines" class="com.maddyhome.idea.vim.action.change.shift.ShiftLeftLinesAction" text="Shift Lines Left"/>
|
<action id="VimShiftLeftLines" class="com.maddyhome.idea.vim.action.change.shift.ShiftLeftLinesAction" text="Shift Lines Left"/>
|
||||||
<action id="VimShiftLeftMotion" class="com.maddyhome.idea.vim.action.change.shift.ShiftLeftMotionAction" text="Shift Motion Left"/>
|
<action id="VimShiftLeftMotion" class="com.maddyhome.idea.vim.action.change.shift.ShiftLeftMotionAction" text="Shift Motion Left"/>
|
||||||
<action id="VimShiftLeftVisual" class="com.maddyhome.idea.vim.action.change.shift.ShiftLeftVisualAction" text="Shift Visual Left"/>
|
<action id="VimShiftLeftVisual" class="com.maddyhome.idea.vim.action.change.shift.ShiftLeftVisualAction" text="Shift Visual Left"/>
|
||||||
<action id="VimShiftRightLines" class="com.maddyhome.idea.vim.action.change.shift.ShiftRightLinesAction" text="Shift Lines Right"/>
|
<action id="VimShiftRightLines" class="com.maddyhome.idea.vim.action.change.shift.ShiftRightLinesAction" text="Shift Lines Right"/>
|
||||||
<action id="VimShiftRightMotion" class="com.maddyhome.idea.vim.action.change.shift.ShiftRightMotionAction" text="Shift Motion Right"/>
|
<action id="VimShiftRightMotion" class="com.maddyhome.idea.vim.action.change.shift.ShiftRightMotionAction" text="Shift Motion Right"/>
|
||||||
<action id="VimShiftRightVisual" class="com.maddyhome.idea.vim.action.change.shift.ShiftRightVisualAction" text="Shift Visual Right"/>
|
<action id="VimShiftRightVisual" class="com.maddyhome.idea.vim.action.change.shift.ShiftRightVisualAction" text="Shift Visual Right"/>
|
||||||
|
|
||||||
<!-- Copy -->
|
<!-- Copy -->
|
||||||
<action id="VimCopyPutTextAfterCursor" class="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorAction" text="Put Text"/>
|
<action id="VimCopyPutTextAfterCursor" class="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorAction" text="Put Text"/>
|
||||||
<action id="VimCopyPutTextBeforeCursor" class="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorAction" text="Put Text"/>
|
<action id="VimCopyPutTextBeforeCursor" class="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorAction" text="Put Text"/>
|
||||||
<action id="VimCopyPutTextAfterCursorNoIndent" class="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorNoIndentAction" text="Put Text"/>
|
<action id="VimCopyPutTextAfterCursorNoIndent" class="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorNoIndentAction" text="Put Text"/>
|
||||||
<action id="VimCopyPutTextBeforeCursorNoIndent" class="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorNoIndentAction" text="Put Text"/>
|
<action id="VimCopyPutTextBeforeCursorNoIndent" class="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorNoIndentAction" text="Put Text"/>
|
||||||
<action id="VimCopyPutTextAfterCursorMoveCursor" class="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorActionMoveCursor" text="Put Text"/>
|
<action id="VimCopyPutTextAfterCursorMoveCursor" class="com.maddyhome.idea.vim.action.copy.PutTextAfterCursorActionMoveCursor" text="Put Text"/>
|
||||||
<action id="VimCopyPutTextBeforeCursorMoveCursor" class="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorActionMoveCursor" text="Put Text"/>
|
<action id="VimCopyPutTextBeforeCursorMoveCursor" class="com.maddyhome.idea.vim.action.copy.PutTextBeforeCursorActionMoveCursor" text="Put Text"/>
|
||||||
<action id="VimCopySelectRegister" class="com.maddyhome.idea.vim.action.copy.SelectRegisterAction" text="Select Register"/>
|
<action id="VimCopySelectRegister" class="com.maddyhome.idea.vim.action.copy.SelectRegisterAction" text="Select Register"/>
|
||||||
<action id="VimCopyYankLine" class="com.maddyhome.idea.vim.action.copy.YankLineAction" text="Yank Line"/>
|
<action id="VimCopyYankLine" class="com.maddyhome.idea.vim.action.copy.YankLineAction" text="Yank Line"/>
|
||||||
<action id="VimCopyYankMotion" class="com.maddyhome.idea.vim.action.copy.YankMotionAction" text="Yank Motion"/>
|
<action id="VimCopyYankMotion" class="com.maddyhome.idea.vim.action.copy.YankMotionAction" text="Yank Motion"/>
|
||||||
<action id="VimCopyYankVisual" class="com.maddyhome.idea.vim.action.copy.YankVisualAction" text="Yank Motion"/>
|
<action id="VimCopyYankVisual" class="com.maddyhome.idea.vim.action.copy.YankVisualAction" text="Yank Motion"/>
|
||||||
<action id="VimCopyYankVisualLines" class="com.maddyhome.idea.vim.action.copy.YankVisualLinesAction" text="Yank Motion"/>
|
<action id="VimCopyYankVisualLines" class="com.maddyhome.idea.vim.action.copy.YankVisualLinesAction" text="Yank Motion"/>
|
||||||
<action id="VimVisualPutText" class="com.maddyhome.idea.vim.action.copy.PutVisualTextAction" text="Paste over Selection"/>
|
<action id="VimVisualPutText" class="com.maddyhome.idea.vim.action.copy.PutVisualTextAction" text="Paste over Selection"/>
|
||||||
<action id="VimVisualPutTextNoIndent" class="com.maddyhome.idea.vim.action.copy.PutVisualTextNoIndentAction" text="Paste over Selection"/>
|
<action id="VimVisualPutTextNoIndent" class="com.maddyhome.idea.vim.action.copy.PutVisualTextNoIndentAction" text="Paste over Selection"/>
|
||||||
<action id="VimVisualPutTextMoveCursor" class="com.maddyhome.idea.vim.action.copy.PutVisualTextMoveCursorAction" text="Paste over Selection"/>
|
<action id="VimVisualPutTextMoveCursor" class="com.maddyhome.idea.vim.action.copy.PutVisualTextMoveCursorAction" text="Paste over Selection"/>
|
||||||
|
|
||||||
<!-- File -->
|
<!-- File -->
|
||||||
<action id="VimFileSaveClose" class="com.maddyhome.idea.vim.action.file.FileSaveCloseAction" text="Save and Close Editor"/>
|
<action id="VimFileSaveClose" class="com.maddyhome.idea.vim.action.file.FileSaveCloseAction" text="Save and Close Editor"/>
|
||||||
<action id="VimFilePrevious" class="com.maddyhome.idea.vim.action.file.FilePreviousAction" text="Selects Previous Editor"/>
|
<action id="VimFilePrevious" class="com.maddyhome.idea.vim.action.file.FilePreviousAction" text="Selects Previous Editor"/>
|
||||||
<action id="VimFileGetAscii" class="com.maddyhome.idea.vim.action.file.FileGetAsciiAction" text="Get ASCII Info"/>
|
<action id="VimFileGetAscii" class="com.maddyhome.idea.vim.action.file.FileGetAsciiAction" text="Get ASCII Info"/>
|
||||||
<action id="VimFileGetHex" class="com.maddyhome.idea.vim.action.file.FileGetHexAction" text="Get Hex Info"/>
|
<action id="VimFileGetHex" class="com.maddyhome.idea.vim.action.file.FileGetHexAction" text="Get Hex Info"/>
|
||||||
<action id="VimFileGetFileInfo" class="com.maddyhome.idea.vim.action.file.FileGetFileInfoAction" text="Get File Info"/>
|
<action id="VimFileGetFileInfo" class="com.maddyhome.idea.vim.action.file.FileGetFileInfoAction" text="Get File Info"/>
|
||||||
<action id="VimFileGetLocationInfo" class="com.maddyhome.idea.vim.action.file.FileGetLocationInfoAction" text="Get Location Info"/>
|
<action id="VimFileGetLocationInfo" class="com.maddyhome.idea.vim.action.file.FileGetLocationInfoAction" text="Get Location Info"/>
|
||||||
|
|
||||||
<!-- Search -->
|
<!-- Search -->
|
||||||
<action id="VimSearchFwdEntry" class="com.maddyhome.idea.vim.action.motion.search.SearchEntryFwdAction" text="Search Forward"/>
|
<action id="VimSearchFwdEntry" class="com.maddyhome.idea.vim.action.motion.search.SearchEntryFwdAction" text="Search Forward"/>
|
||||||
<action id="VimSearchRevEntry" class="com.maddyhome.idea.vim.action.motion.search.SearchEntryRevAction" text="Search Backward"/>
|
<action id="VimSearchRevEntry" class="com.maddyhome.idea.vim.action.motion.search.SearchEntryRevAction" text="Search Backward"/>
|
||||||
<action id="VimSearchAgainNext" class="com.maddyhome.idea.vim.action.motion.search.SearchAgainNextAction" text="Search Again"/>
|
<action id="VimSearchAgainNext" class="com.maddyhome.idea.vim.action.motion.search.SearchAgainNextAction" text="Search Again"/>
|
||||||
<action id="VimSearchAgainPrevious" class="com.maddyhome.idea.vim.action.motion.search.SearchAgainPreviousAction" text="Search Again"/>
|
<action id="VimSearchAgainPrevious" class="com.maddyhome.idea.vim.action.motion.search.SearchAgainPreviousAction" text="Search Again"/>
|
||||||
<action id="VimSearchWholeWordForward" class="com.maddyhome.idea.vim.action.motion.search.SearchWholeWordForwardAction" text="Search Again"/>
|
<action id="VimSearchWholeWordForward" class="com.maddyhome.idea.vim.action.motion.search.SearchWholeWordForwardAction" text="Search Again"/>
|
||||||
<action id="VimSearchWholeWordBackward" class="com.maddyhome.idea.vim.action.motion.search.SearchWholeWordBackwardAction" text="Search Again"/>
|
<action id="VimSearchWholeWordBackward" class="com.maddyhome.idea.vim.action.motion.search.SearchWholeWordBackwardAction" text="Search Again"/>
|
||||||
<action id="VimSearchWordForward" class="com.maddyhome.idea.vim.action.motion.search.SearchWordForwardAction" text="Search Again"/>
|
<action id="VimSearchWordForward" class="com.maddyhome.idea.vim.action.motion.search.SearchWordForwardAction" text="Search Again"/>
|
||||||
<action id="VimSearchWordBackward" class="com.maddyhome.idea.vim.action.motion.search.SearchWordBackwardAction" text="Search Again"/>
|
<action id="VimSearchWordBackward" class="com.maddyhome.idea.vim.action.motion.search.SearchWordBackwardAction" text="Search Again"/>
|
||||||
<action id="VimGotoDeclaration" class="com.maddyhome.idea.vim.action.motion.search.GotoDeclarationAction" text="Goto Declaration"/>
|
<action id="VimGotoDeclaration" class="com.maddyhome.idea.vim.action.motion.search.GotoDeclarationAction" text="Goto Declaration"/>
|
||||||
|
|
||||||
<!-- Macro -->
|
<!-- Macro -->
|
||||||
<action id="VimToggleRecording" class="com.maddyhome.idea.vim.action.macro.ToggleRecordingAction" text="Record Keystrokes"/>
|
<action id="VimToggleRecording" class="com.maddyhome.idea.vim.action.macro.ToggleRecordingAction" text="Record Keystrokes"/>
|
||||||
<action id="VimPlaybackRegister" class="com.maddyhome.idea.vim.action.macro.PlaybackRegisterAction" text="Playback Register"/>
|
<action id="VimPlaybackRegister" class="com.maddyhome.idea.vim.action.macro.PlaybackRegisterAction" text="Playback Register"/>
|
||||||
<action id="VimPlaybackLastRegister" class="com.maddyhome.idea.vim.action.macro.PlaybackLastRegisterAction" text="Playback Last Register"/>
|
<action id="VimPlaybackLastRegister" class="com.maddyhome.idea.vim.action.macro.PlaybackLastRegisterAction" text="Playback Last Register"/>
|
||||||
|
|
||||||
<!-- Command Line -->
|
<!-- Command Line -->
|
||||||
<action id="VimExBackspace" class="com.maddyhome.idea.vim.action.ex.BackspaceAction" text="Backspace"/>
|
<action id="VimExBackspace" class="com.maddyhome.idea.vim.action.ex.BackspaceAction" text="Backspace"/>
|
||||||
<action id="VimProcessExEntry" class="com.maddyhome.idea.vim.action.ex.ProcessExEntryAction" text="Process Ex Entry"/>
|
<action id="VimProcessExEntry" class="com.maddyhome.idea.vim.action.ex.ProcessExEntryAction" text="Process Ex Entry"/>
|
||||||
<action id="VimProcessExKey" class="com.maddyhome.idea.vim.action.ex.ProcessExKeyAction" text="Process Ex Key"/>
|
<action id="VimProcessExKey" class="com.maddyhome.idea.vim.action.ex.ProcessExKeyAction" text="Process Ex Key"/>
|
||||||
<action id="VimCancelExEntry" class="com.maddyhome.idea.vim.action.ex.CancelExEntryAction" text="Cancel Ex Entry"/>
|
<action id="VimCancelExEntry" class="com.maddyhome.idea.vim.action.ex.CancelExEntryAction" text="Cancel Ex Entry"/>
|
||||||
|
|
||||||
<!-- Other -->
|
<!-- Other -->
|
||||||
<action id="VimLastSearchReplace" class="com.maddyhome.idea.vim.action.change.change.ChangeLastSearchReplaceAction" text="Repeat Last :s"/>
|
<action id="VimLastSearchReplace" class="com.maddyhome.idea.vim.action.change.change.ChangeLastSearchReplaceAction" text="Repeat Last :s"/>
|
||||||
<action id="VimLastGlobalSearchReplace" class="com.maddyhome.idea.vim.action.change.change.ChangeLastGlobalSearchReplaceAction" text="Repeat Last :s"/>
|
<action id="VimLastGlobalSearchReplace" class="com.maddyhome.idea.vim.action.change.change.ChangeLastGlobalSearchReplaceAction" text="Repeat Last :s"/>
|
||||||
<action id="VimRepeatChange" class="com.maddyhome.idea.vim.action.change.RepeatChangeAction" text="Repeat Change"/>
|
<action id="VimRepeatChange" class="com.maddyhome.idea.vim.action.change.RepeatChangeAction" text="Repeat Change"/>
|
||||||
<action id="VimRepeatExCommand" class="com.maddyhome.idea.vim.action.change.RepeatExCommandAction" text="Repeat Ex Command"/>
|
<action id="VimRepeatExCommand" class="com.maddyhome.idea.vim.action.change.RepeatExCommandAction" text="Repeat Ex Command"/>
|
||||||
<action id="VimExEntry" class="com.maddyhome.idea.vim.action.ExEntryAction" text="Enter Ex Command"/>
|
<action id="VimExEntry" class="com.maddyhome.idea.vim.action.ExEntryAction" text="Enter Ex Command"/>
|
||||||
<action id="VimResetMode" class="com.maddyhome.idea.vim.action.ResetModeAction" text="Reset Mode"/>
|
<action id="VimResetMode" class="com.maddyhome.idea.vim.action.ResetModeAction" text="Reset Mode"/>
|
||||||
<action id="VimRedo" class="com.maddyhome.idea.vim.action.change.RedoAction" text="Redo"/>
|
<action id="VimRedo" class="com.maddyhome.idea.vim.action.change.RedoAction" text="Redo"/>
|
||||||
<action id="VimUndo" class="com.maddyhome.idea.vim.action.change.UndoAction" text="Undo"/>
|
<action id="VimUndo" class="com.maddyhome.idea.vim.action.change.UndoAction" text="Undo"/>
|
||||||
<action id="VimGenerateConstructor" class="com.maddyhome.idea.vim.action.TxActionWrapper" text="Generate Constructor"/>
|
|
||||||
<action id="VimGenerateGetter" class="com.maddyhome.idea.vim.action.TxActionWrapper" text="Generate Getter"/>
|
|
||||||
<action id="VimGenerateSetter" class="com.maddyhome.idea.vim.action.TxActionWrapper" text="Generate Setter"/>
|
|
||||||
<action id="VimGenerateGetterAndSetter" class="com.maddyhome.idea.vim.action.TxActionWrapper" text="Generate Getter and Setter"/>
|
|
||||||
<action id="VimGenerateEquals" class="com.maddyhome.idea.vim.action.TxActionWrapper" text="Generate Equals"/>
|
|
||||||
|
|
||||||
<action id="VimClassNameCompletion" class="com.maddyhome.idea.vim.action.OriginalDelegateAction" text="Class Name Completion"/>
|
<action id="VimClassNameCompletion" class="com.maddyhome.idea.vim.action.OriginalDelegateAction" text="Class Name Completion"/>
|
||||||
<action id="VimCodeCompletion" class="com.maddyhome.idea.vim.action.OriginalDelegateAction" text="Code Completion"/>
|
<action id="VimCodeCompletion" class="com.maddyhome.idea.vim.action.OriginalDelegateAction" text="Code Completion"/>
|
||||||
<action id="VimSmartTypeCompletion" class="com.maddyhome.idea.vim.action.OriginalDelegateAction" text="Smart Type Completion"/>
|
<action id="VimSmartTypeCompletion" class="com.maddyhome.idea.vim.action.OriginalDelegateAction" text="Smart Type Completion"/>
|
||||||
<action id="VimWordCompletion" class="com.maddyhome.idea.vim.action.OriginalDelegateAction" text="Word Completion"/>
|
<action id="VimWordCompletion" class="com.maddyhome.idea.vim.action.OriginalDelegateAction" text="Word Completion"/>
|
||||||
<action id="VimInsertLiveTemplate" class="com.maddyhome.idea.vim.action.OriginalDelegateAction" text="Insert Live Template"/>
|
<action id="VimInsertLiveTemplate" class="com.maddyhome.idea.vim.action.OriginalDelegateAction" text="Insert Live Template"/>
|
||||||
|
|
||||||
<!-- Keys -->
|
<!-- Keys -->
|
||||||
<action id="VimKeyHandler" class="com.maddyhome.idea.vim.action.key.KeyAction" text="Keys"/>
|
<action id="VimKeyHandler" class="com.maddyhome.idea.vim.action.key.KeyAction" text="Keys"/>
|
||||||
<action id="VimDummyHandler" class="com.maddyhome.idea.vim.action.key.DummyAction" text="Keys"/>
|
<action id="VimDummyHandler" class="com.maddyhome.idea.vim.action.key.DummyAction" text="Keys"/>
|
||||||
<action id="VimNotImplementedHandler" class="com.maddyhome.idea.vim.action.key.NotImplementedAction" text="Reserved For Future Use"/>
|
<action id="VimNotImplementedHandler" class="com.maddyhome.idea.vim.action.key.NotImplementedAction" text="Reserved For Future Use"/>
|
||||||
<action id="VimEditorBackSpace" class="com.maddyhome.idea.vim.action.key.BackSpaceAction" text="Backspace"/>
|
<action id="VimEditorBackSpace" class="com.maddyhome.idea.vim.action.key.BackSpaceAction" text="Backspace"/>
|
||||||
<action id="VimEditorDelete" class="com.maddyhome.idea.vim.action.key.DeleteAction" text="Delete"/>
|
<action id="VimEditorDelete" class="com.maddyhome.idea.vim.action.key.DeleteAction" text="Delete"/>
|
||||||
<action id="VimEditorDown" class="com.maddyhome.idea.vim.action.key.DownAction" text="Down"/>
|
<action id="VimEditorDown" class="com.maddyhome.idea.vim.action.key.DownAction" text="Down"/>
|
||||||
<action id="VimEditorEnter" class="com.maddyhome.idea.vim.action.key.EnterAction" text="Enter"/>
|
<action id="VimEditorEnter" class="com.maddyhome.idea.vim.action.key.EnterAction" text="Enter"/>
|
||||||
<action id="VimEditorEscape" class="com.maddyhome.idea.vim.action.key.EscapeAction" text="Escape"/>
|
<action id="VimEditorEscape" class="com.maddyhome.idea.vim.action.key.EscapeAction" text="Escape"/>
|
||||||
<action id="VimEditorLeft" class="com.maddyhome.idea.vim.action.key.LeftAction" text="Left"/>
|
<action id="VimEditorLeft" class="com.maddyhome.idea.vim.action.key.LeftAction" text="Left"/>
|
||||||
<action id="VimEditorLineEnd" class="com.maddyhome.idea.vim.action.key.LineEndAction" text="LineEnd"/>
|
<action id="VimEditorLineEnd" class="com.maddyhome.idea.vim.action.key.LineEndAction" text="LineEnd"/>
|
||||||
<action id="VimEditorLineStart" class="com.maddyhome.idea.vim.action.key.LineStartAction" text="LineStart"/>
|
<action id="VimEditorLineStart" class="com.maddyhome.idea.vim.action.key.LineStartAction" text="LineStart"/>
|
||||||
<action id="VimEditorPageDown" class="com.maddyhome.idea.vim.action.key.PageDownAction" text="PageDown"/>
|
<action id="VimEditorPageDown" class="com.maddyhome.idea.vim.action.key.PageDownAction" text="PageDown"/>
|
||||||
<action id="VimEditorPageUp" class="com.maddyhome.idea.vim.action.key.PageUpAction" text="PageUp"/>
|
<action id="VimEditorPageUp" class="com.maddyhome.idea.vim.action.key.PageUpAction" text="PageUp"/>
|
||||||
<action id="VimEditorRight" class="com.maddyhome.idea.vim.action.key.RightAction" text="Right"/>
|
<action id="VimEditorRight" class="com.maddyhome.idea.vim.action.key.RightAction" text="Right"/>
|
||||||
<action id="VimEditorTab" class="com.maddyhome.idea.vim.action.key.TabAction" text="Tab"/>
|
<action id="VimEditorTab" class="com.maddyhome.idea.vim.action.key.TabAction" text="Tab"/>
|
||||||
<action id="VimEditorToggleInsertState" class="com.maddyhome.idea.vim.action.key.ToggleInsertStateAction" text="Insert/Overwrite"/>
|
<action id="VimEditorToggleInsertState" class="com.maddyhome.idea.vim.action.key.ToggleInsertStateAction" text="Insert/Overwrite"/>
|
||||||
<action id="VimEditorUp" class="com.maddyhome.idea.vim.action.key.UpAction" text="Up"/>
|
<action id="VimEditorUp" class="com.maddyhome.idea.vim.action.key.UpAction" text="Up"/>
|
||||||
<action id="VimDigraphEntry" class="com.maddyhome.idea.vim.action.key.KeyAction" text="Digraph Entry"/>
|
<action id="VimDigraphEntry" class="com.maddyhome.idea.vim.action.key.KeyAction" text="Digraph Entry"/>
|
||||||
</actions>
|
</actions>
|
||||||
</idea-plugin>
|
</idea-plugin>
|
||||||
|
@@ -1,129 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<keymap version="1" name="Vim" disable-mnemonics="false" parent="$default">
|
<keymap version="1" name="Vim" disable-mnemonics="false" parent="$default">
|
||||||
<action id="$Copy">
|
|
||||||
<keyboard-shortcut first-keystroke="control INSERT" />
|
|
||||||
<keyboard-shortcut first-keystroke="meta C" />
|
|
||||||
</action>
|
|
||||||
<action id="$Cut">
|
|
||||||
<keyboard-shortcut first-keystroke="shift DELETE" />
|
|
||||||
<keyboard-shortcut first-keystroke="meta X" />
|
|
||||||
</action>
|
|
||||||
<action id="$Paste">
|
|
||||||
<keyboard-shortcut first-keystroke="shift INSERT" />
|
|
||||||
<keyboard-shortcut first-keystroke="meta V" />
|
|
||||||
</action>
|
|
||||||
<action id="$Redo">
|
|
||||||
<keyboard-shortcut first-keystroke="shift alt BACK_SPACE" />
|
|
||||||
</action>
|
|
||||||
<action id="$SelectAll" />
|
|
||||||
<action id="$Undo">
|
|
||||||
<keyboard-shortcut first-keystroke="alt BACK_SPACE" />
|
|
||||||
</action>
|
|
||||||
<action id="CheckinProject" />
|
|
||||||
<action id="ClassNameCompletion" />
|
|
||||||
<action id="ClearCase.CheckInProject" />
|
|
||||||
<action id="CodeCompletion" />
|
|
||||||
<action id="CommanderSwapPanels" />
|
|
||||||
<action id="ContextHelp" />
|
|
||||||
<action id="EditorBackSpace">
|
|
||||||
<keyboard-shortcut first-keystroke="BACK_SPACE" />
|
|
||||||
</action>
|
|
||||||
<action id="EditorCodeBlockEnd" />
|
|
||||||
<action id="EditorCodeBlockStart" />
|
|
||||||
<action id="EditorCopy">
|
|
||||||
<keyboard-shortcut first-keystroke="control INSERT" />
|
|
||||||
<keyboard-shortcut first-keystroke="meta C" />
|
|
||||||
</action>
|
|
||||||
<action id="EditorCut">
|
|
||||||
<keyboard-shortcut first-keystroke="shift DELETE" />
|
|
||||||
<keyboard-shortcut first-keystroke="meta X" />
|
|
||||||
</action>
|
|
||||||
<action id="EditorDeleteLine" />
|
|
||||||
<action id="EditorDeleteToWordEnd" />
|
|
||||||
<action id="EditorDeleteToWordStart" />
|
|
||||||
<action id="EditorDownWithSelection" />
|
|
||||||
<action id="EditorDuplicate" />
|
|
||||||
<action id="EditorIndentSelection" />
|
|
||||||
<action id="EditorJoinLines" />
|
|
||||||
<action id="EditorLeftWithSelection" />
|
|
||||||
<action id="EditorLineEndWithSelection" />
|
|
||||||
<action id="EditorLineStartWithSelection" />
|
|
||||||
<action id="EditorMoveToPageBottom" />
|
|
||||||
<action id="EditorMoveToPageBottomWithSelection" />
|
|
||||||
<action id="EditorMoveToPageTop" />
|
|
||||||
<action id="EditorMoveToPageTopWithSelection" />
|
|
||||||
<action id="EditorNextWord" />
|
|
||||||
<action id="EditorNextWordWithSelection" />
|
|
||||||
<action id="EditorPageDownWithSelection" />
|
|
||||||
<action id="EditorPageUpWithSelection" />
|
|
||||||
<action id="EditorPaste">
|
|
||||||
<keyboard-shortcut first-keystroke="shift INSERT" />
|
|
||||||
<keyboard-shortcut first-keystroke="meta V" />
|
|
||||||
</action>
|
|
||||||
<action id="EditorPreviousWord" />
|
|
||||||
<action id="EditorPreviousWordWithSelection" />
|
|
||||||
<action id="EditorRedo" />
|
|
||||||
<action id="EditorRightWithSelection" />
|
|
||||||
<action id="EditorScrollDown" />
|
|
||||||
<action id="EditorScrollToCenter" />
|
|
||||||
<action id="EditorScrollUp" />
|
|
||||||
<action id="EditorSelectAll" />
|
|
||||||
<action id="EditorSelectWord" />
|
|
||||||
<action id="EditorSplitLine" />
|
|
||||||
<action id="EditorStartNewLine" />
|
|
||||||
<action id="EditorTextEnd" />
|
|
||||||
<action id="EditorTextEndWithSelection" />
|
|
||||||
<action id="EditorTextStart" />
|
|
||||||
<action id="EditorTextStartWithSelection" />
|
|
||||||
<action id="EditorToggleCase" />
|
|
||||||
<action id="EditorUnSelectWord" />
|
|
||||||
<action id="EditorUndo" />
|
|
||||||
<action id="EditorUnindentSelection" />
|
|
||||||
<action id="EditorUpWithSelection" />
|
|
||||||
<action id="Find" />
|
|
||||||
<action id="FindNext">
|
|
||||||
<keyboard-shortcut first-keystroke="F3" />
|
|
||||||
</action>
|
|
||||||
<action id="FindPrevious">
|
|
||||||
<keyboard-shortcut first-keystroke="shift F3" />
|
|
||||||
</action>
|
|
||||||
<action id="GotoBookmark2" />
|
|
||||||
<action id="GotoClass">
|
|
||||||
<keyboard-shortcut first-keystroke="shift alt N" />
|
|
||||||
</action>
|
|
||||||
<action id="GotoDeclaration">
|
|
||||||
<mouse-shortcut keystroke="control button1" />
|
|
||||||
<mouse-shortcut keystroke="button2" />
|
|
||||||
</action>
|
|
||||||
<action id="GotoLine" />
|
|
||||||
<action id="GotoSuperMethod">
|
|
||||||
<keyboard-shortcut first-keystroke="shift control U" />
|
|
||||||
</action>
|
|
||||||
<action id="ImplementMethods">
|
|
||||||
<keyboard-shortcut first-keystroke="shift control I" />
|
|
||||||
</action>
|
|
||||||
<action id="InsertLiveTemplate" />
|
|
||||||
<action id="MethodHierarchy.ImplementMethodAction" />
|
|
||||||
<action id="MethodHierarchy.OverrideMethodAction" />
|
|
||||||
<action id="OverrideMethods">
|
|
||||||
<keyboard-shortcut first-keystroke="shift control O" />
|
|
||||||
</action>
|
|
||||||
<action id="ParameterInfo">
|
|
||||||
<keyboard-shortcut first-keystroke="shift control P" />
|
|
||||||
</action>
|
|
||||||
<action id="QuickJavaDoc">
|
|
||||||
<mouse-shortcut keystroke="alt button2" />
|
|
||||||
</action>
|
|
||||||
<action id="RecentFiles" />
|
|
||||||
<action id="Replace" />
|
|
||||||
<action id="SaveAll" />
|
|
||||||
<action id="SmartTypeCompletion" />
|
|
||||||
<action id="Starteam.CheckinProject" />
|
|
||||||
<action id="Subversion.CommitProject" />
|
|
||||||
<action id="ToggleBookmark2" />
|
|
||||||
<action id="TypeHierarchy">
|
|
||||||
<keyboard-shortcut first-keystroke="shift control alt H" />
|
|
||||||
</action>
|
|
||||||
<action id="VimKeyHandler">
|
<action id="VimKeyHandler">
|
||||||
<keyboard-shortcut first-keystroke="control 2" />
|
<keyboard-shortcut first-keystroke="control 2" />
|
||||||
<keyboard-shortcut first-keystroke="control A" />
|
<keyboard-shortcut first-keystroke="control A" />
|
||||||
@@ -145,7 +21,6 @@
|
|||||||
<keyboard-shortcut first-keystroke="control L" />
|
<keyboard-shortcut first-keystroke="control L" />
|
||||||
<keyboard-shortcut first-keystroke="control LEFT" />
|
<keyboard-shortcut first-keystroke="control LEFT" />
|
||||||
<keyboard-shortcut first-keystroke="control M" />
|
<keyboard-shortcut first-keystroke="control M" />
|
||||||
<keyboard-shortcut first-keystroke="control N" />
|
|
||||||
<keyboard-shortcut first-keystroke="control O" />
|
<keyboard-shortcut first-keystroke="control O" />
|
||||||
<keyboard-shortcut first-keystroke="control OPEN_BRACKET" />
|
<keyboard-shortcut first-keystroke="control OPEN_BRACKET" />
|
||||||
<keyboard-shortcut first-keystroke="control P" />
|
<keyboard-shortcut first-keystroke="control P" />
|
||||||
|
@@ -1,30 +1,29 @@
|
|||||||
package com.maddyhome.idea.vim;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2006 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.ActionManager;
|
import com.intellij.openapi.actionSystem.ActionManager;
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.application.ApplicationManager;
|
import com.intellij.openapi.application.ApplicationManager;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.command.CommandProcessor;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
||||||
import com.intellij.openapi.project.Project;
|
import com.intellij.openapi.project.Project;
|
||||||
@@ -105,7 +104,6 @@ public class KeyHandler {
|
|||||||
// All the editor actions should be performed with top level editor!!!
|
// All the editor actions should be performed with top level editor!!!
|
||||||
// Be careful: all the EditorActionHandler implementation should correctly process InjectedEditors
|
// Be careful: all the EditorActionHandler implementation should correctly process InjectedEditors
|
||||||
editor = InjectedLanguageUtil.getTopLevelEditor(editor);
|
editor = InjectedLanguageUtil.getTopLevelEditor(editor);
|
||||||
logger.debug("handleKey " + key);
|
|
||||||
final CommandState editorState = CommandState.getInstance(editor);
|
final CommandState editorState = CommandState.getInstance(editor);
|
||||||
final boolean isRecording = editorState.isRecording();
|
final boolean isRecording = editorState.isRecording();
|
||||||
boolean shouldRecord = true;
|
boolean shouldRecord = true;
|
||||||
@@ -120,13 +118,11 @@ public class KeyHandler {
|
|||||||
else if (isCommandCount(editorState, chKey)) {
|
else if (isCommandCount(editorState, chKey)) {
|
||||||
// Update the count
|
// Update the count
|
||||||
count = count * 10 + (chKey - '0');
|
count = count * 10 + (chKey - '0');
|
||||||
logger.debug("count now " + count);
|
|
||||||
}
|
}
|
||||||
// Pressing delete while entering a count "removes" the last digit entered
|
// Pressing delete while entering a count "removes" the last digit entered
|
||||||
else if (isDeleteCommandCount(key, editorState)) {
|
else if (isDeleteCommandCount(key, editorState)) {
|
||||||
// "Remove" the last digit sent to us
|
// "Remove" the last digit sent to us
|
||||||
count /= 10;
|
count /= 10;
|
||||||
logger.debug("count now " + count);
|
|
||||||
}
|
}
|
||||||
// If we got this far the user is entering a command or supplying an argument to an entered command.
|
// If we got this far the user is entering a command or supplying an argument to an entered command.
|
||||||
// First let's check to see if we are at the point of expecting a single character argument to a command.
|
// First let's check to see if we are at the point of expecting a single character argument to a command.
|
||||||
@@ -138,9 +134,6 @@ public class KeyHandler {
|
|||||||
else {
|
else {
|
||||||
// For debugging purposes we track the keys entered for this command
|
// For debugging purposes we track the keys entered for this command
|
||||||
keys.add(key);
|
keys.add(key);
|
||||||
if (logger.isDebugEnabled()) {
|
|
||||||
logger.debug("keys now " + keys);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ask the key/action tree if this is an appropriate key at this point in the command and if so,
|
// Ask the key/action tree if this is an appropriate key at this point in the command and if so,
|
||||||
// return the node matching this keystroke
|
// return the node matching this keystroke
|
||||||
@@ -161,21 +154,16 @@ public class KeyHandler {
|
|||||||
// If this is an argument node then the last keystroke was not part of the current command but should
|
// If this is an argument node then the last keystroke was not part of the current command but should
|
||||||
// be the first keystroke of the argument of the current command
|
// be the first keystroke of the argument of the current command
|
||||||
else if (node instanceof ArgumentNode) {
|
else if (node instanceof ArgumentNode) {
|
||||||
shouldRecord = handleArgumentNode(editor, key, context, editorState, shouldRecord, (ArgumentNode)node);
|
shouldRecord = handleArgumentNode(editor, key, context, editorState, true, (ArgumentNode)node);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.debug("checking for digraph");
|
|
||||||
logger.debug("lastWasBS=" + lastWasBS);
|
|
||||||
logger.debug("lastChar=" + lastChar);
|
|
||||||
if (lastWasBS && lastChar != 0 && Options.getInstance().isSet("digraph")) {
|
if (lastWasBS && lastChar != 0 && Options.getInstance().isSet("digraph")) {
|
||||||
char dig = CommandGroups.getInstance().getDigraph().getDigraph(lastChar, key.getKeyChar());
|
char dig = CommandGroups.getInstance().getDigraph().getDigraph(lastChar, key.getKeyChar());
|
||||||
logger.debug("dig=" + dig);
|
|
||||||
key = KeyStroke.getKeyStroke(dig);
|
key = KeyStroke.getKeyStroke(dig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are in insert/replace mode send this key in for processing
|
// If we are in insert/replace mode send this key in for processing
|
||||||
if (editorState.getMode() == CommandState.Mode.INSERT ||
|
if (editorState.getMode() == CommandState.Mode.INSERT || editorState.getMode() == CommandState.Mode.REPLACE) {
|
||||||
editorState.getMode() == CommandState.Mode.REPLACE) {
|
|
||||||
if (!CommandGroups.getInstance().getChange().processKey(editor, context, key)) {
|
if (!CommandGroups.getInstance().getChange().processKey(editor, context, key)) {
|
||||||
shouldRecord = false;
|
shouldRecord = false;
|
||||||
}
|
}
|
||||||
@@ -214,49 +202,47 @@ public class KeyHandler {
|
|||||||
fullReset(editor);
|
fullReset(editor);
|
||||||
}
|
}
|
||||||
else if (isRecording && shouldRecord) {
|
else if (isRecording && shouldRecord) {
|
||||||
CommandGroups.getInstance().getRegister().addKeyStroke(key);
|
CommandGroups.getInstance().getRegister().recordKeyStroke(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleEditorReset(@NotNull Editor editor, @NotNull KeyStroke key, @NotNull DataContext context) {
|
private void handleEditorReset(@NotNull Editor editor, @NotNull KeyStroke key, @NotNull final DataContext context) {
|
||||||
if (state != State.COMMAND && count == 0 && currentArg == Argument.Type.NONE && currentCmd.size() == 0 &&
|
if (state != State.COMMAND && count == 0 && currentArg == Argument.Type.NONE && currentCmd.size() == 0 &&
|
||||||
CommandGroups.getInstance().getRegister().getCurrentRegister() == RegisterGroup.REGISTER_DEFAULT) {
|
CommandGroups.getInstance().getRegister().getCurrentRegister() == RegisterGroup.REGISTER_DEFAULT) {
|
||||||
if (key.getKeyCode() == KeyEvent.VK_ESCAPE) {
|
if (key.getKeyCode() == KeyEvent.VK_ESCAPE) {
|
||||||
KeyHandler.executeAction("VimEditorEscape", context);
|
CommandProcessor.getInstance().executeCommand(editor.getProject(), new Runnable() {
|
||||||
//getOriginalHandler().execute(editor, key.getKeyChar(), context);
|
@Override
|
||||||
|
public void run() {
|
||||||
|
KeyHandler.executeAction("VimEditorEscape", context);
|
||||||
|
}
|
||||||
|
}, "", null);
|
||||||
}
|
}
|
||||||
VimPlugin.indicateError();
|
VimPlugin.indicateError();
|
||||||
}
|
}
|
||||||
|
reset(editor);
|
||||||
reset(editor);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isDeleteCommandCount(@NotNull KeyStroke key, @NotNull CommandState editorState) {
|
private boolean isDeleteCommandCount(@NotNull KeyStroke key, @NotNull CommandState editorState) {
|
||||||
return (editorState.getMode() == CommandState.Mode.COMMAND ||
|
return (editorState.getMode() == CommandState.Mode.COMMAND || editorState.getMode() == CommandState.Mode.VISUAL) &&
|
||||||
editorState.getMode() == CommandState.Mode.VISUAL) &&
|
state == State.NEW_COMMAND && currentArg != Argument.Type.CHARACTER && currentArg != Argument.Type.DIGRAPH &&
|
||||||
state == State.NEW_COMMAND && currentArg != Argument.Type.CHARACTER && currentArg !=
|
key.getKeyCode() == KeyEvent.VK_DELETE && count != 0;
|
||||||
Argument.Type.DIGRAPH &&
|
|
||||||
key.getKeyCode() == KeyEvent.VK_DELETE && count != 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isCommandCount(@NotNull CommandState editorState, char chKey) {
|
private boolean isCommandCount(@NotNull CommandState editorState, char chKey) {
|
||||||
return (editorState.getMode() == CommandState.Mode.COMMAND ||
|
return (editorState.getMode() == CommandState.Mode.COMMAND || editorState.getMode() == CommandState.Mode.VISUAL) &&
|
||||||
editorState.getMode() == CommandState.Mode.VISUAL) &&
|
state == State.NEW_COMMAND && currentArg != Argument.Type.CHARACTER && currentArg != Argument.Type.DIGRAPH &&
|
||||||
state == State.NEW_COMMAND && currentArg != Argument.Type.CHARACTER && currentArg !=
|
Character.isDigit(chKey) &&
|
||||||
Argument.Type.DIGRAPH &&
|
(count != 0 || chKey != '0');
|
||||||
Character.isDigit(chKey) &&
|
|
||||||
(count != 0 || chKey != '0');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isEditorReset(@NotNull KeyStroke key, @NotNull CommandState editorState) {
|
private boolean isEditorReset(@NotNull KeyStroke key, @NotNull CommandState editorState) {
|
||||||
return (editorState.getMode() == CommandState.Mode.COMMAND || state == State.COMMAND) &&
|
return (editorState.getMode() == CommandState.Mode.COMMAND || state == State.COMMAND) &&
|
||||||
(key.getKeyCode() == KeyEvent.VK_ESCAPE ||
|
(key.getKeyCode() == KeyEvent.VK_ESCAPE ||
|
||||||
(key.getKeyCode() == KeyEvent.VK_C && (key.getModifiers() & KeyEvent.CTRL_MASK) != 0) ||
|
(key.getKeyCode() == KeyEvent.VK_C && (key.getModifiers() & KeyEvent.CTRL_MASK) != 0) ||
|
||||||
(key.getKeyCode() == '[' && (key.getModifiers() & KeyEvent.CTRL_MASK) != 0));
|
(key.getKeyCode() == '[' && (key.getModifiers() & KeyEvent.CTRL_MASK) != 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleCharArgument(@NotNull KeyStroke key, char chKey) {
|
private void handleCharArgument(@NotNull KeyStroke key, char chKey) {
|
||||||
logger.debug("currentArg is Character");
|
|
||||||
// We are expecting a character argument - is this a regular character the user typed?
|
// We are expecting a character argument - is this a regular character the user typed?
|
||||||
// Some special keys can be handled as character arguments - let's check for them here.
|
// Some special keys can be handled as character arguments - let's check for them here.
|
||||||
if (chKey == 0) {
|
if (chKey == 0) {
|
||||||
@@ -284,12 +270,13 @@ public class KeyHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handleDigraph(@NotNull Editor editor, @NotNull KeyStroke key, @NotNull DataContext context, @Nullable Node node) {
|
private boolean handleDigraph(@NotNull Editor editor, @NotNull KeyStroke key, @NotNull DataContext context,
|
||||||
|
@Nullable Node node) {
|
||||||
if (digraph == null && !(node instanceof CommandNode) && DigraphSequence.isDigraphStart(key)) {
|
if (digraph == null && !(node instanceof CommandNode) && DigraphSequence.isDigraphStart(key)) {
|
||||||
digraph = new DigraphSequence();
|
digraph = new DigraphSequence();
|
||||||
}
|
}
|
||||||
if (digraph != null) {
|
if (digraph != null) {
|
||||||
DigraphSequence.DigraphResult res = digraph.processKey(key, editor, context);
|
DigraphSequence.DigraphResult res = digraph.processKey(key, editor);
|
||||||
switch (res.getResult()) {
|
switch (res.getResult()) {
|
||||||
case DigraphSequence.DigraphResult.RES_OK:
|
case DigraphSequence.DigraphResult.RES_OK:
|
||||||
return true;
|
return true;
|
||||||
@@ -301,11 +288,13 @@ public class KeyHandler {
|
|||||||
currentArg = Argument.Type.CHARACTER;
|
currentArg = Argument.Type.CHARACTER;
|
||||||
}
|
}
|
||||||
digraph = null;
|
digraph = null;
|
||||||
handleKey(editor, res.getStroke(), context);
|
final KeyStroke stroke = res.getStroke();
|
||||||
|
if (stroke == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
handleKey(editor, stroke, context);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug("digraph done");
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -323,23 +312,19 @@ public class KeyHandler {
|
|||||||
cmd = top;
|
cmd = top;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logger.isDebugEnabled()) {
|
|
||||||
logger.debug("cmd=" + cmd);
|
|
||||||
}
|
|
||||||
// If we have a command and a motion command argument, both could possibly have their own counts. We
|
// If we have a command and a motion command argument, both could possibly have their own counts. We
|
||||||
// need to adjust the counts so the motion gets the product of both counts and the count associated with
|
// need to adjust the counts so the motion gets the product of both counts and the count associated with
|
||||||
// the command gets reset. Example 3c2w (change 2 words, three times) becomes c6w (change 6 words)
|
// the command gets reset. Example 3c2w (change 2 words, three times) becomes c6w (change 6 words)
|
||||||
Argument arg = cmd.getArgument();
|
final Argument arg = cmd.getArgument();
|
||||||
if (logger.isDebugEnabled()) {
|
|
||||||
logger.debug("arg=" + arg);
|
|
||||||
}
|
|
||||||
if (arg != null && arg.getType() == Argument.Type.MOTION) {
|
if (arg != null && arg.getType() == Argument.Type.MOTION) {
|
||||||
Command mot = arg.getMotion();
|
final Command mot = arg.getMotion();
|
||||||
// If no count was entered for either command then nothing changes. If either had a count then
|
// If no count was entered for either command then nothing changes. If either had a count then
|
||||||
// the motion gets the product of both.
|
// the motion gets the product of both.
|
||||||
int cnt = cmd.getRawCount() == 0 && mot.getRawCount() == 0 ? 0 : cmd.getCount() * mot.getCount();
|
if (mot != null) {
|
||||||
|
int cnt = cmd.getRawCount() == 0 && mot.getRawCount() == 0 ? 0 : cmd.getCount() * mot.getCount();
|
||||||
|
mot.setCount(cnt);
|
||||||
|
}
|
||||||
cmd.setCount(0);
|
cmd.setCount(0);
|
||||||
mot.setCount(cnt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we were in "operator pending" mode, reset back to normal mode.
|
// If we were in "operator pending" mode, reset back to normal mode.
|
||||||
@@ -352,34 +337,30 @@ public class KeyHandler {
|
|||||||
editorState.setCommand(cmd);
|
editorState.setCommand(cmd);
|
||||||
|
|
||||||
lastWasBS = ((cmd.getFlags() & Command.FLAG_IS_BACKSPACE) != 0);
|
lastWasBS = ((cmd.getFlags() & Command.FLAG_IS_BACKSPACE) != 0);
|
||||||
logger.debug("lastWasBS=" + lastWasBS);
|
|
||||||
|
|
||||||
Project project = editor.getProject();
|
Project project = editor.getProject();
|
||||||
if (cmd.getType().isRead() || project == null || EditorHelper.canEdit(project, editor)) {
|
if (cmd.getType().isRead() || project == null || EditorHelper.canEdit(project, editor)) {
|
||||||
if (ApplicationManager.getApplication().isDispatchThread()) {
|
if (ApplicationManager.getApplication().isDispatchThread()) {
|
||||||
Runnable action = new ActionRunner(editor, context, cmd, key);
|
Runnable action = new ActionRunner(editor, context, cmd, key);
|
||||||
|
String name = cmd.getAction().getTemplatePresentation().getText();
|
||||||
|
name = name != null ? "Vim " + name : "";
|
||||||
if (cmd.getType().isWrite()) {
|
if (cmd.getType().isWrite()) {
|
||||||
RunnableHelper.runWriteCommand(project, action, cmd.getActionId(), null);
|
RunnableHelper.runWriteCommand(project, action, name, action);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RunnableHelper.runReadCommand(project, action, cmd.getActionId(), null);
|
RunnableHelper.runReadCommand(project, action, name, action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.info("write command on read-only file");
|
|
||||||
VimPlugin.indicateError();
|
VimPlugin.indicateError();
|
||||||
reset(editor);
|
reset(editor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handleArgumentNode(@NotNull Editor editor,
|
private boolean handleArgumentNode(@NotNull Editor editor, @NotNull KeyStroke key, @NotNull DataContext context,
|
||||||
@NotNull KeyStroke key,
|
@NotNull CommandState editorState, boolean shouldRecord,
|
||||||
@NotNull DataContext context,
|
|
||||||
@NotNull CommandState editorState,
|
|
||||||
boolean shouldRecord,
|
|
||||||
@NotNull ArgumentNode node) {
|
@NotNull ArgumentNode node) {
|
||||||
logger.debug("argument node");
|
|
||||||
// Create a new command based on what the user has typed so far, excluding this keystroke.
|
// Create a new command based on what the user has typed so far, excluding this keystroke.
|
||||||
Command cmd = new Command(count, node.getActionId(), node.getAction(), node.getCmdType(), node.getFlags());
|
Command cmd = new Command(count, node.getActionId(), node.getAction(), node.getCmdType(), node.getFlags());
|
||||||
cmd.setKeys(keys);
|
cmd.setKeys(keys);
|
||||||
@@ -398,8 +379,7 @@ public class KeyHandler {
|
|||||||
// commands
|
// commands
|
||||||
if ((node.getFlags() & Command.FLAG_OP_PEND) != 0) {
|
if ((node.getFlags() & Command.FLAG_OP_PEND) != 0) {
|
||||||
//CommandState.getInstance().setMappingMode(KeyParser.MAPPING_OP_PEND);
|
//CommandState.getInstance().setMappingMode(KeyParser.MAPPING_OP_PEND);
|
||||||
editorState.pushState(editorState.getMode(), editorState.getSubMode(),
|
editorState.pushState(editorState.getMode(), editorState.getSubMode(), KeyParser.MAPPING_OP_PEND);
|
||||||
KeyParser.MAPPING_OP_PEND);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EX_STRING:
|
case EX_STRING:
|
||||||
@@ -421,7 +401,6 @@ public class KeyHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleCommandNode(@NotNull Editor editor, @NotNull DataContext context, @NotNull CommandNode node) {
|
private void handleCommandNode(@NotNull Editor editor, @NotNull DataContext context, @NotNull CommandNode node) {
|
||||||
logger.debug("command node");
|
|
||||||
// If all does well we are ready to process this command
|
// If all does well we are ready to process this command
|
||||||
state = State.READY;
|
state = State.READY;
|
||||||
// Did we just get the completed sequence for a motion command argument?
|
// Did we just get the completed sequence for a motion command argument?
|
||||||
@@ -429,15 +408,13 @@ public class KeyHandler {
|
|||||||
// We have been expecting a motion argument - is this one?
|
// We have been expecting a motion argument - is this one?
|
||||||
if (node.getCmdType() == Command.Type.MOTION) {
|
if (node.getCmdType() == Command.Type.MOTION) {
|
||||||
// Create the motion command and add it to the stack
|
// Create the motion command and add it to the stack
|
||||||
Command cmd = new Command(count, node.getActionId(), node.getAction(),
|
Command cmd = new Command(count, node.getActionId(), node.getAction(), node.getCmdType(), node.getFlags());
|
||||||
node.getCmdType(), node.getFlags());
|
|
||||||
cmd.setKeys(keys);
|
cmd.setKeys(keys);
|
||||||
currentCmd.push(cmd);
|
currentCmd.push(cmd);
|
||||||
}
|
}
|
||||||
else if (node.getCmdType() == Command.Type.RESET) {
|
else if (node.getCmdType() == Command.Type.RESET) {
|
||||||
currentCmd.clear();
|
currentCmd.clear();
|
||||||
Command cmd = new Command(1, node.getActionId(), node.getAction(),
|
Command cmd = new Command(1, node.getActionId(), node.getAction(), node.getCmdType(), node.getFlags());
|
||||||
node.getCmdType(), node.getFlags());
|
|
||||||
cmd.setKeys(keys);
|
cmd.setKeys(keys);
|
||||||
currentCmd.push(cmd);
|
currentCmd.push(cmd);
|
||||||
}
|
}
|
||||||
@@ -456,23 +433,20 @@ public class KeyHandler {
|
|||||||
// The user entered a valid command that doesn't take any arguments
|
// The user entered a valid command that doesn't take any arguments
|
||||||
else {
|
else {
|
||||||
// Create the command and add it to the stack
|
// Create the command and add it to the stack
|
||||||
Command cmd = new Command(count, node.getActionId(), node.getAction(),
|
Command cmd = new Command(count, node.getActionId(), node.getAction(), node.getCmdType(), node.getFlags());
|
||||||
node.getCmdType(), node.getFlags());
|
|
||||||
cmd.setKeys(keys);
|
cmd.setKeys(keys);
|
||||||
currentCmd.push(cmd);
|
currentCmd.push(cmd);
|
||||||
|
|
||||||
// This is a sanity check that the command has a valid action. This should only fail if the
|
// This is a sanity check that the command has a valid action. This should only fail if the
|
||||||
// programmer made a typo or forgot to add the action to the plugin.xml file
|
// programmer made a typo or forgot to add the action to the plugin.xml file
|
||||||
if (cmd.getAction() == null) {
|
if (cmd.getAction() == null) {
|
||||||
logger.error("NULL action for keys '" + keys + "'");
|
|
||||||
state = State.ERROR;
|
state = State.ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleBranchNode(@NotNull Editor editor, @NotNull DataContext context, @NotNull CommandState editorState, char key,
|
private void handleBranchNode(@NotNull Editor editor, @NotNull DataContext context, @NotNull CommandState editorState,
|
||||||
@NotNull BranchNode node) {
|
char key, @NotNull BranchNode node) {
|
||||||
logger.debug("branch node");
|
|
||||||
// Flag that we aren't allowing any more count digits (unless it's OK)
|
// Flag that we aren't allowing any more count digits (unless it's OK)
|
||||||
if ((node.getFlags() & Command.FLAG_ALLOW_MID_COUNT) == 0) {
|
if ((node.getFlags() & Command.FLAG_ALLOW_MID_COUNT) == 0) {
|
||||||
state = State.COMMAND;
|
state = State.COMMAND;
|
||||||
@@ -505,16 +479,12 @@ public class KeyHandler {
|
|||||||
* @param name The name of the action to execute
|
* @param name The name of the action to execute
|
||||||
* @param context The context to run it in
|
* @param context The context to run it in
|
||||||
*/
|
*/
|
||||||
public static void executeAction(String name, DataContext context) {
|
public static void executeAction(@NotNull String name, @NotNull DataContext context) {
|
||||||
logger.debug("executing action " + name);
|
|
||||||
ActionManager aMgr = ActionManager.getInstance();
|
ActionManager aMgr = ActionManager.getInstance();
|
||||||
AnAction action = aMgr.getAction(name);
|
AnAction action = aMgr.getAction(name);
|
||||||
if (action != null) {
|
if (action != null) {
|
||||||
executeAction(action, context);
|
executeAction(action, context);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
logger.debug("Unknown action");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -523,23 +493,16 @@ public class KeyHandler {
|
|||||||
* @param action The action to execute
|
* @param action The action to execute
|
||||||
* @param context The context to run it in
|
* @param context The context to run it in
|
||||||
*/
|
*/
|
||||||
public static void executeAction(AnAction action, DataContext context) {
|
public static void executeAction(@NotNull AnAction action, @NotNull DataContext context) {
|
||||||
if (logger.isDebugEnabled()) {
|
|
||||||
logger.debug("executing action " + action);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hopefully all the arguments are sufficient. So far they all seem to work OK.
|
// Hopefully all the arguments are sufficient. So far they all seem to work OK.
|
||||||
// We don't have a specific InputEvent so that is null
|
// We don't have a specific InputEvent so that is null
|
||||||
// What is "place"? Leave it the empty string for now.
|
// What is "place"? Leave it the empty string for now.
|
||||||
// Is the template presentation sufficient?
|
// Is the template presentation sufficient?
|
||||||
// What are the modifiers? Is zero OK?
|
// What are the modifiers? Is zero OK?
|
||||||
action.actionPerformed(new AnActionEvent(
|
action.actionPerformed(
|
||||||
null,
|
new AnActionEvent(null, context, "", action.getTemplatePresentation(), ActionManager.getInstance(),
|
||||||
context,
|
// API change - don't merge
|
||||||
"",
|
0));
|
||||||
action.getTemplatePresentation(),
|
|
||||||
ActionManager.getInstance(), // API change - don't merge
|
|
||||||
0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -553,7 +516,6 @@ public class KeyHandler {
|
|||||||
keys = new ArrayList<KeyStroke>();
|
keys = new ArrayList<KeyStroke>();
|
||||||
CommandState editorState = CommandState.getInstance(editor);
|
CommandState editorState = CommandState.getInstance(editor);
|
||||||
editorState.setCurrentNode(KeyParser.getInstance().getKeyRoot(editorState.getMappingMode()));
|
editorState.setCurrentNode(KeyParser.getInstance().getKeyRoot(editorState.getMappingMode()));
|
||||||
logger.debug("partialReset");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -567,7 +529,6 @@ public class KeyHandler {
|
|||||||
currentCmd.clear();
|
currentCmd.clear();
|
||||||
currentArg = Argument.Type.NONE;
|
currentArg = Argument.Type.NONE;
|
||||||
digraph = null;
|
digraph = null;
|
||||||
logger.debug("reset");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -602,9 +563,8 @@ public class KeyHandler {
|
|||||||
boolean wasRecording = editorState.isRecording();
|
boolean wasRecording = editorState.isRecording();
|
||||||
|
|
||||||
executeAction(cmd.getAction(), context);
|
executeAction(cmd.getAction(), context);
|
||||||
if (editorState.getMode() == CommandState.Mode.INSERT ||
|
if (editorState.getMode() == CommandState.Mode.INSERT || editorState.getMode() == CommandState.Mode.REPLACE) {
|
||||||
editorState.getMode() == CommandState.Mode.REPLACE) {
|
CommandGroups.getInstance().getChange().processCommand(editor, cmd);
|
||||||
CommandGroups.getInstance().getChange().processCommand(editor, context, cmd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now that the command has been executed let's clean up a few things.
|
// Now that the command has been executed let's clean up a few things.
|
||||||
@@ -627,7 +587,7 @@ public class KeyHandler {
|
|||||||
KeyHandler.getInstance().reset(editor);
|
KeyHandler.getInstance().reset(editor);
|
||||||
|
|
||||||
if (wasRecording && editorState.isRecording()) {
|
if (wasRecording && editorState.isRecording()) {
|
||||||
CommandGroups.getInstance().getRegister().addKeyStroke(key);
|
CommandGroups.getInstance().getRegister().recordKeyStroke(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -648,13 +608,12 @@ public class KeyHandler {
|
|||||||
private int count;
|
private int count;
|
||||||
private List<KeyStroke> keys;
|
private List<KeyStroke> keys;
|
||||||
private State state;
|
private State state;
|
||||||
private Stack<Command> currentCmd = new Stack<Command>();
|
@NotNull private Stack<Command> currentCmd = new Stack<Command>();
|
||||||
@NotNull private Argument.Type currentArg;
|
@NotNull private Argument.Type currentArg;
|
||||||
private TypedActionHandler origHandler;
|
private TypedActionHandler origHandler;
|
||||||
private DigraphSequence digraph = null;
|
@Nullable private DigraphSequence digraph = null;
|
||||||
private char lastChar;
|
private char lastChar;
|
||||||
private boolean lastWasBS;
|
private boolean lastWasBS;
|
||||||
|
|
||||||
private static KeyHandler instance;
|
private static KeyHandler instance;
|
||||||
private static Logger logger = Logger.getInstance(KeyHandler.class.getName());
|
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.maddyhome.idea.vim;
|
package com.maddyhome.idea.vim;
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
@@ -6,24 +24,19 @@ import com.google.common.io.Resources;
|
|||||||
import com.intellij.notification.Notification;
|
import com.intellij.notification.Notification;
|
||||||
import com.intellij.notification.NotificationType;
|
import com.intellij.notification.NotificationType;
|
||||||
import com.intellij.notification.Notifications;
|
import com.intellij.notification.Notifications;
|
||||||
|
import com.intellij.openapi.actionSystem.Shortcut;
|
||||||
import com.intellij.openapi.application.ApplicationManager;
|
import com.intellij.openapi.application.ApplicationManager;
|
||||||
import com.intellij.openapi.application.ApplicationNamesInfo;
|
|
||||||
import com.intellij.openapi.application.PathManager;
|
import com.intellij.openapi.application.PathManager;
|
||||||
import com.intellij.openapi.application.ex.ApplicationEx;
|
|
||||||
import com.intellij.openapi.application.ex.ApplicationManagerEx;
|
|
||||||
import com.intellij.openapi.components.impl.stores.StorageUtil;
|
import com.intellij.openapi.components.impl.stores.StorageUtil;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
import com.intellij.openapi.keymap.Keymap;
|
import com.intellij.openapi.keymap.Keymap;
|
||||||
import com.intellij.openapi.keymap.KeymapManager;
|
import com.intellij.openapi.keymap.KeymapManager;
|
||||||
import com.intellij.openapi.keymap.impl.KeymapImpl;
|
import com.intellij.openapi.keymap.impl.KeymapImpl;
|
||||||
import com.intellij.openapi.keymap.impl.KeymapManagerImpl;
|
import com.intellij.openapi.keymap.impl.KeymapManagerImpl;
|
||||||
import com.intellij.openapi.project.Project;
|
|
||||||
import com.intellij.openapi.ui.DialogWrapper;
|
import com.intellij.openapi.ui.DialogWrapper;
|
||||||
import com.intellij.openapi.ui.Messages;
|
|
||||||
import com.intellij.openapi.util.InvalidDataException;
|
import com.intellij.openapi.util.InvalidDataException;
|
||||||
import com.intellij.openapi.util.JDOMUtil;
|
import com.intellij.openapi.util.JDOMUtil;
|
||||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||||
import com.intellij.openapi.vfs.VirtualFile;
|
|
||||||
import com.maddyhome.idea.vim.ui.VimKeymapDialog;
|
import com.maddyhome.idea.vim.ui.VimKeymapDialog;
|
||||||
import org.jdom.Document;
|
import org.jdom.Document;
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
@@ -31,6 +44,9 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static com.google.common.io.ByteStreams.toByteArray;
|
import static com.google.common.io.ByteStreams.toByteArray;
|
||||||
|
|
||||||
@@ -56,10 +72,6 @@ public class VimKeyMapUtil {
|
|||||||
*/
|
*/
|
||||||
public static boolean installKeyBoardBindings() {
|
public static boolean installKeyBoardBindings() {
|
||||||
LOG.debug("Check for keyboard bindings");
|
LOG.debug("Check for keyboard bindings");
|
||||||
if (isVimKeymapInstalled()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
final LocalFileSystem localFileSystem = LocalFileSystem.getInstance();
|
final LocalFileSystem localFileSystem = LocalFileSystem.getInstance();
|
||||||
if (localFileSystem.refreshAndFindFileByPath(KEYMAPS_PATH) == null) {
|
if (localFileSystem.refreshAndFindFileByPath(KEYMAPS_PATH) == null) {
|
||||||
reportError("Failed to install vim keymap. Empty keymaps folder");
|
reportError("Failed to install vim keymap. Empty keymaps folder");
|
||||||
@@ -71,9 +83,11 @@ public class VimKeyMapUtil {
|
|||||||
final byte[] bytes = toByteArray(retrieveSourceKeymapStream());
|
final byte[] bytes = toByteArray(retrieveSourceKeymapStream());
|
||||||
Files.write(bytes, new File(INSTALLED_VIM_KEYMAP_PATH));
|
Files.write(bytes, new File(INSTALLED_VIM_KEYMAP_PATH));
|
||||||
final Document document = StorageUtil.loadDocument(bytes);
|
final Document document = StorageUtil.loadDocument(bytes);
|
||||||
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
if (document != null && !ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
// Prompt user to select the parent for the Vim keyboard
|
// Prompt user to select the parent for the Vim keyboard
|
||||||
configureVimParentKeymap(INSTALLED_VIM_KEYMAP_PATH, document, false);
|
if (!configureVimParentKeymap(INSTALLED_VIM_KEYMAP_PATH, document, true)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
installKeymap(document);
|
installKeymap(document);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@@ -90,7 +104,7 @@ public class VimKeyMapUtil {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void installKeymap(Document document) throws InvalidDataException {
|
private static void installKeymap(@Nullable Document document) throws InvalidDataException {
|
||||||
if (document == null) {
|
if (document == null) {
|
||||||
throw new InvalidDataException();
|
throw new InvalidDataException();
|
||||||
}
|
}
|
||||||
@@ -101,47 +115,53 @@ public class VimKeyMapUtil {
|
|||||||
keymapManager.addKeymap(vimKeyMap);
|
keymapManager.addKeymap(vimKeyMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void requestRestartOrShutdown(final Project project) {
|
|
||||||
final ApplicationEx app = ApplicationManagerEx.getApplicationEx();
|
|
||||||
if (app.isRestartCapable()) {
|
|
||||||
if (Messages.showDialog(project, "Restart " + ApplicationNamesInfo.getInstance().getProductName() + " to activate changes?",
|
|
||||||
VimPlugin.IDEAVIM_NOTIFICATION_TITLE, new String[]{"&Restart", "&Postpone"}, 0,
|
|
||||||
Messages.getQuestionIcon()) == 0) {
|
|
||||||
app.restart();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (Messages.showDialog(project, "Shut down " + ApplicationNamesInfo.getInstance().getProductName() + " to activate changes?",
|
|
||||||
VimPlugin.IDEAVIM_NOTIFICATION_TITLE, new String[]{"&Shut Down", "&Postpone"}, 0,
|
|
||||||
Messages.getQuestionIcon()) == 0) {
|
|
||||||
app.exit(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes parent keymap for the Vim
|
* Changes parent keymap for the Vim
|
||||||
*
|
*
|
||||||
* @return true if document was changed successfully
|
* @return true if document was changed successfully
|
||||||
*/
|
*/
|
||||||
private static boolean configureVimParentKeymap(final String path, final Document document, final boolean showNotification) throws IOException {
|
private static boolean configureVimParentKeymap(final String path, @NotNull final Document document,
|
||||||
|
final boolean showNotification)
|
||||||
|
throws IOException, InvalidDataException {
|
||||||
final Element rootElement = document.getRootElement();
|
final Element rootElement = document.getRootElement();
|
||||||
final String parentKeymap = rootElement.getAttributeValue("parent");
|
final String parentKeymapName = rootElement.getAttributeValue("parent");
|
||||||
final VimKeymapDialog vimKeymapDialog = new VimKeymapDialog(parentKeymap);
|
final VimKeymapDialog vimKeymapDialog = new VimKeymapDialog(parentKeymapName);
|
||||||
vimKeymapDialog.show();
|
vimKeymapDialog.show();
|
||||||
if (vimKeymapDialog.getExitCode() != DialogWrapper.OK_EXIT_CODE) {
|
if (vimKeymapDialog.getExitCode() != DialogWrapper.OK_EXIT_CODE) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
rootElement.removeAttribute("parent");
|
rootElement.removeAttribute("parent");
|
||||||
final Keymap selectedKeymap = vimKeymapDialog.getSelectedKeymap();
|
final Keymap parentKeymap = vimKeymapDialog.getSelectedKeymap();
|
||||||
final String keymapName = selectedKeymap.getName();
|
final String keymapName = parentKeymap.getName();
|
||||||
rootElement.setAttribute("parent", keymapName);
|
VimKeymapConflictResolveUtil.resolveConflicts(rootElement, parentKeymap);
|
||||||
|
// We cannot set a user-defined modifiable keymap as the parent of our Vim keymap so we have to copy its shortcuts
|
||||||
|
if (parentKeymap.canModify()) {
|
||||||
|
final KeymapImpl vimKeyMap = new KeymapImpl();
|
||||||
|
final KeymapManager keymapManager = KeymapManager.getInstance();
|
||||||
|
final KeymapManagerImpl keymapManagerImpl = (KeymapManagerImpl)keymapManager;
|
||||||
|
final Keymap[] allKeymaps = keymapManagerImpl.getAllKeymaps();
|
||||||
|
vimKeyMap.readExternal(rootElement, allKeymaps);
|
||||||
|
final HashSet<String> ownActions = new HashSet<String>(Arrays.asList(vimKeyMap.getOwnActionIds()));
|
||||||
|
final KeymapImpl parentKeymapImpl = (KeymapImpl)parentKeymap;
|
||||||
|
for (String parentAction : parentKeymapImpl.getOwnActionIds()) {
|
||||||
|
if (!ownActions.contains(parentAction)) {
|
||||||
|
final List<Shortcut> shortcuts = Arrays.asList(parentKeymap.getShortcuts(parentAction));
|
||||||
|
rootElement.addContent(VimKeymapConflictResolveUtil.createActionElement(parentAction, shortcuts));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
final Keymap grandParentKeymap = parentKeymap.getParent();
|
||||||
|
rootElement.setAttribute("parent", grandParentKeymap.getName());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rootElement.setAttribute("parent", keymapName);
|
||||||
|
}
|
||||||
|
VimPlugin.getInstance().setPreviousKeyMap(keymapName);
|
||||||
// Save modified keymap to the file
|
// Save modified keymap to the file
|
||||||
JDOMUtil.writeDocument(document, path, "\n");
|
JDOMUtil.writeDocument(document, path, "\n");
|
||||||
if (showNotification) {
|
if (showNotification) {
|
||||||
Notifications.Bus.notify(new Notification(VimPlugin.IDEAVIM_NOTIFICATION_ID, VimPlugin.IDEAVIM_NOTIFICATION_TITLE,
|
Notifications.Bus.notify(new Notification(VimPlugin.IDEAVIM_NOTIFICATION_ID, VimPlugin.IDEAVIM_NOTIFICATION_TITLE,
|
||||||
"Successfully configured vim keymap to be based on " +
|
"Successfully configured vim keymap to be based on " +
|
||||||
selectedKeymap.getPresentableName(),
|
parentKeymap.getPresentableName(),
|
||||||
NotificationType.INFORMATION));
|
NotificationType.INFORMATION));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,30 +214,6 @@ public class VimKeyMapUtil {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void reconfigureParentKeymap(final Project project) {
|
|
||||||
final VirtualFile vimKeymapFile = getVimKeymapFile();
|
|
||||||
if (vimKeymapFile == null) {
|
|
||||||
reportError("Failed to find Vim keymap");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
final Document document = StorageUtil.loadDocument(new FileInputStream(vimKeymapFile.getPath()));
|
|
||||||
// Prompt user to select the parent for the Vim keyboard
|
|
||||||
if (configureVimParentKeymap(vimKeymapFile.getPath(), document, true)) {
|
|
||||||
installKeymap(document);
|
|
||||||
requestRestartOrShutdown(project);
|
|
||||||
}
|
|
||||||
} catch (FileNotFoundException e) {
|
|
||||||
reportError("Failed to install vim keymap.", e);
|
|
||||||
} catch (IOException e) {
|
|
||||||
reportError("Failed to install vim keymap.", e);
|
|
||||||
} catch (InvalidDataException e) {
|
|
||||||
reportError("Failed to install vim keymap. Vim.xml file is corrupted", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static InputStream retrieveSourceKeymapStream() throws IOException {
|
private static InputStream retrieveSourceKeymapStream() throws IOException {
|
||||||
String keymapPath = PATH_JOINER.join(PathManager.getPluginsPath(), VimPlugin.IDEAVIM_NOTIFICATION_TITLE, VIM_XML);
|
String keymapPath = PATH_JOINER.join(PathManager.getPluginsPath(), VimPlugin.IDEAVIM_NOTIFICATION_TITLE, VIM_XML);
|
||||||
@@ -241,9 +237,4 @@ public class VimKeyMapUtil {
|
|||||||
Notifications.Bus.notify(new Notification(VimPlugin.IDEAVIM_NOTIFICATION_ID, VimPlugin.IDEAVIM_NOTIFICATION_TITLE,
|
Notifications.Bus.notify(new Notification(VimPlugin.IDEAVIM_NOTIFICATION_ID, VimPlugin.IDEAVIM_NOTIFICATION_TITLE,
|
||||||
message + String.valueOf(e), NotificationType.ERROR));
|
message + String.valueOf(e), NotificationType.ERROR));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
|
||||||
public static VirtualFile getVimKeymapFile() {
|
|
||||||
return LocalFileSystem.getInstance().refreshAndFindFileByPath(INSTALLED_VIM_KEYMAP_PATH);
|
|
||||||
}
|
|
||||||
}
|
}
|
242
src/com/maddyhome/idea/vim/VimKeymapConflictResolveUtil.java
Normal file
242
src/com/maddyhome/idea/vim/VimKeymapConflictResolveUtil.java
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.intellij.openapi.actionSystem.KeyboardShortcut;
|
||||||
|
import com.intellij.openapi.actionSystem.MouseShortcut;
|
||||||
|
import com.intellij.openapi.actionSystem.Shortcut;
|
||||||
|
import com.intellij.openapi.keymap.Keymap;
|
||||||
|
import com.intellij.openapi.keymap.impl.KeymapImpl;
|
||||||
|
import com.intellij.openapi.util.SystemInfo;
|
||||||
|
import org.jdom.Element;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.event.InputEvent;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import static com.google.common.collect.Lists.newLinkedList;
|
||||||
|
import static com.google.common.collect.Maps.newHashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User: zolotov
|
||||||
|
* Date: 1/8/13
|
||||||
|
*/
|
||||||
|
public class VimKeymapConflictResolveUtil {
|
||||||
|
private static final String SHIFT = "shift";
|
||||||
|
private static final String CONTROL = "control";
|
||||||
|
private static final String META = "meta";
|
||||||
|
private static final String ALT = "alt";
|
||||||
|
private static final String ALT_GRAPH = "altGraph";
|
||||||
|
private static final String DOUBLE_CLICK = "doubleClick";
|
||||||
|
|
||||||
|
private static final String VIM_KEY_HANDLER_ACTION_ID = "VimKeyHandler";
|
||||||
|
private static final String ACTION_TAG = "action";
|
||||||
|
private static final String KEYBOARD_SHORTCUT_TAG = "keyboard-shortcut";
|
||||||
|
private static final String MOUSE_SHORTCUT_TAG = "mouse-shortcut";
|
||||||
|
private static final String ID_ATTRIBUTE = "id";
|
||||||
|
private static final String FIRST_KEYSTROKE_ATTRIBUTE = "first-keystroke";
|
||||||
|
private static final String KEYSTROKE_ATTRIBUTE = "keystroke";
|
||||||
|
private static final String SECOND_KEYSTROKE_ATTRIBUTE = "second-keystroke";
|
||||||
|
|
||||||
|
private static final List<Integer> ALTERNATIVE_MODIFIERS = ImmutableList.of(
|
||||||
|
InputEvent.ALT_DOWN_MASK,
|
||||||
|
InputEvent.CTRL_DOWN_MASK,
|
||||||
|
InputEvent.SHIFT_DOWN_MASK,
|
||||||
|
InputEvent.META_DOWN_MASK,
|
||||||
|
InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK,
|
||||||
|
InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK,
|
||||||
|
InputEvent.ALT_DOWN_MASK | InputEvent.META_DOWN_MASK,
|
||||||
|
InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK,
|
||||||
|
InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK);
|
||||||
|
|
||||||
|
public static void resolveConflicts(Element targetKeymapRoot, Keymap parentKeymap) {
|
||||||
|
final Collection<String> vimHandlingShortcuts = getVimHandlingShortcuts(targetKeymapRoot);
|
||||||
|
final Map<String, List<Shortcut>> shortcutsToOverride = retrieveShortcutsToOverride(vimHandlingShortcuts, parentKeymap);
|
||||||
|
overrideShortcuts(targetKeymapRoot, shortcutsToOverride);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param targetKeymapRoot root element of Vim keymap
|
||||||
|
* @return all shortcuts in string representation that should be handled by Vim plugin
|
||||||
|
*/
|
||||||
|
private static Collection<String> getVimHandlingShortcuts(Element targetKeymapRoot) {
|
||||||
|
Element vimKeyHandlerAction = retrieveActionElement(targetKeymapRoot);
|
||||||
|
if (vimKeyHandlerAction != null) {
|
||||||
|
Collection<String> result = newLinkedList();
|
||||||
|
for (Object childAction : vimKeyHandlerAction.getChildren()) {
|
||||||
|
if (childAction instanceof Element) {
|
||||||
|
Element shortcut = (Element)childAction;
|
||||||
|
result.add(shortcut.getAttributeValue(FIRST_KEYSTROKE_ATTRIBUTE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param targetKeymapRoot root element of Vim keymap
|
||||||
|
* @return Retrieve VimKeyHandler action element
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
private static Element retrieveActionElement(Element targetKeymapRoot) {
|
||||||
|
Element vimKeyHandlerAction = null;
|
||||||
|
for (Object child : targetKeymapRoot.getChildren(ACTION_TAG)) {
|
||||||
|
if (child instanceof Element) {
|
||||||
|
Element action = (Element)child;
|
||||||
|
if (VIM_KEY_HANDLER_ACTION_ID.equals(action.getAttributeValue(ID_ATTRIBUTE))) {
|
||||||
|
vimKeyHandlerAction = action;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return vimKeyHandlerAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param vimHandlingShortcuts collection of shortcuts that should be handled by Vim plugin
|
||||||
|
* @param parentKeymap selected parent keymap for vim keymap
|
||||||
|
* @return mapping of action names to its shortcuts that we should save in Vim-keymap
|
||||||
|
* (or empty list of shortcuts if action just should be disabled)
|
||||||
|
*/
|
||||||
|
private static Map<String, List<Shortcut>> retrieveShortcutsToOverride(Collection<String> vimHandlingShortcuts, Keymap parentKeymap) {
|
||||||
|
Map<String, List<Shortcut>> result = newHashMap();
|
||||||
|
for (String shortcut : vimHandlingShortcuts) {
|
||||||
|
final Map<String, ArrayList<KeyboardShortcut>> conflicts = parentKeymap.getConflicts("", KeyboardShortcut.fromString(shortcut));
|
||||||
|
for (Map.Entry<String, ArrayList<KeyboardShortcut>> conflict : conflicts.entrySet()) {
|
||||||
|
String actionName = conflict.getKey();
|
||||||
|
final ArrayList<KeyboardShortcut> conflictedShortcuts = conflict.getValue();
|
||||||
|
if (result.containsKey(actionName)) {
|
||||||
|
// found another conflict for already overridden action
|
||||||
|
List<Shortcut> overridesShortcuts = result.get(actionName);
|
||||||
|
for (KeyboardShortcut conflictedShortcut : conflictedShortcuts) {
|
||||||
|
overridesShortcuts.remove(conflictedShortcut);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// let's override action with all non-conflict shortcuts
|
||||||
|
List<Shortcut> overriddenShortcuts = newLinkedList();
|
||||||
|
for (Shortcut actionShortcut : parentKeymap.getShortcuts(actionName)) {
|
||||||
|
if (!(actionShortcut instanceof KeyboardShortcut) || !conflictedShortcuts.contains(actionShortcut)) {
|
||||||
|
overriddenShortcuts.add(actionShortcut);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (overriddenShortcuts.isEmpty()) {
|
||||||
|
for (Integer modifier : ALTERNATIVE_MODIFIERS) {
|
||||||
|
if (!SystemInfo.isMac && (modifier & InputEvent.META_DOWN_MASK) != 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final KeyStroke originalStroke = KeyStroke.getKeyStroke(shortcut);
|
||||||
|
final int modifiers = originalStroke.getModifiers() | modifier;
|
||||||
|
//noinspection MagicConstant
|
||||||
|
final KeyStroke stroke = KeyStroke.getKeyStroke(originalStroke.getKeyCode(), modifiers);
|
||||||
|
final KeyboardShortcut alternativeShortcut = new KeyboardShortcut(stroke, null);
|
||||||
|
if (parentKeymap.getConflicts("", alternativeShortcut).isEmpty()) {
|
||||||
|
overriddenShortcuts.add(alternativeShortcut);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
result.put(actionName, overriddenShortcuts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fill vim keymap with overridden actions.
|
||||||
|
* Only keyboard and mouse shortcuts will be overridden.
|
||||||
|
*
|
||||||
|
* @param targetKeymapRoot root element of Vim keymap
|
||||||
|
* @param shortcutsToOverride overriding mapping: actions -> shortcuts_should_be_saved
|
||||||
|
*/
|
||||||
|
|
||||||
|
private static void overrideShortcuts(Element targetKeymapRoot, Map<String, List<Shortcut>> shortcutsToOverride) {
|
||||||
|
for (Map.Entry<String, List<Shortcut>> action : shortcutsToOverride.entrySet()) {
|
||||||
|
targetKeymapRoot.addContent(createActionElement(action.getKey(), action.getValue()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Element createActionElement(String actionName, List<Shortcut> shortcuts) {
|
||||||
|
final Element overridesAction = new Element(ACTION_TAG);
|
||||||
|
overridesAction.setAttribute(ID_ATTRIBUTE, actionName);
|
||||||
|
for (Shortcut shortcut : shortcuts) {
|
||||||
|
if (shortcut instanceof KeyboardShortcut) {
|
||||||
|
KeyboardShortcut keyboardShortcut = (KeyboardShortcut)shortcut;
|
||||||
|
final String firstShortcutString = KeymapImpl.getKeyShortcutString(keyboardShortcut.getFirstKeyStroke());
|
||||||
|
final Element shortcutElement = createShortcutElement(KEYBOARD_SHORTCUT_TAG, FIRST_KEYSTROKE_ATTRIBUTE,
|
||||||
|
firstShortcutString);
|
||||||
|
overridesAction.addContent(shortcutElement);
|
||||||
|
final KeyStroke secondKeyStroke = keyboardShortcut.getSecondKeyStroke();
|
||||||
|
if (secondKeyStroke != null) {
|
||||||
|
final String secondShortcutString = KeymapImpl.getKeyShortcutString(secondKeyStroke);
|
||||||
|
shortcutElement.setAttribute(SECOND_KEYSTROKE_ATTRIBUTE, secondShortcutString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (shortcut instanceof MouseShortcut) {
|
||||||
|
overridesAction.addContent(createShortcutElement(MOUSE_SHORTCUT_TAG, KEYSTROKE_ATTRIBUTE, getMouseShortcutString((MouseShortcut)shortcut)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return overridesAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Element createShortcutElement(String elementName, String shortcutAttributeName, String shortcut) {
|
||||||
|
final Element shortcutElement = new Element(elementName);
|
||||||
|
shortcutElement.setAttribute(shortcutAttributeName, shortcut);
|
||||||
|
return shortcutElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create string representation of mouse shortcut
|
||||||
|
* KeymapImpl has implementation for mouse shortcut marshaling, but it is private :-(
|
||||||
|
*
|
||||||
|
* @param shortcut mouse shortcut
|
||||||
|
* @return string representation of mouse shortcut
|
||||||
|
*/
|
||||||
|
private static String getMouseShortcutString(MouseShortcut shortcut) {
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
int modifiers = shortcut.getModifiers();
|
||||||
|
if ((MouseEvent.SHIFT_DOWN_MASK & modifiers) > 0) {
|
||||||
|
builder.append(SHIFT).append(' ');
|
||||||
|
}
|
||||||
|
if ((MouseEvent.CTRL_DOWN_MASK & modifiers) > 0) {
|
||||||
|
builder.append(CONTROL).append(' ');
|
||||||
|
}
|
||||||
|
if ((MouseEvent.META_DOWN_MASK & modifiers) > 0) {
|
||||||
|
builder.append(META).append(' ');
|
||||||
|
}
|
||||||
|
if ((MouseEvent.ALT_DOWN_MASK & modifiers) > 0) {
|
||||||
|
builder.append(ALT).append(' ');
|
||||||
|
}
|
||||||
|
if ((MouseEvent.ALT_GRAPH_DOWN_MASK & modifiers) > 0) {
|
||||||
|
builder.append(ALT_GRAPH).append(' ');
|
||||||
|
}
|
||||||
|
builder.append("button").append(shortcut.getButton()).append(' ');
|
||||||
|
if (shortcut.getClickCount() > 1) {
|
||||||
|
builder.append(DOUBLE_CLICK);
|
||||||
|
}
|
||||||
|
return builder.toString().trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -1,25 +1,29 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2000-2011 JetBrains s.r.o.
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* you may not use this file except in compliance with the License.
|
* it under the terms of the GNU General Public License as published by
|
||||||
* You may obtain a copy of the License at
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* You should have received a copy of the GNU General Public License
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
*/
|
||||||
package com.maddyhome.idea.vim;
|
package com.maddyhome.idea.vim;
|
||||||
|
|
||||||
import com.intellij.notification.Notification;
|
import com.intellij.notification.Notification;
|
||||||
import com.intellij.notification.NotificationType;
|
import com.intellij.notification.NotificationType;
|
||||||
import com.intellij.notification.Notifications;
|
import com.intellij.notification.Notifications;
|
||||||
|
import com.intellij.openapi.actionSystem.impl.SimpleDataContext;
|
||||||
import com.intellij.openapi.application.Application;
|
import com.intellij.openapi.application.Application;
|
||||||
import com.intellij.openapi.application.ApplicationManager;
|
import com.intellij.openapi.application.ApplicationManager;
|
||||||
|
import com.intellij.openapi.application.ex.ApplicationEx;
|
||||||
import com.intellij.openapi.application.ex.ApplicationManagerEx;
|
import com.intellij.openapi.application.ex.ApplicationManagerEx;
|
||||||
import com.intellij.openapi.command.CommandProcessor;
|
import com.intellij.openapi.command.CommandProcessor;
|
||||||
import com.intellij.openapi.components.ApplicationComponent;
|
import com.intellij.openapi.components.ApplicationComponent;
|
||||||
@@ -39,25 +43,23 @@ import com.intellij.openapi.project.Project;
|
|||||||
import com.intellij.openapi.project.ProjectManager;
|
import com.intellij.openapi.project.ProjectManager;
|
||||||
import com.intellij.openapi.project.ProjectManagerAdapter;
|
import com.intellij.openapi.project.ProjectManagerAdapter;
|
||||||
import com.intellij.openapi.ui.Messages;
|
import com.intellij.openapi.ui.Messages;
|
||||||
|
import com.intellij.openapi.util.SystemInfo;
|
||||||
import com.intellij.openapi.wm.StatusBar;
|
import com.intellij.openapi.wm.StatusBar;
|
||||||
import com.intellij.openapi.wm.WindowManager;
|
import com.intellij.openapi.wm.WindowManager;
|
||||||
import com.maddyhome.idea.vim.command.CommandState;
|
import com.maddyhome.idea.vim.command.CommandState;
|
||||||
import com.maddyhome.idea.vim.ex.CommandParser;
|
import com.maddyhome.idea.vim.ex.CommandParser;
|
||||||
import com.maddyhome.idea.vim.group.*;
|
import com.maddyhome.idea.vim.group.*;
|
||||||
import com.maddyhome.idea.vim.helper.DelegateCommandListener;
|
import com.maddyhome.idea.vim.helper.*;
|
||||||
import com.maddyhome.idea.vim.helper.DocumentManager;
|
|
||||||
import com.maddyhome.idea.vim.helper.EditorData;
|
|
||||||
import com.maddyhome.idea.vim.helper.EditorDataContext;
|
|
||||||
import com.maddyhome.idea.vim.key.RegisterActions;
|
|
||||||
import com.maddyhome.idea.vim.option.Options;
|
import com.maddyhome.idea.vim.option.Options;
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This plugin attempts to emulate the keybinding and general functionality of Vim and gVim. See the supplied
|
* This plugin attempts to emulate the key binding and general functionality of Vim and gVim. See the supplied
|
||||||
* documentation for a complete list of supported and unsupported Vim emulation. The code base contains some debugging
|
* documentation for a complete list of supported and unsupported Vim emulation. The code base contains some debugging
|
||||||
* output that can be enabled in necessary.
|
* output that can be enabled in necessary.
|
||||||
* <p/>
|
* <p/>
|
||||||
@@ -80,18 +82,19 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
private static final String IDEAVIM_COMPONENT_NAME = "VimPlugin";
|
private static final String IDEAVIM_COMPONENT_NAME = "VimPlugin";
|
||||||
public static final String IDEAVIM_NOTIFICATION_ID = "ideavim";
|
public static final String IDEAVIM_NOTIFICATION_ID = "ideavim";
|
||||||
public static final String IDEAVIM_NOTIFICATION_TITLE = "IdeaVim";
|
public static final String IDEAVIM_NOTIFICATION_TITLE = "IdeaVim";
|
||||||
|
public static final int STATE_VERSION = 2;
|
||||||
|
|
||||||
private static final boolean BLOCK_CURSOR_VIM_VALUE = true;
|
private static final boolean BLOCK_CURSOR_VIM_VALUE = true;
|
||||||
private static final boolean ANIMATED_SCROLLING_VIM_VALUE = false;
|
private static final boolean ANIMATED_SCROLLING_VIM_VALUE = false;
|
||||||
private static final boolean REFRAIN_FROM_SCROLLING_VIM_VALUE = true;
|
private static final boolean REFRAIN_FROM_SCROLLING_VIM_VALUE = true;
|
||||||
|
|
||||||
private VimTypedActionHandler vimHandler;
|
private VimTypedActionHandler vimHandler;
|
||||||
private RegisterActions actions;
|
|
||||||
private boolean isBlockCursor = false;
|
private boolean isBlockCursor = false;
|
||||||
private boolean isAnimatedScrolling = false;
|
private boolean isAnimatedScrolling = false;
|
||||||
private boolean isRefrainFromScrolling = false;
|
private boolean isRefrainFromScrolling = false;
|
||||||
private boolean error = false;
|
private boolean error = false;
|
||||||
|
|
||||||
|
private int previousStateVersion = 0;
|
||||||
private String previousKeyMap = "";
|
private String previousKeyMap = "";
|
||||||
|
|
||||||
// It is enabled by default to avoid any special configuration after plugin installation
|
// It is enabled by default to avoid any special configuration after plugin installation
|
||||||
@@ -110,6 +113,7 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
LOG.debug("VimPlugin ctr");
|
LOG.debug("VimPlugin ctr");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
public static VimPlugin getInstance() {
|
public static VimPlugin getInstance() {
|
||||||
return (VimPlugin)ApplicationManager.getApplication().getComponent(IDEAVIM_COMPONENT_NAME);
|
return (VimPlugin)ApplicationManager.getApplication().getComponent(IDEAVIM_COMPONENT_NAME);
|
||||||
}
|
}
|
||||||
@@ -140,6 +144,7 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
|
|
||||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
updateState();
|
||||||
checkAndInstallKeymap();
|
checkAndInstallKeymap();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -154,11 +159,50 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
// Add some listeners so we can handle special events
|
// Add some listeners so we can handle special events
|
||||||
setupListeners();
|
setupListeners();
|
||||||
|
|
||||||
getActions();
|
// Register vim actions in command mode
|
||||||
|
RegisterActions.registerActions();
|
||||||
|
|
||||||
|
// Register ex handlers
|
||||||
|
CommandParser.getInstance().registerHandlers();
|
||||||
|
|
||||||
LOG.debug("done");
|
LOG.debug("done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateState() {
|
||||||
|
if (isEnabled() && !ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
|
boolean requiresRestart = false;
|
||||||
|
if (previousStateVersion < 1 && SystemInfo.isMac && VimKeyMapUtil.isVimKeymapInstalled()) {
|
||||||
|
if (Messages.showYesNoDialog("Vim keymap generator has been updated to create keymaps more compatible " +
|
||||||
|
"with base keymaps.\n\nDo you want to reconfigure your Vim keymap?\n\n" +
|
||||||
|
"Warning: Any custom shortcuts will be lost!\n\n" +
|
||||||
|
"(You can do it later using Tools | Reconfigure Vim Keymap).",
|
||||||
|
IDEAVIM_NOTIFICATION_TITLE,
|
||||||
|
Messages.getQuestionIcon()) == Messages.YES) {
|
||||||
|
KeyHandler.executeAction("VimReconfigureKeymap", SimpleDataContext.getProjectContext(null));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (previousStateVersion < 2 && SystemInfo.isMac) {
|
||||||
|
final MacKeyRepeat keyRepeat = MacKeyRepeat.getInstance();
|
||||||
|
final Boolean enabled = keyRepeat.isEnabled();
|
||||||
|
if (enabled == null || !enabled) {
|
||||||
|
if (Messages.showYesNoDialog("Do you want to enable repeating keys in Mac OS X on press and hold " +
|
||||||
|
"(requires restart)?\n\n" +
|
||||||
|
"(You can do it manually by running 'defaults write -g " +
|
||||||
|
"ApplePressAndHoldEnabled 0' in the console).",
|
||||||
|
IDEAVIM_NOTIFICATION_TITLE,
|
||||||
|
Messages.getQuestionIcon()) == Messages.YES) {
|
||||||
|
keyRepeat.setEnabled(true);
|
||||||
|
requiresRestart = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (requiresRestart) {
|
||||||
|
final ApplicationEx app = ApplicationManagerEx.getApplicationEx();
|
||||||
|
app.restart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void checkAndInstallKeymap() {
|
private static void checkAndInstallKeymap() {
|
||||||
// Ensure that Vim keymap is installed and install if not.
|
// Ensure that Vim keymap is installed and install if not.
|
||||||
// Moreover we can use installed keymap as indicator of the first time installed plugin
|
// Moreover we can use installed keymap as indicator of the first time installed plugin
|
||||||
@@ -210,7 +254,8 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
|
|
||||||
if (VimPlugin.isEnabled()) {
|
if (VimPlugin.isEnabled()) {
|
||||||
// Turn on insert mode if editor doesn't have any file
|
// Turn on insert mode if editor doesn't have any file
|
||||||
if (!EditorData.isFileEditor(editor) && !CommandState.inInsertMode(editor)) {
|
if (!EditorData.isFileEditor(editor) && editor.getDocument().isWritable() &&
|
||||||
|
!CommandState.inInsertMode(editor)) {
|
||||||
KeyHandler.getInstance().handleKey(editor, KeyStroke.getKeyStroke('i'), new EditorDataContext(editor));
|
KeyHandler.getInstance().handleKey(editor, KeyStroke.getKeyStroke('i'), new EditorDataContext(editor));
|
||||||
}
|
}
|
||||||
editor.getSettings().setBlockCursor(!CommandState.inInsertMode(editor));
|
editor.getSettings().setBlockCursor(!CommandState.inInsertMode(editor));
|
||||||
@@ -230,7 +275,7 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
// Since the Vim plugin custom actions aren't available to the call to <code>initComponent()</code>
|
// Since the Vim plugin custom actions aren't available to the call to <code>initComponent()</code>
|
||||||
// we need to force the generation of the key map when the first project is opened.
|
// we need to force the generation of the key map when the first project is opened.
|
||||||
ProjectManager.getInstance().addProjectManagerListener(new ProjectManagerAdapter() {
|
ProjectManager.getInstance().addProjectManagerListener(new ProjectManagerAdapter() {
|
||||||
public void projectOpened(final Project project) {
|
public void projectOpened(@NotNull final Project project) {
|
||||||
project.getMessageBus().connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, new MotionGroup.MotionEditorChange());
|
project.getMessageBus().connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, new MotionGroup.MotionEditorChange());
|
||||||
project.getMessageBus().connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, new FileGroup.SelectionCheck());
|
project.getMessageBus().connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, new FileGroup.SelectionCheck());
|
||||||
project.getMessageBus().connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, new SearchGroup.EditorSelectionCheck());
|
project.getMessageBus().connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, new SearchGroup.EditorSelectionCheck());
|
||||||
@@ -256,12 +301,17 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadState(final Element element) {
|
public void loadState(@NotNull final Element element) {
|
||||||
LOG.debug("Loading state");
|
LOG.debug("Loading state");
|
||||||
|
|
||||||
// Restore whether the plugin is enabled or not
|
// Restore whether the plugin is enabled or not
|
||||||
Element state = element.getChild("state");
|
Element state = element.getChild("state");
|
||||||
if (state != null) {
|
if (state != null) {
|
||||||
|
try {
|
||||||
|
previousStateVersion = Integer.valueOf(state.getAttributeValue("version"));
|
||||||
|
}
|
||||||
|
catch (NumberFormatException ignored) {
|
||||||
|
}
|
||||||
enabled = Boolean.valueOf(state.getAttributeValue("enabled"));
|
enabled = Boolean.valueOf(state.getAttributeValue("enabled"));
|
||||||
previousKeyMap = state.getAttributeValue("keymap");
|
previousKeyMap = state.getAttributeValue("keymap");
|
||||||
}
|
}
|
||||||
@@ -276,6 +326,7 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
final Element element = new Element("ideavim");
|
final Element element = new Element("ideavim");
|
||||||
// Save whether the plugin is enabled or not
|
// Save whether the plugin is enabled or not
|
||||||
final Element state = new Element("state");
|
final Element state = new Element("state");
|
||||||
|
state.setAttribute("version", Integer.toString(STATE_VERSION));
|
||||||
state.setAttribute("enabled", Boolean.toString(enabled));
|
state.setAttribute("enabled", Boolean.toString(enabled));
|
||||||
state.setAttribute("keymap", previousKeyMap);
|
state.setAttribute("keymap", previousKeyMap);
|
||||||
element.addContent(state);
|
element.addContent(state);
|
||||||
@@ -308,7 +359,7 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inidicate to the user that an error has occurred. Just beep.
|
* Indicate to the user that an error has occurred. Just beep.
|
||||||
*/
|
*/
|
||||||
public static void indicateError() {
|
public static void indicateError() {
|
||||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
@@ -323,11 +374,11 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
showMessage(msg);
|
showMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void showMessage(String msg) {
|
public static void showMessage(@Nullable String msg) {
|
||||||
ProjectManager pm = ProjectManager.getInstance();
|
ProjectManager pm = ProjectManager.getInstance();
|
||||||
Project[] projs = pm.getOpenProjects();
|
Project[] projects = pm.getOpenProjects();
|
||||||
for (Project proj : projs) {
|
for (Project project : projects) {
|
||||||
StatusBar bar = WindowManager.getInstance().getStatusBar(proj);
|
StatusBar bar = WindowManager.getInstance().getStatusBar(project);
|
||||||
if (bar != null) {
|
if (bar != null) {
|
||||||
if (msg == null || msg.length() == 0) {
|
if (msg == null || msg.length() == 0) {
|
||||||
bar.setInfo("");
|
bar.setInfo("");
|
||||||
@@ -380,17 +431,6 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private RegisterActions getActions() {
|
|
||||||
if (actions == null) {
|
|
||||||
// Register vim actions in command mode
|
|
||||||
actions = RegisterActions.getInstance();
|
|
||||||
// Register ex handlers
|
|
||||||
CommandParser.getInstance().registerHandlers();
|
|
||||||
}
|
|
||||||
|
|
||||||
return actions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isError() {
|
public boolean isError() {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.maddyhome.idea.vim;
|
package com.maddyhome.idea.vim;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||||
|
@@ -1,9 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
package com.maddyhome.idea.vim;
|
package com.maddyhome.idea.vim;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||||
import com.intellij.openapi.project.DumbAware;
|
import com.intellij.openapi.project.DumbAware;
|
||||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This action allows to reconfigure base parent keymap for the Vim keymap
|
* This action allows to reconfigure base parent keymap for the Vim keymap
|
||||||
@@ -11,12 +29,13 @@ import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
|||||||
*/
|
*/
|
||||||
public class VimReconfigureKeymapAction extends AnAction implements DumbAware {
|
public class VimReconfigureKeymapAction extends AnAction implements DumbAware {
|
||||||
@Override
|
@Override
|
||||||
public void update(final AnActionEvent e) {
|
public void update(@NotNull final AnActionEvent e) {
|
||||||
e.getPresentation().setEnabled(VimPlugin.isEnabled());
|
e.getPresentation().setEnabled(VimPlugin.isEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final AnActionEvent e) {
|
public void actionPerformed(@NotNull final AnActionEvent e) {
|
||||||
VimKeyMapUtil.reconfigureParentKeymap(e.getData(PlatformDataKeys.PROJECT));
|
VimKeyMapUtil.installKeyBoardBindings();
|
||||||
|
VimKeyMapUtil.switchKeymapBindings(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,76 +0,0 @@
|
|||||||
package com.maddyhome.idea.vim;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
|
|
||||||
public class VimSettings {
|
|
||||||
public boolean isEnabled() {
|
|
||||||
return enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnabled(boolean enabled) {
|
|
||||||
this.enabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HashSet getChoices() {
|
|
||||||
return choices;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setChoices(HashSet choices) {
|
|
||||||
this.choices = choices;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (o == null || getClass() != o.getClass()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
final VimSettings that = (VimSettings)o;
|
|
||||||
|
|
||||||
if (enabled != that.enabled) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return choices.equals(that.choices);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int hashCode() {
|
|
||||||
int result;
|
|
||||||
result = (enabled ? 1 : 0);
|
|
||||||
result = 29 * result + choices.hashCode();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
final StringBuffer sb = new StringBuffer();
|
|
||||||
sb.append("VimSettings");
|
|
||||||
sb.append("{enabled=").append(enabled);
|
|
||||||
sb.append(", choices=").append(choices);
|
|
||||||
sb.append('}');
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean enabled;
|
|
||||||
private HashSet choices = new HashSet();
|
|
||||||
}
|
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim;
|
||||||
|
|
||||||
import com.intellij.codeInsight.lookup.LookupEx;
|
import com.intellij.codeInsight.lookup.LookupEx;
|
||||||
import com.intellij.codeInsight.lookup.LookupManager;
|
import com.intellij.codeInsight.lookup.LookupManager;
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
@@ -75,12 +74,18 @@ public class VimTypedActionHandler implements TypedActionHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
// Run key handler outside of the key typed command for creating our own undoable commands
|
||||||
handler.handleKey(editor, KeyStroke.getKeyStroke(charTyped), context);
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
}
|
@Override
|
||||||
catch (Throwable e) {
|
public void run() {
|
||||||
logger.error(e);
|
try {
|
||||||
}
|
handler.handleKey(editor, KeyStroke.getKeyStroke(charTyped), context);
|
||||||
|
}
|
||||||
|
catch (Throwable e) {
|
||||||
|
logger.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private TypedActionHandler origHandler;
|
private TypedActionHandler origHandler;
|
||||||
|
@@ -1,36 +1,36 @@
|
|||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public abstract class AbstractDelegateAction extends AnAction implements DelegateAction {
|
public abstract class AbstractDelegateAction extends AnAction implements DelegateAction {
|
||||||
protected AbstractDelegateAction() {
|
protected AbstractDelegateAction() {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AbstractDelegateAction(AnAction origAction) {
|
protected AbstractDelegateAction(@NotNull AnAction origAction) {
|
||||||
setOrigAction(origAction);
|
setOrigAction(origAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOrigAction(AnAction origAction) {
|
public void setOrigAction(@NotNull AnAction origAction) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("origAction=" + origAction);
|
logger.debug("origAction=" + origAction);
|
||||||
}
|
}
|
||||||
|
@@ -1,39 +1,40 @@
|
|||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public abstract class AbstractDelegateEditorAction extends EditorAction implements DelegateAction {
|
public abstract class AbstractDelegateEditorAction extends EditorAction implements DelegateAction {
|
||||||
protected AbstractDelegateEditorAction(EditorActionHandler handler) {
|
protected AbstractDelegateEditorAction(EditorActionHandler handler) {
|
||||||
super(handler);
|
super(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AbstractDelegateEditorAction(EditorActionHandler handler, EditorAction origAction) {
|
protected AbstractDelegateEditorAction(EditorActionHandler handler, @NotNull EditorAction origAction) {
|
||||||
this(handler);
|
this(handler);
|
||||||
setOrigAction(origAction);
|
setOrigAction(origAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOrigAction(AnAction origAction) {
|
public void setOrigAction(@NotNull AnAction origAction) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("origAction=" + origAction);
|
logger.debug("origAction=" + origAction);
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
|
|
||||||
public interface DelegateAction {
|
public interface DelegateAction {
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
import com.maddyhome.idea.vim.command.Command;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -35,7 +35,7 @@ public class ExEntryAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
CommandGroups.getInstance().getProcess().startExCommand(editor, context, cmd);
|
CommandGroups.getInstance().getProcess().startExCommand(editor, context, cmd);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class OriginalDelegateAction extends AbstractDelegateAction {
|
public class OriginalDelegateAction extends AbstractDelegateAction {
|
||||||
public void actionPerformed(AnActionEvent event) {
|
public void actionPerformed(@NotNull AnActionEvent event) {
|
||||||
Editor editor = event.getData(PlatformDataKeys.EDITOR);
|
Editor editor = event.getData(PlatformDataKeys.EDITOR);
|
||||||
if (editor != null) {
|
if (editor != null) {
|
||||||
getOrigAction().actionPerformed(event);
|
getOrigAction().actionPerformed(event);
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.maddyhome.idea.vim.KeyHandler;
|
import com.maddyhome.idea.vim.KeyHandler;
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
import com.maddyhome.idea.vim.VimPlugin;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
@@ -34,7 +34,7 @@ public class PassThruDelegateAction extends AbstractDelegateAction {
|
|||||||
this.stroke = stroke;
|
this.stroke = stroke;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void actionPerformed(AnActionEvent event) {
|
public void actionPerformed(@NotNull AnActionEvent event) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("actionPerformed key=" + stroke);
|
logger.debug("actionPerformed key=" + stroke);
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2006 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
@@ -27,7 +26,6 @@ import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
|||||||
import com.maddyhome.idea.vim.KeyHandler;
|
import com.maddyhome.idea.vim.KeyHandler;
|
||||||
import com.maddyhome.idea.vim.VimPlugin;
|
import com.maddyhome.idea.vim.VimPlugin;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
@@ -44,11 +42,11 @@ public class PassThruDelegateEditorAction extends AbstractDelegateEditorAction {
|
|||||||
this.origHandler = handler;
|
this.origHandler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void execute(@Nullable Editor editor, @NotNull DataContext dataContext) {
|
public void execute(@NotNull Editor editor, @NotNull DataContext dataContext) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("actionPerformed key=" + stroke);
|
logger.debug("actionPerformed key=" + stroke);
|
||||||
}
|
}
|
||||||
if (editor == null || !VimPlugin.isEnabled()) {
|
if (!VimPlugin.isEnabled()) {
|
||||||
origHandler.execute(editor, dataContext);
|
origHandler.execute(editor, dataContext);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action;
|
||||||
|
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.handler.ResetModeHandler;
|
import com.maddyhome.idea.vim.handler.ResetModeHandler;
|
||||||
|
|
||||||
|
@@ -1,36 +0,0 @@
|
|||||||
package com.maddyhome.idea.vim.action;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class TxActionWrapper extends AbstractDelegateAction {
|
|
||||||
|
|
||||||
public void actionPerformed(AnActionEvent event) {
|
|
||||||
logger.debug("actionPerformed");
|
|
||||||
getOrigAction().actionPerformed(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Logger logger = Logger.getInstance(TxActionWrapper.class.getName());
|
|
||||||
}
|
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
import com.maddyhome.idea.vim.command.Command;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.UndoRedoHelper;
|
import com.maddyhome.idea.vim.helper.UndoRedoHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class RedoAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
return UndoRedoHelper.redo(context);
|
return UndoRedoHelper.redo(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -29,6 +28,7 @@ import com.maddyhome.idea.vim.command.CommandState;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
import com.maddyhome.idea.vim.key.KeyParser;
|
import com.maddyhome.idea.vim.key.KeyParser;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -38,7 +38,7 @@ public class RepeatChangeAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, Command command) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command command) {
|
||||||
CommandState state = CommandState.getInstance(editor);
|
CommandState state = CommandState.getInstance(editor);
|
||||||
Command cmd = state.getLastChangeCommand();
|
Command cmd = state.getLastChangeCommand();
|
||||||
if (cmd != null) {
|
if (cmd != null) {
|
||||||
@@ -64,7 +64,9 @@ public class RepeatChangeAction extends EditorAction {
|
|||||||
// oops
|
// oops
|
||||||
}
|
}
|
||||||
state.popState();
|
state.popState();
|
||||||
state.setCommand(save);
|
if (save != null) {
|
||||||
|
state.setCommand(save);
|
||||||
|
}
|
||||||
state.saveLastChangeCommand(cmd);
|
state.saveLastChangeCommand(cmd);
|
||||||
CommandGroups.getInstance().getRegister().selectRegister(reg);
|
CommandGroups.getInstance().getRegister().selectRegister(reg);
|
||||||
|
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Command;
|
|||||||
import com.maddyhome.idea.vim.ex.CommandParser;
|
import com.maddyhome.idea.vim.ex.CommandParser;
|
||||||
import com.maddyhome.idea.vim.ex.ExException;
|
import com.maddyhome.idea.vim.ex.ExException;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +35,7 @@ public class RepeatExCommandAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, Command command) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command command) {
|
||||||
int count = command.getCount();
|
int count = command.getCount();
|
||||||
try {
|
try {
|
||||||
return CommandParser.getInstance().processLastCommand(editor, context, count);
|
return CommandParser.getInstance().processLastCommand(editor, context, count);
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
import com.maddyhome.idea.vim.command.Command;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.UndoRedoHelper;
|
import com.maddyhome.idea.vim.helper.UndoRedoHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class UndoAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
return UndoRedoHelper.undo(context);
|
return UndoRedoHelper.undo(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Argument;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +35,7 @@ public class ChangeCaseLowerMotionAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, @NotNull Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeCaseMotion(editor, context, count, rawCount,
|
return CommandGroups.getInstance().getChange().changeCaseMotion(editor, context, count, rawCount,
|
||||||
CharacterHelper.CASE_LOWER, argument);
|
CharacterHelper.CASE_LOWER, argument);
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -28,6 +27,7 @@ import com.maddyhome.idea.vim.common.TextRange;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -37,8 +37,10 @@ public class ChangeCaseLowerVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
return CommandGroups.getInstance().getChange().changeCaseRange(InjectedLanguageUtil.getTopLevelEditor(editor), context, range, CharacterHelper.CASE_LOWER);
|
@NotNull TextRange range) {
|
||||||
|
return CommandGroups.getInstance().getChange().changeCaseRange(InjectedLanguageUtil.getTopLevelEditor(editor),
|
||||||
|
range, CharacterHelper.CASE_LOWER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class ChangeCaseToggleCharacterAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeCaseToggleCharacter(editor, context, count);
|
return CommandGroups.getInstance().getChange().changeCaseToggleCharacter(editor, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Argument;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +35,7 @@ public class ChangeCaseToggleMotionAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, @NotNull Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeCaseMotion(editor, context, count, rawCount,
|
return CommandGroups.getInstance().getChange().changeCaseMotion(editor, context, count, rawCount,
|
||||||
CharacterHelper.CASE_TOGGLE, argument);
|
CharacterHelper.CASE_TOGGLE, argument);
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -27,6 +26,7 @@ import com.maddyhome.idea.vim.common.TextRange;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -36,8 +36,9 @@ public class ChangeCaseToggleVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
return CommandGroups.getInstance().getChange().changeCaseRange(editor, context, range, CharacterHelper.CASE_TOGGLE);
|
@NotNull TextRange range) {
|
||||||
|
return CommandGroups.getInstance().getChange().changeCaseRange(editor, range, CharacterHelper.CASE_TOGGLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Argument;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +35,7 @@ public class ChangeCaseUpperMotionAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, @NotNull Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeCaseMotion(editor, context, count, rawCount,
|
return CommandGroups.getInstance().getChange().changeCaseMotion(editor, context, count, rawCount,
|
||||||
CharacterHelper.CASE_UPPER, argument);
|
CharacterHelper.CASE_UPPER, argument);
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -27,6 +26,7 @@ import com.maddyhome.idea.vim.common.TextRange;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
import com.maddyhome.idea.vim.helper.CharacterHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -36,8 +36,9 @@ public class ChangeCaseUpperVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
return CommandGroups.getInstance().getChange().changeCaseRange(editor, context, range, CharacterHelper.CASE_UPPER);
|
@NotNull TextRange range) {
|
||||||
|
return CommandGroups.getInstance().getChange().changeCaseRange(editor, range, CharacterHelper.CASE_UPPER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class ChangeCharacterAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, @NotNull Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeCharacter(editor, context, count, argument.getCharacter());
|
return CommandGroups.getInstance().getChange().changeCharacter(editor, count, argument.getCharacter());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class ChangeCharactersAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeCharacters(editor, context, count);
|
return CommandGroups.getInstance().getChange().changeCharacters(editor, context, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class ChangeEndOfLineAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeEndOfLine(editor, context, count);
|
return CommandGroups.getInstance().getChange().changeEndOfLine(editor, context, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -27,6 +26,7 @@ import com.maddyhome.idea.vim.ex.LineRange;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper;
|
import com.maddyhome.idea.vim.helper.EditorHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -36,7 +36,7 @@ public class ChangeLastGlobalSearchReplaceAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
LineRange range = new LineRange(0, EditorHelper.getLineCount(editor) - 1);
|
LineRange range = new LineRange(0, EditorHelper.getLineCount(editor) - 1);
|
||||||
return CommandGroups.getInstance().getSearch().searchAndReplace(editor, context, range, "s", "//~/&");
|
return CommandGroups.getInstance().getSearch().searchAndReplace(editor, context, range, "s", "//~/&");
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Argument;
|
|||||||
import com.maddyhome.idea.vim.ex.LineRange;
|
import com.maddyhome.idea.vim.ex.LineRange;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +35,7 @@ public class ChangeLastSearchReplaceAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
int line = editor.getCaretModel().getLogicalPosition().line;
|
int line = editor.getCaretModel().getLogicalPosition().line;
|
||||||
LineRange range = new LineRange(line, line);
|
LineRange range = new LineRange(line, line);
|
||||||
return CommandGroups.getInstance().getSearch().searchAndReplace(editor, context, range, "s", "//~/");
|
return CommandGroups.getInstance().getSearch().searchAndReplace(editor, context, range, "s", "//~/");
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class ChangeLineAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeLine(editor, context, count);
|
return CommandGroups.getInstance().getChange().changeLine(editor, context, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class ChangeMotionAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, @NotNull Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeMotion(editor, context, count, rawCount, argument);
|
return CommandGroups.getInstance().getChange().changeMotion(editor, context, count, rawCount, argument);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2006 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class ChangeNumberDecAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeNumber(editor, context, -count);
|
return CommandGroups.getInstance().getChange().changeNumber(editor, -count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2006 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class ChangeNumberIncAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeNumber(editor, context, count);
|
return CommandGroups.getInstance().getChange().changeNumber(editor, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class ChangeReplaceAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().changeReplace(editor, context);
|
return CommandGroups.getInstance().getChange().changeReplace(editor, context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -27,6 +26,7 @@ import com.maddyhome.idea.vim.command.SelectionType;
|
|||||||
import com.maddyhome.idea.vim.common.TextRange;
|
import com.maddyhome.idea.vim.common.TextRange;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -36,7 +36,8 @@ public class ChangeVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
|
@NotNull TextRange range) {
|
||||||
final SelectionType type = range.isMultiple() ? SelectionType.BLOCK_WISE : SelectionType.CHARACTER_WISE;
|
final SelectionType type = range.isMultiple() ? SelectionType.BLOCK_WISE : SelectionType.CHARACTER_WISE;
|
||||||
return CommandGroups.getInstance().getChange().changeRange(editor, context, range, type);
|
return CommandGroups.getInstance().getChange().changeRange(editor, context, range, type);
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Command;
|
|||||||
import com.maddyhome.idea.vim.common.TextRange;
|
import com.maddyhome.idea.vim.common.TextRange;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,8 +35,8 @@ public class ChangeVisualCharacterAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd, @NotNull TextRange range) {
|
||||||
return CommandGroups.getInstance().getChange().changeCharacterRange(editor, context, range,
|
return CommandGroups.getInstance().getChange().changeCharacterRange(editor, range,
|
||||||
cmd.getArgument().getCharacter());
|
cmd.getArgument().getCharacter());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -28,6 +27,7 @@ import com.maddyhome.idea.vim.common.TextRange;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper;
|
import com.maddyhome.idea.vim.helper.EditorHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +37,8 @@ public class ChangeVisualLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
|
@NotNull TextRange range) {
|
||||||
range = new TextRange(EditorHelper.getLineStartForOffset(editor, range.getStartOffset()),
|
range = new TextRange(EditorHelper.getLineStartForOffset(editor, range.getStartOffset()),
|
||||||
EditorHelper.getLineEndForOffset(editor, range.getEndOffset()) + 1);
|
EditorHelper.getLineEndForOffset(editor, range.getEndOffset()) + 1);
|
||||||
|
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -28,6 +27,7 @@ import com.maddyhome.idea.vim.common.TextRange;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper;
|
import com.maddyhome.idea.vim.helper.EditorHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +37,8 @@ public class ChangeVisualLinesEndAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
|
@NotNull TextRange range) {
|
||||||
if (range.isMultiple()) {
|
if (range.isMultiple()) {
|
||||||
int[] starts = range.getStartOffsets();
|
int[] starts = range.getStartOffsets();
|
||||||
int[] ends = range.getEndOffsets();
|
int[] ends = range.getEndOffsets();
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
import com.maddyhome.idea.vim.command.Command;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class FilterCountLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
CommandGroups.getInstance().getProcess().startFilterCommand(editor, context, cmd);
|
CommandGroups.getInstance().getProcess().startFilterCommand(editor, context, cmd);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.LogicalPosition;
|
import com.intellij.openapi.editor.LogicalPosition;
|
||||||
@@ -28,6 +27,7 @@ import com.maddyhome.idea.vim.common.TextRange;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.group.MotionGroup;
|
import com.maddyhome.idea.vim.group.MotionGroup;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +37,7 @@ public class FilterMotionAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
TextRange range = MotionGroup.getMotionRange(editor, context, cmd.getCount(), cmd.getRawCount(),
|
TextRange range = MotionGroup.getMotionRange(editor, context, cmd.getCount(), cmd.getRawCount(),
|
||||||
cmd.getArgument(), false, false);
|
cmd.getArgument(), false, false);
|
||||||
if (range == null) {
|
if (range == null) {
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.change;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.change;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
import com.maddyhome.idea.vim.command.Command;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class FilterVisualLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
CommandGroups.getInstance().getProcess().startFilterCommand(editor, context, cmd);
|
CommandGroups.getInstance().getProcess().startFilterCommand(editor, context, cmd);
|
||||||
CommandGroups.getInstance().getMotion().resetVisual(editor, true);
|
CommandGroups.getInstance().getMotion().resetVisual(editor, true);
|
||||||
|
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class DeleteCharacterAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().deleteCharacter(editor, context, 1);
|
return CommandGroups.getInstance().getChange().deleteCharacter(editor, 1, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class DeleteCharacterLeftAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().deleteCharacter(editor, context, -count);
|
return CommandGroups.getInstance().getChange().deleteCharacter(editor, -count, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class DeleteCharacterRightAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().deleteCharacter(editor, context, count);
|
return CommandGroups.getInstance().getChange().deleteCharacter(editor, count, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class DeleteEndOfLineAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().deleteEndOfLine(editor, context, count);
|
return CommandGroups.getInstance().getChange().deleteEndOfLine(editor, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,12 +34,12 @@ public class DeleteJoinLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
if (editor.isOneLineMode()) {
|
if (editor.isOneLineMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CommandGroups.getInstance().getChange().deleteJoinLines(editor, context, count, false);
|
return CommandGroups.getInstance().getChange().deleteJoinLines(editor, count, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,12 +34,12 @@ public class DeleteJoinLinesSpacesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
if (editor.isOneLineMode()) {
|
if (editor.isOneLineMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CommandGroups.getInstance().getChange().deleteJoinLines(editor, context, count, true);
|
return CommandGroups.getInstance().getChange().deleteJoinLines(editor, count, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Command;
|
|||||||
import com.maddyhome.idea.vim.common.TextRange;
|
import com.maddyhome.idea.vim.common.TextRange;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,12 +35,13 @@ public class DeleteJoinVisualLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
|
@NotNull TextRange range) {
|
||||||
if (editor.isOneLineMode()) {
|
if (editor.isOneLineMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CommandGroups.getInstance().getChange().deleteJoinRange(editor, context, range, false);
|
return CommandGroups.getInstance().getChange().deleteJoinRange(editor, range, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Command;
|
|||||||
import com.maddyhome.idea.vim.common.TextRange;
|
import com.maddyhome.idea.vim.common.TextRange;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,12 +35,13 @@ public class DeleteJoinVisualLinesSpacesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
|
@NotNull TextRange range) {
|
||||||
if (editor.isOneLineMode()) {
|
if (editor.isOneLineMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CommandGroups.getInstance().getChange().deleteJoinRange(editor, context, range, true);
|
return CommandGroups.getInstance().getChange().deleteJoinRange(editor, range, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class DeleteLineAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().deleteLine(editor, context, count);
|
return CommandGroups.getInstance().getChange().deleteLine(editor, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class DeleteMotionAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, DataContext context, int count, int rawCount, @NotNull Argument argument) {
|
||||||
return CommandGroups.getInstance().getChange().deleteMotion(editor, context, count, rawCount, argument, false);
|
return CommandGroups.getInstance().getChange().deleteMotion(editor, context, count, rawCount, argument, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -29,6 +28,7 @@ import com.maddyhome.idea.vim.common.TextRange;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper;
|
import com.maddyhome.idea.vim.helper.EditorHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -38,15 +38,16 @@ public class DeleteVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
|
@NotNull TextRange range) {
|
||||||
CommandState.SubMode mode = CommandState.getInstance(editor).getSubMode();
|
CommandState.SubMode mode = CommandState.getInstance(editor).getSubMode();
|
||||||
if (mode == CommandState.SubMode.VISUAL_LINE) {
|
if (mode == CommandState.SubMode.VISUAL_LINE) {
|
||||||
range = new TextRange(EditorHelper.getLineStartForOffset(editor, range.getStartOffset()),
|
range = new TextRange(EditorHelper.getLineStartForOffset(editor, range.getStartOffset()),
|
||||||
EditorHelper.getLineEndForOffset(editor, range.getEndOffset()) + 1);
|
EditorHelper.getLineEndForOffset(editor, range.getEndOffset()) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CommandGroups.getInstance().getChange().deleteRange(editor, context, range,
|
return CommandGroups.getInstance().getChange().deleteRange(editor, range,
|
||||||
SelectionType.fromSubMode(mode));
|
SelectionType.fromSubMode(mode), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -29,6 +28,7 @@ import com.maddyhome.idea.vim.common.TextRange;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper;
|
import com.maddyhome.idea.vim.helper.EditorHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -38,17 +38,18 @@ public class DeleteVisualLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
|
@NotNull TextRange range) {
|
||||||
CommandState.SubMode mode = CommandState.getInstance(editor).getSubMode();
|
CommandState.SubMode mode = CommandState.getInstance(editor).getSubMode();
|
||||||
if (mode == CommandState.SubMode.VISUAL_BLOCK) {
|
if (mode == CommandState.SubMode.VISUAL_BLOCK) {
|
||||||
return CommandGroups.getInstance().getChange().deleteRange(editor, context, range,
|
return CommandGroups.getInstance().getChange().deleteRange(editor, range,
|
||||||
SelectionType.fromSubMode(mode));
|
SelectionType.fromSubMode(mode), false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
range = new TextRange(EditorHelper.getLineStartForOffset(editor, range.getStartOffset()),
|
range = new TextRange(EditorHelper.getLineStartForOffset(editor, range.getStartOffset()),
|
||||||
EditorHelper.getLineEndForOffset(editor, range.getEndOffset()) + 1);
|
EditorHelper.getLineEndForOffset(editor, range.getEndOffset()) + 1);
|
||||||
|
|
||||||
return CommandGroups.getInstance().getChange().deleteRange(editor, context, range, SelectionType.LINE_WISE);
|
return CommandGroups.getInstance().getChange().deleteRange(editor, range, SelectionType.LINE_WISE, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.delete;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.delete;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -28,6 +27,7 @@ import com.maddyhome.idea.vim.common.TextRange;
|
|||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
import com.maddyhome.idea.vim.helper.EditorHelper;
|
import com.maddyhome.idea.vim.helper.EditorHelper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +37,8 @@ public class DeleteVisualLinesEndAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
|
@NotNull TextRange range) {
|
||||||
if (range.isMultiple()) {
|
if (range.isMultiple()) {
|
||||||
int[] starts = range.getStartOffsets();
|
int[] starts = range.getStartOffsets();
|
||||||
int[] ends = range.getEndOffsets();
|
int[] ends = range.getEndOffsets();
|
||||||
@@ -48,15 +49,15 @@ public class DeleteVisualLinesEndAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
range = new TextRange(starts, ends);
|
range = new TextRange(starts, ends);
|
||||||
return CommandGroups.getInstance().getChange().deleteRange(editor, context, range,
|
return CommandGroups.getInstance().getChange().deleteRange(editor, range,
|
||||||
SelectionType.BLOCK_WISE);
|
SelectionType.BLOCK_WISE, false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
range = new TextRange(EditorHelper.getLineStartForOffset(editor, range.getStartOffset()),
|
range = new TextRange(EditorHelper.getLineStartForOffset(editor, range.getStartOffset()),
|
||||||
EditorHelper.getLineEndForOffset(editor, range.getEndOffset()) + 1);
|
EditorHelper.getLineEndForOffset(editor, range.getEndOffset()) + 1);
|
||||||
|
|
||||||
return CommandGroups.getInstance().getChange().deleteRange(editor, context, range,
|
return CommandGroups.getInstance().getChange().deleteRange(editor, range,
|
||||||
SelectionType.LINE_WISE);
|
SelectionType.LINE_WISE, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertAfterCursorAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().insertAfterCursor(editor, context);
|
CommandGroups.getInstance().getChange().insertAfterCursor(editor, context);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertAfterLineEndAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().insertAfterLineEnd(editor, context);
|
CommandGroups.getInstance().getChange().insertAfterLineEnd(editor, context);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertAtPreviousInsertAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().insertAtPreviousInsert(editor, context);
|
CommandGroups.getInstance().getChange().insertAtPreviousInsert(editor, context);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertBeforeCursorAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().insertBeforeCursor(editor, context);
|
CommandGroups.getInstance().getChange().insertBeforeCursor(editor, context);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertBeforeFirstNonBlankAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().insertBeforeFirstNonBlank(editor, context);
|
CommandGroups.getInstance().getChange().insertBeforeFirstNonBlank(editor, context);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
import com.maddyhome.idea.vim.command.Command;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertCharacterAboveCursorAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
if (editor.isOneLineMode()) {
|
if (editor.isOneLineMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
import com.maddyhome.idea.vim.command.Command;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertCharacterBelowCursorAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
if (editor.isOneLineMode()) {
|
if (editor.isOneLineMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
import com.maddyhome.idea.vim.command.Command;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class InsertDeleteInsertedTextAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, Command cmd) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
return CommandGroups.getInstance().getChange().insertDeleteInsertedText(editor, context);
|
return CommandGroups.getInstance().getChange().insertDeleteInsertedText(editor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
import com.maddyhome.idea.vim.command.Command;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class InsertDeletePreviousWordAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, Command cmd) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
return CommandGroups.getInstance().getChange().insertDeletePreviousWord(editor, context);
|
return CommandGroups.getInstance().getChange().insertDeletePreviousWord(editor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||||
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,13 +34,8 @@ public class InsertEnterAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends EditorActionHandler {
|
private static class Handler extends EditorActionHandler {
|
||||||
public void execute(Editor editor, DataContext context) {
|
public void execute(@NotNull Editor editor, @NotNull DataContext context) {
|
||||||
editor = InjectedLanguageUtil.getTopLevelEditor(editor);
|
CommandGroups.getInstance().getChange().processEnter(InjectedLanguageUtil.getTopLevelEditor(editor), context);
|
||||||
if (editor.isOneLineMode()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
CommandGroups.getInstance().getChange().processEnter(editor, context);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||||
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertExitModeAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends EditorActionHandler {
|
private static class Handler extends EditorActionHandler {
|
||||||
public void execute(Editor editor, DataContext context) {
|
public void execute(@NotNull Editor editor, @NotNull DataContext context) {
|
||||||
CommandGroups.getInstance().getChange().processEscape(InjectedLanguageUtil.getTopLevelEditor(editor), context);
|
CommandGroups.getInstance().getChange().processEscape(InjectedLanguageUtil.getTopLevelEditor(editor), context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||||
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertHelpAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends EditorActionHandler {
|
private static class Handler extends EditorActionHandler {
|
||||||
public void execute(Editor editor, DataContext context) {
|
public void execute(@NotNull Editor editor, @NotNull DataContext context) {
|
||||||
CommandGroups.getInstance().getChange().insertHelp(InjectedLanguageUtil.getTopLevelEditor(editor), context);
|
CommandGroups.getInstance().getChange().insertHelp(InjectedLanguageUtil.getTopLevelEditor(editor), context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||||
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertInsertAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends EditorActionHandler {
|
private static class Handler extends EditorActionHandler {
|
||||||
public void execute(Editor editor, DataContext context) {
|
public void execute(@NotNull Editor editor, @NotNull DataContext context) {
|
||||||
CommandGroups.getInstance().getChange().processInsert(InjectedLanguageUtil.getTopLevelEditor(editor), context);
|
CommandGroups.getInstance().getChange().processInsert(InjectedLanguageUtil.getTopLevelEditor(editor), context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertLineStartAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().insertLineStart(editor, context);
|
CommandGroups.getInstance().getChange().insertLineStart(editor, context);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertNewLineAboveAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
if (editor.isOneLineMode()) {
|
if (editor.isOneLineMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertNewLineBelowAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
if (editor.isOneLineMode()) {
|
if (editor.isOneLineMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||||
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertPreviousInsertAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends EditorActionHandler {
|
private static class Handler extends EditorActionHandler {
|
||||||
public void execute(Editor editor, DataContext context) {
|
public void execute(@NotNull Editor editor, @NotNull DataContext context) {
|
||||||
CommandGroups.getInstance().getChange().insertPreviousInsert(InjectedLanguageUtil.getTopLevelEditor(editor), context, false);
|
CommandGroups.getInstance().getChange().insertPreviousInsert(InjectedLanguageUtil.getTopLevelEditor(editor), context, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||||
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertPreviousInsertExitAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends EditorActionHandler {
|
private static class Handler extends EditorActionHandler {
|
||||||
public void execute(Editor editor, DataContext context) {
|
public void execute(@NotNull Editor editor, @NotNull DataContext context) {
|
||||||
CommandGroups.getInstance().getChange().insertPreviousInsert(InjectedLanguageUtil.getTopLevelEditor(editor), context, true);
|
CommandGroups.getInstance().getChange().insertPreviousInsert(InjectedLanguageUtil.getTopLevelEditor(editor), context, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Command;
|
import com.maddyhome.idea.vim.command.Command;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.AbstractEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class InsertRegisterAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, Command cmd) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
return CommandGroups.getInstance().getChange().insertRegister(editor, context, cmd.getArgument().getCharacter());
|
return CommandGroups.getInstance().getChange().insertRegister(editor, context, cmd.getArgument().getCharacter());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||||
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class InsertSingleCommandAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends EditorActionHandler {
|
private static class Handler extends EditorActionHandler {
|
||||||
public void execute(Editor editor, DataContext context) {
|
public void execute(@NotNull Editor editor, @NotNull DataContext context) {
|
||||||
CommandGroups.getInstance().getChange().processSingleCommand(InjectedLanguageUtil.getTopLevelEditor(editor), context);
|
CommandGroups.getInstance().getChange().processSingleCommand(InjectedLanguageUtil.getTopLevelEditor(editor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Command;
|
|||||||
import com.maddyhome.idea.vim.common.TextRange;
|
import com.maddyhome.idea.vim.common.TextRange;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +35,8 @@ public class VisualBlockAppendAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
|
@NotNull TextRange range) {
|
||||||
if (editor.isOneLineMode()) {
|
if (editor.isOneLineMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.insert;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.insert;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Command;
|
|||||||
import com.maddyhome.idea.vim.common.TextRange;
|
import com.maddyhome.idea.vim.common.TextRange;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +35,8 @@ public class VisualBlockInsertAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd,
|
||||||
|
@NotNull TextRange range) {
|
||||||
if (editor.isOneLineMode()) {
|
if (editor.isOneLineMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.shift;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.shift;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,8 +34,8 @@ public class AutoIndentLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().autoIndentLines(editor, context, count);
|
CommandGroups.getInstance().getChange().autoIndentLines(context);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.shift;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.shift;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class ShiftLeftLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().indentLines(editor, context, count, -1);
|
CommandGroups.getInstance().getChange().indentLines(editor, context, count, -1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.shift;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.shift;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class ShiftLeftMotionAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, @NotNull Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().indentMotion(editor, context, count, rawCount, argument, -1);
|
CommandGroups.getInstance().getChange().indentMotion(editor, context, count, rawCount, argument, -1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.shift;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.shift;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Command;
|
|||||||
import com.maddyhome.idea.vim.common.TextRange;
|
import com.maddyhome.idea.vim.common.TextRange;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +35,7 @@ public class ShiftLeftVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd, @NotNull TextRange range) {
|
||||||
CommandGroups.getInstance().getChange().indentRange(editor, context, range, cmd.getCount(), -1);
|
CommandGroups.getInstance().getChange().indentRange(editor, context, range, cmd.getCount(), -1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.shift;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.shift;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class ShiftRightLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().indentLines(editor, context, count, 1);
|
CommandGroups.getInstance().getChange().indentLines(editor, context, count, 1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.shift;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.shift;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class ShiftRightMotionAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, @NotNull Argument argument) {
|
||||||
CommandGroups.getInstance().getChange().indentMotion(editor, context, count, rawCount, argument, 1);
|
CommandGroups.getInstance().getChange().indentMotion(editor, context, count, rawCount, argument, 1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
package com.maddyhome.idea.vim.action.change.shift;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.change.shift;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
@@ -26,6 +25,7 @@ import com.maddyhome.idea.vim.command.Command;
|
|||||||
import com.maddyhome.idea.vim.common.TextRange;
|
import com.maddyhome.idea.vim.common.TextRange;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
import com.maddyhome.idea.vim.handler.VisualOperatorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +35,7 @@ public class ShiftRightVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(Editor editor, DataContext context, Command cmd, TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd, @NotNull TextRange range) {
|
||||||
CommandGroups.getInstance().getChange().indentRange(editor, context, range, cmd.getCount(), 1);
|
CommandGroups.getInstance().getChange().indentRange(editor, context, range, cmd.getCount(), 1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.copy;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.copy;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class PutTextAfterCursorAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getCopy().putTextAfterCursor(editor, context, count, true, false);
|
return CommandGroups.getInstance().getCopy().putTextAfterCursor(editor, context, count, true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.copy;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.copy;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class PutTextAfterCursorActionMoveCursor extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getCopy().putTextAfterCursor(editor, context, count, true, true);
|
return CommandGroups.getInstance().getCopy().putTextAfterCursor(editor, context, count, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.copy;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.copy;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class PutTextAfterCursorNoIndentAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getCopy().putTextAfterCursor(editor, context, count, false, false);
|
return CommandGroups.getInstance().getCopy().putTextAfterCursor(editor, context, count, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.copy;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.copy;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class PutTextBeforeCursorAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getCopy().putTextBeforeCursor(editor, context, count, true, false);
|
return CommandGroups.getInstance().getCopy().putTextBeforeCursor(editor, context, count, true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,30 +1,30 @@
|
|||||||
package com.maddyhome.idea.vim.action.copy;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IdeaVim - A Vim emulator plugin for IntelliJ Idea
|
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||||
* Copyright (C) 2003-2005 Rick Maddy
|
* Copyright (C) 2003-2013 The IdeaVim authors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* modify it under the terms of the GNU General Public License
|
* it under the terms of the GNU General Public License as published by
|
||||||
* as published by the Free Software Foundation; either version 2
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
* of the License, or (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package com.maddyhome.idea.vim.action.copy;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||||
import com.maddyhome.idea.vim.command.Argument;
|
import com.maddyhome.idea.vim.command.Argument;
|
||||||
import com.maddyhome.idea.vim.group.CommandGroups;
|
import com.maddyhome.idea.vim.group.CommandGroups;
|
||||||
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
import com.maddyhome.idea.vim.handler.ChangeEditorActionHandler;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class PutTextBeforeCursorActionMoveCursor extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends ChangeEditorActionHandler {
|
private static class Handler extends ChangeEditorActionHandler {
|
||||||
public boolean execute(Editor editor, DataContext context, int count, int rawCount, Argument argument) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, int count, int rawCount, Argument argument) {
|
||||||
return CommandGroups.getInstance().getCopy().putTextBeforeCursor(editor, context, count, true, true);
|
return CommandGroups.getInstance().getCopy().putTextBeforeCursor(editor, context, count, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user