Moved to https://github.com/appaquet/dotfiles, managed with nix
appaquet's dotfiles
Shell & editor setup
-
Checkout this repo recursively in your ~/
git clone --recursive https://github.com/appaquet/dotfiles.git ~/dotfiles
-
-
To install
- Ubuntu:
sudo apt install fish - MacOS:
brew install fishand follow instructions about adding fish to/etc/shells
- Ubuntu:
-
Change your shell
- Ubuntu:
chsh -s /usr/bin/fish - MacOS:
chsh -s /opt/homebrew/bin/fish(you may have to add it to /etc/shells for MacOS to accept to install)
- Ubuntu:
-
Symlink fish's config folder:
mkdir -p ~/.config/fish/ && ln -s ~/dotfiles/fish/config.fish ~/.config/fish/ -
Log out and log back (you'll get errors as not everyhing is setup yet)
-
Install oh-my-fish framework
curl -L https://get.oh-my.fish | fish
-
Install plugins & themes
foreign-env/fenvto import ~/.profile variables:omf install foreign-envbobthefishtheme:omf install bobthefishand thenomf theme bobthefish
-
Notes
- You can still use your
~/.profileas you would do in bash thanks to theforeign-envplugin that sources your~/.profile- You should not change PATHs from ~/.profile. Use fish persisted PATH instead.
- To add a path:
set -Ua fish_user_paths /some/new/path - To list current paths:
echo $fish_user_paths | tr " " "\n" | nl - TO remove a path:
set --erase fish_user_paths[NUMBER AS LISTED STARTING AT 1]
- You can put any local specifc fish config in
~/.config/fish/local.fish
- You can still use your
-
-
fzf (shell fuzzy shell history finder & fuzzy file finder)
- To install
cd ./fzf && ./install
- To install
-
- To install, see https://github.com/neovim/neovim/wiki/Installing-Neovim
- Make sure to update alternatives on Ubuntu
- On MacOS, you may need to install python neovim:
pip3 install neovim --upgrade
- Symlink config folder:
ln -s ~/dotfiles/nvim ~/.config/nvim - Install neovim python package (
pip3 install pynvim) - Install plugins
nvim +BundleInstall +qall - Finish YouCompleteMe plugin installation
cd ~/.vim/bundle/YouCompleteMe./install.py
- To diagnose issues, run
:healthcheck
- To install, see https://github.com/neovim/neovim/wiki/Installing-Neovim
-
- I use Gpakosz self-contained tmux configuration, which is checked out as a submodule.
- Symlink main tmux config:
ln -s ./dotfiles/tmux/gpakosz_tmux/.tmux.conf ~/.tmux.conf - Symlink personalized conf:
ln -s ./dotfiles/tmux/tmux.conf.local ~/.tmux.conf.local - Install plugins by launching tmux and pressing:
ctrl-b shift-i
-
Autojump (Fast jumping to directories)
- To install
- Ubuntu:
sudo apt install autojump - MacOS:
brew install autojump
- Ubuntu:
- You can add the bootstrap script to your
~/.config/fish/local.fish- MacOS:
[ -f /opt/homebrew/share/autojump/autojump.fish ]; and source /opt/homebrew/share/autojump/autojump.fish - Ubuntu:
[ -f /usr/share/autojump/autojump.fish ]; and source /usr/share/autojump/autojump.fish
- MacOS:
- To install
-
RipGrep (A very fast grep / ack replacement)
- To install
- Ubuntu:
sudo apt install ripgrep - MacOS:
brew install ripgrep
- Ubuntu:
- To install
-
bat (A
catreplacement with syntax highlighting & git integration)- To install:
cargo install bat
- To install:
-
Git-delta (Much better git diff)
- To install
- Ubuntu:
cargo install git-delta - MacOS:
brew install git-delta
- Ubuntu:
- Install in git:
git config --global core.pager "delta --dark" # --light for light terminal backgroundsgit config --global delta.navigate trueto allow navigation usingnfor next file, andShift-Nfor previous file- Change theme to this one (
vim ~/.gitconfig)
- To install
-
Bottom (Htop alternative with disk + network)
- To install
- Ubuntu:
cargo install bottom - MacOS:
brew install clementtsang/bottom/bottom
- Ubuntu:
- To install
-
jless (jq + less with foldable sections)
- To install
- Install dependencies:
sudo apt-get install libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev - Ubuntu & MacOS:
cargo install jless
- Install dependencies:
- To install
-
Bandwhich (Network monitoring / top like by process/hosts)
- To install:
cargo install bandwhich
- To install:
-
Dua (Disk usage / cleanup)
- To install:
cargo install dua-cli - To use:
dua interactive
- To install:
-
tldr (Manpage replacement)
- To install:
apt install tldrorbrew install tldr
- To install:
-
- Checkout asdf:
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1 - Then add
source ~/.asdf/asdf.fishto~/.config/fish/local.fish - Configure completions:
mkdir -p ~/.config/fish/completions; and ln -s ~/.asdf/completions/asdf.fish ~/.config/fish/completions - May need to install for zsh too to make it work in vscode
- Add
. $HOME/.asdf/asdf.shto~/.zshrc
- Add
- Quick usage
- Install nodejs:
asdf plugin-add nodejs - List all versions of nodejs:
asdf list all nodejs - Install a version:
asdf install nodejs 12.22.1orasdf install nodejs latest - List install versions:
asdf list nodejs - Use version in directory:
asdf local nodejs 12.22.1 - Use version globally:
asdf global nodejs latest
- Install nodejs:
- All commands
- Checkout asdf:
-
Alacritty (A GPU accelerated terminal written in Rust)
- Main advantage of Alacritty is it's cross platform and configurable via a configuration file
- To install:
- MacOS: Use released dmg from repo
- Install fonts from
fonts(FiraMono)
- Install fonts from
- Ubuntu: Manually install from Pop!_OS package
- Install patched fonts
cd fonts; ./install.sh
- Symlink config folder:
mkdir -p ~/.config/alacritty/; ln -s ~/dotfiles/alacritty/alacritty.yml ~/.config/alacritty/alacritty.yml
- MacOS: Use released dmg from repo
-
JetBrains' idea based IDEs
- Symlink vim config:
ln -sf ~/dotfiles/idea/.ideavimrc ~/.ideavimrc
- Symlink vim config:
-
Utils
- Add
binto path:fish_add_path /Users/appaquet/dotfiles/bin- or via
~/.profile:PATH="$HOME/dotfiles/bin:$PATH"
- Add
Other setup
Usage
Fish
- With no input
<alt><left>or<alt><right>to jump to previous directory in history - With input
<alt><left>or<alt><right>to between words - With input
<ctl>wto delete previous word - With input
<alt>eto open input in editor
Neovim
-
My leader key is bound to
\(backslash) -
Useful custom commands
EorNewto create a new file in the directory as the current buffer's fileDeletedelete the file in current buffer without messing up vim's layoutRenamerename the current file and correctly replace current buffer with new fileAcklaunches ack in a split buffer
-
Useful custom mappings
<leader> 1 through 9to switch between opened buffers<leader>]to switch to next buffer<leader>[to switch to previous buffer<leader>wto save current buffer<leader>xto save and then execute current buffer (as long as it's chmod +x)<leader>zto execute current visual selection in a shell<leader>rto save current buffer and then executersync.shin working dir<leader>qto close the current buffer (equivalent to:q)<leader>wto close the current buffer by trying not to messup the layout<leader><tab>to switch between tab and spaces<ctrl>eor<leader>eto toggle Nerdtree (files)<leader>dif YouCompleteMe is available, go to definition<ctrl>pfuzzy finding file<ctrl>afuzzy find the current word in files using ack<leader>mto toggle mouse support (useful to allow select + copy)<leader>yto yank to clipboard using bin/pbcopy util<leader>pto paste from clipboard using bin/pbpaste util
-
You can check
init.vimfor more commands / mappings
fzf (in shell)
- In shell
<ctrl>tfor fuzzy file find<ctrl>rfor fuzzy history find
tmux
-
Main shortcuts
<ctrl>b eto toggle synchronized panes<ctrl>b mto toggle mouse support (useful to allow select + copy)<ctrl>b <ctrl>lto navigate to next window<ctrl>b <ctrl>hto navigate to prev window<ctrl>b Tabto navigate to last window<ctrl>b <tab>to navigate to last window<ctrl>b <alt><arrows>to resize pane<ctrl>b rto reload config<ctrl>b <enter>to get into copy modevfor selectionctrl-vto switch between between block and line selectionyto yankHandLstart line / end line
<ctrl>b qto show pane ids, then:swap-pane -s X -t Yto swap
-
For more shorcuts, see here
-
Plugins
-
- See tmux/tmux.conf.local for how to add plugin, and then ctrl-b shift-i to install
- To update plugins: ctrl-b u
-
<ctrl>b <ctrl>sto save current layout<ctrl>b <ctrl>rto ressurect last saved layout
-
Autojump
- In shell
j somefolderto jump to a folder that contains somefolder that you cd'ed to previouslyjc somefolderto jump to a child folderjo [folder]to jump to a folder using the system's file manager<alt>left/right arrowto navigate between previous parent / child
Ripgrep
- In shell
rg <pattern>to find any files that contain the given patternvimrg <pattern>to open matching files in vim + highlight matches
- In vim
Rg <pattern>to ripgrep the given pattern<leader>rto ripgrep the current word