macOS: Monterey 12.0.1
Clone this dotfile into your local repo
git clone [email protected]:richardwu/dotfiles.git $HOME/dotfiles
Symlink configuration files to $HOME/
(warning: this will rm
existing
configuration files in $HOME/
):
./config-symlinks.sh
NB: you may need to delete existing ~/.zshrc
and re-symlink it since installing
oh-my-zsh will create a ~/.zshrc.
Most distros don't have +clipboard
feature enabled (vim --version
) eg WSL. Install vim-gtk
:
sudo apt-get update
sudo apt-get install -y vim-gtk
See brew.sh.
Configure aliases and global .gitignore_global
:
./config-git.sh "<Your Name>" "<Your email>"
Install tmux
brew install tmux # Homebrew (MacOS) or Linxubrew (Linux)
Uncomment the appropriate sections of .tmux.conf
for your tmux -V
version and OS (look for TODO
s).
Install zsh
, fzf
, and wget
brew install zsh zsh-completions fzf wget # Homebrew (MacOS) or Linxubrew (Linux)
sudo apt-get install zsh fzf # WSL/Ubuntu
then install oh-my-zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
To install all the Vim plugins, run the script
./install-vim-plugins.sh
Then open up Vim and run the command
:PluginInstall
In general:
- Make sure terminal has copy to clipboard enabled
- Our
tmux-yank.sh
should handle tmux copy-pasta - Make sure to follow Vim setup above for
+clipboard
feature - Name sure
set clipboard=X
is correct for the given system (see~/.vimrc
)
See https://hackernoon.com/tmux-in-practice-copy-text-from-remote-session-using-ssh-remote-tunnel-and-systemd-service-dd3c51bca1fa for more info.
To copy-paste through an SSH remote tunnel, one can start a launchd pbcopy service (MacOS) or a systemd xclip service (Linux). Simply run the following on your local server (service by default binds to localhost:19988)
./config-remote.sh
whenever you SSH you will need to port forward from your remote server to your local service
with the -R
flag, for example
ssh -R 19988:localhost:19988 [email protected]
or simply add the following to your ~/.ssh/config
file
Host myhost
Hostname 192.168.11.111
User richardwu
...
RemoteForward 19988 localhost:19988 # Add this line
...
Warning: only do this with a trusted remote server!
Enable X11 Forwarding in PuTTY/terminal emulator and start up an X11 server on your local machine (e.g. VcXsrv).