1
0
mirror of https://github.com/amix/vimrc synced 2025-06-29 02:55:01 +08:00

Updated plugins

This commit is contained in:
Amir
2023-04-01 22:48:04 +02:00
parent 2b653aa950
commit b318c1d0e5
96 changed files with 2382 additions and 625 deletions

View File

@ -528,7 +528,14 @@ Add `let g:gitgutter_preview_win_floating = 1` to your `~/.vimrc`. Note that on
#### The appearance of a floating/popup window for hunk previews
Set `g:gitgutter_floating_window_options` to a dictionary of the options you want. This dictionary is passed directly to `popup_create()` (Vim) / `nvim_open_win()` (Neovim).
Either set `g:gitgutter_floating_window_options` to a dictionary of the options you want. This dictionary is passed directly to `popup_create()` (Vim) / `nvim_open_win()` (Neovim).
Or if you just want to override one or two of the defaults, you can do that with a file in an `after/` directory. For example:
```viml
" ~/.vim/after/vim-gitgutter/overrides.vim
let g:gitgutter_floating_window_options['border'] = 'single'
```
#### To load all hunks into the current window's location list instead of the quickfix list

View File

@ -328,6 +328,9 @@ function! s:undo(hunk_diff)
call append(lnum-1, lines[0:hunk[1]])
execute (lnum+hunk[1]) .','. (lnum+hunk[1]+hunk[3]) .'d _'
endif
" Refresh gitgutter's view of buffer.
call gitgutter#process_buffer(bufnr(''), 1)
endfunction
@ -433,7 +436,7 @@ function! s:open_hunk_preview_window()
call nvim_buf_set_name(buf, 'gitgutter://hunk-preview')
" Assumes cursor is in original window.
autocmd CursorMoved <buffer> ++once call gitgutter#hunk#close_hunk_preview_window()
autocmd CursorMoved,TabLeave <buffer> ++once call gitgutter#hunk#close_hunk_preview_window()
if g:gitgutter_close_preview_on_escape
" Map <Esc> to close the floating preview.
@ -565,7 +568,7 @@ endfunction
function! s:screen_lines(lines)
let [_virtualedit, &virtualedit]=[&virtualedit, 'all']
let cursor = getcurpos()
normal! g$
normal! 0g$
let available_width = virtcol('.')
call setpos('.', cursor)
let &virtualedit=_virtualedit

View File

@ -547,6 +547,13 @@ Default:
This dictionary is passed directly to |popup_create()| (Vim) or
|nvim_open_win()| (Neovim).
If you simply want to override one or two of the default values, create a file
in an after/ directory. For example:
>
" ~/.vim/after/vim-gitgutter/overrides.vim
let g:gitgutter_floating_window_options['border'] = 'single'
<
*g:gitgutter_close_preview_on_escape*
Default: 0