Skip to content

Instantly share code, notes, and snippets.

@rconradharris
Created May 13, 2016 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rconradharris/b7a9ecc47bbc07ac6d9c5ae9d4d397fa to your computer and use it in GitHub Desktop.
Save rconradharris/b7a9ecc47bbc07ac6d9c5ae9d4d397fa to your computer and use it in GitHub Desktop.
set rtp+=/usr/local/go/misc/vim
filetype plugin indent on
""" Turn off vi-compat mode
set nocompatible
""" Turn on coloring
syntax on
""" Desert omits a dark blue so is nice for darkbg
colorscheme desert
""" Cursorline highlighting
set cursorline
hi CursorLine cterm=NONE ctermbg=blue ctermfg=white guibg=blue guifg=white
autocmd WinEnter * setlocal cursorline
autocmd WinLeave * setlocal nocursorline
set visualbell
""" Scripting language defaults
set expandtab
set textwidth=78
"set wrap
""" Python Convention
set shiftwidth=4
set tabstop=4
map ,sw4 :set ts=4 sw=4<CR>
""" Guess indentation level (when pasting text use :set pastemode)
set autoindent
set smartindent
""" Highlight the tokens that match the search
set hlsearch
""" Start searching after each typed character
set incsearch
""" Ignore the case of the search term when all lowercase
set ignorecase
set smartcase
""" Always maintain at least two lines of context around working-line
set scrolloff=2
""" Present a menu of matching files when using wildcard completion
set wildmenu
set wildmode=list:longest,full
set wildignore=*.pyc
""" Match brackets
set showmatch
""" Show line and column numbers
set ruler
""" When deleting a softtab, delete a shiftwidth number of spaces
set smarttab
""" Reload/edit vimrc easily
map ,rv :so ~/.vimrc<CR>
map ,ev :new ~/.vimrc<CR>
""" git-diff current file
map ,gd :!git diff %<CR>
map ,gdd :!git diff<CR>
map ,gb :!git blame %<CR>
""" ctags
map ,bt :!ctags -o .tags -R .<CR>
set tags=.tags
""" TODO file
map ,td :new ~/Documents/TODO<CR>
map ,id :new ~/Documents/IDEAS<CR>
map ,sc :new ~/Documents/work/scratchpad.txt<CR>
""" Insert Timestamp/Date
map ,ts :r! date +"\%Y-\%m-\%d \%H:\%M:\%S"<CR>
""" Standup Notes
nmap ,st :new ~/Documents/work/STANDUP<CR>
nmap ,dt :r! date +"\%Y-\%m-\%d"<CR>$"="\nPENDING\n\n\n\nDONE\n\n"<CR>pjjj"="- "<CR>pA
""" Remove toolbar in MacVim
set go-=T
""" Remove scrollbar in MacVim
set go-=r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment