Fix gitcommit starting in insert mode
This commit is contained in:
parent
0f00298156
commit
87ca18d78e
|
@ -13,7 +13,6 @@ local keymap = {
|
|||
['<leader>h'] = {':b#<cr>', m.s},
|
||||
['<leader>k'] = {':bnext<cr>', m.s},
|
||||
['<leader>j'] = {':bprevious<cr>', m.s},
|
||||
['<leader>m'] = {':lua print()<cr>', m.s},
|
||||
['<leader>/'] = {':let @/ = ""<cr>:<BACKSPACE>', m.s},
|
||||
['<c-q>'] = ':qa<cr>',
|
||||
['<c-p>'] = '<cmd>Telescope git_files<cr>',
|
||||
|
@ -26,6 +25,7 @@ local keymap = {
|
|||
['<c-l>'] = ':TmuxNavigateRight<cr>',
|
||||
['<expr> n'] = "'Nn'[v:searchforward]",
|
||||
['<expr> N'] = "'nN'[v:searchforward]",
|
||||
['<c-m>'] = ':lua SynGroup()<cr>'
|
||||
},
|
||||
t = {},
|
||||
[''] = {
|
||||
|
|
|
@ -67,21 +67,13 @@ end
|
|||
|
||||
vim.api.nvim_command'colorscheme donokai'
|
||||
|
||||
vim.api.nvim_command[[
|
||||
function! SynGroup()
|
||||
let l:s = synID(line('.'), col('.'), 1)
|
||||
echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
|
||||
endfun
|
||||
nnoremap <c-m> :call SynGroup()<cr>
|
||||
]]
|
||||
function SynGroup()
|
||||
local s = vim.fn.synID(vim.fn.line('.'), vim.fn.col('.'), 1)
|
||||
print(vim.fn.synIDattr(s, 'name') .. ' -> ' .. vim.fn.synIDattr(vim.fn.synIDtrans(s), 'name'))
|
||||
end
|
||||
|
||||
vim.api.nvim_command[[
|
||||
au! FileType gitcommit exec 'norm gg' | startinsert!
|
||||
au! BufNewFile,BufRead *.slimleex set syntax=slim
|
||||
command! W write
|
||||
command! X writequit
|
||||
augroup gitcommit
|
||||
au! VimEnter COMMIT_EDITMSG exec 'norm gg' | startinsert!
|
||||
augroup END
|
||||
augroup slime
|
||||
au! BufNewFile,BufRead *.slimleex set syntax=slim
|
||||
augroup END
|
||||
]]
|
||||
|
|
Reference in a new issue