Essential Text Editor add-ons for coders

Got an initial version up. Minimum 2.82 required. I’d be interested to see how many issues people run into.

Since this incorporates everything I’ve written up until now (barring Run in console), those would need to be removed to avoid conflicts.

Specifically:
Text Copy2
Text Expand to brackets
Text Highlight occurrences
Text Insert2
Text Move toggle

3 Likes

@iceythe Thank you so much for this wonderful gift to the Text Editor community.

Maybe you could add the GIFs to the GitHub page, so it’ll be easier to understand some of the main features?

(I need to find time to do some proper testing).

1 Like

That is so handy!!

Are you giving up on it? That was the next best thing since bread and butter.

Here is an error that I see in the console, after launching Blender:

Blender version: 2.83 alpha daily build (blender-2.83-31aefdeec5a6-windows64)
Addon version: 1.0.0 (26th february 2020)

Traceback (most recent call last):
File “C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\textension-master\utils.py”, line 224, in
register(lambda: func(*args, **kwargs), first_interval=delay)
File “C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\textension-master_init_.py”, line 2289, in register
return keymaps_ensure(register, keymaps)
File “C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\textension-master\utils.py”, line 134, in keymaps_ensure
raise Exception("Default keymaps are corrupt. Restore Blender to "
Exception: Default keymaps are corrupt. Restore Blender to factory defaults before enabling this addon


And when I use Blender 2.82:

Blender version: 2.82 Official
Addon version: 1.0.0 (6th march 2020)

Traceback (most recent call last):
File “C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\textension-master\utils.py”, line 234, in
register(lambda: func(*args, **kwargs), first_interval=delay)
File “C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\textension-master_init_.py”, line 2289, in register
return keymaps_ensure(register, keymaps)
File “C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\textension-master\utils.py”, line 130, in keymaps_ensure
raise Exception("Default keymaps are corrupt. Restore Blender to "
Exception: Default keymaps are corrupt. Restore Blender to factory defaults before enabling this addon


Could you please increase the version number of your addon each time you update it, this way, it will be easier for us to report errors/bugs.

Reported on your Github repository too: https://github.com/K-410/textension/issues/2

Appreciate the report, just replied to the issue. I do get notification of issues on github so just reporting there is fine. I’ll do a version bump after fixing this. I do a lot of smaller commits so bumping each commit isn’t really helpful, but I’ll try to do it more often in the future.

Not at all, I’m still working on it, but it’s better served as a separate addon due to its size. I’ve found a way to pipe stdout/stderr to a separate buffer, but it’s experimental and prone to segfaults which I’m investigating, so I haven’t committed anything yet.

3 Likes

Just a little experiment with tabs:

Any news about this feature?
Do you have a branch on GitHub that would let us test these tabs?

Updated the pep-8 codestyle checker for the Text Editor, so the external lib will be installed automatic: https://github.com/tin2tin/Python_Stylechecker_for_Blender

1 Like

A GSoC proposition: https://devtalk.blender.org/t/gsoc-2020-improve-the-text-editor/12271

Module for running tests on add-ons:

1 Like

I reported a bug but the problem, I found later, came from code editor v 0.1.0
the problem is this https://youtu.be/LG5nSN9q-S4

So I hope you did a report on the code editor repository? @iceythe might not read it here.

you have 1 or 2 tricks in this video for text editor. I began to study a little bit API around text editor but I still need more time… https://www.youtube.com/watch?v=m_owY486dlc. the video on incremental autosave has been accidentally deleted on my tablet so you can delete the link
I did this little one too https://www.youtube.com/watch?v=JDPvLzbQoDc&t=17s
because Sybren is using an external text editor in his tuto. after this I was thinking about a way to directly install addon from text editor and which link the actual file to the file in the blender directory with a function to save this directory and in another directory (or the exsiting one if the file was already saved. saved in 2 places so. and link this to a refresh. but they are certainly other situtation so maybe add a button in preferences to do a special refresh where it’s opening the file in text editor. and so on.
and I will update your addon search api ref to add the possibility to add it to console too. should be simple to begin

1 Like

Nice to see your optimizations, however using the clipboard is not endorsed: https://developer.blender.org/D5097#116434

I previously tried to get addon refresh and script reload exposed in the Text Editor but the maintainer does not want to it.

After spending all this time on Text Editor improvements, I guess I can finally conclude, that trying to improve the Text Editor with anything else than add-ons is a waste of time:
image

3 Likes

@tin2tin where is the thread in the blender developers?
I would like to write my opinion, thank you :slight_smile:

1 Like

If only scripting in blender was like this…
Https://twitter.com/kevinwatters/status/1261371419201548289?s=19

2 Likes

ok you don’t answer. it was the first time I was using github and especially with another account. I work for my own so.

If you dont use the replying button under there messages… u ll have less chance that they notice it…
And also…perhaps they have problems actually that makes them unreachable?

I’m sorry, I’m buried in trying to learn C, in order to submit patches to improve the VSE, which is my main area of interest. Anyhow, you’re free to take it in any direction you want.