pyratelog

personal blog
git clone git://git.pyratebeard.net/pyratelog.git
Log | Files | Refs | README

commit dc66545e3b4f5720e4647890c8d3a099567cfed4
parent ab639d193500c5fb24cfb85df430f701dee9c3c8
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu, 20 Oct 2022 15:49:45 +0100

shell_shocked

Diffstat:
Mentry/shell_shocked.md | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/entry/shell_shocked.md b/entry/shell_shocked.md @@ -1,15 +1,15 @@ -I didn't know that vim could open a terminal in a window split. +I didn't know that [vim](TK){target="_blank" rel="noreferrer"} could open a terminal in a window split. -Usually I have vim in a tmux session so can split the tmux window to get a terminal. Occasionally I would use `:shell`, which opens a shell in the current terminal but backgrounds vim so you have to exit the shell to return. This is useful but it can be beneficial to keep your vim buffer open while running a command, and vim may not be in a tmux session. +Usually I have vim in a [tmux](TK){target="_blank" rel="noreferrer"} session so can split the tmux window to get a terminal. Occasionally I would use `:shell`, which opens a shell in the current terminal but backgrounds vim so you have to exit the shell to return. This is useful but it can be beneficial to keep your buffer open while running a command, and vim may not be in a tmux session. -As of vim 8.2 the terminal feature is natively supported. Neovim also has this feature natively. To see if your vim has this feature incant the following in vim +As of vim 8 the terminal feature is natively supported. Neovim also has this feature natively. To see if your vim has this feature incant the following ``` :echo has('terminal') ``` If the output is `1` then you have the terminal feature. -To simply open a terminal in a window split incant +To simply open a terminal in a split incant ``` :terminal ``` @@ -18,6 +18,6 @@ or :term ``` -You can append a command, which once completed will open the output in vim ready for editing. +You can append a command, which once completed will open the output in a buffer ready for editing. -This is a cool feature, and even though it has been around a while now it is fun to always be learning vim. +This is a cool feature, and will probably use it quite a bit. It is great fun to be constantly learning vim, even finding features that have been around for a while.