LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 09-27-2010, 06:35 AM   #1
Sukuro
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
Cool Notepad equivalent


Hello,

I have just started to learn Java programming and need to be able to use a compatible notepad equivalent in Ubuntu i will need to save the data as is,in Ubuntu and be able to transfer the data from my Linux machine to the windows desktop regularly via memory stick i absolutely love Linux and don't want to have to go back to windows to do this.
 
Old 09-27-2010, 06:56 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
For the CLI
nano, vi, pico, emacs, vim, joe, jed...
For GUI
gedit, quanta, kwrite, xemacs....


Kind regards
 
Old 09-27-2010, 06:59 AM   #3
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by Sukuro View Post
Hello,

I have just started to learn Java programming and need to be able to use a compatible notepad equivalent in Ubuntu i will need to save the data as is,in Ubuntu and be able to transfer the data from my Linux machine to the windows desktop regularly via memory stick i absolutely love Linux and don't want to have to go back to windows to do this.
Hi,

how about gedit? Keep in mind though, that Linux/Unix has different line-endings than windows. To convert them to dos format you could run
Code:
sed -i 's/$/\r/' file  # convert unix to dos
which will convert your file to dosformat. To convert from dos back to Unix you can use
Code:
sed -i 's/\r$//' file  # convert dos to unix
 
Old 09-27-2010, 07:49 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
That's right, Linux and Widnows even store plain text differently. Widnows uses a CR-LF pair, and Linux uses just LF.
 
Old 09-27-2010, 10:25 AM   #5
rikijpn
Member
 
Registered: Jun 2007
Location: Japan
Distribution: Debian lenny, DSL, Solaris 10
Posts: 157

Rep: Reputation: 33
Quote:
Originally Posted by crts View Post
Hi,

how about gedit? Keep in mind though, that Linux/Unix has different line-endings than windows. To convert them to dos format you could run
Code:
sed -i 's/$/\r/' file  # convert unix to dos
which will convert your file to dosformat. To convert from dos back to Unix you can use
Code:
sed -i 's/\r$//' file  # convert dos to unix
I recommend the programs "unix2dos" and "dos2unix" for these tasks.
However if you intend to regularly copy files from linux to windows, saving the file with dos-like newline endings (CR-LF pair as stated) would save you the trouble to do this every time you copy your files.
Pretty much any editor can save files like this, and be configured to save every file like this. emacs and vi are good examples, although "simple" editors like gedit probably can't.

Anyway, I don't see why the windows machine is needed, being that the compiled code in java is the same in windows and linux and everything. But I guess you should have your reasons...
 
Old 09-27-2010, 11:14 AM   #6
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Sukuro View Post
Hello,

I have just started to learn Java programming and need to be able to use a compatible notepad equivalent in Ubuntu i will need to save the data as is,in Ubuntu and be able to transfer the data from my Linux machine to the windows desktop regularly via memory stick i absolutely love Linux and don't want to have to go back to windows to do this.
You won't have a problem for that, if there's something in Linux that's text editors, Google can help you with that, there are hundreds.

As others already pointed out you will have to watch for the line endings, however in Windows you can open Unix text files (or Linux ones by that matter) using the wordpad, so that's really not a big problem and most editors as stated can be configured to save the file in one or another format.

I don't understand what's the point in moving the files from one OS to another constantly, though... Knowing that Java is cross-platform and you will be programming in Linux it really doesn't make much sense in writting the text file in Linux and then moving it to Windows to build the byte-code..
 
  


Reply



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
Windows Notepad Equivalent in Linux? Bob5 Linux - Software 21 09-16-2013 02:43 AM
Notepad++ replacement? subnet_rx Linux - Software 5 05-19-2008 06:50 PM
Sort of 'web notepad' anyone? concoran Linux - General 1 05-12-2005 01:23 AM
Notepad in linux wh33t Linux - Software 10 05-24-2004 10:10 PM
notepad in java, help Lord-AG Programming 7 05-12-2004 06:47 AM

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

All times are GMT -5. The time now is 08:53 AM.

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