diff --git a/after/plugin/barbar.lua b/after/plugin/barbar.lua index f4861e5..c300571 100644 --- a/after/plugin/barbar.lua +++ b/after/plugin/barbar.lua @@ -1,50 +1,51 @@ local map = vim.api.nvim_set_keymap local opts = { noremap = true, silent = true } --- 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) - ----- 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) - +if vim.loop.os_uname().sysname == "Darwin" then + -- 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) +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 -- Wipeout buffer -- :BufferWipeout