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