What is Cmder?
Windows has developed so many years, UI Ah, performance AH made a number of changes, but the command line is still the worse.
This super ugly interface, I can not endure.
And also do not support Ctrl + c
such shortcut keys, anyway, all kinds of not used.
Some say the command line who uses it now? That is not necessarily, the first to do the development of the general will be used, such as Python, I directly in the command line in a few simple functions to adjust how simple, not to use the super-stupid IDE.
We will usually have a demand ah, such as building a file can use the hand point, but build it 100, or use the hand point, of course, with bat batch processing faster.
If it is impossible to abandon windows, because not everyone is accustomed to Linux, and Linux does have a lot of software does not do well. So is there any way to compromise?
Can be used CMDer
, it is a third-party, very useful command-line tool.
It also integrates several Linux commands as well as Vim, git, and so on.
The configuration steps are described below.
Installation
Download the installation package: Download link
Direct decompression actually can be used, there are some configuration I have done, but still introduce how to use it.
Environment variables
The first is to configure environment variables
- Open Environment Variables dialog box
- modifying environment variables
- Variable name Cmder_home
- Variable value cmder The absolute path of the unpacked package
- Add%cmder_home% inside Path
These two steps are actually the equivalent of Linux,
export CMDER_HOME="绝对路径"export PATH="$PATH:$CMDER_HOME"
The goal is to add CMDER.EXE to the environment variable, and later execution in cmd can be searched by default.
Add Cmder to right-click
This step is for the implementation can be in any of the directory window Right-click Open Cmder
Only need to execute through CMD
Cmder.exe /REGISTER ALL
Alias aliases
Shortcut: Win + Alt + P
Environment
Add in
set PATH=%ConEmuBaseDir%\Scripts;%PATH%set LANG=zh_CN.UTF-8ls=ls --show-control-chars -Falias ll=ls -al --show-control-chars --color $*alias gs=git statusalias gl=git logalias ga=git addalias gc=git commitpwd=cdclear=cls
This allows you to use GL instead of waiting in the Cmder git log
.
Solve Chinese garbled characters
Modify in settingsEnvironment
set LANG=zh_CN.UTF-8
解决中文乱码问题
- If you want to use shell commands in win, you need to change to the
set PATH=%ConEmuBaseDir%\Scripts;%PATH%
following
set PATH=%ConEmuBaseDir%\Scripts;%CMDER_HOME%\vendor\git-for-windows\usr\bin;%PATH%
Modify Command Prompt symbols
Want to set the prompt to be the same as Linux $
rather than the defaultλ
You can modify the file${CMDER_HOME}\vendor\clink.lua
if env == nil then lambda = "λ" else lambda = "("..env..") λ" end
Change into
if env == nil then lambda = "$" else lambda = "("..env..") $" end
Open window new tab Open Administrator rights terminal
Use to Ctrl + T
open a new window
In the dialog box, you can choose Administrator privileges.
How to turn on PowerShell by default
Use the Win + Alt + P
Open Settings window.
You just press theCtrl+滑鼠滚轮
Chocolatey Package Management System
Open the window with administrator privileges and run the following statement
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString(‘https://chocolatey.org/install.ps1‘))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Install the software command choco install softwareName
,
- Short Write is
cinst softwareName
Query whether the installation package existsclist softwareName
List of installable packages
choco install autohotkey.portable #安装 AutoHotkey (Portable)choco install nodejs.install #安装 nodechoco install git.install #安装 gitchoco install python #安装 pythonchoco install ruby #安装 rubychoco install jdk8 #安装 JDK8choco install googlechrome #安装 Chromechoco install google-chrome-x64 #Google Chrome (64-bit only)choco install firefox #安装 firefoxchoco install notepadplusplus.install #安装 notepad++choco install Atom #安装 Atomchoco install SublimeText3 #安装 SublimeText3
"Use tutorial" Cmder,window the alternative to CMD