maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] TxPad - Text/Code Editor (https://talk.maemo.org/showthread.php?t=68582)

trx 2011-01-18 21:21

[Announce] TxPad - Advanced Code Editor for Fremantle
 
TxPad is a code editor i created for the Maemo OS.

http://txpad.devbin.org/images/txpad_ss_01.png

Update 2012-10-09
New version is now in the repository.
Changelog :
Code:

Version 0.7.7 (2012-10-09) :
  * Properly load saved volume keys function
  * Ctrl + N now always opens a new file
  * Remember font name
  * Added symbolic link to the executable at /usr/bin/txpad
  * Fixed Open/Save dialog root path issues
  * Fixed Open/Save dialog scrolling issues
  * Fixed a JavaScript syntax highlighting related bug
  * Fullscreen keyboard shortcut is now Ctrl + Return

Version 0.7.6 (2012-10-08) :
  * Fixed some autobuilder related bugs
  * Package is now optified
Version 0.7.5 (2012-10-03) :
  * Fixed some minor bugs
  * Font size is now remembered by TxPad
  * Fixed errors that occured when volume keys are pressed
  * It is now possible to change Tab width
  * "Extra button bar" can be now be made visible by default via Settings
  * Added JavaScript syntax highlighting
  * Default Open/Save path is now /home/user/MyDocs/
  * Open/Save last path is now remembered by TxPad

Colors can now be changed..
http://txpad.devbin.org/images/txpad-0.7.0-colors.png


Update 2011-03-06
After quite a few weeks, lots of work, and almost a complete rewrite, TxPad now uses Qt widget set.
I have been mainly focused on getting TxPad to be as touch friendly as possible while trying make use of whatever the N900 has to offer.
One of the new features is making use of the proximity sensor. For example kinetic scrolling mode is now enabled only while proximity sensor is closed. It also makes few toolbars visible only when closed in order to gain space for the code editor.
http://txpad.devbin.org/images/txpad-0.7.0.png

I added another new feature which will be usefull when dealing with large files are the bookmarks.
http://txpad.devbin.org/images/txpad_ss_04.png

There are few more things like use of the zoom keys for changing tabs or zooming, RegEx support for the search (& replace) functions, and other things you will see for yourself.


Some of the current features are :
  • Code syntax highlighing
  • Code folding
  • Smart tabs
  • Smart selecting
  • Ability to open multiple files
  • Ability to send text to paste bin (whole file or just the selected text)
  • Standard Search/Search & Replace functions with RegEx
  • Bookmarks
  • Macros
  • Scripts (run shell scripts from TxPad)
  • Extra button bar with frequently used characters (Now customizable)
  • Export to HTML (whole file or just the selected text)
  • Custom color settings
  • Jump to line
  • Open Recent feature
  • Open & Save from/to FTP

About highlighting, currently supported syntaxes are :
Delphi, FPC, C, Java, Perl, HTML, XML, Python, lfm, sh, CSS, PHP, TeX, SQL, VB, Ini, Bat and JavaScript so far...

TxPad is written in FPC and using Lazarus IDE (Using Qt widgetset).
In order to compile the sources, you need to follow this tutorial or use the install scripts from the source tar...

You can find TxPad in Extras-Devel.

Any suggestions for new features are welcome...

TRX.

Radicalz38 2011-01-18 21:57

Re: [Announce] TxPad - Text/Code Editor
 
Wow! Seems like a better alternative to leafpad. And on-device compiling?? Waiting for that feature! :D
And oh... What about search/replace feature? RegEx support? and syntax highlighting? On what specific language is that? :D

trx 2011-01-18 22:27

Re: [Announce] TxPad - Text/Code Editor
 
I am currently working on RegEx support for Search&Replace...
About highlighting, currently there is :
Delphi, FPC, C(pp), Java, Perl, HTML, XML, Python, lfm, sh, CSS, PHP, TeX, SQL, VB so far... I will eventually add the ability to add more syntaxes...

Radicalz38 2011-01-18 22:43

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by trx (Post 923392)
I am currently working on RegEx support for Search&Replace...
About highlighting, currently there is :
Delphi, FPC, C(pp), Java, Perl, HTML, XML, Python, lfm, sh, CSS, PHP, TeX, SQL, VB so far... I will eventually add the ability to add more syntaxes...

Hmm seems like most of the needed languages are there already. Perhaps you can lowly prioritize the syntax highlighting support :D

trx 2011-01-18 22:46

Re: [Announce] TxPad - Text/Code Editor
 
It is on low priority already ;)

