https://github.com/medvind2140/vimdiffer
Quick and easy diffing from clipboard into terminal and Vim
https://github.com/medvind2140/vimdiffer
bash devops vim
Last synced: about 2 months ago
JSON representation
Quick and easy diffing from clipboard into terminal and Vim
- Host: GitHub
- URL: https://github.com/medvind2140/vimdiffer
- Owner: Medvind2140
- Created: 2024-10-30T09:14:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-31T08:43:36.000Z (over 1 year ago)
- Last Synced: 2025-02-12T10:33:30.344Z (over 1 year ago)
- Topics: bash, devops, vim
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
An easy tool to open a file in Vim with a vertical split for diffing against clipboard content.

## INSTALL
NOTE! The setup script installs xclip.
1. Clone the vimdiffer-setup.sh to your home folder(or anyone you like)
2. Make the script executable, then run it as sudo in your terminal
```bash
chmod +x .vimdiffer-setup.sh
sudo ./vimdiffer-setup.sh
```
3. Read the instructions!
## USAGE
1. copy your new code/text to the clipboard
2. run it
```bash
vimdiffer
```
3. diff away!
## VIM INSTRUCTIONS
Key commands in Vim diff mode (NOTE! not INSERT mode):
```md
]c : Jump to the next difference
[c : Jump to the previous difference
do : Obtain the difference from the other window (clipboard content)
zf : Toggle folds
u : Undo
r : Redo
:diffupdate : Refresh the diff highlighting
:w : Write file
:qa : Quit all windows
:wqa! : Write and Quit all windows
```
TIP! Setup aliase vd="vimdiffer" in your .bashrc or .bash_aliases file.