.dotfiles
Vim script Shell Perl Python Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bash
bin
local
tools
vim
.gitignore
.gitmodules
README.md
ackrc
bash_profile
bash_prompt
bashrc
gitconfig
gitignore
gvimrc
inputrc
install.sh
vimrc

README.md

dotfiles

My bash configuration files with a couple of useful aliases.

Installation

Automatic way

Fire up your terminal and type the following in it:

$ curl https://raw.github.com/wschott/dotfiles/master/install.sh | sh

Don't worry, all your old files will be backed up!

Manual way

$ git clone git://github.com/wschott/dotfiles.git ~/.dotfiles
$ ~/.dotfiles/install.sh

Add requirements

$ git submodule init
$ git submodule update

Update every now and then

by running:

$ ~/.dotfiles/install.sh

VIM Mappings

Hints: = ESC, = CTRL, = SPACE, = CMD on OSX

General

  • ;; = : — easier command typing
  • jj, jk, ;; — exit to normal mode
  • H, L — go to start/end of line (EOL)
  • U — redo
  • Y — yank (copy) from cursor to EOL
  • ⎋⎋ — hide search highlights
  • Q — reformat paragraph
  • S — split line (opposite of J to join lines)
  • >, < — indent/deindent current block
  • . — repeat last command
    • >, . — indent many times
    • <, . — deindent many times
  • gw — swap words
  • {insert} ⌃F — omni completion
  • — fold/unfold current folding
  • ;s — substitute (search & replace)
  • ;* — replace word under cursor
  • ;c — find VCS merge conflict marker
  • ;1 — add a Markdown H1 below current line
  • ;v — select the just pasted text
  • {insert} ⌃v — paste from OS clipboard
  • ;y, ;Y — copy to OS clipboard
  • ;p, ;P — paste from OS clipboard
  • ;vs — reload .vimrc
  • %% — puts the current path to the command line
  • ;ft — fold html tag
  • ;S — sort CSS properties

Open/Save/Close files

  • ;e — edit
  • ;t — tabedit
  • ;es — split
  • ;ev — vsplit
  • ;w — save
  • ;W, ;x — save and close file
  • ;q — close file
  • ;Q — close all files
  • ;d — open directory of current file in current tab
  • ;dt — open directory of current file in new tab

Tabs

  • ⌃j, ⌃k — go to previous/next tab

Splits

  • ⌃h, ⌃l — go to left/right split
  • ;H, ;L — create a split on the left/right side
  • ;K, ;J — create a split above/below
  • +, - = _ — increase/decrease split size
  • ;= — set width of all splits to equal size
  • T — move split window into new tab
  • ;mw and ;pw — swap split windows
    1. ;mw — mark first window for swap
    2. ;pw — swap current window with the previously marked one

Toggles

  • ;pp — toggle paste mode
  • ;\ — toggle line wrapping
  • ;inv — toggle invisibles
  • ;num — toggle line numbers
  • ;C — toggle "keep current line in the center of the screen" mode

Set Filetype

  • _d — diff
  • _md — markdown
  • _dp — django python
  • _dh — django html

Mac OS X

  • ⌘k, ⌘{ — go to previous tab
  • ⌘j, ⌘} — go to next tab
  • ⌘1⌘9 — switch to tab #

Python

  • E — execute in python

VIM plugins

  • Powerline statusline
  • NERDTree
    • ⌃w — show NERDTree file browser
  • CtrlP
    • Commands and help
      1. run :helptags ~/.vim/bundle/ctrlp/doc in vims command mode
      2. open CtrlP with :CtrlP or ⌃p and type ? to show the help
    • ⌃p — show CtrlP fuzzy file/buffer/MRU finder
    • ⌃n, ⌃p — select next/previous search from history
    • ⌃f, ⌃b — switch between search modes (file/buffer/MRU)
    • ⌃r — switch to regex search
    • ⌃d — switch to filename/full path search
  • Tagbar
    • ⌃t — show Tagbar outline viewer
  • vim surround
    • change, delete, add surroundings
    • possible surroundings: ", ', `, (, ), {, }, [, ] or even <q> for html tags, etc.
      • { adds a space, } doesn't
    • normal mode
      • cs<oldc><newc> [ cs"( ] — change surround from <oldc> to <newc>
      • ds<c> [ ds" ] — delete surrounding <c>
      • ys<object><c> [ ysiw] ] — add [] around text object (inner word)
      • yss<c> [ yss) ] — add () around entire line
    • surround selection with quotes, parentheses, braces, etc..
      1. select something in visual mode
      2. S(, S), S[, S], S{, S}, S", S', S`
      • useful for example with the following:
        1. type some text
        2. ;v to select the recently typed text (;v is no vim default, defined before)
        3. S" to make a quote
  • Comma Object
    • change/delete arguments in function calls (or simply comma delimited (), [] or {} lists)
    • da,, di,, ca,, ci, — delete/change a comma/inner comma
  • vim git
  • taskpaper
    • ;td — mark as done
    • ;tx — mark as cancelled
    • ;tp — fold all projects
    • ;ta — show all projects
    • ;tc — show all tasks with context under cursor
  • PyRef
    • K — show python reference in browser
  • Python (by Sergei Matusevich)
    • % — jump to the end of the indented block and back
    • FN-F5 — execute current file

Thanks to...

Help