GUI Text Editors

From WebOS Internals
Jump to navigation Jump to search

This page covers available options for editing any file locally from the palm pre itself, without setting up any of the pre-terminal-options. If you do have a shell, you can of course set up and use any of the standard GNU/Linux text editors such as nano and vi.

Currently the best option seems to be ecoder.

You'll need to set up a local web server that supports php before using these. The Graphical_Shell_with_ajaxPHPterm page describes how to do that for thttpd-php.

ecoder

This works quite nicely, although some small amount of hacking to make it work better with the palm's screen size would be useful.

You need to make sure none of the files have execute permission, as this makes thttpd barf:

root@castle:/opt/share/www/ecoder# find . -type f | xargs -n1 chmod ugo-x

You'll need to make at least a change like this for anything to work - replace "/" with the path to files you want the editor to be able to edit.

--- code.php.orig       Sat Jul  4 19:58:34 2009
+++ code.php    Sat Jul  4 20:03:44 2009
@@ -15,9 +15,9 @@
 $code['backup'] = 1; // 1 = on || 0 = off -- create backup copy of files opened ( see code/base/file.backup.php ) ##
 
 // path to editable files ##
-$code['root'] = '/home/ecoder/examples/'; // full path, with trailing slash ##
+$code['root'] = '/tmp/'; // full path, with trailing slash ##
 if ( $_SESSION['live'] == 0 ) { // running locally ##
-    $code['root'] = '/home/loveunit/public_html/ecoder/examples/'; // local path -- for testing ##     
+    $code['root'] = '/tmp/'; // local path -- for testing ##     
 } 
 
 // secure system ##

ide.php

ide.php from http://www.ekenberg.se/php/ide/ ( specifically I used http://www.ekenberg.se/php/ide/getfile.php?filename=ide.php-1.5.2.tar.gz ) seems to work for editing and saving, but some hacking would need to be done to make it more usable on the palm pre's screen size.

vi clones

I tried 2 javascript vi clones - http://gpl.internetconnection.net/vi/ , http://vian.sourceforge.net/ - ; they both had issues with keeping focus (keystrokes would bring up the search bar).