下面由sublime教程栏目给大家介绍怎么2步实现在Git Bash中用Sublime打开文件,希望对需要的朋友有所帮助!
每次都要用鼠标点来点去才能用sublime打开文件!太不科学!今天来配置一下在git bash中用sublime打开文件
方法
- 新建一个文件命名为你想要的命令,比如
subl
(注意不能有后缀名),内容:
#!/bin/sh"C:\Program Files\Sublime Text 3\sublime_text.exe" $1 &
- 第一行是说这是个 shell 脚本
- 第二行的字符串是sublime 的安装目录注意这里要输入你自己的目录
- 第二行的$1 是取的命令之后输入的参数
- 第二行的&是此命令在后台打开,这样sublime打开之后,就不会阻塞你的git bash
- 保存到
C:\Program Files (x86)\Git\mingW32\bin
目录下(你的git目录可能与我的不一样,注意改成你自己的) - 大功告成~
使用方法
subl xxx
如果xxx
已存在,则打开已存在的文件,如果不存在则打开新文件命名为xxx
。
扩展
不光是sublime,感觉用这种方法我们就可以设置更多了,比如用chrome打开.html
文件等等。
发现更大的世界~yeah!
The above is the detailed content of 2 steps to open files with Sublime in Git Bash. For more information, please follow other related articles on the PHP Chinese website!

SublimeTextisfreeduringanunlimitedtrial,buta$99licenseisrecommendedforregularuse.1)Thetrialallowsfullfeatureaccesswithouttimelimits.2)Alicenseoffersperpetualuse,futureupdates,andremovespurchasereminders,enhancingproductivityandsupportingdevelopers.

SublimeText can greatly improve work efficiency. 1) Multiple selection and multicursor functions allow editing of multiple positions at the same time, 2) Command panel provides fast function access, 3) Macros and fragments can automate common operations, 4) Optimized configuration and shortcut key use can improve performance and efficiency.

SublimeText offers a free trial, but ultimately requires a paid purchase for a permanent authorization. 1) During the free trial period, users can experience its functions, but they will receive a purchase prompt. 2) After purchase, users can use it permanently, no subscription fee, and access more plug-ins and themes.

ThemaindifferencesbetweenthepaidandunpaidversionsofSublimeTextaretheremovalofstatusbarremindersandoccasionalpop-uppromptsinthepaidversion.1)Unregisteredversion:fullyfunctionalwithallcorefeatureslikesyntaxhighlighting,codecompletion,andcommandpalette,

SublimeText is worth buying. 1) Its simple interface and powerful functions, such as multi-line editing and GotoAnything, improve development efficiency. 2) Rich plug-in ecosystem, such as Anaconda, enhances the development experience. 3) Although the price is $70, its performance and fluency are great value for professional developers.

SublimeText is loved by developers for its powerful code completion and syntax highlighting capabilities. 1) Code completion can automatically prompt function names, variable names, etc. to improve programming efficiency. 2) Syntax highlighting distinguishes code elements through different colors to improve readability and error detection speed.

SublimeTextisidealforthosevaluingspeedandsimplicity,whileVSCodesuitsthoseneedingextensivefeaturesandcustomization.SublimeTextoffersquickfileaccesswith"GotoAnything"andaminimalisticapproach,butmaylackout-of-the-boxfunctionality.VSCodeprovide

SublimeTextisapowerfulcodingcompanionduetoitsspeed,customization,andkeyfeatures.1)Itoffersincrediblespeedforhandlinglargefiles.2)Itsflexibilityallowsextensivecustomizationwithpluginsandthemes.3)Featureslikemultiplecursors,GotoAnything,CommandPalette,


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

SublimeText3 Linux new version
SublimeText3 Linux latest version

Zend Studio 13.0.1
Powerful PHP integrated development environment

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
