vimdiff

VimDiff E93: More than one match for RE

本秂侑毒 提交于 2020-08-06 08:11:17
问题 So I am new to using vimdiff, however I feel like there is some error. Whenever I try to choose the changes from the remote repository with the command: :diffg RE I get the error: E93: More than one match for RE Not sure where this is coming from or how to solve it. I was pretty surprised that stack overflow doesn't seem to have this problem posted anywhere. Thanks in advance to anyone who can help :) 回答1: There's probably one of the file paths that match the string "RE". Try :diffget REMOTE

Save vimdiff output?

早过忘川 提交于 2020-04-07 11:27:58
问题 I google'd this multiple times in the past but I've never found an answer. Is there a way to save vimdiff's output (preferably while maintaining colors, highlights, etc.)? I'd like to send this one output file to other people and tell them "just open this file, here are the differences, side by side and highlighted". If there are better alternatives to vimdiff for this purpose, I'm open to suggestions - something that would work on both Windows and Linux platforms is ideal. 回答1: Vim can

Save vimdiff output?

落花浮王杯 提交于 2020-04-07 11:27:51
问题 I google'd this multiple times in the past but I've never found an answer. Is there a way to save vimdiff's output (preferably while maintaining colors, highlights, etc.)? I'd like to send this one output file to other people and tell them "just open this file, here are the differences, side by side and highlighted". If there are better alternatives to vimdiff for this purpose, I'm open to suggestions - something that would work on both Windows and Linux platforms is ideal. 回答1: Vim can

Vimdiff: How to put all changes inside a particular function from one file to another?

无人久伴 提交于 2020-01-01 09:08:40
问题 In Vimdiff, I know I can use "do" or "dp" to move changes from one file to the other...but these are for individual changes. If I have to undo all changes inside a specific scope/selection (say undo all changes to a particular function, but leave the rest untouched), is there a way to do it in one go ? 回答1: You can use a visual selection and the ex command :diffget / :diffput So, for example to get the changes for just the current insides of a code block ( { ... } ) Vi}:diffget<Enter> To put

How do I make gvimdiff opened by git mergetool open all files at once in tabs?

烈酒焚心 提交于 2019-12-24 09:35:30
问题 Normally git -c merge.tool=gvimdiff mergetool opens files to be merged on by one, in batch mode: Normal merge conflict for '...': {local}: modified file {remote}: modified file 4 files to edit ... seems unchanged. Was the merge successful? [y/n] n merge of ... failed Continue merging other unresolved paths (y/n) ? y Normal merge conflict for '...': {local}: modified file {remote}: modified file 4 files to edit modules ... seems unchanged. Was the merge successful? [y/n] n merge of modules ...

Force git show to show diff using vimdiff

南笙酒味 提交于 2019-12-23 19:15:19
问题 How do I do this? After doing changes via git config I can diff my staged and committed changes with vimdiff but when I do git show I still see the diff in old plain style. How do I make this work for git show as well? 回答1: With git show you can show objects like commits (see the man page for reference). So you don't show a diff of two files, but changes in (maybe multiple) files. So there are not two files, which can be compared. But that is exactly what vimdiff does, it opens two files side

VIM - Passing colon-commands list via command-line

独自空忆成欢 提交于 2019-12-21 17:08:26
问题 Good day, I am writing a simple script within my BASHRC file to accommodate something I couldn't quite resolve in a previous question: Side-by-side view in Vim of svn-diff for entire directory I basically generate a list of all files which have a "Modified" SVN status. For each of these files, I want to create a side-by-side visual diff, convert it to HTML, then append it to a running HTML file. eg: MODIFIED_FILES="$(svn status | grep "^M" | cut -c9-)" for i in ${MODIFIED_FILES}; do #

How do I toggle between a Vertical and a Horizontal split in vimdiff?

 ̄綄美尐妖づ 提交于 2019-12-20 09:46:33
问题 I already know how to use the diffopt variable to start diff mode with horizontal/vertical splits but not how to toggle between the two when I already have two files open for comparison. I tried the accepted answer found in this older post, but to no avail. The Ctrl+W commands didn't work for me. Perhaps because I'm running gVim in Windows-friendly mode? 回答1: The following command will change a vertical split into a horizontal split: ctrl + w then J To change back to a vertical split use

How can I make git difftool to use gvim (gvimdiff)?

戏子无情 提交于 2019-12-20 03:28:09
问题 There seems to have been a change in git which makes it no longer work correctly with gvim as the diff tool. Specifically, I always used to use the gvim -geometry flag to maximize the window. Now, I end up with one of the windows blank (empty/zero line file). 回答1: OK, I found the answer. In order to work correctly, gvim must stay in the foreground and NOT fork a new process as usual. This is accomplished by using the "-f" or "--nofork" flag when starting gvim (or gvimdiff). I have now setup

Vimdiff - How to extract similar lines in files and output them to a file

自闭症网瘾萝莉.ら 提交于 2019-12-18 09:18:59
问题 I am new to vimdiff and had a question about outputting the similarities of the two or more files into a new file. For example, based on the following picture I would like to have b,c,e,f,a along with the names of the two files being compared outputted to a different file. An example file template for this might be: [file1's name][file2's name] lines that were similar between both files Is there any built in vim command to do this or some bash script I could write that would be able to