Cmder 下载地址和配置

cmder 是一个运行在 Windows 平台下的模拟控制台程序。相比Windows自带的cmd,cmder拥有更高的颜值和更加强大的功能。有自定义文本字体与颜色、git 版本控制、方便快捷的复制与粘贴、任意缩放窗口大小、多窗口管理等功能。cmder还模拟了一些常用Linux命令(比如ls、cat、more、cp、mv、rm、find、grep等),让我们可以在 windows 和 linux 环境上无缝切换。

cmder

cmder 的官网链接是在 github 上, 国内下载十分缓慢. 我从官网下载后分享在阿里云盘上, 需要的朋友可以下载. 版本是 Full (with Git for Windows) ~117MB

下载地址: cmder_full_v1.3.18

1. 右键菜单

image

Step1. 先以管理员身份运行 Cmder

Step2. 输入 Cmder.exe /REGISTER ALL

运行完之后,你就可以右键菜单看到Cmder Here 了

2. 内置 vim 配置

Cmder 内置了 vim, 它的配置文件的路径是 C:\Users\用户名\.vimrc

我的配置是:

imap jj <ESC>
set so=5
set vb
set nu
set rnu
" 设置光标键跨行
set whichwrap+=<,>,h,l
" 设置<ESC>键响应时间
set ttimeoutlen=0
" 允许光标出现在最后一个字符的后面
set virtualedit=block,onemore
" 把内容复制到系统剪贴板
set clipboard+=unnamed

3. 设置默认管理员权限运行

![设置默认管理员权限运行](https://img2020.cnblogs.com/blog/1032208/202111/1032208-20211124150905197-1349279792.png)

4. 如何在cmder vim窗口里进行鼠标选中和复制

" In many terminal emulators the mouse works just fine.  By enabling it you
" can position the cursor, Visually select and scroll with the mouse.
" Only xterm can grab the mouse events when using the shift key, for other
" terminals use ":", select text and press Esc.
if has('mouse')
  if &term =~ 'xterm'
    set mouse=a
  else
    set mouse=nvi
  endif
endif

针对终端xterm:
只需要按下 shift 键,即可使用鼠标选中想要复制的内容;
其它终端:
在vim里输入 : (同时按shift和;两个键),即可使用鼠标选中想要复制的内容,
完成后按Esc可退出鼠标选则模式。

5. 解决中文重叠的问题

Setting->MainCompress long strings to fit space (压缩长字符串以适应空间)关掉就好了。

setting

6. 和 IDEA 整合

把 idea 的终端设置为 cmder

"cmd.exe" /k ""D:\application\cmder\vendor\init.bat""

image

image
整合到 idea 后, 控制台的命令会有个黑色的背景, 去除掉更和谐.
image

posted @ 2021-10-29 23:54  今天代码写完了吗  阅读(1560)  评论(0编辑  收藏  举报