vim: Allow override of default location for gn binary

With this, something like:

  let g:gn_path = "/work/fuchsia/prebuilt/third_party/gn/linux-x64/gn"

lets gn-format.py use the correct binary for formatting. This follows
the convention used by clang-format.py:
https://github.com/llvm/llvm-project/blob/aee9448939cdee5064e65225d1039e7e7f0facc7/clang/tools/clang-format/clang-format.py#L40

Change-Id: Ibd729dc3458927016dfeb79f08e611caeb671dda
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/6120
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
diff --git a/tools/gn/misc/vim/gn-format.py b/tools/gn/misc/vim/gn-format.py
index 7e5d6a4..6170851 100644
--- a/tools/gn/misc/vim/gn-format.py
+++ b/tools/gn/misc/vim/gn-format.py
@@ -21,6 +21,8 @@
 
 # Change this to the full path if gn is not on the path.
 binary = 'gn'
+if vim.eval('exists("g:gn_path")') == "1":
+  binary = vim.eval('g:gn_path')
 
 def main():
   # Get the current text.