add: keymap reorgenize bufferline

This commit is contained in:
asep komarudin 2024-03-06 07:34:49 +07:00
parent f99a244c36
commit 62e8d40e43
2 changed files with 3 additions and 15 deletions

View file

@ -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('<afile>'), +expand('<abuf>'))
-- augroup END
-- ]])

View file

@ -86,6 +86,9 @@ keymap("n", "<S-l>", ":bnext<CR>", opts)
keymap("n", "<S-Left>", "<Esc>:bnext<CR>", opts)
keymap("n", "<S-h>", ":bprevious<CR>", opts)
keymap("n", "<S-Right>", "<Esc>:bprevious<CR>", opts)
-- Reordering Bufferline
keymap("n", "<S-PageUp>", "<cmd>BufferLineMovePrev<cr>", opts)
keymap("n", "<S-PageDown>", "<cmd>BufferLineMoveNext<cr>", opts)
-- Move text up and down
keymap("n", "<A-j>", "<Esc>:m .+1<CR>==gi", opts)