LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Vim: command to show all non-printable chars. (https://www.linuxquestions.org/questions/linux-newbie-8/vim-command-to-show-all-non-printable-chars-848537/)

stf92 12-05-2010 06:21 PM

Vim: command to show all non-printable chars.
 
Vim 7.1

Hi:
Suppose I'm editing a file with vim. The file, a text file, contains line terninators which are line feeds (LF= 0x0a). It could also contain horizontal tabs (HT= 0x09) and some more non-printable chars (in fact, it could be corrupt and contain anything). Will vim let me see the location within the text of those chars (chars = characters) and what each of them is? I know there are such things as hexdump and the like but it would be nice for me to stay within the vim session. Thanks for reading.

chrism01 12-05-2010 06:29 PM

http://vimdoc.sourceforge.net/htmldoc/vimfaq.html#11.5
http://stupidunixlinuxtricks.blogspo...ers-in-vi.html

stf92 12-06-2010 03:44 AM

Thanks, chrism01 for your links.

==================================
After receiving chrism01's links, I did :help in vim. In the first screenfuls you'll see a list of files: usr_NN.txt, NN=01,02,... Then [s]locate any of these files. Within the directory pointed to by locate, grep -irl "non-printable cha" *. In my box, I found options.txt (part of Vim's user manual), with some useful info on non-printable chars stuff.


All times are GMT -5. The time now is 08:21 PM.