nvim: Allow doing commits from within floating terminal
With this we can invoke git commit and not have a nested neovim instance. This also makes 'C' option in lazygit to work properly when lazygit is being used from the floating terminal with floaterm.
This commit is contained in:
parent
a4296a5d7e
commit
757b29b026
4 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
setlocal spell
|
setlocal spell
|
||||||
setlocal textwidth=72
|
setlocal textwidth=72
|
||||||
setlocal iskeyword+=-
|
setlocal iskeyword+=-
|
||||||
|
setlocal bufhidden=delete
|
||||||
|
|
||||||
" Jump to sections of diff
|
" Jump to sections of diff
|
||||||
nmap <buffer> [c ?^@@<CR>
|
nmap <buffer> [c ?^@@<CR>
|
||||||
|
|
1
nvim/.config/nvim/after/ftplugin/gitconfig.vim
Normal file
1
nvim/.config/nvim/after/ftplugin/gitconfig.vim
Normal file
|
@ -0,0 +1 @@
|
||||||
|
setlocal bufhidden=delete
|
|
@ -5,3 +5,5 @@ nnoremap <buffer> <silent> <Leader>e :Edit<CR>
|
||||||
nnoremap <buffer> <silent> <Leader>r :Reword<CR>
|
nnoremap <buffer> <silent> <Leader>r :Reword<CR>
|
||||||
nnoremap <buffer> <silent> <Leader>f :Fixup<CR>
|
nnoremap <buffer> <silent> <Leader>f :Fixup<CR>
|
||||||
nnoremap <buffer> <silent> <Leader>c :Cycle<CR>
|
nnoremap <buffer> <silent> <Leader>c :Cycle<CR>
|
||||||
|
|
||||||
|
setlocal bufhidden=delete
|
||||||
|
|
|
@ -6,6 +6,7 @@ vim.g.floaterm_width = 0.8
|
||||||
vim.g.floaterm_height = 0.8
|
vim.g.floaterm_height = 0.8
|
||||||
vim.g.floaterm_winblend = 0
|
vim.g.floaterm_winblend = 0
|
||||||
vim.g.floaterm_borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'}
|
vim.g.floaterm_borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'}
|
||||||
|
vim.g.floaterm_gitcommit = 'floaterm'
|
||||||
|
|
||||||
remap('n', '<C-z>', ':FloatermToggle<CR>', { noremap = true, silent = true })
|
remap('n', '<C-z>', ':FloatermToggle<CR>', { noremap = true, silent = true })
|
||||||
remap('t', '<C-z>', '<C-\\><C-n>:FloatermToggle<CR>', { noremap = true, silent = true })
|
remap('t', '<C-z>', '<C-\\><C-n>:FloatermToggle<CR>', { noremap = true, silent = true })
|
||||||
|
|
Loading…
Reference in a new issue