Neoterm REPLs replace the current buffer when first opened.
BlueDrink9 opened this issue · 7 comments
Describe the bug
Neoterm REPLs replace the current buffer when first opened.
To Reproduce
Steps to reproduce the behavior:
- Open test.py, test2.py. Write "print('t')" in test.py.
:TREPLSendLine
- See full window neoterm REPL.
:ls
shows terminal window and test2.py
Expected behavior
The repl would open in a new window and the current buffer would remain intact.
Versions (please complete the following information):
- OS: Tested on windows, mac and linux
- neoterm commit sha1 : ee8bba4
- Vim or Neovim
Neovim - Version [vim --version] nvim 3.8, 4.2
Additional context
Also happens in a minimal reproduction with shell set to /bin/sh
Thanks for your issue.
This is the default behavior, but you can change it using g:neoterm_default_mod.
Thank you! When I went looking through the documentation, that didn't stand out as having anything to do with the problem. Would you mind adding a clarifying note about what mods do?
Also, the option about default size (the first option we see) says that by default it will open the window half-size, which made me expect that to happen here.
If you don't mind, why is the default to remove the old buffer? That seems to defeat the use-case of the edit-send cycle
Now that I'm more aware of what to look for, g:neoterm_split_on_tnew mentions the default is to use the current window.
Is it still a bug that the previous buffer was deleted then?
While I'm here, split_size
option needs units documented (rows or %?)
Is it still a bug that the previous buffer was deleted then?
If it's deleting the buffer, maybe.
While I'm here, split_size option needs units documented (rows or %?)
Pull requests are welcome. 😄
Default behavior was changed to replace the current window without deleting the current buffer. Also, some documentation improvements were done, I hope it's more clear now.
Thanks for points these things out.
Thanks for your work!