vim terminal working

This commit is contained in:
Ekshef 2025-06-09 11:41:00 -07:00
parent ba0893e9ba
commit 01a0c168a3
1 changed files with 23 additions and 0 deletions

View File

@ -157,6 +157,11 @@ vim.opt.inccommand = 'split'
-- Show which line your cursor is on
vim.opt.cursorline = true
-- set default tab stop and shiftwitdth so we dont' get 8 space tabs
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.softtabstop = 4
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10
@ -218,6 +223,24 @@ vim.api.nvim_create_autocmd('TextYankPost', {
end,
})
vim.api.nvim_create_autocmd('TermOpen', {
group = vim.api.nvim_create_augroup('custom-term-open', { clear = true }),
callback = function()
vim.opt.number = false
vim.opt.relativenumber = false
end,
})
local job_id = 0
vim.keymap.set('n', '<leader>st', function()
vim.cmd.vnew()
vim.cmd.term()
vim.cmd.wincmd 'J'
vim.api.nvim_win_set_height(0, 15)
job_id = vim.bo.channel
end, { desc = 'Opens [S]mall [T]erminal' })
-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'