1
0
mirror of https://github.com/amix/vimrc synced 2025-07-13 23:05:01 +08:00

Merge branch 'Linux' of https://github.com/Geezus42/vimrc into Linux

This commit is contained in:
geezus
2021-06-30 13:19:18 -05:00
235 changed files with 6246 additions and 1351 deletions

View File

@ -63,15 +63,20 @@ Neovim:~
===============================================================================
WINDOWS *gitgutter-windows*
I recommend configuring vim-gitgutter with the full path to your git executable.
There is a potential risk on Windows due to `cmd.exe` prioritising the current
folder over folders in `PATH`. If you have a file named `git.*` (i.e. with
any extension in `PATHEXT`) in your current folder, it will be executed
instead of git whenever the plugin calls git.
You can avoid this risk by configuring the full path to your git executable.
For example:
>
" This path probably won't work
let g:gitgutter_git_executable = 'C:\Program Files\Git\bin\git.exe'
<
This is to avoid a problem which occurs if you have file named "git.*" (i.e.
with any extension in "PATHEXT") in your current folder. "cmd.exe" prioritises
the current folder over folders in 'PATH' and will try to execute your file
instead of the "git" binary.
Unfortunately I don't know the correct escaping for the path - if you do,
please let me know!
===============================================================================
@ -172,14 +177,36 @@ Commands for operating on a hunk:~
*gitgutter-:GitGutterPreviewHunk*
:GitGutterPreviewHunk Preview the hunk the cursor is in.
<<<<<<< HEAD
Use |:pclose| or |CTRL-W_CTRL-Z| to close the preview
window, or set |g:gitgutter_close_preview_on_escape|
and use <Esc>.
=======
>>>>>>> 1cca3b1df2973096bb9526a0d79c7b93c04e66b3
To stage part of the hunk, move to the preview window,
delete any lines you do not want to stage, and
|GitGutterStageHunk|.
To close a non-floating preview window use |:pclose|
or |CTRL-W_z| or |CTRL-W_CTRL-Z|; or normal window-
closing (|:quit| or |:close| or |CTRL-W_c|) if your cursor
is in the preview window.
To close a floating window when the cursor is in the
original buffer, move the cursor.
To close a floating window when the cursor is in the
floating window use normal window-closing, or move to
the original window with |CTRL-W_p|. Alternatively set
|g:gitgutter_close_preview_on_escape| and use <Esc>.
Two functions are available for your own logic:
>
gitgutter#hunk#is_preview_window_open()
gitgutter#hunk#close_hunk_preview_window()
<
Commands for folds:~
*gitgutter-:GitGutterFold*