Koozali.org: home of the SME Server

Lost with the vim Command

Offline jr v

  • *
  • 5
  • +0/-0
Lost with the vim Command
« 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?

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: Lost with the vim Command
« Reply #1 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.

Offline kb-ohnemus

  • *****
  • 154
  • +0/-0
    • http://www.kb-ohnemus.de
Re: Lost with the vim Command
« Reply #2 on: January 16, 2009, 08:55:06 AM »

Offline jr v

  • *
  • 5
  • +0/-0
Re: Lost with the vim Command
« Reply #3 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

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Lost with the vim Command
« Reply #4 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