Git Product home page Git Product logo

dotfiles's Introduction

Richard's dotfiles

Latest tested versions

macOS: Monterey 12.0.1

1. Cloning

Clone this dotfile into your local repo

git clone [email protected]:richardwu/dotfiles.git $HOME/dotfiles

2. Symlinking config files

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.

3. Vim

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

3.5 HomeBrew/LinuxBrew

See brew.sh.

4. Git configuration

Configure aliases and global .gitignore_global:

./config-git.sh "<Your Name>" "<Your email>"

5. tmux

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 TODOs).

5. Zsh

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 -)"

6. Vim setup

To install all the Vim plugins, run the script

./install-vim-plugins.sh

Then open up Vim and run the command

:PluginInstall

7. Local copy-pasting

In general:

  1. Make sure terminal has copy to clipboard enabled
  2. Our tmux-yank.sh should handle tmux copy-pasta
  3. Make sure to follow Vim setup above for +clipboard feature
  4. Name sure set clipboard=X is correct for the given system (see ~/.vimrc)

8. Remote copy-pasting

See https://hackernoon.com/tmux-in-practice-copy-text-from-remote-session-using-ssh-remote-tunnel-and-systemd-service-dd3c51bca1fa for more info.

MacOS or Linux

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!

Windows

Enable X11 Forwarding in PuTTY/terminal emulator and start up an X11 server on your local machine (e.g. VcXsrv).

dotfiles's People

Contributors

richardwu avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.