diff --git a/after/plugin/barbar.lua b/after/plugin/barbar.lua index f870825..45c51af 100644 --- a/after/plugin/barbar.lua +++ b/after/plugin/barbar.lua @@ -1,57 +1,29 @@ local map = vim.api.nvim_set_keymap local opts = { noremap = true, silent = true } -local function macos() - -- Move to previous/next - map('n', '≤', 'BufferPrevious', opts) - map('n', '≥', 'BufferNext', opts) - -- Re-order to previous/next - map('n', '¯', 'BufferMovePrevious', opts) - map('n', '˘', 'BufferMoveNext', opts) - -- Goto buffer in position... - map('n', '¡', 'BufferGoto 1', opts) - map('n', '™', 'BufferGoto 2', opts) - map('n', '£', 'BufferGoto 3', opts) - map('n', '¢', 'BufferGoto 4', opts) - map('n', '∞', 'BufferGoto 5', opts) - map('n', '§', 'BufferGoto 6', opts) - map('n', '¶', 'BufferGoto 7', opts) - map('n', '•', 'BufferGoto 8', opts) - map('n', 'ª', 'BufferGoto 9', opts) - map('n', 'º', 'BufferLast', opts) - -- Pin/unpin buffer - map('n', 'π', 'BufferPin', opts) - -- Close buffer - map('n', 'ç', 'BufferClose', opts) -end - -vim.api.nvim_create_user_command("MacOS", macos, {}) - -if vim.loop.os_uname().sysname == "Darwin" then - macos() -else - -- Move to previous/next - map('n', '', 'BufferPrevious', opts) - map('n', '', 'BufferNext', opts) - -- Re-order to previous/next - map('n', '', 'BufferMovePrevious', opts) - map('n', '>', 'BufferMoveNext', opts) - -- Goto buffer in position... - map('n', '', 'BufferGoto 1', opts) - map('n', '', 'BufferGoto 2', opts) - map('n', '', 'BufferGoto 3', opts) - map('n', '', 'BufferGoto 4', opts) - map('n', '', 'BufferGoto 5', opts) - map('n', '', 'BufferGoto 6', opts) - map('n', '', 'BufferGoto 7', opts) - map('n', '', 'BufferGoto 8', opts) - map('n', '', 'BufferGoto 9', opts) - map('n', '', 'BufferLast', opts) - -- Pin/unpin buffer - map('n', '', 'BufferPin', opts) - -- Close buffer - map('n', '', 'BufferClose', opts) -end +-- Move to previous/next +map('n', ',', 'BufferPrevious', opts) +map('n', '.', 'BufferNext', opts) +-- Re-order to previous/next +map('n', '<', 'BufferMovePrevious', opts) +map('n', '>', 'BufferMoveNext', opts) +-- Goto buffer in position... +map('n', '1', 'BufferGoto 1', opts) +map('n', '2', 'BufferGoto 2', opts) +map('n', '3', 'BufferGoto 3', opts) +map('n', '4', 'BufferGoto 4', opts) +map('n', '5', 'BufferGoto 5', opts) +map('n', '6', 'BufferGoto 6', opts) +map('n', '7', 'BufferGoto 7', opts) +map('n', '8', 'BufferGoto 8', opts) +map('n', '9', 'BufferGoto 9', opts) +map('n', '0', 'BufferLast', opts) +-- Pin/unpin buffer +map('n', 'p', 'BufferPin', opts) +map('n', 'i', 'BufferPick', opts) +-- Close buffer +map('n', 'c', 'w|BufferClose', opts) +map('n', 'q', 'BufferClose!', opts) -- Wipeout buffer -- :BufferWipeout @@ -62,7 +34,6 @@ end -- :BufferCloseBuffersLeft -- :BufferCloseBuffersRight -- Magic buffer-picking mode --- map('n', '', 'BufferPick', opts) -- Sort automatically by... map('n', 'bb', 'BufferOrderByBufferNumber', opts) map('n', 'bd', 'BufferOrderByDirectory', opts) diff --git a/lua/junikim/options.lua b/lua/junikim/options.lua index 4dc348c..105a4a3 100644 --- a/lua/junikim/options.lua +++ b/lua/junikim/options.lua @@ -26,6 +26,7 @@ vim.g.airline_powerline_fonts = 1 vim.opt.nu = true vim.opt.rnu = true +vim.opt.termguicolors = true vim.opt.scrolloff = 7