For portable Windows Dev Box + Ubuntu WSL2 provisioning with Linuxbrew, see
devbox setup. The repository-root workload.yaml is the
Dev Box customization entry point; the same scripts can run on an existing box.
-
VIM
- for fzf.vim,
ctrl+gis mapped to:GFilesto search with .gitignore applied.- The executable path should be mapped correctly in Plug or with
set rtp+=xxxxto append to theruntimepath.
- The executable path should be mapped correctly in Plug or with
- for
vim surround, select the text in visual mode, and then pressS(uppercase), then input the quote or parenthesis or<anyHtmlTag>etc. - in command line mode,
ctrl-bandctro-eto navigate to beginning/end.
- for fzf.vim,
-
GIT
- for
git config --global user.email xxx, can NOT surround email address with""like how user name is set.
- for
-
Fish shell
- more on
.config/fish/config.fish
- more on
NERDTree is awesome
Actually find coc-explorer is much faster than NERDTree.
Fish VI modeが大好きです
The tmux configuration is split by responsibility so the same repository works with tmux on Linux/macOS/WSL and with native psmux on Windows:
| File | Purpose |
|---|---|
.tmux.common.conf |
Portable tmux commands and key bindings shared by both programs |
.tmux.conf |
Unix entry point, terminal integration, and the oh-my-tmux shell engine |
.tmux.conf.local |
Unix oh-my-tmux theme variables and Unix clipboard integration |
.psmux.conf |
Windows entry point, native theme options, and PowerShell settings |
.psmux-battery.ps1 |
Read-only Windows battery formatter used by the psmux status line |
Do not put shell commands, platform-specific clipboard tools, terminal capability
overrides, or plugins in .tmux.common.conf. A shared setting should be changed
there rather than duplicated in both entry points.
symbolLink.js selects the entry points automatically:
- All platforms receive
~/.tmux.common.conf. - Linux, macOS, and WSL receive
~/.tmux.confand~/.tmux.conf.local. - Native Windows receives
~/.psmux.confand~/.psmux-battery.ps1.
Run the Node linker from the repository root after cloning:
node symbolLink.jsOn Unix, ./sLinks.sh is an equivalent Bash alternative. Its file lists are
kept synchronized with the Unix branch of symbolLink.js. The legacy
.coc.vim link is intentionally disabled in both scripts.
Psmux searches for .psmux.conf before .tmux.conf, so Windows does not execute
the Unix configuration. Restart the relevant server after changing links or
startup-only settings:
# Unix/WSL/macOS
tmux kill-server
# Windows PowerShell
psmux kill-serverThe long commented section after the # -- 8< -- marker is executable code from
oh-my-tmux, not dead comments. tmux ignores
it, while this command removes each line's # prefix and passes the result to
sh:
run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'That shell program reads .tmux.conf.local and generates the Unix theme,
status bar, battery and uptime values, prefix/root/session indicators, clipboard
bindings, and helper commands. Keep the commented section while using the
current Unix oh-my-tmux theme. Psmux does not need it because .psmux.conf uses
native style options and a small read-only PowerShell status helper.
The psmux status line evaluates .psmux-battery.ps1 asynchronously every
status-interval seconds. Its encoded PowerShell command expands
%USERPROFILE% at runtime because psmux does not expand ~ or preserve quoted
paths inside #(command). This also supports profile paths containing spaces.
The script reads Win32_Battery and prints one formatted value to standard
output. It deliberately does not install hooks or
call back into psmux, avoiding invalid-console-handle errors from background
plugin processes.
The battery helper is linked automatically by symbolLink.js. Apply changes by
recreating the links and restarting psmux:
node .\symbolLink.js
psmux kill-server
psmuxThe previously installed psmux-battery plugin may remain on disk, but it must
not be declared in .psmux.conf; otherwise its five-second hook will return.
System Preferences > Dock > Prefer tabs when opening documents and select Always.
MacOS Mojave disables subpixel antialiasing, also known as font smoothing, by default.
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
In .gitconfig, delta is used for pager and diff. For wsl/chromeos-linux, go to the release page download corresponding .deb and install with sudo dpkg -i xxx.deb.
### coc nvim
- For coc plugin, use the official recommended way
:CocInstallinstead of vim plug to manage so that it could get auto update. Example::CocInstall coc-json coc-tsserver coc-eslint coc-pairs coc-git
- use
ctrl-oto go back aftergd or gi. - use
:CocConfigor edit~/.config/nvim/coc-settings.jsondirectly to add ts server options just like inside vscode. for example:"typescript.preferences.importModuleSpecifier": "relative","typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces":true- for project specific settings, use
./.vim/coc-settings.jsonfile. one useful setting here we could do is for settingpython.pythonPathto localvenv's python so that the LSP could kick-in.
- on MacOS,
Terminal->Preferences->KeyboardsetUse Option as Meta Key. then map to:Format<cr>.- For iTerm2, need to make it
ESCinprofiles->keys, and then add specific mapping to the list
- For iTerm2, need to make it