#1
|
||||
|
||||
Ctrl+V, Ctrl+M
I'm trying to get a button to put the following into VI, to remove the Windows Control Characters in a file (currently on SCRT 6.7.3 (x64))
Currently, I hit : to enter into the command portion within VI & then type: %s/\(^M\)// The ^M above is actually Ctrl+V Ctrl+M Is there a way I can use a button on the button bar to put that in there? I tried just doing a string with ^M ... but no luck. Thanks!
__________________
---------------------------------------------- Tom O'Loughlin Last edited by toloughlin; 01-24-2012 at 01:21 PM. Reason: clarification |
#2
|
|||
|
|||
Use the string
:%s/\026013// \026 is ^V, and 013 is ^M |
#3
|
||||
|
||||
SecureCRT's send-string field allows for the use of escaped octal values for sending non-printing ASCII control characters to a remote device.
^V must be specified as the octal code: \026 ^M must be specified as the octal code: \015 See the attached screen-shot: "ASCII Ctrl Codes - Help.png" In addition, since the backslash character '\' has special meaning within a SecureCRT send-string definition, when you need to send a literal backslash without worrying about it conflicting with pre-defined escape codes that have special meaning to SecureCRT (for example \e, \r, \b, \p, \v, \n, \t), you should specify the octal code for backslash (\134) instead of using the literal '\' character in your send-string specifications. In a nutshell...
Does this help to answer your question?
__________________
Jake Devenport VanDyke Software Technical Support YouTube Channel: https://www.youtube.com/vandykesoftware Email: support@vandyke.com Web: https://www.vandyke.com/support |
#4
|
|||
|
|||
and to clarify the discrepancy between my use of 013 vs \015... a three digit decimal sequence may be used to follow a ^V in Vim. Note the lack of \ in my example.
13 in decimal is the same as the \015 octal code. |
#5
|
||||
|
||||
I totally forgot about this -- thanks guys, worked like a charm!
__________________
---------------------------------------------- Tom O'Loughlin |
![]() |
Thread Tools | |
Display Modes | |
|
|