LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-11-2007, 07:47 PM   #1
BuilderQ
Member
 
Registered: Sep 2007
Distribution: Xubuntu 8.04
Posts: 35

Rep: Reputation: 15
Text editor with CR+LF default?


I've been trying to find a lightweight text editor which can be configured so as to save all files with CR+LF line endings by default. Currently I'm using Leafpad, and I have to set this each time I save a file. My purpose, of course, is to ensure my files can be read correctly with Notepad on Windows systems.

What text editor should I use?
 
Old 10-11-2007, 07:59 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Well, if you want to learn a vi-like editor, vim automatically preserves CR/LF if that is in the file when it is opened.
 
Old 10-11-2007, 08:40 PM   #3
BuilderQ
Member
 
Registered: Sep 2007
Distribution: Xubuntu 8.04
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks, but Leafpad will also preserve CR+LF. What I meant was I had to set that each time I saved a new file.

The text editor I'm looking for will save new text files as CR+LF unless instructed otherwise.
 
Old 10-12-2007, 12:51 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Alternative: get an editor for windows that can read Unix text files (I use PFE, but there are others)
 
Old 10-12-2007, 06:08 AM   #5
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,609

Rep: Reputation: 131Reputation: 131
In kwrite you can setup if it as standard saves with "UNIX" or "Windows" line endings.
 
Old 10-12-2007, 01:58 PM   #6
BuilderQ
Member
 
Registered: Sep 2007
Distribution: Xubuntu 8.04
Posts: 35

Original Poster
Rep: Reputation: 15
titopoquito: Thanks, KWrite looks like what I want.
Wim Sturkenboom: I think even WordPad can read Unix line endings.
 
Old 10-12-2007, 02:07 PM   #7
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
You can put this in your .vimrc to make it use the DOS style end of line for new files:
Code:
set ff=dos
 
  


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
Gnome is not Allowing me to Change its Default Text Editor rickh Linux - Desktop 2 06-02-2007 11:21 AM
LXer: Howto Change Default Text editor in Debian Etch LXer Syndicated Linux News 0 05-22-2007 03:01 PM
How to set a default text editor carlsonultimate SUSE / openSUSE 2 04-26-2007 04:52 PM
Is it possible to change the default text editor? Gethyn Slackware 2 09-05-2006 06:08 PM
Which light text editor can copy text from file and paste in browser? davidas Linux - Software 9 03-06-2006 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:14 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