From 08dfe17678f8d4759effdb934cdc30bad760dc88 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 21 Jul 2021 11:26:25 +0530 Subject: [PATCH] clean stuff | map new tab --- lua/mappings.lua | 3 ++- lua/options.lua | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index d779756..f5cb5ea 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 2210681..8132551 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]])