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
|
special versions for the old behavior
|
||||||
* IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and
|
* IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and
|
||||||
VimperatorLeave respectively
|
VimperatorLeave respectively
|
||||||
|
* add N% normal mode command
|
||||||
* add interpolation for items such as <url> to autocommands
|
* add interpolation for items such as <url> to autocommands
|
||||||
* add -nargs, -bang, and -count attribute support to :command
|
* add -nargs, -bang, and -count attribute support to :command
|
||||||
* much improved completion support, including javascript, option, and search keyword
|
* much improved completion support, including javascript, option, and search keyword
|
||||||
|
|||||||
@@ -517,15 +517,26 @@ liberator.Buffer = function () //{{{
|
|||||||
function () { liberator.buffer.scrollEnd(); });
|
function () { liberator.buffer.scrollEnd(); });
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["gg", "<Home>"],
|
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); },
|
function (count) { liberator.buffer.scrollToPercentile(count > 0 ? count : 0); },
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["G", "<End>"],
|
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); },
|
function (count) { liberator.buffer.scrollToPercentile(count >= 0 ? count : 100); },
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ 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>"],
|
liberator.mappings.add(modes, ["<C-d>"],
|
||||||
"Scroll window downwards in the buffer",
|
"Scroll window downwards in the buffer",
|
||||||
function (count) { liberator.buffer.scrollByScrollSize(count, 1); },
|
function (count) { liberator.buffer.scrollByScrollSize(count, 1); },
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ ________________________________________________________________________________
|
|||||||
|<Home>| |gg| +
|
|<Home>| |gg| +
|
||||||
||[count]gg||
|
||[count]gg||
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
Goto the top of the document. When used with [count] like in [m]35gg[m], it
|
Go to the top of the document. When used with [count] like in [m]35gg[m], it
|
||||||
scrolls to 35% of the document.
|
scrolls to 35% of the document.
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|
||||||
@@ -81,11 +81,18 @@ ________________________________________________________________________________
|
|||||||
|<End>| |G| +
|
|<End>| |G| +
|
||||||
||[count]G||
|
||[count]G||
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
Goto the end of the document. When used with [count] like in [m]35G[m], it
|
Go to the end of the document. When used with [count] like in [m]35G[m], it
|
||||||
scrolls to 35% of the document.
|
scrolls to 35% of the document.
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|
||||||
|
|
||||||
|
|N%| +
|
||||||
|
||{count}%||
|
||||||
|
________________________________________________________________________________
|
||||||
|
Scroll to {count} percent of the document.
|
||||||
|
________________________________________________________________________________
|
||||||
|
|
||||||
|
|
||||||
|<Left>| |h| +
|
|<Left>| |h| +
|
||||||
||[count]h||
|
||[count]h||
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ section:Normal{nbsp}mode[normal-index]
|
|||||||
||B|| Show buffer list +
|
||B|| Show buffer list +
|
||||||
||D|| Delete current buffer, focus tab to the left +
|
||D|| Delete current buffer, focus tab to the left +
|
||||||
||F|| Start QuickHint mode, but open link in a new tab +
|
||F|| Start QuickHint mode, but open link in a new tab +
|
||||||
||G|| Goto the end of the document +
|
||G|| Go to the end of the document +
|
||||||
||H|| Go back in the browser history +
|
||H|| Go back in the browser history +
|
||||||
||L|| Go forward in the browser history +
|
||L|| Go forward in the browser history +
|
||||||
||M|| Add new QuickMark for current URL +
|
||M|| Add new QuickMark for current URL +
|
||||||
@@ -76,6 +76,8 @@ section:Normal{nbsp}mode[normal-index]
|
|||||||
||*|| Find word under cursor +
|
||*|| Find word under cursor +
|
||||||
||#|| Find word under cursor backwards +
|
||#|| Find word under cursor backwards +
|
||||||
|
|
||||||
|
||N%|| Scroll to {count} percent of the document +
|
||||||
|
|
||||||
||'|| Jump to the mark in the current buffer +
|
||'|| Jump to the mark in the current buffer +
|
||||||
|
|
||||||
||@|| Play a macro +
|
||@|| Play a macro +
|
||||||
@@ -96,7 +98,7 @@ section:Normal{nbsp}mode[normal-index]
|
|||||||
||gU|| Go to the root of the website +
|
||gU|| Go to the root of the website +
|
||||||
||gb|| Repeat last :buffer[!] command +
|
||gb|| Repeat last :buffer[!] command +
|
||||||
||gf|| View source +
|
||gf|| View source +
|
||||||
||gg|| Goto the top of the document +
|
||gg|| Go to the top of the document +
|
||||||
||gh|| Open homepage +
|
||gh|| Open homepage +
|
||||||
||gi|| Focus last used input field +
|
||gi|| Focus last used input field +
|
||||||
||gn|| Jump to a QuickMark in a new tab +
|
||gn|| Jump to a QuickMark in a new tab +
|
||||||
|
|||||||
Reference in New Issue
Block a user