Thread (11 messages) flat view 11 messages, 5 authors, 2016-06-15

Re: Extremely simple Vim interface for Git

From: Teemu Likonen <hidden>
Date: 2016-06-15 22:45:19

Michael Wookey wrote (2008-09-07 20:32 +1000):
If you alter the RunShellCommand() function to the following -
      if stridx(a:cmdline, "diff") > 0
          set filetype=diff
      endif
Then Vim will apply diff syntax highlighting to the scratch buffer
when a "diff" command is executed.
Good idea. I implemented the same thing this way:

    if match(a:cmdline,'\v^(git|hg|svn|bzr) diff') >= 0
        setlocal filetype=diff
    endif
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help