Essential Text Editor add-ons for coders

How could we have overlooked Cristian Hasbun’s WEED add-on which contains: eagle view, code tree, code file explorer, autocomplete, debugger, breakpoints, popup API navigator, popup icon viewer, popup find/replace, in breakpoint, stack, variables, interpreter for the Text Editor?

He was doing a lightning talk in 2019 about them here(at: 46.48):

The add-on lives here, but needs an update for 2.8+:

2 Likes

He’s on Facebook as Cristian Hasbun B. Might be worth contacting him to see if he needs any help updating WEED to work with 2.8?

He’s on Facebook as Cristian Hasbun B. Might be worth contacting him to see if he needs any help updating WEED to work with 2.8?

From the WEED add-on, here’s a pop-up Find & Replace for 2.8+. This could be a starting point if someone would like to add operators for a fully industry-standard Find & Replace pop-up.
image

Download: https://gist.github.com/tin2tin/339e2e9ade530d34bc82e03d9c2a39a9

1 Like

If would be handy if we had a search text upwards or search downwards, too!

It would be handy to be able to Left Click (once) on the line number to select this line.

Also, it would be convenient to mark lines with a dot (maybe with ALT + Left Click?). Similar to what Notepad++ offers: https://superuser.com/questions/923893/notepad-permanent-line-marking

@mkbreuer @xan2622 Thanks for the suggestions. Maybe you guys could consider having a go at making add-ons which do what you’re suggesting and share them here?

1 Like

I do have something in the works for line number selection:

Also started working on line bookmarking a while back, but I still need to find a reliable solution to uniquely identify lines. Storing line indices isn’t good enough and the line pointer is only valid until undo/redo, which then gets remapped.

2 Likes

I have also noticed that it’s currently not possible to extend the word selection with CTRL+Shift+Left/Right Arrow.

I use it a lot in other editors, it makes selecting parts of a line (several terms/words) really quickly.

It’s working fine here. Have you tried factory defaults to see if it’s a keymap or addon issue?

About CTRL+Shift+Left/Right Arrow, I have just tested and it now works fine. Dunno what happened.


@iceythe : Your implementations for line number selection and line marking look promising (and already almost finished)!

About the line selection, have you also thought of selecting a line with “triple click” ? (some applications allow that).

Jose Conseco made an alternate version of the ‘Intellisense for the Blender Text Editor’ add-on, where you press Ctrl + Space for word completion suggestions and the pop-up have a search-bar.
image
Download it here: https://github.com/tin2tin/Intellisense_for_Blender_Text_Editor/blob/Ctrl%26Space/intellisense_addon.py

5 Likes

What doesn’t seem to work is the selection of multiple words (even across several lines) from location A (inside a line or at the beginning of the line) to location B (elsewhere, inside another line or at the end of the line) with SHIFT+Left Click. video

I’ve added triple click line selection. Can probably add quadruple click to select all text.

Those other features in the video are already implemented (range selection). I’m working on joining highlight occurrences into the same addon, then I’ll probably let you all test things!

Just a little experiment with tabs:

3 Likes

Wow, really amazing what you’re doing here. Is this only coded in python?

@iceythe… where from I can download your most recent scripts for text editor?

thank you for your great contributions.

Just a note - the search popup is using enumproperty, and max length of enum in blender is 32. So for long list of suggestions, some may be missing.

2 Likes

It’s all python. I’m trying to avoid using too much ctypes since it somewhat narrows backward compatibility, but in case of the tabs (really needed the middle-click to close) it’s unavoidable since ui elements aren’t exposed in the api.

I just upload my scripts here from time to time, but haven’t pushed any updates lately since I’ve been working on consolidating everything text editor related into one addon (almost 3500 lines :P) which is getting its own repo.

3 Likes

Wow, sounds great. If there are any of my scripts or functions from above you want to include to make it more complete, feel free. :slight_smile:

1 Like

Writing in Text Editor directly converted to 3D text object:
https://twitter.com/ppaawweeuu/status/1231395720592314371

2 Likes