christianmlong + diff   46

Exclude a directory from git diff - Stack Overflow
git diff previous_release..current_release -- . ':!spec'

This is a newish git feature which allows excluding certain paths. It should be more reliable than various shell oneliners.
git  diff  exclude  path 
march 2019 by christianmlong
Good-lookin' diffs. Actually… nah… The best-lookin' diffs. 🎉
diff-so-fancy strives to make your diff's human readable instead of machine readable. This helps improve code quality and help you spot defects faster.
git  diff  plugin  format 
november 2017 by christianmlong
unix - How to compare two files for non-printing characters - Super User
I think an easier way is just to pipe your diff output through cat -t

diff file1 file2 | cat -t

This method also works simply with various version control tools

bzr diff | cat -t
diff  non-printing  characters 
september 2016 by christianmlong
bash - Comparison function that compares two text files in Unix - Stack Overflow
You can use these command in a shell if statement:

if cmp -s "$file1" "$file2"
then
echo "The files match"
else
echo "The files are different"
fi
bash  compare  script  diff  cmp 
august 2016 by christianmlong
A noob question, exiting out of Gdiff · Issue #36 · tpope/vim-fugitive
For the past couple of days I've been immediately switching (manually) to the stage buffer after :Gdiff to see what it would be like. I really like it. I just have to train myself to use do instead of dp to stage changes.

My usual flow now:

:Gdiff
<C-w><C-h> (Switch to stage buffer.)
gg (Go to the top of the file.)
]c (Go to next change.)
do, if I want to stage the change.
Repeat from Step 4 until I get to the bottom of the file.
:wq
If I'm ready to commit, :Gcommit

It feels pretty smooth.
@blueyed
blueyed commented on Mar 15, 2013

@Peeja
you might want to try my "gd" and "gD" mappings then: ",gd" for ":Gdiff" and ",gD" to close the diff (via a function); I have mentioned this above already, but here's a link again: https://github.com/blueyed/dotfiles/blob/master/vimrc#L1067
@Peeja
Peeja commented on Mar 15, 2013

@blueyed How do you write the buffer before closing it?
@blueyed
blueyed commented on Mar 15, 2013

Vim asks me, if I want to write the changes (if there are any).
@yevgenko
yevgenko commented on Apr 13, 2013

I've posed the similar question on SO, ended up with the following mapping:

nnoremap <Leader>gD <c-w>h<c-w>c
vim  git  fugitive  workflow  diff  vimdiff  key  mappings 
march 2016 by christianmlong
best workflow when using fugitive? : vim
" fugitive git bindings
nnoremap <space>ga :Git add %:p<CR><CR>
nnoremap <space>gs :Gstatus<CR>
nnoremap <space>gc :Gcommit -v -q<CR>
nnoremap <space>gt :Gcommit -v -q %:p<CR>
nnoremap <space>gd :Gdiff<CR>
nnoremap <space>ge :Gedit<CR>
nnoremap <space>gr :Gread<CR>
nnoremap <space>gw :Gwrite<CR><CR>
nnoremap <space>gl :silent! Glog<CR>:bot copen<CR>
nnoremap <space>gp :Ggrep<Space>
nnoremap <space>gm :Gmove<Space>
nnoremap <space>gb :Git branch<Space>
nnoremap <space>go :Git checkout<Space>
nnoremap <space>gps :Dispatch! git push<CR>
nnoremap <space>gpl :Dispatch! git pull<CR>
git  vim  fugitive  plugin  workflow  diff  vimdiff  key  mappings 
march 2016 by christianmlong
chrisbra/vim-diff-enhanced: Better Diff options for Vim
This plugin allows you to make use of the Patience diff algorithm for generating diffs to use with Vim. This needs the git command line tool available.

You can also customize your setup to use any other tool to generated diffs (e.g. mercurial) Read the help on how to configure the plugin accordingly.
vim  diff  patience 
february 2016 by christianmlong
vimdiff - vim: diff two sections in two files, but not the entire file? - Super User
It sounds like linediff.vim might be what you want: “Perform an interactive diff on two blocks of text”.

You specify each block (line range) with its :Linediff command (e.g. :4,10Linediff, or do a visual selection first, then type :Linediff (which comes out as :'<,'>LineDiff)). The ranges can be from the same file/buffer or different ones. Once you have specified two ranges, it opens a new tab that has two new, diff-mode buffers (in a split) for the specified ranges. You can edit and :w in either of these buffers to update the original ranges. When you are done, :q out of the diff buffers and :LinediffReset to get rid of the range specifiers in the original buffers.
vim  diff  linediff  instructions 
september 2015 by christianmlong
(Vim)diff two subroutines in same file - Stack Overflow
Plugin linediff.vim : Perform an interactive diff on two blocks of text is similar to the one pointed ou by Vincent with some additional features:

has a command to close the opened buffer
seems to work without GUI
insert some visual indication on the original file(s) being diffed.

