mirror of
https://github.com/PowerShell/PSReadLine
synced 2026-06-08 12:12:13 +00:00
Expose 'ViBackwardChar' and 'ViForwardChar' as bindable functions (#1547)
This commit is contained in:
@@ -502,7 +502,9 @@ namespace Microsoft.PowerShell
|
||||
case nameof(ShellBackwardWord):
|
||||
case nameof(ShellForwardWord):
|
||||
case nameof(ShellNextWord):
|
||||
case nameof(ViBackwardChar):
|
||||
case nameof(ViBackwardWord):
|
||||
case nameof(ViForwardChar):
|
||||
case nameof(ViEndOfGlob):
|
||||
case nameof(ViEndOfPreviousGlob):
|
||||
case nameof(ViGotoBrace):
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Microsoft.PowerShell
|
||||
/// <summary>
|
||||
/// Moves the cursor one character to the right on a single logical line.
|
||||
/// </summary>
|
||||
private static void ViForwardChar(ConsoleKeyInfo? key = null, object arg = null)
|
||||
public static void ViForwardChar(ConsoleKeyInfo? key = null, object arg = null)
|
||||
{
|
||||
if (TryGetArgAsInt(arg, out var numericArg, 1))
|
||||
{
|
||||
@@ -105,7 +105,7 @@ namespace Microsoft.PowerShell
|
||||
/// <summary>
|
||||
/// Move the cursor one character to the left on a single logical line.
|
||||
/// </summary>
|
||||
private static void ViBackwardChar(ConsoleKeyInfo? key = null, object arg = null)
|
||||
public static void ViBackwardChar(ConsoleKeyInfo? key = null, object arg = null)
|
||||
{
|
||||
if (TryGetArgAsInt(arg, out var numericArg, 1))
|
||||
{
|
||||
|
||||
@@ -591,6 +591,12 @@ If there are other parse errors, unresolved commands, or incorrect parameters, s
|
||||
<data name="ViBackwardWordDescription" xml:space="preserve">
|
||||
<value>Delete backward to the beginning of the previous word, as delimited by white space and common delimiters, and enter insert mode.</value>
|
||||
</data>
|
||||
<data name="ViBackwardCharDescription" xml:space="preserve">
|
||||
<value>Move the cursor back one character in the Vi edit mode.</value>
|
||||
</data>
|
||||
<data name="ViForwardCharDescription" xml:space="preserve">
|
||||
<value>Move the cursor forward one character in the Vi edit mode.</value>
|
||||
</data>
|
||||
<data name="PasteAfterDescription" xml:space="preserve">
|
||||
<value>Write the contents of the local clipboard after the cursor.</value>
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user