use Neogit and Diffview for git stuff
This commit is contained in:
parent
fce84d8735
commit
de594a0b9e
2 changed files with 31 additions and 35 deletions
52
README.md
52
README.md
|
@ -331,15 +331,24 @@ Mardkown Preview plugin commands:
|
||||||
|
|
||||||
#### Git stuff
|
#### Git stuff
|
||||||
|
|
||||||
|keys|action|
|
##### Neogit
|
||||||
|----|----|
|
|
||||||
Ctrl+g show current code chunk changes
|
Just run `:Neogit` to launch it, `?` for help, changing parameters is
|
||||||
|\<leader\>hb | show full git blame of current line (double use to enter displayed diff)|
|
done usually by adding `-` before letter assigned to specific option.
|
||||||
|\<leader\>hD |show splitted blame diff (double use to enter displayed diff)|
|
|
||||||
|\<leader\>hd| show splitted diff|
|
##### Diffview
|
||||||
|\<leader\>hr| reset hunk|
|
|
||||||
|\<leader\>hR| reset whole buffer|
|
Diff log / file history:
|
||||||
|\<leader\>td| toggle deleted |
|
|
||||||
|
```bash
|
||||||
|
:DiffviewFileHistory
|
||||||
|
```
|
||||||
|
|
||||||
|
Diff log of single file (or dir):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
:DiffviewFileHistory <filename/dirname>
|
||||||
|
```
|
||||||
|
|
||||||
##### Telescope git stuff
|
##### Telescope git stuff
|
||||||
|
|
||||||
|
@ -352,31 +361,6 @@ Bindings:
|
||||||
|<leader>gc|git_commits|
|
|<leader>gc|git_commits|
|
||||||
|<leader>gb|git_branches|
|
|<leader>gb|git_branches|
|
||||||
|
|
||||||
Genreal git commands:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
:Git <command>
|
|
||||||
|
|
||||||
#Commands with dedicated display
|
|
||||||
:Git # show nice interactive summary of whole git project state
|
|
||||||
:Git mergetool, :Git difftool # load their changesets into the quickfix list
|
|
||||||
:Git blame # this will nicely show \
|
|
||||||
# for every line in separate split
|
|
||||||
# Useful shortcuts for blame mode:
|
|
||||||
# o - jump to patch or blob in horizontal split
|
|
||||||
# A, C, D - different display (lenght) modes
|
|
||||||
# g? - other keybindings
|
|
||||||
|
|
||||||
#other examples:
|
|
||||||
:Git add .
|
|
||||||
:Git commit
|
|
||||||
```
|
|
||||||
|
|
||||||
Nice single file diff viewer:
|
|
||||||
|
|
||||||
```
|
|
||||||
:Gdiffsplit
|
|
||||||
```
|
|
||||||
|
|
||||||
GitSings provides some commands for displaying git stuff:
|
GitSings provides some commands for displaying git stuff:
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,19 @@ require("lazy").setup({
|
||||||
'rmagatti/auto-session',
|
'rmagatti/auto-session',
|
||||||
opts = require('plugins.auto-session').config
|
opts = require('plugins.auto-session').config
|
||||||
},
|
},
|
||||||
{ 'tpope/vim-fugitive' },
|
{
|
||||||
|
"NeogitOrg/neogit",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim", -- required
|
||||||
|
"sindrets/diffview.nvim", -- optional - Diff integration
|
||||||
|
|
||||||
|
-- Only one of these is needed, not both.
|
||||||
|
"nvim-telescope/telescope.nvim", -- optional
|
||||||
|
"ibhagwan/fzf-lua", -- optional
|
||||||
|
},
|
||||||
|
config = true
|
||||||
|
},
|
||||||
|
|
||||||
{ 'Glench/Vim-Jinja2-Syntax', priority = 15 },
|
{ 'Glench/Vim-Jinja2-Syntax', priority = 15 },
|
||||||
{ 'vmware-archive/salt-vim', priority = 10 },
|
{ 'vmware-archive/salt-vim', priority = 10 },
|
||||||
{ 'stephpy/vim-yaml' }, -- for proper sls syntax highlighting when jinja
|
{ 'stephpy/vim-yaml' }, -- for proper sls syntax highlighting when jinja
|
||||||
|
|
Loading…
Reference in a new issue