/Dot-It-Up

A collection of dotfile scripts, plugins, and clever hacks so that you can become the master of your own OS! 🚀

MIT LicenseMIT

Dot It Up 🔥

A collection of dotfile scripts, plugins, and clever hacks so that you can become the master of your own OS!

Dot It Up

contributions welcome

Table Of Contents

Popular Dotfiles

  • holman - @holman does dotfiles
  • LukeSmithxyz - My dotfiles (deployed by LARBS)
  • mathiasbynens - 🔧 .files, including ~/.macos — sensible hacker defaults for macOS
  • lewagon - Default configuration for Le Wagon's students
  • jessfraz - My dotfiles. Buyer beware ;)
  • cowboy - My Ubuntu / OS X dotfiles.
  • amacgregor - Dotfiles repository
  • alrra - 💻 macOS / Ubuntu dotfiles
  • CoreyMSchafer - My dotfiles and personal preferences
  • justone - Dotfiles
  • webpro - A curated list of dotfiles resources.
  • thoughtbot - A set of vim, zsh, git, and tmux configuration files.
  • driesvints - Get started with your own dotfiles.
  • TheLocehiliosan - Yet Another Dotfiles Manager
  • skwp - YADR - The best vim,git,zsh plugins and the cleanest vimrc you've ever seen
  • anishathalye - A tool that bootstraps your dotfiles ⚡️
  • theniceboy - My dotfiles
  • paulirish - paul's shell, git, etc config files. also homebrew, migration setup. good stuff.
  • webpro - Dotfiles for macOS
  • awesome-streamers - Dotfiles for various streamers on Twitch.
  • dotphiles - A community driven framework of dotfiles.
  • fatih - My personal dotfiles
  • jessfraz - My .vim dotfiles and configurations.
  • freekmurze - My personal dotfiles
  • joedicastro - My .dotfiles
  • michaeljsmalley - My dotfiles
  • freshshell - Keep your dotfiles fresh.
  • jaagr - dotfiles for my local setup
  • spencerwooo - Dotfiles for all :D
  • twpayne - Manage your dotfiles across multiple diverse machines, securely.
  • nickjj - Personal dotfiles (Vim, tmux, zsh, etc.)

Vim

Some of the settings here may reference a 'leader' key, use:

let mapleader="{Your Key Of Choice}"

Sane-er Defaults

Enables syntax highlighting, why wouldn't you?

syntax on

Shows you line numbers, it's great:

set number

Copy and paste from the system clipboard, and avoid indentation issues:

noremap <leader>y "+y
noremap <leader>p "+p

Makes the backspace key behave like you'd expect, and go through EVERYTHING:

set backspace=indent,eol,start

Makes 1 tab = 4 spaces:

set shiftwidth=4
set tabstop=4

Convert tabs to spaces:

set expandtab

Always try to show 10 lines above and below the cursor location:

set scrolloff=10

Allows you to switch between buffers without saving EVERY TIME:

set hidden

Case insensitive in command-line mode:

set wildignorecase

Change to the correct indention and plugins dependent on the file type

filetype on
filetype indent on
filetype plugin on
" or one line alternative
filetype plugin indent on

KO Key-Strokes

Normal mode

Visually select the entire file:

ggVG

Search for the word under the cursor (forward):

*

Search for the word under the cursor (backward):

#

Re-run the last command-line command:

@:

Insert mode

Alternative to Esc:

<C-[>

Paste the content of register and fix the indent:

<C-r><C-p><vim-register>
" for example: <C-r><C-p>+ (paste clipboard content into vim)

Delete until the beginning of recently added word:

<C-w>

Delete until the beginning of where entering insert mode:

<C-u>

Visual mode

Add/minus number for each matching line:

g<C-a> " add one number
g<C-x> " minus one number
" for example:
" select the number below using Visual block command:
" 0
" 0
" 0
" if we use g<C-a>, then those three line will become:
" 1
" 2
" 3

Handy-Dandy Commands

Reads and inserts the contents of a file at the current line:

:r {your file name}

Reads and inserts the output of a shell command at the current line:

:r! {your shell command, eg: ls}

Find and replace "foo" with "bar" through whole file!

:%s/foo/bar/g

Remaps, Baby!

Move visual selection up and down a line:

vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv

Quickly re-select either the last pasted or changed text:

noremap gV `[v`]

Run the recorded macro on a range of lines:

" Credit goes to https://github.com/stoeffel/.dotfiles/blob/master/vim/visual-at.vim
xnoremap <silen> @ :<C-u>echo "@".getcmdline() | execute ":\'<,\'>normal @" . nr2char(getchar())<CR>

Format a paragraph or visual selection to 80 character lines:

" Taken from: https://github.com/nickjj/dotfiles/blob/599f90a959f58c4ba3b771c9d933f2eeb83eef94/.vimrc#L305
nnoremap <Leader>g gqap
xnoremap <Leader>g gqa

Avoiding RSI

If you use command mode a lot, swapping the colon and semi-colon keys means 1 less keypress:

nnoremap ; :
nnoremap : ;

Write to and exit the file, behaves like :wq:

ZZ

Exit without saving, behaves like :q!:

ZQ

Run the current line as a command:

