06/14/2009, 01:40 AM
|
#1 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 3
Likes Received: 0
Thanks: 1
Thanked 0 Times in 0 Posts
|
Hey everybody, sorry for the amateurish question, but how do you get a file open from within the command line?
For instance, i want to edit the devmode enabler to make it visible, and i know i have to edit this file: /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js but, when i enter the command root@castle:/home/user# vi /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js it simply displays the contents within the command window, leaving me unable to edit it. How do I get them to open within a text editor or something? |
06/14/2009, 02:15 AM
|
#4 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 360
Likes Received: 0
Thanks: 10
Thanked 66 Times in 35 Posts
|
You just have to learn how to use vi, it has an insert mode to change the actual file. I would suggest finding a vi tutorial online if you really want to learn the basics of how it works.
|
06/14/2009, 02:20 AM
|
#5 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 3
Likes Received: 0
Thanks: 1
Thanked 0 Times in 0 Posts
|
So if i install a VI client, entering
vi /usr/palm/applications/com.palm.app.devmodeswitcher/appinfo.json should open the file within Vi instead of just displaying the contents in the terminal window? |
06/14/2009, 03:20 AM
|
#6 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 519
Likes Received: 0
Thanks: 52
Thanked 65 Times in 43 Posts
|
when you see the contents you are using vi - vi defaults to command mode - move to the location where you want to make an edit and press i to change to insert mode - start by googling: vi how to
|
06/14/2009, 03:23 AM
|
#7 (permalink) | |
|
Member
![]() Join Date: Jun 2009
Posts: 360
Likes Received: 0
Thanks: 10
Thanked 66 Times in 35 Posts
|
Quote:
It has vi built in. You just need to know what to type to edit what its displaying is what I meant. I found a tutorial on youtube: YouTube - Vi - Vim Tutorial. Howto video for the amazing vim editor. (vi on the pre won't have the line numbers like theirs but it should work the same) vi in 10 minutes - part 1 There are lots more tutorials on the web if that ones not clear enough. |
|
06/14/2009, 08:22 AM
|
#8 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 203
Likes Received: 0
Thanks: 2
Thanked 7 Times in 7 Posts
|
Does the pre allow sftp connections? I was trying to transfer some files but couldn't seem to connect. If I transfer a file through usb where is this in root so I can move the file?
|
06/14/2009, 09:12 AM
|
#9 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 16
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
|
Personally, I find vi incredibly difficult to use (the thing you're missing is both having perms to edit the file -- sudo will fix this, and you need to hit i in vi in order to enter INSERT mode).
But jove (a slimmed down emacs build) is available in the optware repo, so I would recommend that if you're looking for something a little easier. And nano is there as well, which I would say is the simplest of the unix command line editors. |
06/14/2009, 11:38 AM
|
#10 (permalink) | |
|
Member
![]() Join Date: May 2009
Posts: 452
Likes Received: 0
Thanks: 27
Thanked 253 Times in 51 Posts
|
Quote:
|
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



