Essential Text Editor add-ons for coders

Context override add-on: https://b3d.interplanety.org/en/context-override/

Easy way to maximize quickly text editor:
right click normal context menu
right click and drag (mouse move) toggle maximize windows

1 Like

Not at computer right now, but isnā€™t ctrl+alt+space exposed in the View > Area menu?

Auto close brackets etc. by Matheus Santos has been committed:
https://developer.blender.org/D13119

1 Like

yes but you can create locally another shortcut and thatā€™s a lot more intuitive and fast. in fact you click and do a gesture as ā€œI want to enlarge this or reduce thisā€. I just shared because finally this is the best way to be sure to stay in the window. try it and tell me. Iā€™m doing an addon around manipulating objects and cursor and I tested a lot of different ways, and trying thing concretely is the best way to find more intuitive and natural processes. thatā€™s why I still donā€™t forget the mess in keys going from 2.7 to 2.8. a lot of things has been misunderstood and have been a regression there. Imaging now to move an object people are using G. when you do everything at the mouse like select move unselectā€¦and certainly not using a shortcut to do the most common thing. I could share my key config to make feel what I mean blender2.93.py (76.5 KB)

2 Likes

I did an update in Advanced_Addons_Installer, to synchronize install from text editor(TE), with external text editors.
when installing an addon from TE, the original file is saved too. so if you do some modifications in TE, it will be modified in an external editor too. you can see the gif on github.
if you do some modifications outside, this is automatically reloaded(resolve conflict) when reinstalling the addon from TE

remember you need to put the main installer in quick favorite, to have access from everywhere. itā€™s a great help and super quick. I use it a bunch.

Blender

and I cleaned some useless menus too and put more explicit text buttons in preferences> addons

I do some updates with my needs but any help is welcome

1 Like

ok I did an update because I forgot the point that some ext editor are auto savingā€¦
so I did 2 entries
Blender_3
if you saved externally use the second option. it will reload the file
so you donā€™t have to open this and choose the right option. (boring)
Blender_4
I updated the gif on the github page

edit; other update to remove previous version even if the file name is changed. so behaving like the multi addon installer part

1 Like

@iceythe One more attempt:
image
Show some support here: https://developer.blender.org/D13616

3 Likes

Thatā€™s cool!

Personally, Iā€™m done contributing code. If anyone can further the text editor, all the power to him :slightly_smiling_face:

2 Likes

Hi I did an update for advanced addon installer. I added ā€œopen multifilesā€ in text editor.
watch this first https://youtu.be/VYJxFDdOBuk
so you can use a multi file addon in a folder,
install it with the option install/reload addon (it detects init file with a valid bl_info)
you can open multifiles in text editor to modify them, and save Alt+S (the original files), reinstall the addon (first step).
if you do some external modifs you can do open multifiles again (files with same names will be replaced)
if you create some files directly in the text editor, save them in a directory and you can use the same method againā€¦
https://github.com/1C0D/Advanced_Addons_Installer__Blender_Addon

2 Likes

Congratulations you succeed. So much perseverance!

1 Like

thank you
I corrected a little bug on a missing variable

1 Like

And here is my little off-topic ā€œi only want to use the internal text editor if absolutely necessaryā€-script:

auto_reloader

While activated it simply reloads all updated script files and executes the one selected script. No more clicking the red button to manually tell blender ā€œYes! I want the new file, thanks!ā€

Big advantage is: Itā€™s editor-agnostic. Youā€™re using Sublime? Atom? VSCode? VIM? Notepad++? Nodepad? Stone tablets? Script donā€™t care.

Disadvantage: Youā€™re executing by saving the fileā€¦ Meh, canā€™t have everything i guess.

Additional functionality: You can swap the file path of the selected script from relative to absolute and back. Very useful when you need to share the script along with the blend file and people donā€™t use the very same path structrue.

Github: auto_reload_script.py

And iā€™m already very sorry for my hacky code.

Edit: Inspired by Samy Tichadouā€™s Auto Reload for images/textures.

2 Likes

I erased previous post to not make doublons
I did another simple ahk to mimic ā€œsearch apiā€ addon, out of blender. for example select a word in your browser (or any other window) and press shift+ctrl+F1, it open API with the searched word. if there is no selection a message warns you.
search api.ahk (576 Bytes)
it could be possible to improve this to have it in the Windows context menu.
https://www.autohotkey.com/boards/viewtopic.php?t=38579
any improvement is welcome

edit:
ok I improved my script again ALWAYS ON TOP
explanation on the github page. but you can use it to pin anything now or specifically only the windows console and in the window this is marked Ā¤Ā¤Ā¤Ā¤Ā¤ PINNED Ā¤Ā¤Ā¤Ā¤Ā¤

@tin2tin I was thinking about a simple proposal in C in text editor. when in autocomplete https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_text/text_autocomplete.c
in the switch line 333, introduce a default doing the same as esc (to esc from autocomplete) + insert input
(maybe it should be more precise, like if input = alpha numeric so another case) but the effect would be if enter autocomplete, writing again another char will close autocomplete and keep on writing.

You should ask Campbell about it. You can reach him in a pm in the blender chat.

@tin2tin maybeā€¦
I did an update in console_easy_text_edit, an operator to directly open a module file, when typing his name in the console (or import name). in the console menu: ā€œOpen Module Fileā€. can be usefull to search some code

ctrl+pā€¦ is super useful in dev tools addon, I was frustrated to not have it in another editor so I created it easily in VSC following this video https://www.youtube.com/watch?v=VB6Km8nYz28
print("$") with shift ctrl p and print("$", $) with shift alt p

edit: to do exactly same shortcuts as dev tools: ctrl p ctrl+shift+p which are already used, use ā€œwhenā€: ā€œeditorHasSelectionā€ in the keybindings.json. to only trigger the shorcut when there is a selection

[
    {
        "key" : "ctrl+p",
        "command" : "editor.action.insertSnippet",
        "args": {"name": "print wrap"},
        "when": "editorHasSelection",
    },
    {
        "key" : "ctrl+shift+p",
        "command" : "editor.action.insertSnippet",
        "args": {"name": "print wrap plus"},
        "when": "editorHasSelection",
    },
]

my code in python.json is

{
   "print wrap": {
   "prefix": "print_wrap",
   "body": [
           "print('$TM_SELECTED_TEXT')"
       ],
   "description": "print wrap selected"
   },
   "print wrap plus": {
       "prefix": "print_wrap_plus",
       "body": [
                "print('$TM_SELECTED_TEXT:', $TM_SELECTED_TEXT)"
            ],
       "description": "print wrap plus selected"
       }
}

any solution for this script?
with new changes for Blender 3 - T78228 Send all python errors to info editor it doesnā€™t catch console errors anymore

3 Likes