:<Ctrl-r> <Ctrl-l>

Nicer Navigation

Allows the cursor to move up and down naturally by display, lines instead of file lines:

nnoremap j gj
nnoremap k gk

Make yanking with capital Y behave like the other capital letters, and yank until the end of the line:

nnoremap Y y$

Press space to go down 10 lines, control + space to go up 10 lines:

noremap <Space> 10j
noremap <C-Space> 10k
" if there's an issue with ctrl-space, you can use <C-@> or <Nul>
" Ref: https://stackoverflow.com/a/24983736
noremap <C-@> 10k

File and Buffer Navigation (but better)

Press space twice to switch between your last two buffers, use it all the time for superfast switching:

nnoremap <leader><leader> <c-^>

Switch buffers with Left and Right arrow keys:

nnoremap <left> :bp<cr>
nnoremap <right> :bn<cr>

Text searching

Search for foo throughout file (press n for next, N for previous):

/foo

Searching ignores case unless an upper case letter is present in the query:

set ignorecase smartcase

Begin searching while typing, highlighting matches:

set incsearch hlsearch

Press your 'leader' key + enter to clear search highlighting:

nnoremap <silent> <leader><CR> :noh<CR>

Get Specific Help

Description Prepend Example
Normal mode command (nothing) :help x
Visual mode command v_ :help v_u
Insert mode command i_ :help i_META
Command-line command : :help :quit
Option ' :help 'textwidth'
Command-line editing c :help c_<BS>
Vim command argument - :help -r
Search flags / :help /\U
Substitution flags s/ :help s/\&

Super-Cool Plugins

A fuzzy-finder to easily search for files, contents & buffers:

junegunn/fzf.vim

Provides mappings to easily delete, change and add parentheses, brackets, quotes, and tags:

tpope/vim-surround

An integrated git experience in vim, that's "so awesome, it should be illegal":

tpope/vim-fugitive

Vim like navigation of file system using buffers.

justinmk/vim-dirvish

ColorSchemes

  • vim-colors-solarized - precision colorscheme for the vim text editor
  • vim - FlatColor vim colorscheme
  • vim-one - Adaptation of one-light and one-dark colorschemes for Vim
  • jellybeans.vim - A colorful, dark color scheme for Vim.
  • vim-github-colorscheme - A vim colorscheme based on Github's syntax highlighting.
  • onedark.vim - A dark Vim/Neovim color scheme inspired by Atom's One Dark syntax theme.
  • Apprentice - A dark, low-contrast, Vim colorscheme.
  • srcery-vim - Dark colorscheme for gvim and vim
  • vim-janah - Vim colorscheme.
  • tender.vim - A 24bit colorscheme for Vim, Airline and Lightline
  • Alduin - A Vim Colorscheme
  • vim-solarized8 - Optimized Solarized colorschemes. Best served with true-color terminals!
  • vim-colorscheme-primary - Primary, a Vim color scheme based on Google's colors
  • vim-vividchalk - vividchalk.vim: a colorscheme strangely reminiscent of Vibrant Ink for a certain OS X editor
  • nvcode-color-schemes.vim - A bunch of generated colorschemes (treesitter supported)
  • vim-afterglow - Vim adaptation of the Afterglow colorscheme
  • desert.vim - desert colorscheme
  • wal.vim - 🎨 A vim colorscheme for use with wal
  • Sierra - A Vim Colorscheme
  • vim-gruvbox8 - A simplified and optimized Gruvbox colorscheme for Vim
  • space-vim-dark - 💜 A dark colorscheme for space-vim, see space-vim-theme for light background support!
  • vim-kalisi - The colorscheme with neovim in mind
  • candid.vim - A dark colorscheme with vibrant colors
  • anderson.vim - Dark vim colorscheme based on colors from Wes Anderson films
  • kuroi.vim - A very dark colorscheme for Vim
  • landscape.vim - A colorscheme for Vim
  • nord-vim - An arctic, north-bluish clean and elegant Vim theme.
  • vim-monotone - A dark, monochrome colorscheme for vim

TMUX

Most of the settings here require a prefix key, use this to set it, or keep it as ctrl+b, it's your life ;)

unbind C-b
set -g prefix {Your Key Of Choice}

Better Life, From the Start!

Tmux Windows start from 1, so no big reaches ;)

set -g base-index 1

Makes keys register instantly, you may notice escape delays in vim without this:

set -s escape-time 0

Prefix+c will open a new tmux session in your current directory:

bind c new-window -c "#{pane_current_path}"

Renumber windows sequentially after closing any of them:

set -g renumber-windows on

Enable mouse, it's sometimes nice for scrolling:

set -g mode-mouse on

Increase scroll-back history, so you can see more:

set -g history-limit 10000

Plugins That Rock!

Installing TPM (Tmux plugin manager):

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

A set of tmux options that should be acceptable to everyone. tmux-sensible

Shell (ZSH & Bash)

Oh-My-ZSH

Gives you more customization over your shell

Install:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Add to zshrc:

ZSH=~/.oh-my-zsh

Gnarly Plugs, Man

Auto-complete shell commands, it's cool:

zsh-autosuggestions

Highlight your current command, lets you know what's going on:

zsh-syntax-highlighting