Skip to content

Instantly share code, notes, and snippets.

View mrmrs's full-sized avatar

Adam Morse mrmrs

View GitHub Profile
@mrmrs
mrmrs / .gitignore_global
Created August 20, 2013 18:08
Files I want github to ignore.
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@mrmrs
mrmrs / vimrc-front-end
Created August 6, 2013 19:48
VIMRC for vim beginners that are Front End Developer types.
set nocompatible
set title
set number " Show line numbers
set history=1000 " Default is 20, I'd rather set this to ∞
set nofoldenable " Don't fold shit
set laststatus=2 " Always show file status line
set encoding=utf-8
setlocal tabstop=4
setlocal shiftwidth=4
csslint --ignore=box-model,universal-selector,underscore-property-hack,star-property-hack
@mrmrs
mrmrs / random
Created August 2, 2013 04:34
Random useful things
# Test to see if url is serving up gzipped content
curl --head --compressed URL
-------- HTACCESS STUFF ------
# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP
set nocompatible
set title
set number
set history=1000 " Default is 20, I'd rather set this to ∞
set nofoldenable " Don't fold shit
set laststatus=2
set encoding=utf-8
execute pathogen#infect()
syntax on
" Smarter defaults
set nocompatible " Uses vim vs vi settings must be set first
syntax on " Turn on syntax highlighting for recognized filetypes
set history=1000 " Default is 20, I'd rather set this to ∞
set nofoldenable " Don't fold shit
set wildmenu " List outoptions for autocompleting commmands
set number " Adds line numbers
set visualbell " Never hear beep again === happy
@mrmrs
mrmrs / favorite-vim.md
Created June 12, 2013 05:44
Examples of common tasks. Can be mapped to anything you want.

Delete all blank lines in a file

:g/^$/d

Delete trailing white space

:%s/\s+$//

@mrmrs
mrmrs / html-css-nav
Created June 7, 2013 00:34
.vimrc mappings for super easy front-end file management. When your cursor is over a class name, press fj to step to the first definition of that class in your css/sass. Subsequently press cn to step through the quick-fix list results. These can obviously be mapped to anything you want. I like this combo personally.
map fj :execute "vimgrep /" . expand("<cword>") . "/j **" <Bar> cnext<CR>
map cn :cn<CR>
@mrmrs
mrmrs / vim-random
Last active December 16, 2015 04:29
let @+=@" "This copies your latest buffer to clipboard
vim --version look for +clipboard
@mrmrs
mrmrs / change-file-extension
Last active December 15, 2015 22:39
Rename all css files to scss. Could be used to change extension for any two file types.
for file in *.css
do
mv ${file} ${file%.css}.scss
done