feat(nvim): mappings to add trailing characters

Add mappings to add a trailing comma or semicolon to the end of the current line from insert mode.
This commit is contained in:
Oliver Davies 2022-03-30 14:11:30 +01:00 committed by GitHub
parent 14ebc86df5
commit 54397bc899
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,12 @@ local function set_key_mappings()
vim.cmd [[ nnoremap <expr> <CR> {-> v:hlsearch ? ":nohl\<CR>" : "\<CR>"}() ]]
map("n", "<C-f>", ":silent !tmux neww tmux-sessioniser<CR>", { noremap = true, silent = true })
local imap = require "opdavies.keymap".imap
-- Easy insertion of a trailing ; or , from insert mode
imap({ ",,", "<Esc>A,<Esc>" })
imap({ ";;", "<Esc>A;<Esc>" })
end
local function set_highlights()