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. |
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? |
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> |
Quote:
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 Code:
:w myfile.html Code:
vi myfile.html |
Oh! great advice Komakino. I will try the way you have suggested.
|
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? |
Quote:
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. |
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. |
Quote:
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 :D |
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
Code:
$ vi index.html 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. |
All times are GMT -5. The time now is 12:40 PM. |