Expose 'ViBackwardChar' and 'ViForwardChar' as bindable functions (#1547)

This commit is contained in:
Dongbo Wang
2020-05-25 22:46:13 -07:00
committed by GitHub
parent 65d332e277
commit a2a409d7ad
3 changed files with 10 additions and 2 deletions
+2
View File
@@ -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):
+2 -2
View File
@@ -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))
{
+6
View File
@@ -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>