Skip to content
forked from skwp/dotfiles

YADR - The best vim,git,zsh plugins and the cleanest vimrc you've ever seen

Notifications You must be signed in to change notification settings

fklassen/dotfiles

 
 

Repository files navigation

dotfiles

These are my personal dotfiles based on pure prompt

Installation

Prerequisites

  • A Unix-like operating system: macOS, Linux, BSD. On Windows: WSL2 is preferred, but cygwin or msys also mostly work.
  • Zsh should be installed (v4.3.9 or more recent is fine but we prefer 5.0.8 and newer). If not pre-installed (run zsh --version to confirm)
  • curl or wget should be installed
  • git should be installed (recommended v2.4.11 or higher)

To get started please run:

sh -c "`curl -fsSL https://raw.githubusercontent.com/fklassen/dotfiles/master/install.sh`"

Basic Installation

Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl, wget or another similar tool.

Method Command
curl sh -c "$(curl -fsSL https://raw.githubusercontent.com/fklassen/dotfiles/master/tools/install.sh)"
wget sh -c "$(wget -O- https://raw.githubusercontent.com/fklassen/dotfiles/master/tools/install.sh)"
fetch sh -c "$(fetch -o - https://raw.githubusercontent.com/fklassen/dotfiles/master/tools/install.sh)"

Note that any previous .zshrc will be renamed to .zshrc.pre-dotfiles. After installation, you can move the configuration you want to preserve into the new .zshrc.

Wait, you're not done! Do this:

Install GruvBox Colors

Set up a system wide hotkey for iTerm (Keys=>Hotkey)

Recommended Cmd-Escape, which is really Cmd-Capslock.

In iTerm, uncheck "Native full screen windows" on General

This will give you fast full screen windows that are switchable without switching to spaces.

in MacVim, uncheck "Prefer native full-screen support" under Advanced settings

Same as iTerm. The native spaces navigation slows everything down for no reason.

If you want to run vim in terminal

  • Make sure you install Solarized colorscheme in your terminal!

  • If you don't want to use solarized terminal, then make sure you do this:

    let g:yadr_using_unsolarized_terminal = 1 # in ~/.vimrc

Git Customizations:

dotfiles will take over your ~/.gitconfig, so if you want to store your usernames, please put them into ~/.gitconfig.user

It is recommended to use this file to set your user info. Alternately, you can set the appropriate environment variables in your ~/.secrets.

Tmux configuration

tmux.conf provides some sane defaults for tmux on Mac OS like a powerful status bar and vim keybindings. You can customize the configuration in ~/.tmux.conf.user.

Navigation

  • ,z - go to previous buffer (:bp)

  • ,x - go to next buffer (:bn)

  • Cmd-j and Cmd-k to move up and down roughly by functions (Alt in Linux)

  • Ctrl-o - Old cursor position - this is a standard mapping but very useful, so included here

  • Ctrl-i - opposite of Ctrl-O (again, this is standard)

My Shell Setup

Much of my information comes from here and his YouTube video.

Note that this will backup and replace your existing ~/.zshrc file

You'll need zsh to install Oh My Zsh. Run zsh --version to check if you have it.

macOS

  • install HomeBrew (probably already installed)

  • install iTerm2

  • install/configure iTerm2 colour themes Grove Box contrib

  • install prereqs

    • need to install Nerd Fonts (may want other fonts but must be Nerd variety)

      brew tap homebrew/cask-fonts
      brew install --cask font-meslo-lg-nerd-font
      brew install --cask font-hack-nerd-font
      brew install --cask font-fira-nerd-font
    • Configure iTerm2 to use one of the nerd fonts (I like hack)

    • needed for dotfiles module fasd

      brew install fasd
      brew install terminal-notifier
      brew install thefuck
    • install ls replacement exa

      brew install exa
  • continue to Common Install Steps

Linux

  • install some terminal tools

    sudo apt install curl exa fasd fzf thefuck tmux vim-nox
    
  • install Tilex

    sudo apt install tilix
  • install/configure Tilex colour themes Grove Box for Tilix

  • install prereqs

    • If which zsh not installed, then install with sudo apt install zsh. Next, change your login shell with chsh -s $(which zsh)

    • need to install Nerd Fonts (may want other fonts but must be Nerd variety)

      • I download, expand, open Nautilus and double-click on each non-Windows font
    • configure Tilix to use the Nerd font (I like Hack)

  • continue to Common Install Steps

Windows

  • Install Git Bash, if not already installed
  • Optionally install Windows Terminal
  • Install Zsh (not dotfiles) using these instructions
    • you may need to download PeaZip to extract the file

    • once .zst is extracted and copied to /c/Program\ Files/Git/ open an admin Git Bash and do ...

      fklassen@FREDKLASSENA265 MINGW64 ~
      $ cd /
      fklassen@FREDKLASSENA265 MINGW64 /
      $ tar xvf zsh-5.9-2-x86_64.pkg.tar
      
    • for .bashrc I prefer to append this entry so I can start the bash shell from zsh

      /c/Windows/System32/chcp.com 65001 > /dev/null 2>&1
      if [ -t 1 ] && [ "$0" = "/usr/bin/bash" ]; then
        exec zsh
      fi
      
    • install fasd

      • git clone https://github.com/clvv/fasd.git
      • open and Git Bash terminal in Administrator mode, cd to above directy and
        • make install
    • continue with instructions to install Zsh

  • install Oh My Posh in a PowerShell with commands:
    • winget install oh-my-posh
    • winget install XP8K0HKJFRXGCK
    • winget upgrade oh-my-posh
  • need to install Nerd Fonts (may want other fonts but must be Nerd variety)
    • I download, expand, open with Explorer and double-click on each Windows font
  • Windows Terminal does not seem to accept Nerd Fonts so I updated fonts in Git Bash shortcut and mainly use that.
  • continue to Common Install Steps

Common Install Steps

  • install customized dotfiles fork

    • fork fklassen fork of dotfiles to your personal account, or simpler yet use fklassen/dotfiles if you don't plan to modify anything

      https://github.com/fklassen/dotfiles/fork
    • if you forked, optionally modify README.md and tools/install.sh to point to your repo so that you don't need REPO=fklassen/dotfiles during installation

    • optionally customize forked repo to match your preferences

    • run installer

      • if you are using fklassen/dotfiles ...

        sh -c "$(curl -fsSL <https://raw.githubusercontent.com/fklassen/dotfiles/master/tools/install.sh>)"
      • if you forked your own repo ...

        REPO=<your_github_id>/dotfiles sh -c "$(curl -fsSL <https://raw.githubusercontent.com/fklassen/dotfiles/master/tools/install.sh>)"
      • initialize submodules

        cd ~/.dotfiles
        git submodules update --init
        
    • ... or if that doesn't work simply git clone --recurse-submodules https://github.com/fklassen/dotfiles.git

    • configure '~/.zshrc` (see Getting Started)

      • I personally like to make a symbolic link so I can commit my changes to my forked config

        cd
        ln -sf ~/.dotfiles/templates/zshrc.zsh-template .zshrc
        
  • optionally install Starship

    • copy or link Starship config file

      mkdir -p ~/.config
      cd ~/.config
      ln -s ~/.dotfiles/templates/starship.toml
      
    • run installer

      curl -sS https://starship.rs/install.sh | sh
      
  • install fzf for zsh-interactive-cd support

  • Start a terminal session

Post install

There are a few things that can make things even better

  • set up GIT configuration

    • cd && ln -s ~/.dotfiles/plugins/gitconfig .gitconfig

    • create a ~/.gitconfig.user for user-specific GIT settings

      [user]
        name = Fred Klassen
        email = fred.klassen@broadcom.com
        #email = fklassen@appneta.com
        signingkey = 84E4FA215C934A7D97DC76D5E9E2149793BDE17E
      
  • create ~/.inputrc

    set editing-mode vi
    set bell-style none
    
  • if tmux is installed install tmux config Oh My Tmux

  • install vim config SpaceVim

  • install Mosh replacement Eternal Terminal

  • on macOS

About

YADR - The best vim,git,zsh plugins and the cleanest vimrc you've ever seen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 98.4%
  • Python 1.5%
  • Makefile 0.1%