When in vim I execute this command
:set isprint=1-225 all the non printable characters are condensed/removed. Now how can I save this file or convert the format of this file so that by default this file opens with this format. Or if I upload it to github the non printable characters are condensed?
My question was down-voted on Stack Overflow for not being programming- or development-related, so I thought I’d try adding some more detail here. I couldn't fit this all in the title, but basically I can sum my additions with this line: I am using the
script command to log my session, while
script command gives a file with lots of 'non-printable' characters, I can condense non-printable characters in vim with
:set isprint=1-225 how can I save the file in this format?
Other options that I am aware of and have tried out are writing a perl function to remove control character (best alternative, albeit I have to check to see if all the non-printable characters have been removed), and combination of
col -bp commands from the bash prompt.
This looked promising, but before I could try it out I saw that under downloads for Ubuntu it says out of date – should I still try to install it with the
P.S. In this SO post Kyle Barbour's answer's gets me thinking is there a way to use
tr utility to do what
set: isprint=1-225 doing from vim command line.