33--********************************************************************/
44
55using System ;
6- using System . Collections . Generic ;
7- using System . Management . Automation . Language ;
8- using System . Windows ;
96
107namespace Microsoft . PowerShell
118{
129 public partial class PSConsoleReadLine
1310 {
1411 private string _clipboard = string . Empty ;
1512
13+ /// <summary>
14+ /// Paste the clipboard after the cursor, moving the cursor to the end of the pasted text.
15+ /// </summary>
1616 public static void PasteAfter ( ConsoleKeyInfo ? key = null , object arg = null )
1717 {
1818 if ( string . IsNullOrEmpty ( _singleton . _clipboard ) )
@@ -24,6 +24,9 @@ public static void PasteAfter(ConsoleKeyInfo? key = null, object arg = null)
2424 _singleton . PasteAfterImpl ( ) ;
2525 }
2626
27+ /// <summary>
28+ /// Paste the clipboard before the cursor, moving the cursor to the end of the pasted text.
29+ /// </summary>
2730 public static void PasteBefore ( ConsoleKeyInfo ? key = null , object arg = null )
2831 {
2932 if ( string . IsNullOrEmpty ( _singleton . _clipboard ) )
@@ -57,11 +60,17 @@ private void SaveToClipboard(int startIndex, int length)
5760 _clipboard = _buffer . ToString ( startIndex , length ) ;
5861 }
5962
63+ /// <summary>
64+ /// Yank the entire buffer.
65+ /// </summary>
6066 public static void ViYankLine ( ConsoleKeyInfo ? key = null , object arg = null )
6167 {
6268 _singleton . SaveToClipboard ( 0 , _singleton . _buffer . Length ) ;
6369 }
6470
71+ /// <summary>
72+ /// Yank character(s) under and to the right of the cursor.
73+ /// </summary>
6574 public static void ViYankRight ( ConsoleKeyInfo ? key = null , object arg = null )
6675 {
6776 int numericArg ;
@@ -81,6 +90,9 @@ public static void ViYankRight(ConsoleKeyInfo? key = null, object arg = null)
8190 _singleton . SaveToClipboard ( start , length ) ;
8291 }
8392
93+ /// <summary>
94+ /// Yank character(s) to the left of the cursor.
95+ /// </summary>
8496 public static void ViYankLeft ( ConsoleKeyInfo ? key = null , object arg = null )
8597 {
8698 int numericArg ;
@@ -110,13 +122,19 @@ public static void ViYankLeft(ConsoleKeyInfo? key = null, object arg = null)
110122 _singleton . SaveToClipboard ( start , length ) ;
111123 }
112124
125+ /// <summary>
126+ /// Yank from the cursor to the end of the buffer.
127+ /// </summary>
113128 public static void ViYankToEndOfLine ( ConsoleKeyInfo ? key = null , object arg = null )
114129 {
115130 int start = _singleton . _current ;
116131 int length = _singleton . _buffer . Length - _singleton . _current ;
117132 _singleton . SaveToClipboard ( start , length ) ;
118133 }
119134
135+ /// <summary>
136+ /// Yank the word(s) before the cursor.
137+ /// </summary>
120138 public static void ViYankPreviousWord ( ConsoleKeyInfo ? key = null , object arg = null )
121139 {
122140 int numericArg ;
@@ -139,6 +157,9 @@ public static void ViYankPreviousWord(ConsoleKeyInfo? key = null, object arg = n
139157 }
140158 }
141159
160+ /// <summary>
161+ /// Yank the word(s) after the cursor.
162+ /// </summary>
142163 public static void ViYankNextWord ( ConsoleKeyInfo ? key = null , object arg = null )
143164 {
144165 int numericArg ;
@@ -165,6 +186,9 @@ public static void ViYankNextWord(ConsoleKeyInfo? key = null, object arg = null)
165186 }
166187 }
167188
189+ /// <summary>
190+ /// Yank from the cursor to the end of the word(s).
191+ /// </summary>
168192 public static void ViYankEndOfWord ( ConsoleKeyInfo ? key = null , object arg = null )
169193 {
170194 int numericArg ;
@@ -187,6 +211,9 @@ public static void ViYankEndOfWord(ConsoleKeyInfo? key = null, object arg = null
187211 }
188212 }
189213
214+ /// <summary>
215+ /// Yank from the cursor to the end of the WORD(s).
216+ /// </summary>
190217 public static void ViYankEndOfGlob ( ConsoleKeyInfo ? key = null , object arg = null )
191218 {
192219 int numericArg ;
@@ -209,6 +236,9 @@ public static void ViYankEndOfGlob(ConsoleKeyInfo? key = null, object arg = null
209236 }
210237 }
211238
239+ /// <summary>
240+ /// Yank from the beginning of the buffer to the cursor.
241+ /// </summary>
212242 public static void ViYankBeginningOfLine ( ConsoleKeyInfo ? key = null , object arg = null )
213243 {
214244 int length = _singleton . _current ;
@@ -218,6 +248,9 @@ public static void ViYankBeginningOfLine(ConsoleKeyInfo? key = null, object arg
218248 }
219249 }
220250
251+ /// <summary>
252+ /// Yank from the first non-whitespace character to the cursor.
253+ /// </summary>
221254 public static void ViYankToFirstChar ( ConsoleKeyInfo ? key = null , object arg = null )
222255 {
223256 int start = 0 ;
@@ -237,6 +270,9 @@ public static void ViYankToFirstChar(ConsoleKeyInfo? key = null, object arg = nu
237270 }
238271 }
239272
273+ /// <summary>
274+ /// Yank to/from matching brace.
275+ /// </summary>
240276 public static void ViYankPercent ( ConsoleKeyInfo ? key = null , object arg = null )
241277 {
242278 int start = _singleton . ViFindBrace ( _singleton . _current ) ;
@@ -254,6 +290,9 @@ public static void ViYankPercent(ConsoleKeyInfo? key = null, object arg = null)
254290 }
255291 }
256292
293+ /// <summary>
294+ /// Yank from beginning of the WORD(s) to cursor.
295+ /// </summary>
257296 public static void ViYankPreviousGlob ( ConsoleKeyInfo ? key = null , object arg = null )
258297 {
259298 int numericArg ;
@@ -277,6 +316,9 @@ public static void ViYankPreviousGlob(ConsoleKeyInfo? key = null, object arg = n
277316 }
278317 }
279318
319+ /// <summary>
320+ /// Yank from cursor to the start of the next WORD(s).
321+ /// </summary>
280322 public static void ViYankNextGlob ( ConsoleKeyInfo ? key = null , object arg = null )
281323 {
282324 int numericArg ;
0 commit comments