06/14/2009, 03:40 AM
|
#1 (permalink) |
|
Member
Join Date: Jun 2009
Posts: 3
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, 04:15 AM
|
#4 (permalink) |
|
Member
Join Date: Jun 2009
Posts: 226
Thanks: 8
Thanked 46 Times in 22 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, 04:20 AM
|
#5 (permalink) |
|
Member
Join Date: Jun 2009
Posts: 3
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, 05:20 AM
|
#6 (permalink) |
|
Member
Join Date: Jun 2009
Posts: 382
Thanks: 29
Thanked 35 Times in 26 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, 05:23 AM
|
#7 (permalink) | |
|
Member
Join Date: Jun 2009
Posts: 226
Thanks: 8
Thanked 46 Times in 22 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, 11:12 AM
|
#9 (permalink) |
|
Member
Join Date: Jun 2009
Posts: 16
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, 01:38 PM
|
#10 (permalink) | |
|
Member
Join Date: May 2009
Posts: 446
Thanks: 27
Thanked 246 Times in 50 Posts
|
Quote:
|
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -4. The time now is 12:16 PM.






Linear Mode








