mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-28 19:50:05 +02:00
add: keymap reorgenize bufferline
This commit is contained in:
parent
f99a244c36
commit
62e8d40e43
2 changed files with 3 additions and 15 deletions
|
@ -16,18 +16,3 @@ local term_program = vim.fn.getenv("TERM_PROGRAM")
|
||||||
if term_program == "WezTerm" then
|
if term_program == "WezTerm" then
|
||||||
vim.cmd('silent !wezterm cli set-tab-title "' .. _get_folder_name() .. '"')
|
vim.cmd('silent !wezterm cli set-tab-title "' .. _get_folder_name() .. '"')
|
||||||
end
|
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
|
|
||||||
-- ]])
|
|
||||||
|
|
|
@ -86,6 +86,9 @@ keymap("n", "<S-l>", ":bnext<CR>", opts)
|
||||||
keymap("n", "<S-Left>", "<Esc>:bnext<CR>", opts)
|
keymap("n", "<S-Left>", "<Esc>:bnext<CR>", opts)
|
||||||
keymap("n", "<S-h>", ":bprevious<CR>", opts)
|
keymap("n", "<S-h>", ":bprevious<CR>", opts)
|
||||||
keymap("n", "<S-Right>", "<Esc>: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
|
-- Move text up and down
|
||||||
keymap("n", "<A-j>", "<Esc>:m .+1<CR>==gi", opts)
|
keymap("n", "<A-j>", "<Esc>:m .+1<CR>==gi", opts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue