From 7d23b8c24e1d7004a23036a59f11120b878735da Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 27 Jun 2021 18:15:58 +0530 Subject: [PATCH] add some mappings --- init.lua | 2 -- lua/mappings.lua | 12 ++++++++++-- lua/top-bufferline.lua | 12 ------------ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/init.lua b/init.lua index 2ebe488..fc461cf 100644 --- a/init.lua +++ b/init.lua @@ -5,14 +5,12 @@ require "misc-utils" require "top-bufferline" require("colorizer").setup() -local cmd = vim.cmd local g = vim.g g.mapleader = " " g.auto_save = 0 -- colorscheme related stuff -cmd "syntax on" g.nvchad_theme = "onedark" local base16 = require "base16" diff --git a/lua/mappings.lua b/lua/mappings.lua index 5663f8a..379225b 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -33,14 +33,14 @@ map("n", "n", [[ set nu!]], opt) map("n", "z", ":TZAtaraxis", opt) map("n", "m", ":TZMinimalist", opt) -map("n", "", [[ w ]], opt) +map("n", "", ":w ", opt) -- vim.cmd("inoremap jh ") -- Commenter Keybinding map("n", "/", ":CommentToggle", {noremap = true, silent = true}) map("v", "/", ":CommentToggle", {noremap = true, silent = true}) -map("n","",":BufDel", opt) +map("n", "", ":bpspbnbd! ", opt) -- compe stuff @@ -123,3 +123,11 @@ map("n", "fp", [[lua require('telescope').extensions.media_files.me map("n", "fb", [[Telescope Buffers]], opt) map("n", "fh", [[Telescope help_tags]], opt) map("n", "fo", [[Telescope oldfiles]], opt) + +-- bufferline tab stuff +map("n", "", [[tabnew]], opt) -- new tab +map("n", "", [[bdelete]], opt) -- close tab + +-- move between tabs +map("n", "", [[BufferLineCycleNext]], opt) +map("n", "", [[BufferLineCyclePrev]], opt) diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index f0fa4de..eb56214 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -17,15 +17,3 @@ require "bufferline".setup { mappings = "true" } } - -local opt = {silent = true} -local map = vim.api.nvim_set_keymap -vim.g.mapleader = " " - --- MAPPINGS -map("n", "", [[tabnew]], opt) -- new tab -map("n", "", [[bdelete]], opt) -- close tab - --- move between tabs -map("n", "", [[BufferLineCycleNext]], opt) -map("n", "", [[BufferLineCyclePrev]], opt)