Skip to content

rogerfan48/dotfiles

Repository files navigation

Roger Fan's dotfiles


dotfiles_demo1 dotfiles_demo2 dotfiles_demo3


  • All the files are settled in ~/.dotfiles/

Features

Installation

Step 1. Clone the repo

cd ~
git clone git@github.com:rogerfan48/dotfiles.git
mv dotfiles .dotfiles

Step 2. Run the setup script

cd ~/.dotfiles
# For Ubuntu, before running, make sure uninstall apt-installed neovim to avoid conflicts
sudo apt remove neovim

bash initialization.sh

It'll run ./setup_link.sh to create symlinks for all the required config files inside the initialization script. If you want to re-establish the symlinks one day, simply run: bash ~/.dotfiles/setup_link.sh

Remember to restart your terminal after this step, or zsh + source ~/.zshrc.

Step 3. Tmux and Neovim setup

  • tmux new -s <session_name>: start a new tmux session
    • Inside tmux, type Ctrl+Space + I to install tmux plugins
  • nvim: open neovim
    • It will auto-install plugins via lazy.nvim on first launch
    • Inside neovim, run :Copilot setup to get the GitHub Copilot working

Structure and Customization

  • To see zsh customizations, check out ~/.dotfiles/.zshrc.
  • To see what plugins are included, check out the ~/.dotfiles/nvim/lua/roger/plugins/ folders.
  • To see custom keymaps, check out ~/.dotfiles/nvim/lua/roger/core/keymaps.lua.
  • To see custom TMUX keymaps and settings, check out ~/.dotfiles/.tmux.conf.
  • To see vimtex keymaps introduction, check out ~/.dotfiles/vimtex-keymaps.md.
  • Copilot Keymaps:
    • Option + l: Accept Word
    • Option + ;: Accept Line
    • Option + ': Accept Full Suggestion
    • Option + Backspace: Clear Suggestion
    • you can also see/change keymaps in ~/.dotfiles/nvim/lua/roger/core/keymaps.lua under "Copilot" section.
  • Use nvimleet in the terminal to use leetcode.nvim

Extra

Fix tmux messing with conda

  • reference
  • Problem: When running a conda environment and opening tmux on macOS, a utility called path_helper is run again. Essentially, the shell is initialized twice which messes up the ${PATH} so that the wrong Python version shows up within tmux.
  • Solution: If using bash, edit /etc/profile and add one line. (For zsh, edit /etc/zprofile)
    if [ -x /usr/libexec/path_helper ]; then
    PATH="" # <- ADD THIS LINE (right before path_helper call)
    eval `/usr/libexec/path_helper -s`
    fi

About

My dotfiles ❤️ Dev env: Wezterm, Tmux, Nvim ...

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published