Giter VIP home page Giter VIP logo

dotfiles's Introduction

Dotfiles

Obviously this setup works for me, a JavaScript developer, but this particular setup may not work for you. If this particular setup doesn't work for you, please steal ideas from this and if you like, contribute back tips, tricks, PRs, and other tidbits if you like!

Contents

Initial Setup and Installation

Backup

First, you may want to backup any existing files that exist so this doesn't overwrite your work.

Run install/backup.sh to backup all symlinked files to a ~/dotfiles-backup directory.

This will not delete any of these files, and the install scripts will not overwrite any existing. After the backup is complete, you can delete the files from your home directory to continue installation.

Installation

Then, 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.sh

install.sh will start by initializing the submodules used by this repository (if any). Read through this file and comment out anything you don't want installed. 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.

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
  • Setup zplug plugin manager for zsh plugins and installed 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
  • 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 (⇣).

dotfiles's People

Contributors

jptcnde avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.