3
3
--********************************************************************/
4
4
5
5
using System ;
6
- using System . Collections . Generic ;
7
- using System . Management . Automation . Language ;
8
- using System . Windows ;
9
6
10
7
namespace Microsoft . PowerShell
11
8
{
12
9
public partial class PSConsoleReadLine
13
10
{
14
11
private string _clipboard = string . Empty ;
15
12
13
+ /// <summary>
14
+ /// Paste the clipboard after the cursor, moving the cursor to the end of the pasted text.
15
+ /// </summary>
16
16
public static void PasteAfter ( ConsoleKeyInfo ? key = null , object arg = null )
17
17
{
18
18
if ( string . IsNullOrEmpty ( _singleton . _clipboard ) )
@@ -24,6 +24,9 @@ public static void PasteAfter(ConsoleKeyInfo? key = null, object arg = null)
24
24
_singleton . PasteAfterImpl ( ) ;
25
25
}
26
26
27
+ /// <summary>
28
+ /// Paste the clipboard before the cursor, moving the cursor to the end of the pasted text.
29
+ /// </summary>
27
30
public static void PasteBefore ( ConsoleKeyInfo ? key = null , object arg = null )
28
31
{
29
32
if ( string . IsNullOrEmpty ( _singleton . _clipboard ) )
@@ -57,11 +60,17 @@ private void SaveToClipboard(int startIndex, int length)
57
60
_clipboard = _buffer . ToString ( startIndex , length ) ;
58
61
}
59
62
63
+ /// <summary>
64
+ /// Yank the entire buffer.
65
+ /// </summary>
60
66
public static void ViYankLine ( ConsoleKeyInfo ? key = null , object arg = null )
61
67
{
62
68
_singleton . SaveToClipboard ( 0 , _singleton . _buffer . Length ) ;
63
69
}
64
70
71
+ /// <summary>
72
+ /// Yank character(s) under and to the right of the cursor.
73
+ /// </summary>
65
74
public static void ViYankRight ( ConsoleKeyInfo ? key = null , object arg = null )
66
75
{
67
76
int numericArg ;
@@ -81,6 +90,9 @@ public static void ViYankRight(ConsoleKeyInfo? key = null, object arg = null)
81
90
_singleton . SaveToClipboard ( start , length ) ;
82
91
}
83
92
93
+ /// <summary>
94
+ /// Yank character(s) to the left of the cursor.
95
+ /// </summary>
84
96
public static void ViYankLeft ( ConsoleKeyInfo ? key = null , object arg = null )
85
97
{
86
98
int numericArg ;
@@ -110,13 +122,19 @@ public static void ViYankLeft(ConsoleKeyInfo? key = null, object arg = null)
110
122
_singleton . SaveToClipboard ( start , length ) ;
111
123
}
112
124
125
+ /// <summary>
126
+ /// Yank from the cursor to the end of the buffer.
127
+ /// </summary>
113
128
public static void ViYankToEndOfLine ( ConsoleKeyInfo ? key = null , object arg = null )
114
129
{
115
130
int start = _singleton . _current ;
116
131
int length = _singleton . _buffer . Length - _singleton . _current ;
117
132
_singleton . SaveToClipboard ( start , length ) ;
118
133
}
119
134
135
+ /// <summary>
136
+ /// Yank the word(s) before the cursor.
137
+ /// </summary>
120
138
public static void ViYankPreviousWord ( ConsoleKeyInfo ? key = null , object arg = null )
121
139
{
122
140
int numericArg ;
@@ -139,6 +157,9 @@ public static void ViYankPreviousWord(ConsoleKeyInfo? key = null, object arg = n
139
157
}
140
158
}
141
159
160
+ /// <summary>
161
+ /// Yank the word(s) after the cursor.
162
+ /// </summary>
142
163
public static void ViYankNextWord ( ConsoleKeyInfo ? key = null , object arg = null )
143
164
{
144
165
int numericArg ;
@@ -165,6 +186,9 @@ public static void ViYankNextWord(ConsoleKeyInfo? key = null, object arg = null)
165
186
}
166
187
}
167
188
189
+ /// <summary>
190
+ /// Yank from the cursor to the end of the word(s).
191
+ /// </summary>
168
192
public static void ViYankEndOfWord ( ConsoleKeyInfo ? key = null , object arg = null )
169
193
{
170
194
int numericArg ;
@@ -187,6 +211,9 @@ public static void ViYankEndOfWord(ConsoleKeyInfo? key = null, object arg = null
187
211
}
188
212
}
189
213
214
+ /// <summary>
215
+ /// Yank from the cursor to the end of the WORD(s).
216
+ /// </summary>
190
217
public static void ViYankEndOfGlob ( ConsoleKeyInfo ? key = null , object arg = null )
191
218
{
192
219
int numericArg ;
@@ -209,6 +236,9 @@ public static void ViYankEndOfGlob(ConsoleKeyInfo? key = null, object arg = null
209
236
}
210
237
}
211
238
239
+ /// <summary>
240
+ /// Yank from the beginning of the buffer to the cursor.
241
+ /// </summary>
212
242
public static void ViYankBeginningOfLine ( ConsoleKeyInfo ? key = null , object arg = null )
213
243
{
214
244
int length = _singleton . _current ;
@@ -218,6 +248,9 @@ public static void ViYankBeginningOfLine(ConsoleKeyInfo? key = null, object arg
218
248
}
219
249
}
220
250
251
+ /// <summary>
252
+ /// Yank from the first non-whitespace character to the cursor.
253
+ /// </summary>
221
254
public static void ViYankToFirstChar ( ConsoleKeyInfo ? key = null , object arg = null )
222
255
{
223
256
int start = 0 ;
@@ -237,6 +270,9 @@ public static void ViYankToFirstChar(ConsoleKeyInfo? key = null, object arg = nu
237
270
}
238
271
}
239
272
273
+ /// <summary>
274
+ /// Yank to/from matching brace.
275
+ /// </summary>
240
276
public static void ViYankPercent ( ConsoleKeyInfo ? key = null , object arg = null )
241
277
{
242
278
int start = _singleton . ViFindBrace ( _singleton . _current ) ;
@@ -254,6 +290,9 @@ public static void ViYankPercent(ConsoleKeyInfo? key = null, object arg = null)
254
290
}
255
291
}
256
292
293
+ /// <summary>
294
+ /// Yank from beginning of the WORD(s) to cursor.
295
+ /// </summary>
257
296
public static void ViYankPreviousGlob ( ConsoleKeyInfo ? key = null , object arg = null )
258
297
{
259
298
int numericArg ;
@@ -277,6 +316,9 @@ public static void ViYankPreviousGlob(ConsoleKeyInfo? key = null, object arg = n
277
316
}
278
317
}
279
318
319
+ /// <summary>
320
+ /// Yank from cursor to the start of the next WORD(s).
321
+ /// </summary>
280
322
public static void ViYankNextGlob ( ConsoleKeyInfo ? key = null , object arg = null )
281
323
{
282
324
int numericArg ;
0 commit comments