From 75e8c32aa579fb0dbbc2d5170d221a1426284973 Mon Sep 17 00:00:00 2001 From: Jan Grosser Date: Tue, 11 Jun 2024 22:40:15 +0200 Subject: [PATCH] Neovim terminal win: auto insert mode & no line numbers When opening a terminal window in neovim with :terminal the terminal shall start directly in insert mode and shall not have any line numbers Sources: * https://vi.stackexchange.com/a/22956 * https://stackoverflow.com/a/63908546 --- modules/dotfiles/init.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/dotfiles/init.vim b/modules/dotfiles/init.vim index 1e15a04..2f9081d 100644 --- a/modules/dotfiles/init.vim +++ b/modules/dotfiles/init.vim @@ -336,6 +336,10 @@ map x :e ~/buffer.md " Toggle paste mode on and off map pp :setlocal paste! +" Always switch to insert mode for terminal window and disable +" line numbers +autocmd TermOpen * setlocal nonumber norelativenumber +autocmd TermOpen * startinsert """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Helper functions