Radicalz38 2011-01-18 22:50

Re: [Announce] TxPad - Text/Code Editor
 
BTW one last question... How's the text encodings? Does it support multiple text encodings? Can it handle complex ones? Will download it later after going home.

trx 2011-01-18 23:01

Re: [Announce] TxPad - Text/Code Editor
 
You mean like unicode? Not yet...

Radicalz38 2011-01-18 23:30

Re: [Announce] TxPad - Text/Code Editor
 
Ok will wait for the text encodings also :p

trx 2011-03-06 17:25

Re: [Announce] TxPad - Text/Code Editor
 
First post is now updated.

ivyking 2011-03-06 18:01

Re: [Announce] TxPad - Text/Code Editor
 
thanks a lot for your work , seems it's good enough now to hit the repositories !

trx 2011-03-15 02:55

Re: [Announce] TxPad - Text/Code Editor
 
TxPad is now in extras-devel, enjoy.

sowwhatyoureap 2011-04-01 20:34

Re: [Announce] TxPad - Text/Code Editor
 
Just tried out TxPad (latest version), but unfortunately all letters typed gets capitalized, e.g. INT MAIN (... Tapping or holding Shift while typing makes no change in the behaviour. For your information, I have a Swedish/Nordic N900 where the keyboard layout features 'å', 'ä' and 'ö'. I'm guessing it has something to do with keyboard mapping differences. Can you perhaps look into this?

Great work so far though, cool to have stuff like code folding and the layout looks nice. It would be good to be able to choose the color schemes for the foreground/background, since I like to code (on the N900) with a dark/black background.

/sowwhatyoureap

trx 2011-04-05 13:46

Re: [Announce] TxPad - Text/Code Editor
 
Hi, thank you for reporting this.

Does it happen with all the letters, or just Swedish/Nordic letters?

How do the Fn keys behave (The "blue arrow" + Key), do they work properly? Also, does the Symbol dialog work ("blue arrow" + Sym) ?

About the color schemes, that should be easy to implement, expect it in the next release...

TRX.

helloct 2011-04-07 23:37

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by trx (Post 982424)

About the color schemes, that should be easy to implement, expect it in the next release...

TRX.

GREAT!
Waiting for that.

sowwhatyoureap 2011-04-08 01:28

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by trx (Post 982424)
Does it happen with all the letters, or just Swedish/Nordic letters?

It capitalizes all letters a-z and the swedish letters (åäö).

I tried it again now, and it does actually print lower case letters if I hold Shift while typing. So something is going on with the keyboard layout.

Quote:

Originally Posted by trx (Post 982424)
How do the Fn keys behave (The "blue arrow" + Key), do they work properly? Also, does the Symbol dialog work ("blue arrow" + Sym) ?

The Fn keys work -- typed ":" and "#" for instance and scrolled using the Up/Down arrow buttons which requires Fn+Left/Fn+Right. Also tried with Ctrl, e.g. ctrl+c and ctrl+f, and it also seems to work properly.

Yep, the symbol dialog shows up with Fn + Sym as it should. However, it differs from the normal symbol dialog in that the letters ç, ñ and ß have become uppercase:

TxPad:
http://i53.tinypic.com/25tl3r6.png

PyGtkEditor:
http://i54.tinypic.com/8zfzh3.jpg

Quote:

Originally Posted by trx (Post 982424)
About the color schemes, that should be easy to implement, expect it in the next release...

Great :)

I noticed also that the Open dialog does not list the hidden folders such as .documents and .images in MyDocs, so it should also be fixed. Also, you can move the marker/cursor anywhere on the screen, e.g. outside the lines -- have you implemented the behaviour to be like that? It would be nice to be able to switch it off, since I'm used to the old style.

/sowwhatyoureap

trx 2011-04-08 09:30

Re: [Announce] TxPad - Text/Code Editor
 
Thank you for those details, i have found where the bug was, the diffrence was not the keyboard layout but the fact that i had the "Auto capitalisation" feature turned off..

As the text editor is a custom written widget, Qt (or whoever) considered every letter as the first letter...

The bug has been fixed, thank you for your help.

Quote:

Originally Posted by sowwhatyoureap (Post 983965)
I noticed also that the Open dialog does not list the hidden folders such as .documents and .images in MyDocs, so it should also be fixed.