To use it you perform a visual selection on the first block to diff, enter command :Linediff, and repeat it to the second block. To quit, :LineDiffReset
vim  diff  linediff  plugin 
september 2015 by christianmlong
linediff.vim - Perform an interactive diff on two blocks of text : vim online
This plugin provides a simple command, ":Linediff", which is used to diff two separate blocks of text. Here's a simple example:

def one
two
end

def two
three
end

If we mark the first three lines, starting from "def one", in visual mode, and execute the ":Linediff" command, the signs "1-" will be placed at the start and at the end of the visual mode's range. Doing the same thing on the bottom half of the code, starting from "def two", will result in the signs "2-" placed there. After that, a new tab will be opened with the two blocks of code in vertical splits, diffed against each other.
vim  plugin  linediff  diff  vimdiff 
september 2015 by christianmlong
colors - Coloring white space in git-diff's output - Stack Overflow
In git before 2.5, this is the way to see trailing whitespace in diffs. In git >= 2.5, use the new --ws-error-highlight option instead.

"""
Use git diff -R to turn removed lines into added lines. Then trailing whitespace will be highlighted.
"""
git  whitespace  diff 
august 2015 by christianmlong
How do you exit vimdiff mode in vim, specifically, for Fugitive? - Stack Overflow
UPDATE2: My current mappings (closes diff window only!)

"vimdiff current vs git head (fugitive extension)
nnoremap <Leader>gd :Gdiff<cr>
"switch back to current file and closes fugitive buffer
nnoremap <Leader>gD <c-w>h<c-w>c
git  vim  diff  vimdiff  fugitive 
august 2015 by christianmlong
No formula for Meld? · Issue #36824 · Homebrew/homebrew
The correct commands are either

brew install homebrew/x11/meld

or

brew tap homebrew/x11
brew install meld
homebrew  install  meld  diff  osx 
august 2015 by christianmlong
Shorthand for diff of git commit with its parent? - Stack Overflow
Show the changes introduced in one git commit

git show aaea5ca

or

git diff aaea5ca^!

or

git difftool aaea5ca^!
git  diff  one  commit  changes 
july 2015 by christianmlong
vim - What's the recommended way of copying changes with vimdiff? - Unix & Linux Stack Exchange
]c - advance to the next block with differences
[c - reverse search for the previous block with differences
do (diff obtain) - bring changes from the other file to the current file
dp (diff put) - send changes from the current file to the other file
zo - unfold/unhide text
zc - refold/rehide text
zr - unfold both files completely
vim  diff  vimdiff  shortcuts 
july 2015 by christianmlong
Meld
An open-source visual diff tool
visual  diff  osx  linux 
march 2013 by christianmlong
How do I apply a diff patch on windows? - Stack Overflow
Get the gnuwin32 utilities ( I use the GetGnuWin32 program)
Make sure C:\GnuWin32\bin is on your path

To make the patch
diff -rup original_dir modified_dir > patchfile.patch

To apply the patch
patch --dry-run --verbose --input=patchfile.patch --directory=dir_to_patch
windows  patch  merge  apply  diff 
june 2011 by christianmlong
xdocdiff WinMerge Plugin -Compare Word, Excel, PowerPoint, pdf-
With this plugin, you can compare these files.

.rtf Rich Text
.docx/.docm Microsoft WORD 2007(OOXML)
.xlsx/.xlsm Microsoft Excel 2007(OOXML)
.pptx/.pptm Microsoft PowerPoint 2007(OOXML)
.doc
Microsoft WORD ver5.0/95/97/2000/XP/2003
.xls Microsoft Excel ver5.0/95/97/2000/XP/2003
.ppt Microsoft PowerPoint 97/2000/XP/2003
.sxw/.sxc/.sxi/.sxd OpenOffice.org
.odt/.ods/.odp/.odg Open Document
.wj2/wj3/wk3/wk4/123 Lotus 123
.wri Windows3.1 Write
.pdf Adobe PDF
.mht Web Archive
.eml Exported files from OutlookExpress
diff  pdf  winmerge 
february 2011 by christianmlong
Oracle DBMS_METADATA
AIP reference for the dbms_metadata package. Also an interesting schema diff example.
oracle  diff  schema  compare  ddl  export  utility  api  reference  dbms_metadata 
july 2010 by christianmlong
Tapping into Oracle's Metadata - Part 2 | Oracle FAQ
This article takes on the task of comparing the tables in two different schemas to see where the differences are. Keep in mind this example could quickly be converted to compare any types of objects or you could extend the code to accept the object types to compare
oracle  diff  schema  compare  ddl  export  utility 
july 2010 by christianmlong
Generating Objectlistreport - Oracle DBA Forums
ifcmp60.exe MODULE=MYFORM LOGON=NO FORMS_DOC=YES BATCH=YES WINDOW_STATE=MINIMIZE For individual forms, go to File-> Administration->Object List Report
oracle  forms  convert  text  diff 
october 2007 by christianmlong

Copy this bookmark:



description:


tags: