Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to open a file with Sublime in Git Bash

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to use Sublime to open files in Git Bash. It is very detailed and has certain reference value. Friends who are interested must finish reading it.

Every time you have to click with the mouse to open the file with sublime! So unscientific! Today, let's configure to open files with sublime in git bash.

Method

Create a new file and name it the command you want, such as subl (note that you cannot have a suffix), with the following contents:

#! / bin/sh "C:\ Program Files\ Sublime Text 3\ sublime_text.exe" $1 &

The first line says it's a shell script.

The string on the second line is the installation directory of sublime. Note that you need to enter your own directory here.

The $1 in the second line is the parameter entered after the fetched command

The second line & this command is opened in the background so that after sublime is turned on, it will not block your git bash

Save to C:\ Program Files (x86)\ Git\ mingW32\ bin directory (your git directory may be different from mine, please change it to your own)

The work is done.

Use method subl xxx

If xxx already exists, open the existing file, and if it does not, open a new file named xxx.

Expansion

It's not just sublime, it feels like we can set more in this way, such as opening .html files with chrome, and so on.

Discover a bigger world ~ yeah!

The above is all the contents of the article "how to open a file with Sublime in Git Bash". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report