1
0
Fork 0

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
This commit is contained in:
Jan Grosser 2024-06-11 22:40:15 +02:00
parent b6c8b2b7de
commit 75e8c32aa5

View file

@ -336,6 +336,10 @@ map <leader>x :e ~/buffer.md<cr>
" Toggle paste mode on and off " Toggle paste mode on and off
map <leader>pp :setlocal paste!<cr> map <leader>pp :setlocal paste!<cr>
" Always switch to insert mode for terminal window and disable
" line numbers
autocmd TermOpen * setlocal nonumber norelativenumber
autocmd TermOpen * startinsert
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions " => Helper functions