Author Topic: nTxt - Nspire Text Editor  (Read 137662 times)

0 Members and 1 Guest are viewing this topic.

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
nTxt - Nspire Text Editor
« on: October 10, 2012, 01:37:13 pm »
nTxt is a text editor for the Nspire. It requires Ndless to be installed on your calculator.

Some of its features:
- open/save files anywhere in the file system
- cut, copy & paste
- search
- various navigation commands (page up/down etc)
See the readme for a more detailed description.

Tell me what you think and if you have suggestions for improvement  :)

The code is on github: https://github.com/lkjcalc/nTxt
 
Latest download also on github: https://github.com/lkjcalc/nTxt/releases


Spoiler For original 1st post:
I'm working on a new text editor for the Nspire because I never really understood how to use the existing one and it isn't being worked on anymore.

It's already working on both cx and b/w, and you can
- write almost all characters
- delete characters
- navigate with the left/right arrow keys
- save your file anywhere in the filesystem

I will surely add
- opening files
- navigating with up/down arrows
- menus
« Last Edit: June 06, 2016, 06:19:34 pm by lkj »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #1 on: October 10, 2012, 03:00:28 pm »
Tell me what you think and if you have suggestions for improvement  :)
Well, first feature request, of course, opening files. I don't see the point of saving them if we can't open them :P
Secondly, I didn't try, but are those txt real txt ? I mean that if I open it with Notepad on my PC, will it display fine ?
Thirdly, the interface is lacking. Could you add on the left a column with the number of the line for example ?
And the last thing, I didn't manage to save properly using Ctrl+S. Quitting and saving poduced a noname file but when I tried to save with Ctrl+S, I wrote /documents/nTxt/test and there was no test file ???

Other than this, it seems great already, good job :D
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline CompSystems

  • LV3 Member (Next: 100)
  • ***
  • Posts: 68
  • Rating: +7/-4
  • HP48GX,HP50G and TInspireCAS Calculator Programmer
    • View Profile
    • HP48GX,HP50G and TInspireCAS Calculator Programmer
Re: nTxt - Nspire Text Editor
« Reply #2 on: October 10, 2012, 03:04:55 pm »
Please may also develop a version for PC.

The existing program many years ago that no improvement

http://www.ti-bank.fr/index.php?mod=archives&ac=voir&id=397

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #3 on: October 10, 2012, 03:24:39 pm »
Tell me what you think and if you have suggestions for improvement  :)
Well, first feature request, of course, opening files. I don't see the point of saving them if we can't open them :P
I'm working on this right now :P

Quote
Secondly, I didn't try, but are those txt real txt ? I mean that if I open it with Notepad on my PC, will it display fine ?
They're normal txt, but notepad won't display newlines correctly because they are unix style.
Quote
Thirdly, the interface is lacking. Could you add on the left a column with the number of the line for example ?
I think other things are more important right now, so this will take a while.
Quote
And the last thing, I didn't manage to save properly using Ctrl+S. Quitting and saving poduced a noname file but when I tried to save with Ctrl+S, I wrote /documents/nTxt/test and there was no test file ???
You probably just couldn't see it because the documents screen isn't refreshed. This doesn't work with ndless currently, sorry. After a reboot it should be there.
Quote
Other than this, it seems great already, good job :D
Thanks for testing ;)


Please may also develop a version for PC.

The existing program many years ago that no improvement

http://www.ti-bank.fr/index.php?mod=archives&ac=voir&id=397
This program doesn't have anything to do with my program, it's just the same name.

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #4 on: October 10, 2012, 03:46:48 pm »
You probably just couldn't see it because the documents screen isn't refreshed. This doesn't work with ndless currently, sorry. After a reboot it should be there.
You can refresh the documents screen by using refresh_osscr() ;)

And the last thing, I didn't manage to save properly using Ctrl+S. Quitting and saving poduced a noname file but when I tried to save with Ctrl+S, I wrote /documents/nTxt/test and there was no test file ???
You probably have to add the .tns ending.

And it's always nice to see new Nspire projects :)

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #5 on: October 10, 2012, 04:21:16 pm »
You probably just couldn't see it because the documents screen isn't refreshed. This doesn't work with ndless currently, sorry. After a reboot it should be there.
You can refresh the documents screen by using refresh_osscr() ;)
I thought it crashed the classic nspires, but I can't reproduce it ??? I'll re-add it to my code.

