mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 00:17:58 +01:00
add initial implementation of :normal command
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,6 +1,7 @@
|
|||||||
<pre>
|
<pre>
|
||||||
2007-08-*:
|
2007-08-*:
|
||||||
* version 0.5
|
* version 0.5
|
||||||
|
* new :normal command
|
||||||
* the command line keeps focus now, even when clicking outside of it
|
* the command line keeps focus now, even when clicking outside of it
|
||||||
* vimperator.events.feedkeys("2zi") support for scripts
|
* vimperator.events.feedkeys("2zi") support for scripts
|
||||||
* Ctrl-U/Ctrl-D for scrolling the window up/down and the associated
|
* Ctrl-U/Ctrl-D for scrolling the window up/down and the associated
|
||||||
|
|||||||
@@ -588,7 +588,7 @@ function Commands() //{{{
|
|||||||
// 2 args -> map arg1 to arg*
|
// 2 args -> map arg1 to arg*
|
||||||
function(args)
|
function(args)
|
||||||
{
|
{
|
||||||
if (args.length == 0)
|
if (!args)
|
||||||
{
|
{
|
||||||
vimperator.mappings.list(vimperator.modes.NORMAL);
|
vimperator.mappings.list(vimperator.modes.NORMAL);
|
||||||
return;
|
return;
|
||||||
@@ -694,6 +694,23 @@ function Commands() //{{{
|
|||||||
help: "If <code class=\"argument\">[arg]</code> is specified then limit the list to the those marks mentioned."
|
help: "If <code class=\"argument\">[arg]</code> is specified then limit the list to the those marks mentioned."
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
addDefaultCommand(new Command(["norm[al]"],
|
||||||
|
function(args)
|
||||||
|
{
|
||||||
|
if (!args)
|
||||||
|
{
|
||||||
|
vimperator.echoerr("E471: Argument required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
vimperator.events.feedkeys(args);
|
||||||
|
},
|
||||||
|
{
|
||||||
|
usage: ["norm[al][!] {commands}"],
|
||||||
|
short_help: "Execute Normal mode commands",
|
||||||
|
help: "TODO"
|
||||||
|
}
|
||||||
|
));
|
||||||
// TODO: remove duplication in :map
|
// TODO: remove duplication in :map
|
||||||
addDefaultCommand(new Command(["no[remap]"],
|
addDefaultCommand(new Command(["no[remap]"],
|
||||||
// 0 args -> list all maps
|
// 0 args -> list all maps
|
||||||
@@ -701,7 +718,7 @@ function Commands() //{{{
|
|||||||
// 2 args -> map arg1 to arg*
|
// 2 args -> map arg1 to arg*
|
||||||
function(args)
|
function(args)
|
||||||
{
|
{
|
||||||
if (args.length == 0)
|
if (!args)
|
||||||
{
|
{
|
||||||
vimperator.mappings.list(vimperator.modes.NORMAL);
|
vimperator.mappings.list(vimperator.modes.NORMAL);
|
||||||
return;
|
return;
|
||||||
@@ -1133,7 +1150,7 @@ function Commands() //{{{
|
|||||||
addDefaultCommand(new Command(["unm[ap]"],
|
addDefaultCommand(new Command(["unm[ap]"],
|
||||||
function(args)
|
function(args)
|
||||||
{
|
{
|
||||||
if (args.length == 0)
|
if (!args)
|
||||||
{
|
{
|
||||||
vimperator.echoerr("E474: Invalid argument");
|
vimperator.echoerr("E474: Invalid argument");
|
||||||
return;
|
return;
|
||||||
@@ -1194,7 +1211,7 @@ function Commands() //{{{
|
|||||||
{
|
{
|
||||||
var level;
|
var level;
|
||||||
|
|
||||||
if (args.length == 0)
|
if (!args)
|
||||||
{
|
{
|
||||||
level = 100;
|
level = 100;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ function CommandLine() //{{{
|
|||||||
multiline_output_widget.collapsed = false;
|
multiline_output_widget.collapsed = false;
|
||||||
setTimeout(function() { multiline_output_widget.collapsed = true; }, 0);
|
setTimeout(function() { multiline_output_widget.collapsed = true; }, 0);
|
||||||
|
|
||||||
// The widget used for multiline iutput
|
// The widget used for multiline intput
|
||||||
var multiline_input_widget = document.getElementById("vimperator-multiline-input");
|
var multiline_input_widget = document.getElementById("vimperator-multiline-input");
|
||||||
|
|
||||||
// we need to save the mode which were in before opening the command line
|
// we need to save the mode which were in before opening the command line
|
||||||
|
|||||||
Reference in New Issue
Block a user