aboutsummaryrefslogtreecommitdiffstats
path: root/auto_word_select_mode.js
diff options
context:
space:
mode:
authoranekos2009-05-06 13:25:47 +0000
committeranekos2009-05-06 13:25:47 +0000
commit23ceaec8f88199eb9b51a18d8e3f701567a7d71a (patch)
tree0b8e8aeb409c8af0fe2d18e140230a3e1d00d690 /auto_word_select_mode.js
parentea0c38f470d06b7d30d52202758a441c811567b0 (diff)
downloadvimperator-plugins-23ceaec8f88199eb9b51a18d8e3f701567a7d71a.tar.bz2
範囲拡張用マッピング追加
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@33110 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'auto_word_select_mode.js')
-rw-r--r--auto_word_select_mode.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/auto_word_select_mode.js b/auto_word_select_mode.js
index 2287d5e..dcc8deb 100644
--- a/auto_word_select_mode.js
+++ b/auto_word_select_mode.js
@@ -41,7 +41,7 @@ var PLUGIN_INFO =
<updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/auto_word_select_mode.js</updateURL>
<author mail="snaka.gml@gmail.com" homepage="http://vimperator.g.hatena.ne.jp/snaka72/">snaka</author>
<license>MIT style license</license>
- <version>1.1.0</version>
+ <version>1.2.0</version>
<detail><![CDATA[
== Subject ==
Add auto word select mode.
@@ -216,6 +216,17 @@ mappings.add( [modes.AUTO_WORD_SELECT],
);
mappings.add( [modes.AUTO_WORD_SELECT],
+ ["L"],
+ "Extend to right word.",
+ function() {
+ var before = range();
+ content.getSelection().collapseToEnd();
+ controller().wordMove(true, true);
+ content.getSelection().getRangeAt(0).setStart(before.startNode, before.startOffset);
+ }
+);
+
+mappings.add( [modes.AUTO_WORD_SELECT],
["h"],
"Move to left word and select.",
function() {
@@ -236,6 +247,17 @@ mappings.add( [modes.AUTO_WORD_SELECT],
);
mappings.add( [modes.AUTO_WORD_SELECT],
+ ["H"],
+ "Extend to left word.",
+ function() {
+ var before = range();
+ content.getSelection().collapseToStart();
+ controller().wordMove(false, true);
+ content.getSelection().getRangeAt(0).setEnd(before.endNode, before.endOffset);
+ }
+);
+
+mappings.add( [modes.AUTO_WORD_SELECT],
["j"],
"Move to below word and select.",
function() {