Skip to content

help , how to use vim-diff #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
colinvivy opened this issue Feb 8, 2012 · 6 comments
Closed

help , how to use vim-diff #1

colinvivy opened this issue Feb 8, 2012 · 6 comments

Comments

@colinvivy
Copy link

hello ynkdir !

First of all ,thank you for this vim-diff plugin for vim , but I don't know how to use it ... poor man ..

I copy "autoload/vim.diff" to "~/.vim/autoload/" , and add some config ":set runtimepath+=/path/to/vim-diff :set iffexpr=diff#diffexpr()
" in my gvimrc . restart vim ,using vimdiff command , it doesn't work.

Cound you show me more detail about this ?

Best Regards!

@ynkdir
Copy link
Owner

ynkdir commented Feb 8, 2012

Hi colinvivy.

vimdiff command doesn't load gvimrc.
Add those config to vimrc (not gvimrc).
Or use gvimdiff command.

vim-diff only works for 2-file diff.

@ynkdir
Copy link
Owner

ynkdir commented Feb 8, 2012

vim-diff only works for 2-file diff.

I was mistaken. It seems that 'diffexpr' also works for 3-file diff...

@colinvivy
Copy link
Author

Hi, ynkdir .
I am so sorry , I am late .

My editor is vim for Mac OS X, so I can only find gvimrc .
And I try to use gvimdiff , it still doesn't work , leave this error information: Not an editor command: gvimdiff

Anything wrong with im my MacVim ?

@ynkdir
Copy link
Owner

ynkdir commented Feb 14, 2012

I am so sorry , I am late .

No problem.

vimdiff and gvimdiff are not vim's command. You can run these command
from shell. If these command are not installed in your system, you can
use '-d' option.

$ vim -d file1 file2
# or
$ gvim -d file1 file2

Another way to view diff, you can use :diffsplit ex-command. Try the following command in Vim.

:edit file1
:diffsplit file2

If you use vim, add the following command to your ~/.vimrc.
If you use gvim, add the following command to your ~/.vimrc or ~/.gvimrc
If the file is not exist, create new file.

:set runtimepath+=/path/to/vim-diff
:set diffexpr=diff#diffexpr()

Replace /path/to/vim-diff to actual directory where you downloaded
vim-diff. If you copied diff.vim to your ~/.vim/autoload/ directory,
you don't need to set ":set runtimepath+=...".

@colinvivy
Copy link
Author

well , at last I use this way to diff file

:edit file1
:diffsplit file2

Thank you for your patience , So kind of you !

@ynkdir
Copy link
Owner

ynkdir commented Feb 14, 2012

You are welcome.

@ynkdir ynkdir closed this as completed Feb 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants