Skip to content

lanespade/lsh

Repository files navigation

Installation

Disclaimer

This is only tested on the latest M1 macOS

  • Creates / replaces ~/.ignore
  • Reinstalls nvm (via zsh-nvm)
  • Creates / replaces ~/.nvmrc with 'stable'
  • Installs npm
  • Replace ~/Library/Preferences/com.apple.Terminal.plist in order to...
    • Default to Homebrew
    • Switch to Fira Code Light font
    • Enable "Use option as Meta Key"

tl;dr

  1. git clone https://github.com/lanespade/lsh.git
  2. cd lsh
  3. ./install.zsh
  4. Logout and log back in

Shell Breakdown (.zshrc)

NVM

Loads zsh-nvm plugin to enable nvm with completion

Custom Prompt

Loads spaceship

Completion

Enables zsh and bash built-in completions

FZF Completion

Loads fzf-tab plugin to enable fuzzy completion

FZF

Opinionated, minimal configuration of the fzf keybindings, Alt-C, Ctrl-R, and Ctrl-T

Alt-C

Finds directory to change to by name, starting at the home directory using fd while previewing contents using tree

Ctrl-T

Finds file by name, starting in the current directory using fd in fullscreen mode while previewing contents using bat

Interactive Git

Enables forgit for interactive git commands

Aliases

Primarily around git and the extremely valuable l alias (inspired by oh-my-zsh)

Custom Key Bindings

Ctrl-f (Find in Files)

A key binding connected to a function that combines fzf and rg to search file contents and selected files back to the prompt to be used however (i.e. opened with an editor, removed, moved, chmod, etc.)

Ctrl-x (Kill Process)

A key binding connected to a function that combines fzf and ps to filter, select (multi), and terminate kill-able processes

Auto Suggestions

Loads zsh-autosuggestions plugin to enable suggestions as you type

Syntax Highlighting

Loads zsh-syntax-highlighting plugin to enable syntax highlighting as you type