opening sublime text from windows git bash

后端 未结 11 2042
有刺的猬
有刺的猬 2021-01-30 09:15

How do I open Sublime text from Git Bash in Windows? I tried adding the alias at the ~/.bashrc file but nothing worked. I was looking for something very easy but I could not fin

11条回答
  •  深忆病人
    2021-01-30 10:06

    1. Create a text file called subl (with no extension) with the following content:

      #!/bin/sh
      "C:\Program Files\Sublime Text 2\sublime_text.exe" $1 &
      
    2. Copy it into the C:\Program Files (x86)\Git\bin folder. 32bit Copy it into the C:\Program Files\Git\usr\bin folder. 64bit

    Now to open the file enter the following command on Windows Git Bash

    subl text.txt
    

    or

    subl .
    

提交回复
热议问题