mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-17 16:31:45 +02:00
Compare commits
74 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 |
60
CHANGES.md
60
CHANGES.md
@@ -4,6 +4,66 @@ 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
|
0.27, 2013-04-03
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
26
README.md
26
README.md
@@ -2,15 +2,15 @@ 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
|
* [@IdeaVim](http://twitter.com/ideavim) in Twitter
|
||||||
|
|
||||||
|
|
||||||
@@ -18,10 +18,10 @@ 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.
|
||||||
|
|
||||||
@@ -32,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
|
||||||
@@ -49,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.
|
||||||
@@ -68,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
|
||||||
@@ -136,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.27
|
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
|
||||||
|
@@ -1,37 +1,38 @@
|
|||||||
<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>
|
||||||
<change-notes>
|
<change-notes>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<p>0.27:</p>
|
<p>0.32:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Better Vim keymaps for Mac OS X</li>
|
<li>Fixed API compatibility with IntelliJ platform builds 132.1052+</li>
|
||||||
<li>Ask if the plugin should enable repeating keys in Mac OS X</li>
|
|
||||||
<li>Fixed a long-standing bug with code completion and repeat last change command ('<code>.</code>')</li>
|
|
||||||
<li>Various bug fixes</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<p>0.26:</p>
|
<p>0.31:</p>
|
||||||
<ul>
|
|
||||||
<li>Added support for paste in the command mode: from a register using <code><C-R></code>, from the clipboard using <code><S-Insert></code> or <code><M-V></code></li>
|
|
||||||
<li>Added support for the last change position mark (the dot <code>.</code> mark)</li>
|
|
||||||
<li>New shortcuts for Go to declaration <code><C-]></code> and Navigate back <code><C-T></code></li>
|
|
||||||
<li>Various bug fixes</li>
|
|
||||||
</ul>
|
|
||||||
<p>0.25:</p>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Various bug fixes</li>
|
<li>Various bug fixes</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>0.24:</p>
|
<p>0.30:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Added Vim string object selection motions (see help topics <code>v_i"</code>, <code>v_a"</code>)</li>
|
<li>Support for a separate <code>.ideavimrc</code> config file</li>
|
||||||
|
<li>Fixed long-standing issues with merged undo/redo commands and <code><Esc></code> during completion</li>
|
||||||
<li>Various bug fixes</li>
|
<li>Various bug fixes</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p>0.29:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Fixed repeat buffer limits</li>
|
||||||
|
<li>Enable normal <code><Enter></code> handling for one-line editors</li>
|
||||||
|
<li>Don't move cursor while scrolling</li>
|
||||||
|
</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>
|
<p>See also the complete <a href="https://github.com/JetBrains/ideavim/blob/master/CHANGES.md">changelog</a>.</p>
|
||||||
]]>
|
]]>
|
||||||
</change-notes>
|
</change-notes>
|
||||||
<description>
|
<description>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<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>
|
<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>
|
<p>Supported functionality:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Motion keys</li>
|
<li>Motion keys</li>
|
||||||
@@ -346,11 +347,6 @@
|
|||||||
<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"/>
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -218,45 +206,43 @@ public class KeyHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
@@ -506,15 +480,11 @@ public class KeyHandler {
|
|||||||
* @param context The context to run it in
|
* @param context The context to run it in
|
||||||
*/
|
*/
|
||||||
public static void executeAction(@NotNull String name, @NotNull 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");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -524,22 +494,15 @@ public class KeyHandler {
|
|||||||
* @param context The context to run it in
|
* @param context The context to run it in
|
||||||
*/
|
*/
|
||||||
public static void executeAction(@NotNull AnAction action, @NotNull 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,8 +563,7 @@ 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, cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -656,5 +616,4 @@ public class KeyHandler {
|
|||||||
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;
|
||||||
|
|
||||||
@@ -67,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, true);
|
if (!configureVimParentKeymap(INSTALLED_VIM_KEYMAP_PATH, document, true)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
installKeymap(document);
|
installKeymap(document);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@@ -97,48 +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, @NotNull 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);
|
VimPlugin.getInstance().setPreviousKeyMap(keymapName);
|
||||||
VimKeymapConflictResolveUtil.resolveConflicts(rootElement, selectedKeymap);
|
|
||||||
// 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,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);
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -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.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
@@ -160,14 +178,21 @@ public class VimKeymapConflictResolveUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Element createActionElement(String actionName, List<Shortcut> shortcuts) {
|
public static Element createActionElement(String actionName, List<Shortcut> shortcuts) {
|
||||||
final Element overridesAction = new Element(ACTION_TAG);
|
final Element overridesAction = new Element(ACTION_TAG);
|
||||||
overridesAction.setAttribute(ID_ATTRIBUTE, actionName);
|
overridesAction.setAttribute(ID_ATTRIBUTE, actionName);
|
||||||
for (Shortcut shortcut : shortcuts) {
|
for (Shortcut shortcut : shortcuts) {
|
||||||
if (shortcut instanceof KeyboardShortcut) {
|
if (shortcut instanceof KeyboardShortcut) {
|
||||||
KeyboardShortcut keyboardShortcut = (KeyboardShortcut)shortcut;
|
KeyboardShortcut keyboardShortcut = (KeyboardShortcut)shortcut;
|
||||||
overridesAction
|
final String firstShortcutString = KeymapImpl.getKeyShortcutString(keyboardShortcut.getFirstKeyStroke());
|
||||||
.addContent(createShortcutElement(KEYBOARD_SHORTCUT_TAG, FIRST_KEYSTROKE_ATTRIBUTE, 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) {
|
else if (shortcut instanceof MouseShortcut) {
|
||||||
overridesAction.addContent(createShortcutElement(MOUSE_SHORTCUT_TAG, KEYSTROKE_ATTRIBUTE, getMouseShortcutString((MouseShortcut)shortcut)));
|
overridesAction.addContent(createShortcutElement(MOUSE_SHORTCUT_TAG, KEYSTROKE_ATTRIBUTE, getMouseShortcutString((MouseShortcut)shortcut)));
|
||||||
|
@@ -1,17 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
* 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;
|
||||||
|
|
||||||
@@ -48,7 +50,6 @@ 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.*;
|
import com.maddyhome.idea.vim.helper.*;
|
||||||
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;
|
||||||
@@ -58,7 +59,7 @@ 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/>
|
||||||
@@ -88,7 +89,6 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
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;
|
||||||
@@ -159,7 +159,11 @@ 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");
|
||||||
}
|
}
|
||||||
@@ -167,7 +171,7 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
private void updateState() {
|
private void updateState() {
|
||||||
if (isEnabled() && !ApplicationManager.getApplication().isUnitTestMode()) {
|
if (isEnabled() && !ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
boolean requiresRestart = false;
|
boolean requiresRestart = false;
|
||||||
if (previousStateVersion < 1 && VimKeyMapUtil.isVimKeymapInstalled()) {
|
if (previousStateVersion < 1 && SystemInfo.isMac && VimKeyMapUtil.isVimKeymapInstalled()) {
|
||||||
if (Messages.showYesNoDialog("Vim keymap generator has been updated to create keymaps more compatible " +
|
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" +
|
"with base keymaps.\n\nDo you want to reconfigure your Vim keymap?\n\n" +
|
||||||
"Warning: Any custom shortcuts will be lost!\n\n" +
|
"Warning: Any custom shortcuts will be lost!\n\n" +
|
||||||
@@ -250,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));
|
||||||
@@ -354,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()) {
|
||||||
@@ -371,9 +376,9 @@ public class VimPlugin implements ApplicationComponent, PersistentStateComponent
|
|||||||
|
|
||||||
public static void showMessage(@Nullable 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("");
|
||||||
@@ -426,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,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.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
|
@@ -1,80 +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 org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
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(@Nullable 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
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,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;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
@@ -1,23 +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;
|
||||||
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;
|
||||||
|
@@ -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,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.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;
|
||||||
@@ -36,7 +35,7 @@ public class ExEntryAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, DataContext context, @NotNull 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,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.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;
|
||||||
|
@@ -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.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;
|
||||||
|
@@ -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,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;
|
||||||
@@ -35,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, @NotNull 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;
|
||||||
@@ -39,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, @NotNull DataContext context, @NotNull 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) {
|
||||||
@@ -65,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;
|
||||||
@@ -36,7 +35,7 @@ public class RepeatExCommandAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
public boolean execute(@NotNull Editor editor, DataContext context, @NotNull 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,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;
|
||||||
@@ -35,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, @NotNull 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;
|
||||||
|
@@ -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;
|
||||||
@@ -38,7 +37,8 @@ public class ChangeCaseLowerVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull 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().changeCaseRange(InjectedLanguageUtil.getTopLevelEditor(editor),
|
return CommandGroups.getInstance().getChange().changeCaseRange(InjectedLanguageUtil.getTopLevelEditor(editor),
|
||||||
range, CharacterHelper.CASE_LOWER);
|
range, CharacterHelper.CASE_LOWER);
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
@@ -37,7 +36,8 @@ public class ChangeCaseToggleVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull 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().changeCaseRange(editor, range, CharacterHelper.CASE_TOGGLE);
|
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;
|
||||||
|
@@ -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;
|
||||||
@@ -37,7 +36,8 @@ public class ChangeCaseUpperVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull 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().changeCaseRange(editor, range, CharacterHelper.CASE_UPPER);
|
return CommandGroups.getInstance().getChange().changeCaseRange(editor, range, CharacterHelper.CASE_UPPER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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-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;
|
||||||
|
@@ -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-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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
@@ -37,7 +36,8 @@ public class ChangeVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, Command cmd, @NotNull 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;
|
||||||
@@ -36,7 +35,7 @@ public class ChangeVisualCharacterAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, DataContext context, @NotNull Command cmd, @NotNull TextRange range) {
|
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd, @NotNull TextRange range) {
|
||||||
return CommandGroups.getInstance().getChange().changeCharacterRange(editor, 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;
|
||||||
@@ -38,7 +37,8 @@ public class ChangeVisualLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, @NotNull 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;
|
||||||
@@ -38,7 +37,8 @@ public class ChangeVisualLinesEndAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, Command cmd, @NotNull 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,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;
|
||||||
@@ -35,7 +34,7 @@ public class FilterCountLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, DataContext context, @NotNull 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;
|
||||||
@@ -38,7 +37,7 @@ public class FilterMotionAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, DataContext context, @NotNull 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,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;
|
||||||
@@ -35,7 +34,7 @@ public class FilterVisualLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, DataContext context, @NotNull 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,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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
@@ -36,7 +35,8 @@ public class DeleteJoinVisualLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, DataContext context, Command cmd, @NotNull 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.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;
|
||||||
@@ -36,7 +35,8 @@ public class DeleteJoinVisualLinesSpacesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, DataContext context, Command cmd, @NotNull 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.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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
@@ -39,7 +38,8 @@ public class DeleteVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull 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()),
|
||||||
|
@@ -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;
|
||||||
@@ -39,7 +38,8 @@ public class DeleteVisualLinesAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull 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, range,
|
return CommandGroups.getInstance().getChange().deleteRange(editor, range,
|
||||||
|
@@ -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;
|
||||||
@@ -38,7 +37,8 @@ public class DeleteVisualLinesEndAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, DataContext context, Command cmd, @NotNull 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,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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
@@ -35,7 +34,7 @@ public class InsertCharacterAboveCursorAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, @NotNull 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,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;
|
||||||
@@ -35,7 +34,7 @@ public class InsertCharacterBelowCursorAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, @NotNull 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,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;
|
||||||
@@ -35,7 +34,7 @@ public class InsertDeleteInsertedTextAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
public boolean execute(@NotNull Editor editor, DataContext context, Command cmd) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
return CommandGroups.getInstance().getChange().insertDeleteInsertedText(editor);
|
return CommandGroups.getInstance().getChange().insertDeleteInsertedText(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;
|
||||||
@@ -35,7 +34,7 @@ public class InsertDeletePreviousWordAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends AbstractEditorActionHandler {
|
private static class Handler extends AbstractEditorActionHandler {
|
||||||
public boolean execute(@NotNull Editor editor, DataContext context, Command cmd) {
|
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull Command cmd) {
|
||||||
return CommandGroups.getInstance().getChange().insertDeletePreviousWord(editor);
|
return CommandGroups.getInstance().getChange().insertDeletePreviousWord(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;
|
||||||
@@ -35,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, @NotNull 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,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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
@@ -35,7 +34,7 @@ public class InsertSingleCommandAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends EditorActionHandler {
|
private static class Handler extends EditorActionHandler {
|
||||||
public void execute(@NotNull Editor editor, DataContext context) {
|
public void execute(@NotNull Editor editor, @NotNull DataContext context) {
|
||||||
CommandGroups.getInstance().getChange().processSingleCommand(InjectedLanguageUtil.getTopLevelEditor(editor));
|
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;
|
||||||
@@ -36,7 +35,8 @@ public class VisualBlockAppendAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, Command cmd, @NotNull 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;
|
||||||
@@ -36,7 +35,8 @@ public class VisualBlockInsertAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, Command cmd, @NotNull 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.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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
@@ -36,7 +35,7 @@ public class ShiftLeftVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull 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,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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
@@ -36,7 +35,7 @@ public class ShiftRightVisualAction extends EditorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Handler extends VisualOperatorActionHandler {
|
private static class Handler extends VisualOperatorActionHandler {
|
||||||
protected boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull 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,24 +1,23 @@
|
|||||||
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;
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
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;
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
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;
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
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;
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
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;
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
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;
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
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;
|
||||||
|
@@ -1,24 +1,23 @@
|
|||||||
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;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user