Tame the wild horse Windows

The editor

The most frustrating thing with Windows is I can’t config Vim — my favorite editor exactly like what I have in Mac. For example, I have Karabiner Elements to map jk to ESC, it’s super productive while the escape is right at your finger, but I don’t have it here. Fzf is experimenting on Windows, it’s buggy and doesn’t work at all in my case, Windows terminal not very good with vim running inside…

The command-line tools

Git is the second most important tool. I have several alias functions for git, which combine several commands in one function which helps save time on repetitive tasks. It works on whatever shells except for Powershell… So I have to learn the PowerShell way and transform those commands one by one, like this: It is quite similar to bash shell syntax but it still needs some research and transforms all of them. I have like 10 frequently use commands like that, e.g., tagging, rebasing, showing log, pull with rebase… for example, git merge to master

function gmerge() {
$CURRENT_BRANCH = & invoke-Expression gcurrent 2>&1
$TO_BRANCH="master"
"> Merging $CURRENT_BRANCH -> $TO_BRANCH" "> git checkout $TO_BRANCH"
git checkout $TO_BRANCH
"> git merge --no-ff $CURRENT_BRANCH"
git merge --no-ff $CURRENT_BRANCH
"> git commit -m 'Merge branch $CURRENT_BRANCH'"
git commit -m "Merge branch $CURRENT_BRANCH"
"> git push origin $TO_BRANCH"
git push origin $TO_BRANCH
"> Delete $CURRENT_BRANCH branch from local"
git branch -D $CURRENT_BRANCH
}

The terminal

Windows doesn’t have much choice on the terminal app, cause most of them is ugly af. Windows terminal so far is the best, with true color, tab and pannel support, able to open all kinds of shells.

Productivity tools

Window management

I introduce you to PowerToys, a series of productive tools for Windows. There is a tool name FancyZones which helps to split the windows by the predefined layouts. But I found it’s kind of complex to use, hundred times harder to use than my favorite tool on Mac name Spectacles. So the basic default Win + up/down/left/right is enough for me.

Spotlight search

PowerToys also have tool PowerToys Run, it does search for file, application, calculator, run a shell command, open url, run a window command.

Key remapping

PowerToys Keyboard Manager can help to remap the simple keystrokes. I don’t want to relearn the memory muscle so that I map all the familiar keystrokes like alt+c, alt+v to ctrl+c, ctrl+v, and so on.

F1::
if WinExist("ahk_exe chrome.exe",,"Picture-in-Picture")
WinActivate
return
F2::
if WinExist("ahk_exe code.exe")
WinActivate
return
F3::
if WinExist("ahk_exe WindowsTerminal.exe")
WinActivate
return
F4::
if WinExist("ahk_exe rider64.exe")
WinActivate
return
F5::
if WinExist("ahk_exe firefox.exe",,"Picture-in-Picture")
WinActivate
return
!F5::
if WinExist("ahk_exe telegram.exe")
WinActivate
return
F6::
if WinExist("ahk_exe discord.exe")
WinActivate
return
F7::
if WinExist("ahk_exe Slack.exe")
WinActivate
return
F8::
if WinExist("ahk_exe Postman.exe")
WinActivate
return
F9::
if WinExist("ahk_exe pritunl.exe")
WinActivate
return
F10::
if WinExist("ahk_exe clickup.exe")
WinActivate
return

Conclusion

It is not the end of the road yet, I just switch to Windows for a few weeks, and the post will be updated. Checkout my dot files for more detail: https://github.com/finnng/dotfiles

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Finn Nguyen

Finn Nguyen

Software Engineer who is highly interested in building high scalability systems.