I missed that one, its now fixed.

Quote:

Originally Posted by sowwhatyoureap (Post 983965)
Also, you can move the marker/cursor anywhere on the screen, e.g. outside the lines -- have you implemented the behaviour to be like that? It would be nice to be able to switch it off, since I'm used to the old style.

Yes, i have implemented it that way, i will add an option to turn that off in the settings menu..

TRX.

laasonen 2011-04-08 09:56

Re: [Announce] TxPad - Text/Code Editor
 
Couple UI things:

http://hosted.laasonen.net/attachment-ODQ6SV.png
Dialogs could be higher or you could put them to two columns and use buttons.
http://hosted.laasonen.net/attachment-JZHLTV.png
Bold?
http://hosted.laasonen.net/attachment-5P34SV.png
"Tab Bar visible" doesn't fit to the button. Horizontal radio-buttons would look nicer :rolleyes:
http://hosted.laasonen.net/attachment-ELMITV.png
These arrows could be on right side of screen, so you could put your left thumb on the proximity sensor and use your right thumb to click them :)

Quote:

Yes, i have implemented it that way, i will add an option to turn that off in the settings menu..
This would be great :)

michaelxy 2011-04-08 12:59

Re: [Announce] TxPad - Text/Code Editor
 
Why is a proximityd installed with the editor ?

Runs it all the time in background ?

laasonen 2011-04-08 13:40

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by michaelxy (Post 984171)
Why is a proximityd installed with the editor ?

Runs it all the time in background ?

It uses it for kinetic scrolling. Open some document, cover the proximity sensor with your left hand and scroll with your right hand,

trx 2011-04-08 15:26

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by laasonen (Post 984113)
Couple UI things:

http://hosted.laasonen.net/attachment-ODQ6SV.png
Dialogs could be higher or you could put them to two columns and use buttons.

I have made them higher. Thanks.

Quote:

Originally Posted by laasonen (Post 984113)

Nope, your theme has set that font/size (look at the settings dialog, buttons are non bold, but the text above is bold(i made it bold)).
Quote:

Originally Posted by laasonen (Post 984113)
http://hosted.laasonen.net/attachment-5P34SV.png
"Tab Bar visible" doesn't fit to the button. Horizontal radio-buttons would look nicer :rolleyes:

Again, "Tab Bar visible" fits properly with the standard theme its your theme that made the letters thicker/larger. Anyway, i have made it bigger so it should fit properly now.
Quote:

Originally Posted by laasonen (Post 984113)
http://hosted.laasonen.net/attachment-ELMITV.png
These arrows could be on right side of screen, so you could put your left thumb on the proximity sensor and use your right thumb to click them :)

I have placed them on the left side for two reasons, first, they dont cover any code there and the second, there are allready 3 potential buttons there..

When the tab bar isn't visible, there are some controls in the upper right corner, "bookmarks" button is in the bottom right corner (also macros will be there with the next release), and when in fullscreen mode, the fullscreen button.. And if Find or Find and Replace is active, there is even less space...
so moving it on the right side would require that it covers "two colums"... I don't know if that would "feel" right..

What do you guys think?

Quote:

Originally Posted by michaelxy (Post 984171)
Why is a proximityd installed with the editor ?

Runs it all the time in background ?

Yes, as you know or don't know, the proximity sensor is allways on, it doesnt matter if you use the phone or not. Proximityd reads its status.. Other programs like MAG's MediaBar also require proximityd...

TRX.

trx 2011-04-17 13:54

Re: [Announce] TxPad - Text/Code Editor
 
New version, 0.6.0 is now in extras-devel... Check the first post for change log..

Enjoy.

TRX.

laasonen 2011-04-17 14:08

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by trx (Post 990499)
New version, 0.6.0 is now in extras-devel... Check the first post for change log..

Enjoy.

TRX.

Thanks. It's probably the best editor for maemo now :)

Kinetic scrolling with the line number bar would be nice addition.

trx 2011-04-17 14:16

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by laasonen (Post 990505)
Thanks. It's probably the best editor for maemo now :)

Kinetic scrolling with the line number bar would be nice addition.

Thank you for the compliment :)

What do you mean by line number bar?

TRX.

laasonen 2011-04-17 14:41

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by trx (Post 990510)
What do you mean by line number bar?

TRX.

