惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
J
Java Code Geeks
博客园 - 聂微东
量子位
C
Check Point Blog
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
B
Blog
罗磊的独立博客
腾讯CDC
GbyAI
GbyAI
博客园 - 【当耐特】
A
About on SuperTechFans
M
MIT News - Artificial intelligence
U
Unit 42
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队

jdhao's digital space

Conversion between base64 and OpenCV or PIL Image 腾讯云对象存储博客图床开启 CDN 加速(不需要购买额外域名) Search and Replace in Multiple Files in Vim/Neovim Change Table Column Width in LaTeX Image or Table Side by Side in LaTeX LaTeX 并排显示图像或表格 Firenvim: Neovim inside Your Browser Content inside HTML tags missing in Latest Hugo? Creating Markdown Front Matter with Ultisnips Labelme JSON 标注格式转 voc XML 格式 Nifty Nvim Techniques That Make My Life Easier -- Series 6 macOS 下如何为视频制作字幕 Running Command Asynchronously inside Neovim Resolving Merge Conflict after Git Stash Pop Pylint: command not found? A Hands-on Experience with Neovim's Built-in LSP Support How to Convert PDF to Images with Imagemagick 互联网上常用缩略语集锦 File Backup in Neovim Converting PDF Pages to Images with Poppler Nifty Nvim Techniques That Make My Life Easier -- Series 5 Neovim Configuration for System-wide Use How to sort a list of tuple or list in Python -- lambda or itemgetter? Building A Vim Statusline from Scratch 人类第一颗原子弹爆炸始末 Distributed Training in PyTorch with Horovod Learning Expect Programming Essential Knowledge about SSH Nifty LaTeX Techniques -- Series 1 更改 Adsense 邮寄地址,重新寄送 PIN
Execellent Development Experience with Cygwin and Mintty ...
2018-10-23 · via jdhao's digital space

Linux is great for programming compared to Windows. If you miss the experience you get on Linux, maybe you should try Cygwin, which set up a Linux-like environment on Windows platform. In this post, I want to talk about how to configure Cygwin and how to use mintty terminal on Windows 10 to get excellent programming experience.

How to install new packages?#

There is no official way to install a new package. Just run the Cygwin setup tool one more time and select the package you want to install. It will not rewrite the package you have installed, only the new package will be installed.

If the package download speed is slow, you can choose a local mirror for Cygwin. In China, TUNA is good.

Reference#

When I use ssh to connect to my server, I got an error message “Pseudo-terminal will not be allocated because stdin is not a terminal”#

On Windows 10, there is a built-in ssh program under C:/Windows/System32/OpenSSH/ssh.exe. You are probably using this program. If that is the case, you have to install openssh yourself. Just run the Cygwin setup program one more time to install the additional package. Then this issue should disappear.

Reference#

Mintty settings#

Cygwin use the popular mintty terminal as its terminal emulator. In this part, I document several settings related to mintty.

How do I set up the mintty terminal emulator type, i.e., TERM variable?#

Right-click Cygwin window title and choose Options..., go to Terminal, and choose Type to be xterm-256color. That is all.

How to use an external color theme for mintty?#

By default, mintty provides a few color themes. The color theme for mintty are just a list of settings for different colors. There are several places where you can find mintty themes. A non-exhaustive list is:

Save the color theme file under $CYGWIN_ROOT/usr/share/mintty/themes. Open mintty options (right click on Cygwin title bar), go to Looks pane and choose from the Theme pull-down menu a color theme you want to use.

Alternatively, create a .minttyrc file under your HOME. Paste the content of color theme in this file and save it. The next time you open Cygwin, mintty will automatically use the configurations in .minttyrc.

References#

How do I configure mintty to use the settings from a config file and what are the available options?#

As I have said, create a .minttyrc under your HOME, and put mintty settings in this file. To see all the options available, visit this page.

How to open URL in browser#

In the iTerm terminal, we can click a URL to open it in the browser, which is convenient. Actually mintty also supports this feature.

But sometimes, Ctrl+click won’t work properly. It has something to do with the mouse mode of various programs. When mouse mode is enabled for Neovim and Tmux, to open a URL in browser, I have to use Ctrl+Shift+click . If the mouse mode is turned off, I can open a URL with just Ctrl+click.

References#

How to update mintty?#

It is the same as you install or update other packages. Run setup_x86_64.exe and install the latest version of Mintty.