如何配置 Msys 的默认大小、颜色和字体?
我最近一直在探索使用 MSys 作为我的 Windows 开发的替代方案,类似 'nix 的 shell。 然而,默认的颜色和尺寸让我抓狂。 有人知道如何更改默认大小、颜色和/或字体吗? 老实说,如果我能让 shell 的默认字符宽度/高度更大,我会很高兴,但其他的也很好......
澄清:msys shell 是一个独立于 windows shell 的应用程序 - 正常的“右” -点击左上方-> 属性的配置(如 Windows shell)不存在。
看起来下面它正在发射 rxvt。 谢谢!
I've been exploring use of MSys lately as an alternative, 'nix-like shell for my windows development. However, the default colors and size are driving me crazy. Anyone have any idea as to how I can change the default size, color, and / or font? Honestly, I'd be happy if I could make the default character width/height of the shell larger, but the others would be nice too...
Clarification: the msys shell is a separate app from the windows shell - the normal 'right-click-upper-left -> properties' configuration (like with the windows shell) is not present.
Looks like underneath it's firing off rxvt. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您从命令行运行 MSYS bash,则在幕后它是一个 Windows 命令 shell 窗口,因此配置它是相同的。
右键单击标题栏
shell 窗口顶部并选择
'属性'
使用选项配置窗口
在对话框的选项卡上; 这些
应该是相当不言自明的。
关闭对话框后,选择
'修改启动此的快捷方式
窗口'保存配置
返回默认值。
编辑:如果您通过 X 服务器在 xterm 或 RXVT 窗口中运行 shell,请使用 -fg(前景)、-bg(背景)和 -fn(字体)启动 xterm 窗口。 不记得 RXVT 开关是什么,但您应该能够在手册页中看到它们。 您还可以通过 .Xdefaults 文件配置它们。 再次,请参阅手册页了解详细信息。
编辑:谢谢 Paulo - 请注意,MSYS 还附带了 RXVT 的 X-less 版本,OP 似乎正在使用该版本。 这是在 MSYS 上配置 RXVT 的链接。
If you're running MSYS bash from a command line, Behind the scenes it's a windows command shell window, so configuring it is just the same.
Right click on the title bar at the
top of the shell window and select
'properties'
Configure the window with the options
on the tabs on the dialog; these
should be fairly self-explanatory.
When you close the dialog, select
'Modify shortcut that started this
window' to save the configuration
back as defaults.
EDIT: If you're running the shell in an xterm or RXVT window through an X server, start the xterm window with -fg (foreground), -bg (background) and -fn (font). Can't remember what the RXVT switches are, but you should be able to see them in the man page. You can also configure them through your .Xdefaults file. Again, see the man page for details.
EDIT: Thanks Paulo - note that MSYS also comes with an X-less version of RXVT, which the OP seems to be using. Here's a link for configuring RXVT on MSYS.
打开 msys.bat 文件,大约第 72 行,内容如下:
用您喜欢的颜色更改前 4 行,要更改字体,只需执行以下操作:
用您喜欢的字体更改 Courier-12,用您喜欢的窗口更改 80x25尺寸。
Open the msys.bat file an aroun line 72 it reads like this:
change the first 4 lines with the colors you like, to change the font, just bellow:
change the Courier-12 with your favourite font and the 80x25 with your prefered window size.
我创建了 HOME env var,其值类似于“e:\home”,并放入具有以下内容的 %HOME% dir .Xdefaults 文件中:
另请注意,此配置成功地在 Cygwin 和各种 Unix 机器上工作。
I create HOME env var, which have value like 'e:\home' and put into %HOME% dir .Xdefaults file with such content:
Also note that this config successfully work on Cygwin and various Unix boxes.
如果您厌倦了使用 cmd 进行 msys git,我建议使用 minty 和/或 ConEmu
:
要使用 mintty,请从 google code/mintty 下载最新版本并将其放入
bin
文件夹 + 制作以下快捷方式:(将工作目录设置为您的主目录)
要使用vim
,请确保阅读 此错误报告对于颜色,请确保 gitconfig 设置为 color = always
我将 sublime 设置为默认编辑器,因为 vim 不起作用,请参阅下面的注释
注意:
参考:
If you're tired of using cmd for msys git, I recommend using minty and/or ConEmu
:
to use mintty, download latest version from google code/mintty and drop it in the
bin
folder of git msys + make following shortcut:(set working dir to your home dir)
to usevim
, make sure to read this bug reportfor colors, make sure gitconfig is set to color = always
I set sublime as my default editor as vim didn't work, see notes below
note:
ref: