Not sure about other text editors, but in spacemacs with alchemist it’s possible to send snippets of code from a buffer into the repl, so I use that sometimes. Although most often I just edit and save the module’s source code and rely on code reloading (with exsync, for example) to also update the loaded modules in the repl.
For “debugging” I tend to use tracing, like rexbug. I haven’t found a way to do step-through debugging sensibly with elixir …