mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 18:32:25 +01:00
add N% normal mode command
This commit is contained in:
@@ -517,15 +517,26 @@ liberator.Buffer = function () //{{{
|
||||
function () { liberator.buffer.scrollEnd(); });
|
||||
|
||||
liberator.mappings.add(modes, ["gg", "<Home>"],
|
||||
"Goto the top of the document",
|
||||
"Go to the top of the document",
|
||||
function (count) { liberator.buffer.scrollToPercentile(count > 0 ? count : 0); },
|
||||
{ flags: liberator.Mappings.flags.COUNT });
|
||||
|
||||
liberator.mappings.add(modes, ["G", "<End>"],
|
||||
"Goto the end of the document",
|
||||
"Go to the end of the document",
|
||||
function (count) { liberator.buffer.scrollToPercentile(count >= 0 ? count : 100); },
|
||||
{ flags: liberator.Mappings.flags.COUNT });
|
||||
|
||||
liberator.mappings.add(modes, ["%"],
|
||||
"Scroll to {count} percent of the document",
|
||||
function (count)
|
||||
{
|
||||
if (count > 0 && count <= 100)
|
||||
liberator.buffer.scrollToPercentile(count);
|
||||
else
|
||||
liberator.beep();
|
||||
},
|
||||
{ flags: liberator.Mappings.flags.COUNT });
|
||||
|
||||
liberator.mappings.add(modes, ["<C-d>"],
|
||||
"Scroll window downwards in the buffer",
|
||||
function (count) { liberator.buffer.scrollByScrollSize(count, 1); },
|
||||
|
||||
Reference in New Issue
Block a user