跳到主要內容

[Tool] cmder + python + MinGW for windows

推薦適用於 windows 的好用 shell terminal 工具 cmder,它能提供類似 Linux 的終端機介面跟指令,且我覺得它比 Windows 10 內建的 Bash 終端好用。



cmder 下載網址:https://cmder.net/
cmder 不需要安裝,下載後直接執行主程式即可。

一般我都在 Linux 環境編程,但如果使用的電腦是 Windows 10,我會用 cmder 建立熟悉的 Linux 終端機環境。
以下提供我常用來編程的初始化設定。

cmder 按 Win+Alt+P,可以啟動設定介面,在這個介面內先設定 bash 預設的 Shell,否則啟動時可能會出現錯誤訊息,因為 cmder 預設使用 PowerShell,但因簽證問題造成 Windows PowerShell 出現錯誤訊息。
在 Startup 選單:



在 General 選單:


接著微調一些設定:
  1. 字體調整到舒適的字型和大小。



  2. 可以開啟 Quake 模式。這個模式在程式競賽或是工作時很好用,可以透過 Ctrl+` 這個組合鍵將終端機顯示在最上方,或隱藏終端機成為背景模式。



    這個組合鍵是可以修改的,在 Keys & Macro 選單:


  3. 下載 MinGW Installer,安裝 MinGW,然後在系統環境變數加入 MinGW 的 bin 資料夾位置。
    http://mingw-w64.org/doku.php



  4. 安裝 vim,cmder 切換到家目錄 “~,可以在裡面設定 .vimrc 檔案,來調整 vim 設定。

  5. 安裝 python,一樣將 python bin 資料夾新增到環境變數。




留言

這個網誌中的熱門文章

[Linux] Elementary OS 字體調校

用 gesetting 取得 elementary os 的等寬字體(這也是終端機默認字體): gsettings get org.gnome.desktop.interface monospace-font-name 會顯示目前字型跟字體大小: Roboto Mono 10 設定字體大小: gsettings set org.gnome.desktop.interface monospace-font-name 'Roboto Mono 12' 可以微調 text-scaling-factor: gsettings set org.gnome.desktop.interface text-scaling-factor <value>

[Vim] 我的 .vimrc

我用過的文字編輯器有 sublime text/atom/notepad++/gedit 等等。 後來我在 window 和 Linux 寫程式還是比較慣用 vim。 以下整理我常用的 .vimrc:  set nu "show line number. set rnu "related line number. nmap ; : "replace ';' with ':' in normal mode. set ai "auto indent set mouse=a "activate mouse set expandtab "replace tab with space. set tabstop=4 "replace tab with 4 spaces. set bg=dark "background set to dark. color desert "color scheme. syntax on "enable syntax highlight. " auto complete: inoremap ( ()<Esc>i inoremap ' ''<Esc>i inoremap " ""<Esc>i inoremap [ []<Esc>i inoremap { {}<Esc>i set cursorline " active cursorline 到此 vim 搭配 Ctrl + N 當自動補全,已經很好用了,之後有好用設定會再補上來。

[心得] 復古、老派的程式設計之路

最近看到 John Carmack 2018 年的貼文中的幾段話: I’m not a Unix geek.  I get around ok, but I am most comfortable developing in Visual Studio on Windows.  I thought a week of full immersion work in the old school Unix style would be interesting, even if it meant working at a slower pace.  It was sort of an adventure in retro computing — this was fvwm and vi.  Not vim, actual BSD vi. In the end, I didn’t really explore the system all that much, with 95% of my time in just the basic vi / make / gdb operations.  I appreciated the good man pages, as I tried to do everything within the self contained system, without resorting to internet searches.  Seeing references to 30+ year old things like Tektronix terminals was amusing. In the spirit of my retro theme, I had printed out several of Yann LeCun’s old papers and was considering doing everything completely off line, as if I was actually in a mountain cabin somewhere, but I wound up watching a lot of the Stanford CS231N lectur...