Skip to content

Instantly share code, notes, and snippets.

View LEI's full-sized avatar

Guillaume LEI

  • Paris, France
View GitHub Profile
@LEI
LEI / unimpaired.lua
Last active January 23, 2023 02:59
vim.g.loaded_unimpaired == 1
-- Copy mappings prefixed with [ and ] to ( and ) and add desc
for _, mode in ipairs({ 'n', 'o', 'x' }) do
local keymaps = vim.api.nvim_get_keymap(mode)
for _, keymap in ipairs(keymaps) do
for left, right in pairs({ ['('] = '[', [')'] = ']' }) do
if keymap.lhs ~= right and keymap.lhs:match('^%' .. right) then
local lhs = keymap.lhs:gsub('^%' .. right, left)
local rhs = keymap.lhs
local callback = keymap.callback
local desc = keymap.desc and keymap.desc
" Vim syntax file
" Language: mbsync setup files
" Maintainer: Stephen Gregoratto <themanhimself@sgregoratto.me>
" Last Change: 2018-07-15
" Filenames: mbsyncrc
" Version: 0.2.1
" Licence: GPLv3+
"
" Note: This config borrows heavily from msmtprc.vim
" by Simon Ruderich and Eric Pruitt

Keybase proof

I hereby claim:

  • I am LEI on github.
  • I am lei (https://keybase.io/lei) on keybase.
  • I have a public key whose fingerprint is 4F9C A344 DD36 EED0 C2B1 5753 8B7C F4F8 D5C1 FFBE

To claim this, I am signing this object: