Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-03-2005, 02:58 PM
|
#1
|
|
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638
Rep:
|
Vi alternatives
If you write a letter or a few words using 'vi' editor , it will be written or rather save as a ANSI text.
When you press :wq at the end of your letter, it will save.
My question is whether it is possible to save in other formats. I would like to save as a HTML file.
|
|
|
|
09-03-2005, 03:12 PM
|
#2
|
|
Member
Registered: Aug 2005
Location: Flintshire, WALES, UK
Distribution: Slackware
Posts: 57
Rep:
|
If you write your html source in VI and then save it as file.html, its then saved in that format.
e.g.
"<title>your document </title>"
"<body> This is what I want on my page etc </body>"
If on the otherhand, you are trying to write a document and then save it preformatted in html you should use something else like Openoffice or Abiword.
Have I understood your question properly?
|
|
|
|
09-03-2005, 03:42 PM
|
#3
|
|
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638
Original Poster
Rep:
|
Thanks F0UI
I meant to write some html tags.
If I wrote the following tags and saved, it will save as ANSI document. If I can save as .htm document, for example '' testing.htm or testing.html '', I could open it on my browser.
Is it possible to save as html document?
<html>
<head>
<title>My homepage</title>
</head>
<body>
Hello everybody. Welcome to my homepage.
</body>
</html>
|
|
|
|
09-03-2005, 03:46 PM
|
#4
|
|
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938
Rep:
|
Quote:
Originally posted by Gins
Thanks F0UI
I meant to write some html tags.
If I wrote the following tags and saved, it will save as ANSI document. If I can save as .htm document, for example '' testing.htm or testing.html '', I could open it on my browser.
Is it possible to save as html document?
<html>
<head>
<title>My homepage</title>
</head>
<body>
Hello everybody. Welcome to my homepage.
</body>
</html>
|
You mean ASCII (American Standard Code for Information Interchange), not ANSI (American National Standards Institute)
Of course you can save it as HTML. HTML IS in ASCII, it just has a .html (or .htm) file extension. You could call it mypage.blah and it would still open in most web browsers! In vi just do
to save it to the file called myfile.html, or better still when you start vi, start it by appending the filename, i.e.:
|
|
|
|
09-03-2005, 03:51 PM
|
#5
|
|
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638
Original Poster
Rep:
|
Oh! great advice Komakino. I will try the way you have suggested.
|
|
|
|
09-03-2005, 04:07 PM
|
#6
|
|
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638
Original Poster
Rep:
|
Komakino
It worked beautifully. I owe you a lot. You are living in Somerset. I would like to pay you 10 pounds. It was a really a great, great , great help.
Is this possible in Emacs too?
|
|
|
|
09-03-2005, 04:26 PM
|
#7
|
|
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938
Rep:
|
Quote:
Originally posted by Gins
Komakino
It worked beautifully. I owe you a lot. You are living in Somerset. I would like to pay you 10 pounds. It was a really a great, great , great help.
Is this possible in Emacs too?
|
lol, danke, bitte schön
Yes, you can do it in any text editor. HTML is just ASCII text with html tags in it. Any editor that can save in plain text (that is, without word processor formatting) can save an HTML file.
|
|
|
|
09-03-2005, 04:39 PM
|
#8
|
|
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638
Original Poster
Rep:
|
Thanks Komakino
I am sure you have the freeware wordprocessor for Linux and Solaris. It is called 'Open office'
I tried in vain to write those tags in that program.
Does it work there too? I doubt it very much.
In any case, now it is getting late here. I must sleep. I will try more and more tomorrow and come back to you when necessary.
Tomorrow is Sunday. I am free. Only thing I am going to do is training at the gym. Rest of the time I would spend on this.
I profoundly appreciate all the help. As I said before I don't mind paying 10 pounds for the help.
|
|
|
|
09-03-2005, 04:43 PM
|
#9
|
|
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938
Rep:
|
Quote:
Originally posted by Gins
Thanks Komakino
I am sure you have the freeware wordprocessor for Linux and Solaris. It is called 'Open office'
I tried in vain to write those tags in that program.
Does it work there too? I doubt it very much.
In any case, now it is getting late here. I must sleep. I will try more and more tomorrow and come back to you when necessary.
Tomorrow is Sunday. I am free. Only thing I am going to do is training at the gym. Rest of the time I would spend on this.
I profoundly appreciate all the help. As I said before I don't mind paying 10 pounds for the help.
|
It is possible to write html in Openoffice and save it as plain text. When you save the file choose "Text (txt)" as the file type and uncheck the box that says "Automatic file name extension". Then call your file something like index.html and it should all be fine.
And of course I'm flattered that you think my advice is worth paying for but as with everything linux it's experimental but free 
|
|
|
|
09-05-2005, 10:29 AM
|
#10
|
|
Member
Registered: Aug 2005
Location: Juniata College, PA
Distribution: Ubuntu, Slackware
Posts: 67
Rep:
|
Don't forget also that you can specify the file extension when opening the file, even if it doesn't exist. So if you wanted to create a new HTML file in Vi, you could simply do
and anytime you save the file, it will write to index.html. This notation should work for most, if not all text editors.
On the side, I would NOT recommend writing any form of code, including HTML, in a word processor for several reasons. Firstly, your code won't be readable. This is why forums like this one provide a Code block for people to enter code. It makes the font monowidth, which is important when looking at spacing, indentation, etc. Secondly, word processors won't help you with syntax in any way. Simple editors like Vi(m), Bluefish, etc at least highlight syntax properly, and there are "smarter" ones out there that could be classified as structure editors, which are aware of the proper syntax of whatever language you are working with and will inform you when you have errors.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:33 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|