diff --git a/lua/mappings.lua b/lua/mappings.lua index d7797562..f5cb5ea0 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -133,7 +133,8 @@ map("n", "fh", [[Telescope help_tags]], opt) map("n", "fo", [[Telescope oldfiles]], opt) -- bufferline tab stuff -map("n", "", ":enew", opt) -- new tab +map("n", "", ":enew", opt) -- new buffer +map("n", "b", ":tabnew", opt) -- new tab map("n", "", ":bd!", opt) -- close tab -- move between tabs diff --git a/lua/options.lua b/lua/options.lua index 2210681e..81325510 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -59,16 +59,6 @@ g.loaded_spec = 0 local M = {} -function M.is_buffer_empty() - -- Check whether the current buffer is empty - return vim.fn.empty(vim.fn.expand("%:t")) == 1 -end - -function M.has_width_gt(cols) - -- Check if the windows width is greater than a given number of columns - return vim.fn.winwidth(0) / 2 > cols -end - -- file extension specific tabbing -- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]])