The gray area on the left. It currently doesn't do anything when you click it, so I thought it could be used for scrolling, for example when you want to scroll only couple lines.

Radicalz38 2011-04-17 14:45

Re: [Announce] TxPad - Text/Code Editor
 
@trx
At last! After i don't know months :p My most awaited macro feature is now implemented lol! Thanks!!!! Now hoping for the code compiling feature.

trx 2011-04-17 14:46

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by laasonen (Post 990519)
The gray area on the left. It currently doesn't do anything when you click it, so I thought it could be used for scrolling, for example when you want to scroll only couple lines.

Oh, thats a nice idea... I'll try and implement that, thanks!

Quote:

Originally Posted by Radicalz38 (Post 990521)
@trx
At last! After i don't know months :p My most awaited macro feature is now implemented lol! Thanks!!!! Now hoping for the code compiling feature.

You can use "scripts" menu to run scripts which compile your code, a window will open, and show you the result. if it needs input, you can send input too.. :)

TRX.

sowwhatyoureap 2011-04-18 15:27

Re: [Announce] TxPad - Text/Code Editor
 
Great work on the new version! Now it's probably going to be my default code editor for the N900. The battery life is also happy for the introduction of colour schemes :-)

Seeing that it opens a blank file at startup, it would be nice to have a menu pop up at startup from which you can choose to open the most recent files. Otherwise you have to navigate to the file each time the program starts.

trx 2011-04-18 17:36

Re: [Announce] TxPad - Text/Code Editor
 
There is a "Open Recent" feature in File Menu already if you didn't notice, or were you saying that it should pop up on start up anyway?

TRX.

Mentalist Traceur 2011-04-18 20:04

Re: [Announce] TxPad - Text/Code Editor
 
I just noticed that hardware-keyboard mapped {, }, and ] symbols don't work for me if mapped to Shift+Fn+V, Shift+Fn+B, and Shift+Fn+M, respectively. Oddly, Shift+Fn+N mapped to [ works fine.

I have only barely used TxPad after this latest update, so I'm not sure if this was an issue on earlier versions. It may also only work for Shift+Fn+N because instead of ", I have a dead-double-acute (which converts to a " when combined with itself or a space) mapped to Fn+N.

Another thing: It seems that the proximity sensor is still polled when you're not using the editor (at least, when you're in the task switcher, and cover the proximity sensor, you can see in the TxPad window that the proximity-sensor triggered menu comes up anyway - since constant proximity sensor polling is a rather high energy waste, and you might leave an open instance of TxPad in the background while spending a prolonged amount of time reading up on documentation or just doing anything else, it would be nice if the proximity sensor was only polled when TxPad was the currently open window, and at the same time was actually visible (I.E. the screen wasn't off).

Other than that I really like this editor, and while I'm currently in the habit of using vi on my N900, I can easily see myself deferring to this when coding something actually complicated.

- Edit -

@ post two posts before this one - battery life will not be significantly effected regardless of color scheme - the kind of battery life savings you could get from different color schemes was if the screen's pixels could be made to turn off (I.E. not emit any light) when they're completely black - the N900's pixels don't do that, and "black" on the N900's screen is still not true black - as a result, the amount of energy used is either the same, or almost identical. The N900's screen also has a backlight which uses significantly more energy than the screen's pixels do, regardless of color. However, I DO like the option to change color scheme.

trx 2011-04-19 18:16

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by Mentalist Traceur (Post 991371)
I just noticed that hardware-keyboard mapped {, }, and ] symbols don't work for me if mapped to Shift+Fn+V, Shift+Fn+B, and Shift+Fn+M, respectively. Oddly, Shift+Fn+N mapped to [ works fine.

I have only barely used TxPad after this latest update, so I'm not sure if this was an issue on earlier versions. It may also only work for Shift+Fn+N because instead of ", I have a dead-double-acute (which converts to a " when combined with itself or a space) mapped to Fn+N.

Can you point me to what you did to map those keys so i can try and test/fix it?

Quote:

