logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Vimdiff 2 and 3-way merge support: msg#00099

Subject: Re: Vimdiff 2 and 3-way merge support
Nathaniel Smith wrote:
On Mon, Feb 14, 2005 at 04:17:12PM -0600, Matthew A. Nicholson wrote:

Here is a patch to std_hooks.lua to add vimdiff support for 2 and 3 way merge. For the merge to work, the user must save all changes in the left-most file in the vim window. (they will also have to press enter to vim's prompt when it starts)


Cool, thanks.

Umm... can you confirm that these actually work, in light of your last
email message, though?  I'll wait to apply them until then :-).

-- Nathaniel


Fixed.  Gvim was backgrounding it self.

--
Matthew A. Nicholson
Matt-land.com
--- std_hooks.lua       2004-12-31 02:16:56.000000000 -0600
+++ ../mon/std_hooks.lua        2005-02-14 16:00:52.000000000 -0600
@@ -132,6 +132,16 @@
 
 -- merger support
 
+function merge2_vim_cmd(vim, lfile, rfile, outfile)
+   local cmd_fmt = "%s -d -c \"file %s\" \"%s\" \"%s\""
+   return string.format(cmd_fmt, vim, outfile, lfile, rfile)
+end
+
+function merge3_vim_cmd(vim, lfile, afile, rfile, outfile)
+   local cmd_fmt = "%s -d -c \"file %s\" \"%s\" \"%s\" \"%s\""
+   return string.format(cmd_fmt, vim, outfile, lfile, afile, rfile)
+end
+
 function merge2_emacs_cmd(emacs, lfile, rfile, outfile)
    local elisp = "'(ediff-merge-files \"%s\" \"%s\" nil \"%s\")'"
    local cmd_fmt = "%s -no-init-file -eval " .. elisp
@@ -211,6 +221,10 @@
          cmd = merge2_emacs_cmd("emacs", lfile, rfile, outfile)
       elseif program_exists_in_path("xemacs") then
          cmd = merge2_emacs_cmd("xemacs", lfile, rfile, outfile)
+      elseif program_exists_in_path("gvim") then
+         cmd = merge2_vim_cmd("gvim -f", lfile, rfile, outfile)
+      elseif program_exists_in_path("vim") then
+         cmd = merge2_vim_cmd("vim", lfile, rfile, outfile)
       end
 
       if cmd ~= nil
@@ -259,6 +273,10 @@
          cmd = merge3_emacs_cmd("emacs", lfile, afile, rfile, outfile)
       elseif program_exists_in_path("xemacs") then
          cmd = merge3_emacs_cmd("xemacs", lfile, afile, rfile, outfile)
+      elseif program_exists_in_path("gvim") then
+         cmd = merge3_vim_cmd("gvim -f", lfile, afile, rfile, outfile)
+      elseif program_exists_in_path("vim") then
+         cmd = merge3_vim_cmd("vim", lfile, afile, rfile, outfile)
       end
 
       if cmd ~= nil
_______________________________________________
Monotone-devel mailing list
Monotone-devel@xxxxxxxxxx
http://lists.nongnu.org/mailman/listinfo/monotone-devel
Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe