This is a simple plugin of neovim that prvoides some preset configuration for terminal.
- Use
<ESC>
to switch to NORMAL mode as if you were editing a general file. - Use
<C-w>
+ key (h
,j
.k
,l
and so on) to switch window as if you were in a general window. - Automatically enter the TERMINAL mode when you enter the terminal.
- Dont't show the line number when in TERMINAL mode or the terminal window loses focus.
- You can set terminal to show line numbers or not when in NORMAL mode.
- Neovim >= 0.7.2
For packer user:
require('packer').startup(function(use)
use {
'h-hg/BetterTermConfig.nvim',
config = function()
require('bettertermconfig').setup {
-- write your configuration here
}
end
}
end)
The default configuration
{
keymap = {
esc = true, -- whether use <ESC> to switch to NORMAL mode
cw = true, -- whether use <C-w> + key to switch window
},
normal = {
nu = true, -- whether show line number of terminal in NORMAL mode
rnu = true,-- whether show relative line number of terminal in NORMAL mode
},
}