4 ms·
My pet favorite: opening a terminal in a vim split. Having an interactive bash/ipython/repl session where you can use vim keys to navigate and yank lines from
by kjeetgill 8y ago
My pet favorite: opening a terminal in a vim split.
Having an interactive bash/ipython/repl session where you can use vim keys to navigate and yank lines from your scrollback is pure bliss.
I like to run builds and be able to see, yank, open files from the errors all inside vim.
- tostr 8y agoHow does one get back to "terminal content as a buffer" from the interactive version of the terminal?
- kjeetgill 8y agofrom: https://neovim.io/doc/user/nvim_terminal_emulator.html https://neovim.io/doc/user/nvim_terminal_emulator.html "In [terminal] mode all keys except <C-\><C-N> are sent to the underlying program. Use <C-\><C-N> to return to normal-mode."
- JdeBP 8y agoThis and more is explained in the doco. :help terminal-emulator-input
- dmortin 8y agoWhy did it take VIM so long to get this? Emacs has this feature for 30 years or so.
- pasabagi 8y agoIt's a very emacsy idea. I think, for better or worse, vim is centered around the goal of making a better editor. Emacs is centered around making a portable universe. To be honest, I don't really like having a 'terminal' in vim. It makes more sense to just use the terminal, which is like, right there, one ctrl-z away.
- kjeetgill 8y agoI don't like Neovim's terminal mode because I need a terminal. I'm also a religious ctrl-z user. I use it when I want to be able to yy stuff out of the scrollback to use in the split with my code like parts of a live repl session or the output from curl.
- rjkennedy98 8y agoTmux solves that problem and most power vim users use tmux
- qu4z-2 8y agovim used to have this listed in :help design-not - Vim is not a shell or an Operating System. You will not be able to run a shell inside Vim or use it to control a debugger. This should work the other way around: Use Vim as a component from a shell or in an IDE. A satirical way to say this: "Unlike Emacs, Vim does not attempt to include everything but the kitchen sink, but some people say that you can clean one with it. ;-)" In summary, it took it so long to get it because it explicitly goes against the original design (and I kind of think it was the right choice. Emacs already exists).
- davesque 8y agoI honestly think this is a bit of a misfeature. Tmux provides the same functionality and the resulting hierarchy of responsibilities between your terminal apps seems more correct to me.
- buvanshak 8y agoI use nvims terminal because. 1. I don't want to learn a bunch of new key bindings to switch between terminal and editor windows. With nvim, I can use the same process that I use to switch between buffers, to switch to a terminal window. 2. I can use the same process to copy to/from terminal/buffer windows, and use the full range of vim registers in the process. 3. I can name terminal buffers in the same way I name editor windows, and use the names to switch to the terminal window.
- soraminazuki 8y agoTerminal mode is awesome when combined with the quickfix feature. You can use :make and :grep without blocking the editor.
- u801e 8y ago> I like to run builds and be able to see, yank, open files from the errors all inside vim. You can do something like this with the :grep or :make commands with the resulting preview window. Even if you were to do something like :r !make, you can view the errors by moving your cursor to the file name and pressing ctrl-w ctrl-f (to open in a new split window) or ctrl-w gf (to open it in a new tab).