Welcome! regarding your first point. In Blender it’s more likely that you have your own custom startup-scripts or an add-on which is enabled at load time.
Then you can use whatever IDE/editor you like outside of Blender, reloading scripts can be assigned to a shortcut and will reload the add-on (Blender -> System -> Reload Scripts).
Your second suggestion seems like something that fits a macro system, are you using this with Python in Maya?
Running only the selected text is not an issue to implement, however Python often relies on imports which are typically at the top of a file.
We could scan the buffer for imports, run them, then run the selected code, but this seems error prone as imports don’t necessarily follow a strict pattern.
An alternative could be that running only the selected text uses the name-space of the last execution, so you would need to run the imports at some point, this has the down-side that script authors would need to be aware of the name-space between executions, it could be confusing, or you might accidentally use a variable which is later removed, causing the script to fail on restarting Blender.