1
0
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:
Doug Kearns
2008-10-11 10:51:10 +00:00
parent ce65d762a0
commit 881d0ac843
4 changed files with 27 additions and 6 deletions

View File

@@ -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); },