Don't be clever with number/relativenumber in terminals
This commit is contained in:
parent
68e8635ae1
commit
aa7da3dfe2
@ -31,26 +31,6 @@ vim.api.nvim_create_autocmd('TermOpen', {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Don't show the line number column in terminal-insert mode
|
|
||||||
vim.api.nvim_create_autocmd('TermEnter', {
|
|
||||||
group = group, pattern = 'term://*',
|
|
||||||
callback = function()
|
|
||||||
vim.opt.number = false
|
|
||||||
vim.opt.relativenumber = false
|
|
||||||
vim.opt.signcolumn = 'no'
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- But do show the line number column in terminal-normal mode
|
|
||||||
vim.api.nvim_create_autocmd('TermLeave', {
|
|
||||||
group = group, pattern = 'term://*',
|
|
||||||
callback = function()
|
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
vim.opt.signcolumn = 'yes'
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Automatically press enter when the terminal process exit successfully
|
-- Automatically press enter when the terminal process exit successfully
|
||||||
vim.api.nvim_create_autocmd('TermClose', {
|
vim.api.nvim_create_autocmd('TermClose', {
|
||||||
group = group,
|
group = group,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user