拥抱cmder,和cmd说再见

来源:互联网 发布:身高172扣篮知乎 编辑:程序博客网 时间:2024/04/30 15:02
拥抱cmder,和cmd说再见 - fbysss的专栏 - 博客频道 - CSDN.NET

http://blog.csdn.net/fbysss/article/details/41891837


作为一个程序员,即使是在windows工作环境,cmd也是我们必不可少的使用工具。

然而,windows发展了这么多年,cmd还是一如既往、毫无改进。

下面先列举cmd几大不能忍的“特性”

1.窗口size不能便捷缩放

2.复制文本,不能直接用鼠标拷贝,还需要多一道菜单操作;而且,还只能块状拷贝,而不是按行字符,极其不便

3.不支持多Tab页,多窗口管理不便

此外,cmd界面丑陋,只有黑白界面,而且不支持文字颜色区分。

OK,是时候终结这个时代了,忘掉cmd,让我们在更舒适的环境下敲命令吧!


下载地址:http://cmder.net    

源码    https://github.com/cmderdev/cmder

说明:有一个mini版本,就几M大小,这个也就用来替代windows的cmd,上述几点诟病已经能够解决。

full版本比较大,100多M,模拟了一些常用linux命令(比如ls、cat、more、cp、mv、rm、find、grep等),自带git,而且自带vim!哈哈,真是太爽了。

这样,我们可以在windows下,小成本体验linux(重度体验可以使用cygwin或者vmware),也很适合很多习惯linux的用户。

如果要安装其他命令,如wget,可以使用Chocolatey这个包管理器来下载。


关于Cmder,有几篇文章,大家可以参考:

cmder简单使用小结

如何在Windows打造出你的Linux开发环境


注意几点:

1.Chocolatey安装之后,需要重新开一个Cmder,因为这样环境变量才会生效;

2.修改alias文件和直接在命令中输入alias是一个效果——后者更方便,只是需要在每一句前面增加一个alias。因为马上就生效,前者需要重启Cmder。

3.乱码问题解决的同时,建议加上颜色区隔:

l=ls --show-control-chars  --color
la=ls -aF --show-control-chars --color
ll=ls -alF --show-control-chars --color
ls=ls --show-control-chars -F --color

以下是一个截图,清爽的界面让大家一睹为快。











/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
附上官网给出的基本快捷键   


Shortcut to open Cmder in a chosen folder (设置"选中文件夹"的"右键打开cmder")

  1. Open a terminal as an Administrator
  2. Navigate to the directory you have placed Cmder
  3. Execute .\cmder.exe /REGISTER ALL
    If you get a message "Access Denied" ensure you are executing the command in anAdministrator prompt.

In a file explorer window right click in or on a directory to see "Cmder Here" in the context menu.

Keyboard shortcuts (快捷键)

Tab manipulation

  • Ctrl + t : new tab dialog (maybe you want to open cmd as admin?)
  • Ctrl + w : close tab
  • Ctrl + d : close tab (if pressed on empty command)
  • Shift + alt + number : fast new tab: 1 - CMD, 2 - Powershell * - More to come
  • Alt + enter: Fullscreen

Shell

  • Shift + Up : Traverse up in directory structure (lovely feature!)
  • End, Home, Ctrl : Traversing text with as usual on Windows
  • Ctrl + r : History search
  • Shift + mouse : Select and copy text from buffer

(Some shortcuts are not yet documented, thought they exist - please document them here)

Features

Aliases

You can define simple aliases with command alias name=command.

For example there is one defined for you alias e.=explorer .

All aliases will be saved in /config/aliases file

SSH Agent

To start SSH agent simply call agent, which is in the bin folder.

If you want to run SSH agent on startup, uncomment the line in /vendor/init.batso it says @call "%CMDER_ROOT%/bin/agent.cmd".

Todo

  1. Git Bash
  2. Check for clink and git before injecting them (Sort of done)




0 0
原创粉丝点击