Today, I have found a file in which there were many control characters, so I need to replace it due to be detected correctly. But I have no idear about inputing the characters in the command mode. So I have searched the methods via internet, now I write it down for my next using.
First, input <ctrl>+V, you can see a character "^"; then you need to press the corresponding key following the next table. There are corresponding displays you can see in vim editor.
e.g. If you wanna to input ^@, you need to press the key in the next order. <Ctrl>V, then <Ctrl><Shift>@
ASCII TABLE for SPECIAL CODES in vi | |||||
Dec | Oct | Hex | Symbol | vi Display | Keypress |
---|---|---|---|---|---|
000 | 000 | 00 | NULL | ^@ | <ctrl><shift>@ |
001 | 001 | 01 | SOH | ^A | <ctrl>A |
002 | 002 | 02 | STX | ^B | <ctrl>B |
003 | 003 | 03 | ETX | ^C | <ctrl>C |
004 | 004 | 04 | EOT | ^D | <ctrl>D |
005 | 005 | 05 | ENQ | ^E | <ctrl>E |
006 | 006 | 06 | ACK | ^F | <ctrl>F |
007 | 007 | 07 | BEL | ^G | <ctrl>G |
008 | 010 | 08 | BS | ^H | <ctrl>H |
009 | 011 | 09 | HT | ^I | <ctrl>I |
010 | 012 | 0A | LF | <LF> | <ctrl>J |
011 | 013 | 0B | VT | <VT> | <ctrl>K |
012 | 014 | 0C | FF | ^L | <ctrl>L |
013 | 015 | 0D | CR | ^M | <ctrl>M |
014 | 016 | 0E | SO | ^N | <ctrl>N |
015 | 017 | 0F | SI | ^O | <ctrl>O |
016 | 020 | 10 | DLE | ^P | <ctrl>P |
017 | 021 | 11 | DC1 | ^Q | <ctrl>Q |
018 | 022 | 12 | DC2 | ^R | <ctrl>R |
019 | 023 | 13 | DC3 | ^S | <ctrl>S |
020 | 024 | 14 | DC4 | ^T | <ctrl>T |
021 | 025 | 15 | NAK | ^U | <ctrl>U |
022 | 026 | 16 | SYN | ^V | <ctrl>V |
023 | 027 | 17 | ETB | ^W | <ctrl>W |
024 | 030 | 18 | CAN | ^X | <ctrl>X |
025 | 031 | 19 | EM | ^Y | <ctrl>Y |
026 | 032 | 1A | SUB | ^Z | <ctrl>Z |
027 | 033 | 1B | ESC | ^[ | <ctrl><esc> |
028 | 034 | 1C | FS | ^/ | <ctrl>V/ |
029 | 035 | 1D | GS | ^] | <ctrl><shift>] |
030 | 036 | 1E | RS | ^^ | <ctrl><shift>^ |
031 | 037 | 1F | US | ^_ | <ctrl><shift>_ |
127 | 177 | 7F | DEL | ^? | <ctrl>V<del> |