3 ms·
Vim's :term command has become my go-to way to open up a terminal nowadays. It gives you nice terminal emulation, but also lets you stay in Vim and use all the
by patricius 6y ago
Vim's :term command has become my go-to way to open up a terminal nowadays. It gives you nice terminal emulation, but also lets you stay in Vim and use all the Vim keyboard mappings. When a terminal window has focus, you can go into Normal mode with `Ctrl+W N`, which will let you search and yank stuff like you're used to.
- clipradiowallet 6y agoTIL `:term`. I've been using vim/tmux (and before that, vim/screen) for nearly 30 years. I never knew about `:term` before that, thanks for posting. PS: And when the terminal session exits, the history is still a vim buffer - that's awesome!
- graywh 6y agoit hasn't been in Vim very long, added in 8.1 ~3 years https://www.vim.org/vim-8.1-released.php https://www.vim.org/vim-8.1-released.php
- leephillips 6y agoEven more awesome: vim-repl (https://github.com/sillybun/vim-repl https://github.com/sillybun/vim-repl) uses the :term feature to provide convenient communication with any REPL, with extra support for some languages such as Python. (In fact there are a host of these; for example, vim-slime now can communicate with Vim’s built-in terminal.)