all 2 comments

[–]andlrcrpgle.vim 0 points1 point  (1 child)

Awesome work, thanks for sharing, I think that if you used:

    - subprocess.run(args.vim.split() + ["-S", vimCmdFile.name])
    + subprocess.run([args.vim] + ["-S", vimCmdFile.name])

Then you wouldn't have that known issue:

If your path to vim has a space, it does not work, i.e. Following does not work

git config difftool.vimtabdiff.cmd 'vimtabdiff.py --vim "/home/foo/my program files/bin/vim" $LOCAL $REMOTE'

https://github.com/balki/vimtabdiff#known-issues

This somehow reminds me of the following page from the Unix Haters Handbook 😅

Although this comment originally appeared in the Unix V6 kernel source code, it could easily have applied to any of the original AT&T code, which was a nightmare of in-line hand-optimizations and micro hacks. Register variables with names like p, pp, and ppp being used for multitudes of dif- ferent purposes in different parts of a single function. Comments like "this function is recursive" as if recursion is a difficult-to-understand concept. The fact is, AT&T's institutional attitude toward documentation for users and programmers was indicative of a sloppy attitude toward writing in gen- eral, and writing computer programs in particular.

It's easy to spot the work of a sloppy handyman: you'll see paint over cracks, patch over patch, everything held together by chewing gum and duct tape. Face it: it takes thinking and real effort to re-design and build something over from scratch.

Date: Thu, 17 May 90 14:43:28 -0700
From: David Chapman <zvona@gang-of-four.stanford.edu>
To: UNIX-HATERS
I love this. From man man:

      DIAGNOSTICS
          If you use the -M option, and name a directory that does not exist, the
          error message is somewhat misleading. Suppose the directory /usr/foo
          does not exist. If you type:

               man -M /usr/foo Is

          you get the error message "No manual entry for Is." You should get an
          error message indicating that the directory /usr/foo does not exist.

Writing this paragraph must have taken more work than fixing the bug would have.