And the last thing, I didn't manage to save properly using Ctrl+S. Quitting and saving poduced a noname file but when I tried to save with Ctrl+S, I wrote /documents/nTxt/test and there was no test file ???
You probably have to add the .tns ending.[/quote]
You're right, I forgot to say that you'll only see your documents if you add the .tns ending. Should I modify nTxt to add it automatically?
Quote
And it's always nice to see new Nspire projects :)
I have the feeling that Nspire development is getting a bit more active again lately :)
« Last Edit: October 10, 2012, 04:22:26 pm by lkj »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #6 on: October 11, 2012, 01:09:22 am »
Tell me what you think and if you have suggestions for improvement  :)
Well, first feature request, of course, opening files. I don't see the point of saving them if we can't open them :P
I'm working on this right now :P
If you are lazy (and I won't blame you for this :P), you can first make your program work with file association so you don't have to code a file browser ;)

And the last thing, I didn't manage to save properly using Ctrl+S. Quitting and saving poduced a noname file but when I tried to save with Ctrl+S, I wrote /documents/nTxt/test and there was no test file ???
You probably have to add the .tns ending.
Lol, that's true XD

You're right, I forgot to say that you'll only see your documents if you add the .tns ending. Should I modify nTxt to add it automatically?
That would be a good idea. Because now I have a file in my calc that I don't even know how to remove since I don't see it :-\
« Last Edit: October 11, 2012, 01:09:43 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #7 on: October 11, 2012, 04:55:11 pm »
That would be a good idea. Because now I have a file in my calc that I don't even know how to remove since I don't see it :-\

You can always delete a file in the student software or computer link, maybe also tilp, even files which don't show up on the calculator (they still have to be in the Documents folder, though).

I completely forgot about file association, thanks for mentioning it :)

Today only opening with ctrl+o if you know the path, no file browser. Maybe file association tomorrow ;D

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #8 on: October 11, 2012, 05:28:07 pm »
I'll try this soon, and good job!! :D

And yeah, this will probably take a while, but you can try adding syntax highlighting like nwriter.

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #9 on: October 12, 2012, 06:21:49 pm »
Thanks :)

And yeah, this will probably take a while, but you can try adding syntax highlighting like nwriter.
As soon as it has all basic editor features, I'll start implementing such programming features :)


New release: file association support, some bug fixes.
« Last Edit: October 12, 2012, 06:23:58 pm by lkj »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #10 on: October 15, 2012, 12:29:17 pm »
New release: file association support, some bug fixes.
I somehow missed that release but that is great :D
Does it automatically add the entry in the ndless.cfg if it is missing or do we have to add it manually ?

edit Bug reports and feature requests
- I don't manage to "save as" with Ctrl+Shift+S. When I do Ctrl+Shift+S, nothing happens ???
- Adding the down/up keys to go to the next/previous line would be great :D
« Last Edit: October 15, 2012, 01:18:51 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: nTxt - Nspire Text Editor
« Reply #11 on: October 15, 2012, 01:20:10 pm »
So what I get from this is that this is a raw text file editor?
Can you for example also make .cht.tns files with this? (would be awesome since then we can change cheats on calc)
I'm not a nerd but I pretend:

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #12 on: October 15, 2012, 05:26:37 pm »
I've been working on a menu but didn't finish yet because of too much homework :(

I somehow missed that release but that is great :D
Does it automatically add the entry in the ndless.cfg if it is missing or do we have to add it manually ?

edit Bug reports and feature requests
- I don't manage to "save as" with Ctrl+Shift+S. When I do Ctrl+Shift+S, nothing happens ???
- Adding the down/up keys to go to the next/previous line would be great :D

It doesn't add itself to ndless.cfg.tns because I was unsure if this was good style. Do other programs do it?
You can always open the file with nTxt and add the line (though it's a pita without up/down arrow navigation).

Yeah I've also noticed the bug with "save as". I'm unsure why it doesn't work, but once there's a menu it isn't a problem anymore.

Adding the down/up keys will be top priority after the menu works  ;)

So what I get from this is that this is a raw text file editor?
Can you for example also make .cht.tns files with this? (would be awesome since then we can change cheats on calc)
Sure, it's normal ascii raw text files.
« Last Edit: October 15, 2012, 05:27:55 pm by lkj »

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #13 on: October 16, 2012, 07:34:05 am »
I'm considering making the auto-update of ndless.cfg standard with new functions in libndls.
Ndless.me with the finest TI-Nspire programs

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: nTxt - Nspire Text Editor
« Reply #14 on: October 16, 2012, 12:20:01 pm »
That would be great, for coders and for users.

Edit: Update

Now there's a menu for opening, saving and save as (additionally to the shortcuts) :)
« Last Edit: October 16, 2012, 01:39:35 pm by lkj »