https://github.com/aileot/vim-gitrebase-commander
Keymappings to replace gitrebase-commands (pick, reword, edit, ...)
https://github.com/aileot/vim-gitrebase-commander
gitrebase vim
Last synced: 12 months ago
JSON representation
Keymappings to replace gitrebase-commands (pick, reword, edit, ...)
- Host: GitHub
- URL: https://github.com/aileot/vim-gitrebase-commander
- Owner: aileot
- License: mit
- Created: 2020-07-28T15:09:04.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-28T15:44:20.000Z (almost 6 years ago)
- Last Synced: 2025-02-09T01:38:38.579Z (over 1 year ago)
- Topics: gitrebase, vim
- Language: Vim script
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gitrebase Commander
Replace gitrebase-commands (`pick`, `reword`, `edit`, ...) by simple keymappings
## Installation
Use your favorite plugin manager
### For dein
```vim
call dein#add('kaile256/vim-gitrebase-commander')
```
or in toml,
```toml
[[plugins]]
repo = 'kaile256/vim-gitrebase-commander'
```
## Usage
### Default mappings
```vim
let g:gitrebase_commander#prefix = 'z'
let g:gitrebase_commander#suffixes = {
\ 'p': 'pick',
\ 'r': 'reword',
\ 'e': 'edit',
\ 's': 'squash',
\ 'f': 'fixup',
\ 'x': 'exec',
\ 'b': 'break',
\ 'd': 'drop',
\ 'l': 'label',
\ 't': 'reset',
\ 'm': 'merge',
\ }
```
### Excerpt from a gitrebase file
```gitrebase
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop = remove commit
# l, label = label current HEAD with a name
# t, reset = reset HEAD to a label
# m, merge [-C | -c ] [# ]
# . create a merge commit using the original merge commit's
# . message (or the oneline, if no original merge commit was
# . specified). Use -c to reword the commit message.
```
### Excuse about default prefix `z`
Do you use these default mappings while editing gitrebase?
- `zr` to reduce fold
- `zf` to create fold
- `zx` to update fold
- `zd` to delete fold
- `zm` to fold more
- `zs`, `ze` or `zl` to scroll horizontally
- `zt` to redraw, line `[count]` at top of window
- `zb` to redraw, line `[count]` at bottom of window