search
HomeDevelopment ToolssublimeHow to change Powershell to CMD in Sublime

The following tutorial column of sublime will introduce to you how to change Powershell to CMD under the Sublime Terminal plug-in Win7. I hope it will be helpful to friends in need!

How to change Powershell to CMD in Sublime

Sublime Terminal plug-in Change Powershell to CMD under Win7

As for why you want to change, I think you must also I am the same, I don’t want to install Powershell, although it is very powerful, very powerful...

Not much to say, please see the operation if needed:

Find the plug-in installation location, modify "Terminal.py" "File:

if os.name == 'nt':
            # if os.path.exists(os.environ['SYSTEMROOT'] +
            #         '\System32\WindowsPowerShell\v1.0\powershell.exe'):
            #     # This mimics the default powershell colors since calling
            #     # subprocess.POpen() ends up acting like launching powershell
            #     # from cmd.exe. Normally the size and color are inherited
            #     # from cmd.exe, but this creates a custom mapping, and then
            #     # the LaunchPowerShell.bat file adjusts some other settings.
            #     key_string = 'Console\%SystemRoot%_system32_' + 
            #         'WindowsPowerShell_v1.0_powershell.exe'
            #     try:
            #         key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER,
            #             key_string)
            #     except (WindowsError):
            #         key = _winreg.CreateKey(_winreg.HKEY_CURRENT_USER,
            #             key_string)
            #         _winreg.SetValueEx(key, 'ColorTable05', 0,
            #             _winreg.REG_DWORD, 5645313)
            #         _winreg.SetValueEx(key, 'ColorTable06', 0,
            #             _winreg.REG_DWORD, 15789550)
            #     default = os.path.join(package_dir, 'PS.bat')
            #     sublime_terminal_path = os.path.join(sublime.packages_path(), installed_dir)
            #     # This should turn the path into an 8.3-style path, getting around unicode
            #     # issues and spaces
            #     buf = create_unicode_buffer(512)
            #     if windll.kernel32.GetShortPathNameW(sublime_terminal_path, buf, len(buf)):
            #         sublime_terminal_path = buf.value
            #     os.putenv('sublime_terminal_path', sublime_terminal_path.replace(' ', '` '))
            # else :
            default = os.environ['SYSTEMROOT'] + '\System32\cmd.exe'

        elif sys.platform == 'darwin':

I believe my friends have figured it out. In fact, it means commenting out the Powershell judgment. As long as it is Windows, just set the Terminal path to the cmd path directly.


The above is the detailed content of How to change Powershell to CMD in Sublime. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete
Sublime Text vs. VS Code: Features and FunctionalitySublime Text vs. VS Code: Features and FunctionalityMay 11, 2025 am 12:20 AM

SublimeText is suitable for developers who pursue speed and simplicity, while VSCode is suitable for users who need strong scalability and integration capabilities. 1.SublimeText is known for its lightweight and fast response, with GotoAnything and multi-select powerful. 2. VSCode is known for its scalability and IDE functions, with built-in Git and debugging tools, and IntelliSense improves development efficiency.

Sublime Text: The Power of Plugins and PackagesSublime Text: The Power of Plugins and PackagesMay 10, 2025 am 12:17 AM

SublimeText's plug-ins and packages can be installed and managed through PackageControl to improve programming efficiency. 1. Install plug-ins such as BracketHighlighter to simplify code reading by highlighting bracket matching. 2. Use SublimeLinter to configure pylint to implement real-time code checking. 3. Use SideBarEnhancements to customize the sidebar function to optimize file management.

Is Sublime Text Free? Understanding the LicensingIs Sublime Text Free? Understanding the LicensingMay 09, 2025 am 12:10 AM

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

Sublime Text: Enhancing Your Coding WorkflowSublime Text: Enhancing Your Coding WorkflowMay 08, 2025 am 12:19 AM

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.

Sublime Text: Free to Try, Not Necessarily Free to OwnSublime Text: Free to Try, Not Necessarily Free to OwnMay 07, 2025 am 12:02 AM

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.

Sublime Text: Comparing Paid and Unpaid FeaturesSublime Text: Comparing Paid and Unpaid FeaturesMay 06, 2025 am 12:07 AM

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

Sublime Text: The Cost of a Powerful EditorSublime Text: The Cost of a Powerful EditorMay 05, 2025 am 12:04 AM

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.

Sublime Text: Code Completion, Syntax Highlighting, and MoreSublime Text: Code Completion, Syntax Highlighting, and MoreMay 04, 2025 am 12:04 AM

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.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Article

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.