1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 20:42:27 +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

1
NEWS
View File

@@ -7,6 +7,7 @@
special versions for the old behavior
* IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and
VimperatorLeave respectively
* add N% normal mode command
* add interpolation for items such as <url> to autocommands
* add -nargs, -bang, and -count attribute support to :command
* much improved completion support, including javascript, option, and search keyword

View File

@@ -526,6 +526,17 @@ liberator.Buffer = function () //{{{
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); },

View File

@@ -86,6 +86,13 @@ scrolls to 35% of the document.
________________________________________________________________________________
|N%| +
||{count}%||
________________________________________________________________________________
Scroll to {count} percent of the document.
________________________________________________________________________________
|<Left>| |h| +
||[count]h||
________________________________________________________________________________

View File

@@ -76,6 +76,8 @@ section:Normal{nbsp}mode[normal-index]
||*|| Find word under cursor +
||#|| Find word under cursor backwards +
||N%|| Scroll to {count} percent of the document +
||'|| Jump to the mark in the current buffer +
||@|| Play a macro +