How do I apply ROT13 encoding to the current line in Vim without using a motion or visual selection?
g??
Vim has a built-in ROT13 operator g? that encodes text by rotating each letter 13 positions in the alphabet.
g??
Vim has a built-in ROT13 operator g? that encodes text by rotating each letter 13 positions in the alphabet.
8g8
The 8g8 command searches forward from the cursor for the first byte that belongs to an invalid UTF-8 sequence.
:e ++enc=utf-8
When Vim opens a file with the wrong encoding — producing garbled text or incorrect characters — you can reload it with a specific encoding using :e ++enc={
g8
Pressing g8 in normal mode displays the UTF-8 encoding of the character under the cursor as a sequence of hex bytes.
g?
Vim has a built-in ROT13 encoding operator accessible via g?.
visual-mode #visual-mode #encoding #rot13 #text-transformation
set encoding=utf-8 fileencoding=utf-8
Set encoding for internal representation and fileencoding for the file on disk.