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
# Generate a side-by-side diff in vim via VIMDIFF
# Convert via ToHTML
# Append the HTML file to a file called "overall_diff.html"
done
I can accomplish the vimdiff easily enough by creating a clean copy of the file, and having a copy of the modified file.
vimdiff
has an issue at first, ie:
2 files to edit
Error detected while processing /Users/Owner/.vimrc:
line 45:
E474: Invalid argument: listchars=tab:>-,trail:.,extends:>,precedes:«
Press ENTER or type command to continue
So, I am trying to get past this so I don't have to hit ENTER for each file in my list.
Next, I need to have vimdiff
call the ToHTML
command, and then issue the command to append the HTML buffer to a running file:
:'<,'>w! >>overall_diff.html
In short, how do I:
- Get past this issue with
listchars
whenvimdiff
is called. This issue doesn't occur when I runvim
, so I don't know why it occurs when I runvimdiff
. - Pass a list of colon-commands to VIM to have it run them at
startup
without requiring a change to my.vimrc
file.