set spell when entering commit, and use ftplugin instead of autocmds
This commit is contained in:
parent
b4ab8d3505
commit
ec66072a5f
3 changed files with 3 additions and 7 deletions
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("'\""))]],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue