vim: rename buffer local maps for consistency with nvim API

This commit is contained in:
Fernando Schauenburg 2022-02-09 23:14:25 +01:00
parent 0edb597382
commit cfef55a487
4 changed files with 8 additions and 8 deletions

View file

@ -1,3 +1,3 @@
local nmap = require 'fs.util'.buffer_nmap local nmap = require 'fs.util'.buf_nmap
nmap { 'q', '<cmd>q<cr>' } nmap { 'q', '<cmd>q<cr>' }

View file

@ -1,6 +1,6 @@
vim.bo.tabstop = 2 vim.bo.tabstop = 2
local nmap = require 'fs.util'.buffer_nmap local nmap = require 'fs.util'.buf_nmap
-- execute the current line -- execute the current line
nmap { '<leader>x', [[<cmd>call luaeval(getline("."))<cr>]] } nmap { '<leader>x', [[<cmd>call luaeval(getline("."))<cr>]] }

View file

@ -1,4 +1,4 @@
local nmap = require'fs.util'.buffer_nmap local nmap = require'fs.util'.buf_nmap
local setup = function() local setup = function()
-- Disable concealling on italic, bold, etc. -- Disable concealling on italic, bold, etc.

View file

@ -10,11 +10,11 @@ local buf_map = function(mode, lhs, rhs, opts)
vim.api.nvim_buf_set_keymap(0, mode, lhs, rhs, opts) vim.api.nvim_buf_set_keymap(0, mode, lhs, rhs, opts)
end end
M.nmap = function(tbl) map('n', tbl[1], tbl[2], tbl[3]) end M.nmap = function(tbl) map('n', tbl[1], tbl[2], tbl[3]) end
M.imap = function(tbl) map('i', tbl[1], tbl[2], tbl[3]) end M.imap = function(tbl) map('i', tbl[1], tbl[2], tbl[3]) end
M.vmap = function(tbl) map('v', tbl[1], tbl[2], tbl[3]) end M.vmap = function(tbl) map('v', tbl[1], tbl[2], tbl[3]) end
M.buffer_nmap = function(tbl) buf_map('n', tbl[1], tbl[2], tbl[3]) end M.buf_nmap = function(tbl) buf_map('n', tbl[1], tbl[2], tbl[3]) end
M.buffer_imap = function(tbl) buf_map('i', tbl[1], tbl[2], tbl[3]) end M.buf_imap = function(tbl) buf_map('i', tbl[1], tbl[2], tbl[3]) end
M.colors = function(gui) M.colors = function(gui)
if gui or vim.opt.termguicolors:get() then if gui or vim.opt.termguicolors:get() then