mirror of
https://github.com/DefectingCat/nvim
synced 2025-07-15 16:51:33 +00:00
remove line number when open terminal
This commit is contained in:
@ -19,6 +19,14 @@ autocmd({ "BufNewFile", "BufRead" }, {
|
||||
end,
|
||||
})
|
||||
|
||||
-- remove relative line number when open terminal
|
||||
autocmd({ "TermOpen" }, {
|
||||
callback = function()
|
||||
vim.api.nvim_buf_set_option(0, "relativenumber", false)
|
||||
vim.api.nvim_buf_set_option(0, "number", false)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Automatically update changed file in Vim
|
||||
-- Triger `autoread` when files changes on disk
|
||||
-- https://unix.stackexchange.com/questions/149209/refresh-changed-content-of-file-opened-in-vim/383044#383044
|
||||
@ -113,6 +121,7 @@ local function update_winbar()
|
||||
local buffer_count = get_buffer_count()
|
||||
local ft = vim.bo.filetype
|
||||
if ft == "NvimTree" then
|
||||
vim.opt.winbar = ""
|
||||
return
|
||||
else
|
||||
vim.opt.winbar = "%#WinBar1#%m "
|
||||
|
@ -19,7 +19,6 @@ map("i", "<A-k>", "<Esc>:m .-2<CR>==gi")
|
||||
map("v", "<A-j>", ":m '>+1<CR>gv=gv")
|
||||
map("v", "<A-k>", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- map("n", "<C-a>", "gg<S-v>G")
|
||||
map("n", "$", "g_")
|
||||
map("v", "$", "g_")
|
||||
map("v", ">", ">gv")
|
||||
|
Reference in New Issue
Block a user