This is a collection of all the dotfiles and configuration that I use for my workflow. This repository has been modeled off of another vim + tmux workflow. If you have any questions about how this all works, please ping me.
- Initial Setup and Installation
- ZSH Setup
- Vim and Neovim Setup
- Tmux Configuration
- Git configuration
- OSX configuration
- Homebrew
- Node Installation
If on OSX, you will need to install the XCode CLI tools before continuing. To do so, open a terminal and type
xcode-select --installThen, clone the dotfiles repository to your computer. This can be placed anywhere, and symbolic links will be created to reference it from your home directory.
git clone https://github.com/nicknisi/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.shinstall.sh will start by initializing the submodules used by this repository. Then, it will install all symbolic links into your home directory. Every file with a .symlink extension will be symlinked to the home directory with a . in front of it. As an example, vimrc.symlink will be symlinked in the home directory as ~/.vimrc. Then, this script will create a ~/.vim-tmp directory in your home directory, as this is where vim is configured to place its temporary files. Additionally, all files in the $DOTFILES/config directory will be symlinked to the ~/.config/ directory for applications that follow the XDG base directory specification, such as neovim.
Next, the install 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. Then, it will run 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 to install Node.js (stable) using nvm.
There are a few steps left over in order to get everything set up the way I like it. These could not be automated by a script because they require human interaction.
- Open vim by typing
viminto the terminal. Run the:PlugInstallcommand in order to download all of my plugins. - cd to
~/.vim/plugged/YouCompleteMeand run./install.py --clang-completerin order to compile autocompletion with C support- this plugin will no longer be useful as soon as the
deopletecan do autocompletion asynchronously when neovim adds support for Ruby Plugins
- this plugin will no longer be useful as soon as the
- head back th
~/.dotfiles/installand type./snippets.sh. This will properly initialize all of my custom snippets with autocompletion. - Change your shell profile settings in order to use the Base16-eighties dark theme by default, and change your font to
Inconsolata for Powerline Plus Nerd File Types Plus Octicons Plus Pomicons Medium
After that you should be good to go!
If you are seeing blue numbers in the side of your console when you are using vim. It is because the font installation script changes your settings during installation. Run source ~/.dotfiles/.config/base16-shell/base16-eighties.dark.sh in order to change the shell colors back to the proper values.
ZSH is configured in the zshrc.symlink file, which will be symlinked to the home directory. The following occurs in this file:
- set the
EDITORto nvim - Load any
~/.terminfosetup - Set the
CODE_DIRvariable, pointing to the location where the code projects exist for exclusive autocompletion with theccommand - Recursively search the
$DOTFILES/zshdirectory for files ending in .zsh and source them - source a
~/.localrcif 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
~/binand$DOTFILES/bindirectories to the path - Setup NVM, RVM, and hub if they exist
- Set the base16 colorscheme to use for both the terminal (gnome-terminal) and vim/neovim by exporting the
$THEMEand$BACKGROUNDenvironment variables - And more...
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.
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 (⇣).
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 should just work once the correct plugins are installed. To install the plugins, you will need to open vim/neovim in the following way:
for vim
vim +PlugInstallfor neovim
nvim +PlugInstallCurrently I am using the Inconsolata font with Powerline support so that I can have good looking file icons when I use the NERDTree plugin in vim. If you would like to add any other fonts into your system, add the proper .otf file to ~/.dotfiles/.config/fonts/patched-fonts directory.
- zsh configuration
- vim configuration
- tmux configuration
- git configuration
- osx configuration
- Node.js setup (nvm)
- Homebrew
git clone https://github.com/nicknisi/dotfiles.git ~/.dotfilescd ~/.dotfiles./install.sh
By default, the .zshrc file will source any file within .dotfiles/zsh that have the .zsh extension.
Vim plugins are managed with vim-plug. To install, run vim +PlugInstall.