Skip to content

Instantly share code, notes, and snippets.

View charlesthomas's full-sized avatar

Charles Thomas charlesthomas

View GitHub Profile
@charlesthomas
charlesthomas / .vimrc
Created April 1, 2014 15:03
Set window title to hostname when exiting vim
" If you use settitle, vim will set the window title to the file you have open, but when you exit, it sets the window title to
" Thanks for Flying Vim.
" In order to set it to the hostname of the machine you're on when exiting, use this:
execute "set titleold=".hostname()
@charlesthomas
charlesthomas / .vimrc
Created May 5, 2014 21:35
Comment / Uncomment line in vim w/ctrl+c / ctrl + u
" Comment / Uncomment line in vim w/ctrl+c / ctrl + u
nmap <C-c> V: s/\v^(\s*)/\1# /g<CR>:nohls<CR>
vmap <C-c> : s/\v^(\s*)/\1# /g<CR>:nohls<CR>