kassio / neoterm

Wrapper of some vim/neovim's :terminal functions.
Other
1.32k stars 117 forks source link

Neoterm REPLs replace the current buffer when first opened. #262

Closed BlueDrink9 closed 4 years ago

BlueDrink9 commented 4 years ago

Describe the bug

Neoterm REPLs replace the current buffer when first opened.

To Reproduce Steps to reproduce the behavior:

  1. Open test.py, test2.py. Write "print('t')" in test.py.
  2. :TREPLSendLine
  3. See full window neoterm REPL.
  4. :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):

Additional context

Also happens in a minimal reproduction with shell set to /bin/sh

kassio commented 4 years ago

Thanks for your issue.

This is the default behavior, but you can change it using g:neoterm_default_mod.

BlueDrink9 commented 4 years ago

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

BlueDrink9 commented 4 years ago

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?

BlueDrink9 commented 4 years ago

While I'm here, split_size option needs units documented (rows or %?)

kassio commented 4 years ago

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. 😄

kassio commented 4 years ago

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.

BlueDrink9 commented 4 years ago

Thanks for your work!