2013年2月20日 星期三

Ubuntu 12.04 GVim Workaround for Hanging

Create a file named "gvim" in your $PATH, add following contents, and "chmod +x gvim"

#!/usr/bin/python

import subprocess
import sys

def main():
    dev_null = open('/dev/null', 'w+')
    arg = ['/usr/bin/gvim', '-f'] + sys.argv[1:]
    subprocess.Popen(arg, stdout=dev_null, stderr=dev_null)

if __name__ == '__main__':
    main()

沒有留言:

張貼留言