I'm learning ipython for data analysis and I'd like to use Sublime text, my favorite text editor. However, I'm having a problem with "CR", carriage return, being output instead of the original "stuff" I want to display. This makes copying/pasting to another location a hassle because I'll have to manually delete those characters. It's also frustrating to look at.
Here's an example from the textbook I'm using:
Running the same command in terminal and it works fine
Although it displays properly in terminal, I really would like to use a REPL in sublime because of the helpful plugins such as autocomplete and code intelligence. I've tried changing the user settings default_line_ending but nothing helped. If someone knows how to get rid of those carriage returns or at least hide them from the output, I'd be very happy.
Thank you
file names/yob1880.txt
say? Maybe trydos2unix
orsed -e 's/\r//'
... – Maggotyfile
command on a plain text file with unix line endings would say 'ASCII Text'; for a DOS file 'ASCII Text, with CRLF line terminators', and in your case I wouldn't know what it says. It looks to me the line endings are CRCRLF (\r\r\n
, you could verify withhexdump -C
: there would be0d 0d 0a
patterns), and need to be fixed; there's no setting in any editor that I know that fixes that. Do you know how to search and replace a\r
with an empty string in regexp mode? – Maggoty