nvim: use easier keys for spell
This commit is contained in:
parent
bef34649f5
commit
df1f8ece8f
|
@ -91,7 +91,7 @@ map('v', '<Leader>f', 'gq', 'Reformat text')
|
|||
map('n', '<C-D>', ':bdelete<CR>', 'Close buffer')
|
||||
|
||||
-- use ui.select for spelling suggestions so dressing can make it look nice
|
||||
map('n', 'z=', function()
|
||||
local function spellsugg_select()
|
||||
local word = vim.fn.expand('<cword>')
|
||||
local suggestions = vim.fn.spellsuggest(word)
|
||||
vim.ui.select(suggestions, {}, vim.schedule_wrap(function(selected)
|
||||
|
@ -102,4 +102,11 @@ map('n', 'z=', function()
|
|||
'n', true)
|
||||
end
|
||||
end))
|
||||
end)
|
||||
end
|
||||
|
||||
map('n', 'z=', spellsugg_select)
|
||||
|
||||
-- use easier keys for spell
|
||||
map('n', '<F17>', '[s', 'Previous misspelled word') -- <S-F5>
|
||||
map('n', '<F18>', ']s', 'Next misspelled word') -- <S-F6>
|
||||
map('n', '<F19>', spellsugg_select, 'Spelling suggestions') -- <S-F7>
|
||||
|
|
Loading…
Reference in New Issue
Block a user