/dotfiles

Primary LanguageVim Script

My beloved config

Requirements

  • Be compatible on macOS and Linux
  • Make work in a terminal as efficient as possible

Software choices

why zsh over bash

  • Automatic cd: /usr has the same effect as cd /usr
  • Spelling correction: cd /uzr<Tab> is fixed to cd /usr
  • Path expansion cd /u/lo/b<Tab> expands to cd /usr/local/bin
  • Smarter completion for commands like git, ssh
  • Recursive globbing vim **/*.md opens all markdown files in the current dir and descendants
  • Fish-like features: zsh-autosuggestions, zsh-syntax-highlighting, zsh-history-substring-search

prezto modules

  • archive: add handy functions archive, unarchive
  • directory: add d and 1..9 to navigate through pushed directories. Also configures AUTO_CD, CDABLE_VARS
  • editor: add bindkey-all to display bind keys
  • fasd: quick navigation through frecent files and directories. add j and ,<Tab>
  • history: add history-stat

How to install

Linux

curl https://raw.githubusercontent.com/YannMoisan/dotfiles/master/scripts/setup | bash -s linux

Software

  • window manager : i3
  • terminal : urxvt

Keyboard shortcuts

tmux
shortcut description
ctrl+b ? help
ctrl+b [pn] prev/next window

Useful command for configuring X/i3

  • xset : user preference utility for X (bip, DPMS)
  • xset q : display current settings
  • xprop : property displayer for X (get window class for i3 config)
  • xev : print contents of X events (get keycodes for i3 config)
  • xinput : utility to configure and test X input devices (touchpad, …)
  • xinput list : list all the input devices
  • fc-list : list available fonts

Mac

Prerequisites

  • install brew and iterm2
  • brew install git
  • configure ssh keys in github
curl https://raw.githubusercontent.com/YannMoisan/dotfiles/master/scripts/setup | bash -s clone
curl https://raw.githubusercontent.com/YannMoisan/dotfiles/master/scripts/setup | bash -s git
curl https://raw.githubusercontent.com/YannMoisan/dotfiles/master/scripts/setup | bash -s zsh

Open a new tab in your terminal and p10k configuration will be launched automatically and will install Meslo fonts

Installation order

installation order

generated from the CLI with dot -Tpng installation-order.dot -o installation-order.png

Update the system

Failed to merge submodule modules/autosuggestions/external (commits don't follow merge-base)
CONFLICT (submodule): Merge conflict in modules/autosuggestions/external
    ❯ LANGUAGE=en_US.utf8 git submodule update
    Skipping unmerged submodule modules/autosuggestions/external
  • brew
    • brew update
    • brew upgrade
  • vim plugins
    • gws ff

CLI tools

  • bat: Clone of cat(1) with syntax highlighting and Git integration
  • ctop: Top-like interface for container metrics
  • diff-so-fancy: Good-looking diffs with diff-highlight and more)
  • exa: Modern replacement for 'ls' (so we don't need .dircolors anymore and tree)
  • fd: Simple, fast and user-friendly alternative to find
  • fzf: Command-line fuzzy finder written in Go
  • gh: GitHub command-line tool. Replacement of hub
  • git (install the brew version on Mac)
  • glances: Alternative to top/htop
  • gws: Manage workspaces composed of git repositories. Use to manage my VIM plugins.
  • htop: Improved top (interactive process viewer)
  • httpie: User-friendly cURL replacement (command-line HTTP client)
  • iftop: Display an interface's bandwidth usage
  • jq: Lightweight and flexible command-line JSON processor
  • ncdu: NCurses Disk Usage
  • ranger: File browser
  • rename: Perl-powered file rename script with many helpful built-ins
  • ripgrep: Search tool like grep and The Silver Searcher
  • shellcheck: Static analysis and lint tool, for (ba)sh scripts
  • tig: Text interface for Git repositories
  • tldr: Simplified and community-driven man pages
  • vim (install the brew version on Mac)
  • vivid: a generator for the LS_COLORS environment variable
  • youtube-dl: Download YouTube videos from the command-line

Dev

  • ammonite-repl
  • coursier
  • openjdk
  • sbt
  • scala

Troubleshooting

A script scripts/check displays useful pieces of information to help you spot the issue.

Thanks to