Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: jr v on January 16, 2009, 02:05:21 AM

Title: Lost with the vim Command
Post by: jr v on January 16, 2009, 02:05:21 AM
I am trying to create a script to add php5 by following http://sme.firewall-services.com/spip.php?article46 , but when it comes to step 3 and creating the custom template I dont understand how to use the vim command.

Exactly how am I spose to type all the info in a save it?  Is there a guide somewhere as how to use the vim command?  I searched here on the forum as well as thru the wiki but am just lost.  My experience using the root is pretty minimal.  Obviously!!

Can I just create this file on my workstation and then upload it onto the server with the wget command?
Title: Re: Lost with the vim Command
Post by: David Harper on January 16, 2009, 05:09:31 AM
Welcome to Contribs.org  :smile:

Try using pico instead -- it's more like Notepad or Edit.com.

To open a file:

Code: [Select]
pico myfile.txt

To save a file:

CTRL+O

To quit:

CTRL+Z

FYI, if you were to create a file on Windows, you would need to use the dos2unix command to convert it for use with SME Server.
Title: Re: Lost with the vim Command
Post by: kb-ohnemus on January 16, 2009, 08:55:06 AM
flickr.com/photos/hackgou/97484644 (http://flickr.com/photos/hackgou/97484644)
Title: Re: Lost with the vim Command
Post by: jr v on January 16, 2009, 02:36:21 PM
Thanks guys.  I actually figured it out last night.  For anyone else that was in my situation look here for the answers.

http://vim.wikia.com/wiki/Best_Vim_Tips#Basic_use
Title: Re: Lost with the vim Command
Post by: mercyh on January 16, 2009, 03:26:06 PM
Or for most linux commands the basic syntax can be found with man.

like this:
Code: [Select]
#man vim