Originally Posted by Mentalist Traceur (Post 991371)
Another thing: It seems that the proximity sensor is still polled when you're not using the editor (at least, when you're in the task switcher, and cover the proximity sensor, you can see in the TxPad window that the proximity-sensor triggered menu comes up anyway - since constant proximity sensor polling is a rather high energy waste, and you might leave an open instance of TxPad in the background while spending a prolonged amount of time reading up on documentation or just doing anything else, it would be nice if the proximity sensor was only polled when TxPad was the currently open window, and at the same time was actually visible (I.E. the screen wasn't off).

Good point, i have implemented that, expect it in the next version..

Quote:

Originally Posted by Mentalist Traceur (Post 991371)
Other than that I really like this editor, and while I'm currently in the habit of using vi on my N900, I can easily see myself deferring to this when coding something actually complicated.

Good to know that i'm making something usefull, thanks. ;)

TRX.

Mentalist Traceur 2011-04-19 21:07

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by trx (Post 991959)
Can you point me to what you did to map those keys so i can try and test/fix it?

I just tested it with some more keys: yeah, it seems to not register any shift+fn+key combos, except for the one where my fn+N is mapped to a dead key. Anyway: *Point -->* http://wiki.maemo.org/Remapping_keyboard (I always find it odd that this isn't common knowledge among N900 users - knowing how to do this exponentially increased my N900 usability. I can also send you my N900's /usr/share/X11/xkb/symbols/nokia_vndr/rx-51 file, so you can text my exact keyboard map. (Just don't have your default language set to Russian, because my Russian keymap has only Russian characters, and doesn't support the Ctrl-Space for switching characters. I use Fn-Shift [Yes that's mapped so it's different than Shift-Fn] for switching layouts.

Quote:

Originally Posted by trx
Good point, i have implemented that, expect it in the next version..

Cool, glad to hear it, thank you.

trx 2011-04-20 13:25

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by Mentalist Traceur (Post 992044)
I can also send you my N900's /usr/share/X11/xkb/symbols/nokia_vndr/rx-51 file, so you can text my exact keyboard map.

Sure, send me your config...

TRX.

Mentalist Traceur 2011-04-20 22:23

Re: [Announce] TxPad - Text/Code Editor
 
1 Attachment(s)
Merry Christmas.

Attachment 19499

I presume you don't need to be told to backup the relevant file. This is the original file, just copied over with the name "rx-51.txt" since talk.maemo.org doesn't like files without an extension as uploads. So there's no metadata that things like notepad/wordpad or whatever leave in .txt files.

So, just mv/cp to /usr/share/X11/xkb/symbols/nokia_vndr/rx-51

Edit - "original file" is bad wording choice. I mean, it's my current file, but it's the exact copy of it, not a copy-paste of the text in it.

trx 2011-04-21 11:42

Re: [Announce] TxPad - Text/Code Editor
 
Can you please test those keys on other Qt apps, and see if they work? It seems that GTK handles them "properly" while Qt does not( at least the apps i tested). Can you confim this?

Edit: I have confirmed it, this is a Qt bug, and Qt guys said "custom key maps are not supported" :/

TRX.

Mentalist Traceur 2011-04-21 17:41

Re: [Announce] TxPad - Text/Code Editor
 
Yes; I only have one other Qt app off the top of my head installed currently (probably others I don't remember); namely, QtIrreco...

And you're right, the only custom-mapped button that works there is the same one that works for me in TxPad "[", for which the fn-key button is remapped to a dead instead of standard key.

Annoying, this is, and I have some Qt people to complain to no doubt. xkb is pretty standard on Linuxes, no?

Anyway, thank you for taking the time to investigate my issue. Much appreciated.

trx 2011-05-08 18:33

Re: [Announce] TxPad - Text/Code Editor
 
Are there any feature requests or bugs noticed?

TRX.

strange1712 2011-05-08 23:14

Re: [Announce] TxPad - Text/Code Editor
 
Nope till now, this program is very nice.
Thanks for this app!

trx 2011-05-09 09:00

Re: [Announce] TxPad - Text/Code Editor
 
New version, 0.7.0 is now in extras-devel... Check the first post for the change log..

Enjoy.

TRX.

Radicalz38 2011-05-09 10:10

Re: [Announce] TxPad - Text/Code Editor
 
Thanks again trx! Great work you're almost competing it to windows' notepad++

tsadowski 2011-07-08 22:55

Re: [Announce] TxPad - Text/Code Editor
 
Quote:

Originally Posted by trx (Post 1002605)
New version, 0.7.0 is now in extras-devel... Check the first post for the change log..

Enjoy.

TRX.

Very nice, especially the TeX syntax highlighting. Would it be possible to add word wrapping? Latex lines tend to be quite long.

Cheers,
Torsten


All times are GMT. The time now is 07:12.

vBulletin® Version 3.8.8