mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 21:37:58 +01:00
Add :keepalt.
This commit is contained in:
@@ -353,6 +353,27 @@ function Tabs() //{{{
|
|||||||
literal: 0
|
literal: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
|
commands.add(["keepa[lt]"],
|
||||||
|
"Execute a command without changing the current alternate buffer",
|
||||||
|
function (args)
|
||||||
|
{
|
||||||
|
let alternate = tabs.alternate;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
liberator.execute(args[0], null, true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
tabs.updateSelectionHistory([tabs.getTab(), alternate]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
argCount: "+",
|
||||||
|
completer: function (context) completion.ex(context),
|
||||||
|
literal: 0
|
||||||
|
});
|
||||||
|
|
||||||
// TODO: this should open in a new tab positioned directly after the current one, not at the end
|
// TODO: this should open in a new tab positioned directly after the current one, not at the end
|
||||||
commands.add(["tab"],
|
commands.add(["tab"],
|
||||||
"Execute a command and tell it to output in a new tab",
|
"Execute a command and tell it to output in a new tab",
|
||||||
@@ -1167,12 +1188,15 @@ function Tabs() //{{{
|
|||||||
// alternate after a restart is often incorrectly tab 1 when there
|
// alternate after a restart is often incorrectly tab 1 when there
|
||||||
// shouldn't be one yet.
|
// shouldn't be one yet.
|
||||||
/**
|
/**
|
||||||
* Called on each TabSelect event to update the tab selection history.
|
* Sets the current and alternate tabs, updating the tab selection
|
||||||
|
* history.
|
||||||
|
*
|
||||||
|
* @param {Array(Object)} tabs The current and alternate tab.
|
||||||
* @see tabs#alternate
|
* @see tabs#alternate
|
||||||
*/
|
*/
|
||||||
updateSelectionHistory: function ()
|
updateSelectionHistory: function (tabs)
|
||||||
{
|
{
|
||||||
alternates = [this.getTab(), alternates[0]];
|
alternates = tabs || [this.getTab(), alternates[0]];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//}}}
|
//}}}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
(this might change again, as this is REALLY inconsistent, and i don't
|
(this might change again, as this is REALLY inconsistent, and i don't
|
||||||
know if I like copying bugs)
|
know if I like copying bugs)
|
||||||
|
|
||||||
|
* add [c]:keepalt[c]
|
||||||
* add [c]:styledisable[c], [c]:styleenable[c], and [c]:styletoggle[c]
|
* add [c]:styledisable[c], [c]:styleenable[c], and [c]:styletoggle[c]
|
||||||
* add [c]:sanitize[c], 'sanitizetimespan' and 'sanitizeitems'
|
* add [c]:sanitize[c], 'sanitizetimespan' and 'sanitizeitems'
|
||||||
* add [c]:verbose[c]
|
* add [c]:verbose[c]
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ section::Ex{nbsp}commands[ex-cmd-index,:index]
|
|||||||
||[c]:iunmap[c]|| Remove a mapping in Insert mode +
|
||[c]:iunmap[c]|| Remove a mapping in Insert mode +
|
||||||
||[c]:javascript[c]|| Run a JavaScript command through eval() +
|
||[c]:javascript[c]|| Run a JavaScript command through eval() +
|
||||||
||[c]:jumps[c]|| Show jumplist +
|
||[c]:jumps[c]|| Show jumplist +
|
||||||
|
||[c]:keepalt[c]|| Execute a command without changing the current alternate buffer +
|
||||||
||[c]:let[c]|| Set or list a variable +
|
||[c]:let[c]|| Set or list a variable +
|
||||||
||[c]:loadplugins[c]|| Immediately load all unloaded plugins +
|
||[c]:loadplugins[c]|| Immediately load all unloaded plugins +
|
||||||
||[c]:macros[c]|| List all macros +
|
||[c]:macros[c]|| List all macros +
|
||||||
|
|||||||
@@ -12,6 +12,21 @@ section::Listing{nbsp}tabs[listing-tabs]
|
|||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
Show a list of buffers (=tabs) matching [a][filter][a]. Without [a][filter][a]
|
Show a list of buffers (=tabs) matching [a][filter][a]. Without [a][filter][a]
|
||||||
list all tabs.
|
list all tabs.
|
||||||
|
|
||||||
|
A buffer may be marked with one of the following indicators:
|
||||||
|
|
||||||
|
[frame="topbot",grid="none",cols="1,10"]
|
||||||
|
|===============================================================================
|
||||||
|
|*%*|The current buffer
|
||||||
|
|*#*|The alternate buffer for [c]:e #[c] and [m]<C-^>[m]
|
||||||
|
|===============================================================================
|
||||||
|
________________________________________________________________________________
|
||||||
|
|
||||||
|
|
||||||
|
|:keepa| |:keepalt| +
|
||||||
|
||:keepa[lt] {cmd}||
|
||||||
|
________________________________________________________________________________
|
||||||
|
Execute a command without changing the current alternate buffer.
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|
||||||
section::Opening{nbsp}tabs[opening-tabs]
|
section::Opening{nbsp}tabs[opening-tabs]
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
// TODO: this should be generated by the Makefile in the same order as
|
// TODO: this should be generated by the Makefile in the same order as
|
||||||
// config.helpFiles
|
// config.helpFiles
|
||||||
|
|
||||||
|intro.html|
|
|intro.html|
|
||||||
|
|
||||||
include::intro.txt[]
|
include::intro.txt[]
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ section::Ex{nbsp}commands[ex-cmd-index,:index]
|
|||||||
||[c]:iunmap[c]|| Remove a mapping in Insert mode +
|
||[c]:iunmap[c]|| Remove a mapping in Insert mode +
|
||||||
||[c]:javascript[c]|| Run a JavaScript command through eval() +
|
||[c]:javascript[c]|| Run a JavaScript command through eval() +
|
||||||
||[c]:jumps[c]|| Show jumplist +
|
||[c]:jumps[c]|| Show jumplist +
|
||||||
|
||[c]:keepalt[c]|| Execute a command without changing the current alternate buffer +
|
||||||
||[c]:let[c]|| Set or list a variable +
|
||[c]:let[c]|| Set or list a variable +
|
||||||
||[c]:load[c]|| Load a playlist +
|
||[c]:load[c]|| Load a playlist +
|
||||||
||[c]:loadplugins[c]|| Immediately load all unloaded plugins +
|
||[c]:loadplugins[c]|| Immediately load all unloaded plugins +
|
||||||
|
|||||||
@@ -12,6 +12,21 @@ section::Listing{nbsp}tabs[listing-tabs]
|
|||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
Show a list of buffers (=tabs) matching [a][filter][a]. Without [a][filter][a]
|
Show a list of buffers (=tabs) matching [a][filter][a]. Without [a][filter][a]
|
||||||
list all tabs.
|
list all tabs.
|
||||||
|
|
||||||
|
A buffer may be marked with one of the following indicators:
|
||||||
|
|
||||||
|
[frame="topbot",grid="none",cols="1,10"]
|
||||||
|
|===============================================================================
|
||||||
|
|*%*|The current buffer
|
||||||
|
|*#*|The alternate buffer for [c]:e #[c] and [m]<C-^>[m]
|
||||||
|
|===============================================================================
|
||||||
|
________________________________________________________________________________
|
||||||
|
|
||||||
|
|
||||||
|
|:keepa| |:keepalt|
|
||||||
|
||:keepa[lt] {cmd}||
|
||||||
|
________________________________________________________________________________
|
||||||
|
Execute a command without changing the current alternate buffer.
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|
||||||
section::Opening{nbsp}tabs[opening-tabs]
|
section::Opening{nbsp}tabs[opening-tabs]
|
||||||
|
|||||||
Reference in New Issue
Block a user