1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 09:12:28 +01:00

add ]n and ]p mappings for navigating document relationships defined by the

'nextpattern' and 'previouspattern' options - thanks kidd
This commit is contained in:
Doug Kearns
2007-11-15 02:43:13 +00:00
parent 20e176ee01
commit 5b8d9a05e1
5 changed files with 73 additions and 3 deletions

View File

@@ -414,6 +414,22 @@ vimperator.Mappings = function () //{{{
flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["]n"],
function (count) {vimperator.buffer.followDocumentRelation("next");},
{
short_help: "go to 'next' or '>' if it exists. Beep otherwise.",
help: "Opens link labeled with next or >. Useful when browsing forums or documentation. Change nextpattern to modify its behaviour. It follows relations between files too.",
flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["]p"],
function (count) {vimperator.buffer.followDocumentRelation("previous");},
{
short_help: "go to 'prev', 'previous' or '<' if it exists. Beep otherwise.",
help: "Opens link labeled with prev, previous or <. Useful when browsing forums or documentation. Change nextpattern to modify its behaviour. It follows relations between files too.",
flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["b"],
function () { vimperator.commandline.open(":", "buffer! ", vimperator.modes.EX); },
{