Skip to main content
added 90 characters in body
Source Link
Vivian De Smedt
  • 21.1k
  • 5
  • 22
  • 40

I would do:

vim.keymap.set('i', '<C-b>', 'b:gitsigns_head', {expr = true})

Or if you prefer a "pure" lua version:

lua vim.keymap.set('i', '<C-b>', "luaeval('vim.b.gitsigns_head')", {expr = true})

The {expr = true} makes that the lhs is evaluated instead of used directly as input.

I would do:

vim.keymap.set('i', '<C-b>', 'b:gitsigns_head', {expr = true})

Or if you prefer a "pure" lua version:

lua vim.keymap.set('i', '<C-b>', "luaeval('vim.b.gitsigns_head')", {expr = true})

I would do:

vim.keymap.set('i', '<C-b>', 'b:gitsigns_head', {expr = true})

Or if you prefer a "pure" lua version:

lua vim.keymap.set('i', '<C-b>', "luaeval('vim.b.gitsigns_head')", {expr = true})

The {expr = true} makes that the lhs is evaluated instead of used directly as input.

Source Link
Vivian De Smedt
  • 21.1k
  • 5
  • 22
  • 40

I would do:

vim.keymap.set('i', '<C-b>', 'b:gitsigns_head', {expr = true})

Or if you prefer a "pure" lua version:

lua vim.keymap.set('i', '<C-b>', "luaeval('vim.b.gitsigns_head')", {expr = true})