LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-05-2010, 06:21 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
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.

Last edited by stf92; 12-05-2010 at 06:23 PM.
 
Old 12-05-2010, 06:29 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
http://vimdoc.sourceforge.net/htmldoc/vimfaq.html#11.5
http://stupidunixlinuxtricks.blogspo...ers-in-vi.html
 
1 members found this post helpful.
Old 12-06-2010, 03:44 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
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.

Last edited by stf92; 12-06-2010 at 03:46 AM.
 
  


Reply

Tags
non-printable-char, vim



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Editor comparison: vim VS vim-lite, Cleaning vim Ruler2112 *BSD 4 04-13-2009 04:26 PM
LXer: vimdiff - Edit two or Three versions of a file with Vim and show differences LXer Syndicated Linux News 0 04-09-2009 12:21 AM
Show line and column numbers in Vim 7.0 judgex Linux - Desktop 1 08-29-2006 06:06 AM
Wiki: Show Printable Version / printer friendly version / wiki page setup Emmanuel_uk LQ Suggestions & Feedback 1 10-24-2005 08:09 AM
Show printable version button for Linux Answers JZL240I-U LQ Suggestions & Feedback 2 08-04-2005 03:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration