Tip 20Applying Customizations to Your Shell in a Terminal Buffer
images/neovim-only.png

At a glance, you may not be able to tell whether a shell is running within a terminal buffer or outside of Neovim. In this tip, you’ll find out how you can customize the prompt for your shell so that it appears differently inside of a terminal buffer.

Open a shell in a terminal outside of Neovim and take note of how your prompt looks. Then launch Neovim with a shell running inside a terminal buffer:

=> $ nvim +terminal

Can you tell which shell is running inside of Neovim and which one is running outside? You could make it more obvious by changing how the prompt looks in each ...

Get Modern Vim now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.