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:
1
NEWS
1
NEWS
@@ -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
|
||||
|
||||
@@ -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); },
|
||||
|
||||
@@ -86,6 +86,13 @@ scrolls to 35% of the document.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|N%| +
|
||||
||{count}%||
|
||||
________________________________________________________________________________
|
||||
Scroll to {count} percent of the document.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|<Left>| |h| +
|
||||
||[count]h||
|
||||
________________________________________________________________________________
|
||||
|
||||
@@ -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 +
|
||||
|
||||
Reference in New Issue
Block a user