Moved to https://github.com/appaquet/dotfiles, managed with nix
-
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 fish
and 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
/fenv
to import ~/.profile variables:omf install foreign-env
bobthefish
theme:omf install bobthefish
and thenomf theme bobthefish
-
Notes
- You can still use your
~/.profile
as you would do in bash thanks to theforeign-env
plugin 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
cat
replacement 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 backgrounds
git config --global delta.navigate true
to allow navigation usingn
for next file, andShift-N
for 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 tldr
orbrew 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.fish
to~/.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.sh
to~/.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.1
orasdf 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
bin
to path:fish_add_path /Users/appaquet/dotfiles/bin
- or via
~/.profile
:PATH="$HOME/dotfiles/bin:$PATH"
- Add
- 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>w
to delete previous word - With input
<alt>e
to open input in editor
-
My leader key is bound to
\
(backslash) -
Useful custom commands
E
orNew
to create a new file in the directory as the current buffer's fileDelete
delete the file in current buffer without messing up vim's layoutRename
rename the current file and correctly replace current buffer with new fileAck
launches ack in a split buffer
-
Useful custom mappings
<leader> 1 through 9
to switch between opened buffers<leader>]
to switch to next buffer<leader>[
to switch to previous buffer<leader>w
to save current buffer<leader>x
to save and then execute current buffer (as long as it's chmod +x)<leader>z
to execute current visual selection in a shell<leader>r
to save current buffer and then executersync.sh
in working dir<leader>q
to close the current buffer (equivalent to:q
)<leader>w
to close the current buffer by trying not to messup the layout<leader><tab>
to switch between tab and spaces<ctrl>e
or<leader>e
to toggle Nerdtree (files)<leader>d
if YouCompleteMe is available, go to definition<ctrl>p
fuzzy finding file<ctrl>a
fuzzy find the current word in files using ack<leader>m
to toggle mouse support (useful to allow select + copy)<leader>y
to yank to clipboard using bin/pbcopy util<leader>p
to paste from clipboard using bin/pbpaste util
-
You can check
init.vim
for more commands / mappings
- In shell
<ctrl>t
for fuzzy file find<ctrl>r
for fuzzy history find
-
Main shortcuts
<ctrl>b e
to toggle synchronized panes<ctrl>b m
to toggle mouse support (useful to allow select + copy)<ctrl>b <ctrl>l
to navigate to next window<ctrl>b <ctrl>h
to navigate to prev window<ctrl>b Tab
to navigate to last window<ctrl>b <tab>
to navigate to last window<ctrl>b <alt><arrows>
to resize pane<ctrl>b r
to reload config<ctrl>b <enter>
to get into copy modev
for selectionctrl-v
to switch between between block and line selectiony
to yankH
andL
start line / end line
<ctrl>b q
to show pane ids, then:swap-pane -s X -t Y
to 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>s
to save current layout<ctrl>b <ctrl>r
to ressurect last saved layout
-
- In shell
j somefolder
to jump to a folder that contains somefolder that you cd'ed to previouslyjc somefolder
to jump to a child folderjo [folder]
to jump to a folder using the system's file manager<alt>left/right arrow
to navigate between previous parent / child
- 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>r
to ripgrep the current word