LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 08-20-2008, 03:55 PM   #1
jpostma
Member
 
Registered: Jun 2003
Location: Alphen ad Rijn -- The Netherlands
Distribution: Fedora Core 2 - Slackware 12
Posts: 119

Rep: Reputation: 15
text editor with crlf


Hi,

I'm using Ubuntu. I'm searching for a simple graphical text editor where I can save the file with Windows newlines (crlf).

Can someone help me?

Regards,

Johannes
 
Old 08-20-2008, 04:31 PM   #2
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 32
the 'Kate' text editor has an option for this.

Once in Kate
Goto Settings->Configure Kate...->Open/Save->General(tab)

Under 'End of line', there is an option for DOS/WINDOWS.

Kate is a KDE editor so I don't know if Ubuntu will have it in their repos and I couldn't figure out how to do this with gedit(the gnome simple editor).

Alternatively, you can edit a file in any editor you want and use 'unix2dos' and 'dos2unix' commands to change all line endings in the file for you.
 
Old 08-20-2008, 04:32 PM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
you could use any editor then use a utility such as tofrodos to convert the files..

tofrodos - Converts DOS <-> Unix text files, alias tofromdos
 
Old 08-20-2008, 04:39 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,793

Rep: Reputation: 292Reputation: 292Reputation: 292
I use the text editor called mp which has an option to use either Unix or Windows end-of-line.

http://triptico.com/software/mp.html

-----------------------
Steve Stites
 
Old 08-20-2008, 04:39 PM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Theoretically, you could define a character set with that convention and use it in the editor of your choice.

But I'm somewhat curious about your need for this. Most Windows editors will accept a LF delimited file and happily add the (redundant) CR to the output as "needed." IIRC, even the venerable "word" has an option for this.
 
Old 08-21-2008, 02:13 AM   #6
jpostma
Member
 
Registered: Jun 2003
Location: Alphen ad Rijn -- The Netherlands
Distribution: Fedora Core 2 - Slackware 12
Posts: 119

Original Poster
Rep: Reputation: 15
Quote:
Once in Kate
Goto Settings->Configure Kate...->Open/Save->General(tab)

Under 'End of line', there is an option for DOS/WINDOWS.
Thanks. I tried that also with KWrite but unfortunately it didn't work.
 
Old 08-21-2008, 02:16 AM   #7
jpostma
Member
 
Registered: Jun 2003
Location: Alphen ad Rijn -- The Netherlands
Distribution: Fedora Core 2 - Slackware 12
Posts: 119

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by farslayer View Post
you could use any editor then use a utility such as tofrodos to convert the files..

tofrodos - Converts DOS <-> Unix text files, alias tofromdos
Thank you. This works quite well. Although it is not very user friendly but fortunately I do not have much text files.

The problem was that I'm always working on a Linux machine and the text files are for Windows (and Linux). I didn't want that users must use WordPad to open the files.

Regards,

Johannes
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
text selection question in text editor olin Linux - Software 1 09-25-2007 02:25 PM
text editor Gortex Programming 12 11-01-2006 11:33 PM
Text Editor on Fedora Core 4 in Text Mode blong4life Linux - Software 5 07-31-2006 10:07 PM
Which light text editor can copy text from file and paste in browser? davidas Linux - Software 9 03-06-2006 12:28 PM
Changing coding of text file(LF -> CRLF) koyi Linux - General 2 10-18-2005 08:44 AM


All times are GMT -5. The time now is 11:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration