From 62e8d40e4384219ee3322261998d9d9d2e5eb349 Mon Sep 17 00:00:00 2001 From: asep komarudin Date: Wed, 6 Mar 2024 07:34:49 +0700 Subject: [PATCH] add: keymap reorgenize bufferline --- lua/custom/autocmd.lua | 15 --------------- lua/user/keymaps.lua | 3 +++ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lua/custom/autocmd.lua b/lua/custom/autocmd.lua index 3938ab4..d0b1371 100644 --- a/lua/custom/autocmd.lua +++ b/lua/custom/autocmd.lua @@ -16,18 +16,3 @@ local term_program = vim.fn.getenv("TERM_PROGRAM") if term_program == "WezTerm" then vim.cmd('silent !wezterm cli set-tab-title "' .. _get_folder_name() .. '"') end - --- vim.cmd([[ --- function s:MkNonExDir(file, buf) --- if empty(getbufvar(a:buf, '&buftype')) && a:file!~#'\v^\w+\:\/' --- let dir=fnamemodify(a:file, ':h') --- if !isdirectory(dir) --- call mkdir(dir, 'p') --- endif --- endif --- endfunction --- augroup BWCCreateDir --- autocmd! --- autocmd BufWritePre * :call s:MkNonExDir(expand(''), +expand('')) --- augroup END --- ]]) diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index a7a5911..014d09a 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -86,6 +86,9 @@ keymap("n", "", ":bnext", opts) keymap("n", "", ":bnext", opts) keymap("n", "", ":bprevious", opts) keymap("n", "", ":bprevious", opts) +-- Reordering Bufferline +keymap("n", "", "BufferLineMovePrev", opts) +keymap("n", "", "BufferLineMoveNext", opts) -- Move text up and down keymap("n", "", ":m .+1==gi", opts)