set spell when entering commit, and use ftplugin instead of autocmds
This commit is contained in:
2
after/ftplugin/gitcommit.lua
Normal file
2
after/ftplugin/gitcommit.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vim.cmd('set spell!')
|
||||||
|
vim.cmd('startinsert | 1')
|
1
after/ftplugin/gitrebase.lua
Symbolic link
1
after/ftplugin/gitrebase.lua
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
gitcommit.lua
|
@ -13,13 +13,6 @@ auto('TextYankPost', { -- highlight yanks
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
auto('FileType', { -- start git messages in insert mode
|
|
||||||
group = 'bufcheck',
|
|
||||||
pattern = { 'gitcommit', 'gitrebase', },
|
|
||||||
desc = 'Start git messages in insert mode.',
|
|
||||||
command = 'startinsert | 1'
|
|
||||||
})
|
|
||||||
|
|
||||||
auto('BufRead', { -- return to last place
|
auto('BufRead', { -- return to last place
|
||||||
pattern = '*',
|
pattern = '*',
|
||||||
command = [[call setpos(".", getpos("'\""))]],
|
command = [[call setpos(".", getpos("'\""))]],
|
||||||
|
Reference in New Issue
Block a user