Skip to content

Instantly share code, notes, and snippets.

View Edderic's full-sized avatar

Edderic Ugaddan Edderic

View GitHub Profile
@Edderic
Edderic / gist:7be5d3524f13300f9c09
Created September 21, 2014 01:52
Show current branch state in Git
GIT_PS1_SHOWDIRTYSTATE=true
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;33m\]\w\[\033[00m\]\[\033[01;31m\]$(__git_ps1 " {%s}")\[\033[00m\]\$ '
nnoremap <leader>sv :source $MYVIMRC<cr>
augroup Markdown
autocmd!
" some code here
autocmd Filetype markdown inoremap <buffer> <Leader>` ``````<Esc>2hi
augroup end
@Edderic
Edderic / gist:5bda849ec949137f6162
Last active August 29, 2015 14:01
Tips & Snips

Terminal:

  • OPTION + LEFT / RIGHT skips words backwards/forwards.
  • CTRL + k deletes everything at the right of the cursor.
  • CTRL + u deletes everything at the left of the cursor.

Vim:

  • in Command Mode:
    • gg/G goes to start/end of file.
      • 39gg moves cursor to line 39.
  • 39G moves cursor to line 39.