tag:blogger.com,1999:blog-6637736252081011583.post4460496613377339678..comments2023-10-23T11:13:47.199-07:00Comments on Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: Diffing From Inside VimTravis Whittonhttp://www.blogger.com/profile/14592647486468034166noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6637736252081011583.post-15243490378066698052009-09-18T06:19:29.886-07:002009-09-18T06:19:29.886-07:00Hi guys,
Running VIM under putty or other termina...Hi guys,<br /><br />Running VIM under putty or other terminal window, if you accidentally roll the mouse-wheel will cause the actual terminal buffer to be scrolled.<br />I found out this can be overridden by setting:<br /><br />:set mouse=a<br /><br />Which will make VIM mouse sensitive even if run within a terminal window. <br />Rolling the mouse-wheel will make the actual vim buffer to scroll.;)<br />Didn´t find a way to contribute to your blog so I am leaving this comment.<br /><br />Thanks,<br /><br />-<br />Miguel Mattos <br />http://mmmattos.net<br />+55 51 9198-9914Miguelhttps://www.blogger.com/profile/02225616069413022974noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-67140364974797803472009-09-15T20:59:37.510-07:002009-09-15T20:59:37.510-07:00After you close one of the buffers, the remaining ...After you close one of the buffers, the remaining document will still be in 'diff' mode, with folding, ugly highlighting, etc. :diffoff does the trick.Greg Whitescarverhttps://www.blogger.com/profile/09235651080908874850noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-65236850769432184182009-09-15T11:36:39.664-07:002009-09-15T11:36:39.664-07:00If you have 2 buffers open, running ':diffthis...If you have 2 buffers open, running ':diffthis' in each buffer will also produce the vimdiff effect. This is handy if you have data that has not been saved to a file.Unknownhttps://www.blogger.com/profile/06810530381034457718noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-73996960264743129252009-09-14T11:47:13.409-07:002009-09-14T11:47:13.409-07:00A couple of useful (related) scripts:
DirDiff mak...A couple of useful (related) scripts:<br /><br /><a href="http://www.vim.org/scripts/script.php?script_id=102" rel="nofollow">DirDiff</a> makes it easy to diff two directories with vim.<br /><br /><a href="http://www.vim.org/scripts/script.php?script_id=90" rel="nofollow">VCSCommand</a> includes a VCSVimDiff command which will diff against a version of the current file in the VCS of your choice.Unknownhttps://www.blogger.com/profile/07465728195692896413noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-7310172751882671852009-09-14T07:54:59.248-07:002009-09-14T07:54:59.248-07:00I use the following mapping to make it quick and e...I use the following mapping to make it quick and easy. This diffs from version saved to disk; usefull when I want to make sure I have not made any errant keystrokes before saving.<br /><br />"DiffOrig Mapping.<br />function! DiffOrig()<br /> if &diff<br /> wincmd p | bdel | diffoff<br /> else<br /> vert new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis<br /> endif<br />endfunction<br />map -leader-do :call DiffOrig() -cr-Anonymousnoreply@blogger.com