[vim] Add Meta-O to show open buffers in Neovide
This commit is contained in:
parent
03fe14895c
commit
bd05bc392a
1 changed files with 7 additions and 2 deletions
|
@ -6,7 +6,7 @@ local function init_key_options()
|
||||||
vim.g.mapleader = ","
|
vim.g.mapleader = ","
|
||||||
end
|
end
|
||||||
|
|
||||||
local function navigation_mappings()
|
local function text_navigation_mappings()
|
||||||
local options = { noremap = true }
|
local options = { noremap = true }
|
||||||
|
|
||||||
-- Navigate by soft-wrapped lines using Alt/Option/Meta + jk
|
-- Navigate by soft-wrapped lines using Alt/Option/Meta + jk
|
||||||
|
@ -87,17 +87,22 @@ end
|
||||||
|
|
||||||
local function telescope_mappings()
|
local function telescope_mappings()
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
|
|
||||||
map('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
map('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||||
map('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
map('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||||
map('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
map('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||||
map('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
map('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||||
|
|
||||||
|
if vim.fn.has('gui_running') then
|
||||||
|
map('n', 'D-O', builtin.buffers, { desc = 'Open existing' })
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function init_all_global_keybindings()
|
local function init_all_global_keybindings()
|
||||||
init_key_options()
|
init_key_options()
|
||||||
clipboard_mappings()
|
clipboard_mappings()
|
||||||
window_key_mappings()
|
window_key_mappings()
|
||||||
navigation_mappings()
|
text_navigation_mappings()
|
||||||
diagnostic_mappings()
|
diagnostic_mappings()
|
||||||
telescope_mappings()
|
telescope_mappings()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue