update zsh prompt
* update colors * replaced the needs_push call with arrows indicating whether a pull or push is needed (Thanks, pure) * clean up file and add comments * update README with thorough description of prompt * add section on ~/.zshrc to the README
This commit is contained in:
58
README.md
58
README.md
@@ -4,16 +4,16 @@ Welcome to my world. This is a collection of vim, tmux, and zsh configurations.
|
||||
|
||||
## Contents
|
||||
|
||||
+ Initial setup
|
||||
+ vim setup and neovim setup
|
||||
+ zsh setup
|
||||
+ tmux configuration
|
||||
+ git configuration
|
||||
+ OSX configuration
|
||||
+ Homebrew
|
||||
+ Node.js
|
||||
+ [Initial Setup and Installation](#initial-setup-and-installation)
|
||||
+ [ZSH Setup](#zsh-setup)
|
||||
+ [Vim and Neovim Setup](#vim-and-neovim-setup)
|
||||
+ [Tmux Configuration](#tmux-configuration)
|
||||
+ [Git configuration](#git-configuration)
|
||||
+ [OSX configuration](osx-configuration)
|
||||
+ [Homebrew](#homebrew)
|
||||
+ [Node Installation](#node-installation)
|
||||
|
||||
## Initial setup and installation
|
||||
## Initial Setup and Installation
|
||||
|
||||
If on OSX, you will need to install the XCode CLI tools before continuing. To do so, open a terminal and type
|
||||
|
||||
@@ -33,7 +33,45 @@ cd ~/.dotfiles
|
||||
|
||||
Next, the isntall script will perform a check to see if it is running on an OSX machine. If so, it will install Homebrew if it is not currently installed and will install the homebrew packages listed in [`brew.sh`](install/brew.sh). Then, it will run [`installosx.sh`](installosx.sh) and change some OSX configurations. This file is pretty well documented and so it is advised that you __read through and comment out any changes you do not want__. Next, the script will call [`install/nvm.sh`](install/nvm.sh) to install Node.js (stable) using nvm.
|
||||
|
||||
## vim and neovim setup
|
||||
## ZSH Setup
|
||||
|
||||
ZSH is configured in the `zshrc.symlink` file, which will be symlinked to the home directory. The following occurs in this file:
|
||||
|
||||
* set the `EDITOR` to nvim
|
||||
* Load any `~/.terminfo` setup
|
||||
* Set the `CODE_DIR` variable, pointing to the location where the code projects exist for exclusive autocompletion with the `c` command
|
||||
* Recursively search the `$DOTFILES/zsh` directory for files ending in .zsh and source them
|
||||
* source a `~/.localrc` if it exists so that additional configurations can be made that won't be kept track of in this dotfiles repo. This is good for things like API keys, etc.
|
||||
* Add the `~/bin` and `$DOTFILES/bin` directories to the path
|
||||
* Setup NVM, RVM, and hub if they exist
|
||||
* Set the base16 colorscheme to use for both the terminal (iTerm2) and vim/neovim by exporting the `$THEME` and `$BACKGROUND` environment variables
|
||||
* And more...
|
||||
|
||||
### Prompt
|
||||
|
||||
The prompt is meant to be simple while still providing a lot of information to the user, particularly about the status of the git project, if the PWD is a git project. This prompt sets `precmd`, `PROMPT` and `RPROMPT`.
|
||||
|
||||

|
||||
|
||||
The `precmd` shows the current working directory in it and the `RPROMPT` shows the git and suspended jobs info.
|
||||
|
||||
#### Prompt Git Info
|
||||
|
||||
The git info shown on the `RPROMPT` displays the current branch name, and whether it is clean or dirty.
|
||||
|
||||

|
||||
|
||||
Additionally, there are ⇣ and ⇡ arrows that indicate whether a commit has happened and needs to be pushed (⇡), and whether commits have happened on the remote branch that need to be pulled (⇣).
|
||||
|
||||

|
||||
|
||||
#### Suspended Jobs
|
||||
|
||||
The prompt will also display a ✱ character in the `RPROMPT` indicating that there is a suspended job that exists in the background. This is helpful in keeping track of putting vim in the background by pressing CTRL-Z.
|
||||
|
||||

|
||||
|
||||
## Vim and Neovim Setup
|
||||
|
||||
vim and neovim should just work once the correct plugins are installed. To install the plugins, you will need to open vim/neovim in the following way:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user