Created
May 26, 2011 19:01
-
-
Save arnorhs/993793 to your computer and use it in GitHub Desktop.
vim configs and snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snippet grad | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='${1:#cccccc}', endColorstr='${2:#ffffff}'); | |
background: -webkit-gradient(linear, left top, left bottom, from($1), to($2)); | |
background: -moz-linear-gradient(top, $1, $2); | |
${3} | |
snippet box | |
-moz-box-shadow: ${1:1px} ${2:1px} ${3:0px} ${4:0px} ${5:rgba(0,0,0, 0.1)}; | |
-webkit-box-shadow: $1 $2 $3 $4 $5; | |
box-shadow: $1 $2 $3 $4 $5; | |
${6} | |
snippet transition | |
-webkit-transition: ${1:all .25s ease-in}; | |
-moz-transition: $1; | |
transition: $1; | |
${2} | |
snippet radius | |
border-radius: ${1:10px}; | |
-moz-border-radius: $1; | |
-webkit-border-radius: $1; | |
${2} | |
snippet icon | |
display:inline-block; | |
width: ${1:16px}; | |
height: ${2:16px}; | |
margin-bottom: ${3:-2px}; | |
background: transparent url(${6:images/sprites.png}) no-repeat; | |
background-position: ${5:-0px} ${6:-0px} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generic Doctype | |
snippet doctype HTML 4.01 Strict | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
snippet doctype HTML 4.01 Transitional | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
snippet doctype HTML 5 | |
<!DOCTYPE HTML> | |
snippet doctype XHTML 1.0 Frameset | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
snippet doctype XHTML 1.0 Strict | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
snippet doctype XHTML 1.0 Transitional | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
snippet doctype XHTML 1.1 | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | |
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
# HTML Doctype 4.01 Strict | |
snippet docts | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
# HTML Doctype 4.01 Transitional | |
snippet doct | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
# HTML Doctype 5 | |
snippet doct5 | |
<!DOCTYPE HTML> | |
# XHTML Doctype 1.0 Frameset | |
snippet docxf | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> | |
# XHTML Doctype 1.0 Strict | |
snippet docxs | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
# XHTML Doctype 1.0 Transitional | |
snippet docxt | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
# XHTML Doctype 1.1 | |
snippet docx | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | |
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
snippet html | |
<html> | |
${1} | |
</html> | |
snippet xhtml | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
${1} | |
</html> | |
snippet body | |
<body class="${1:themed}"> | |
${2} | |
</body> | |
snippet head | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title> | |
</head> | |
${2} | |
snippet title | |
<title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title>${2} | |
snippet script | |
<script type="text/javascript" charset="utf-8"> | |
${1} | |
</script>${2} | |
snippet scriptsrc | |
<script src="${1}.js" type="text/javascript" charset="utf-8"></script>${2} | |
snippet style | |
<style type="text/css" media="${1:screen}"> | |
${2} | |
</style>${3} | |
snippet base | |
<base href="${1}" target="${2}" /> | |
snippet r | |
<br /> | |
snippet div | |
<div class="${1:class}"> | |
${2} | |
</div> | |
# Embed QT Movie | |
snippet movie | |
<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" | |
codebase="http://www.apple.com/qtactivex/qtplugin.cab"> | |
<param name="src" value="$1"`Close()`> | |
<param name="controller" value="$4"`Close()`> | |
<param name="autoplay" value="$5"`Close()`> | |
<embed src="${1:movie.mov}" | |
width="${2:320}" height="${3:240}" | |
controller="${4:true}" autoplay="${5:true}" | |
scale="tofit" cache="true" | |
pluginspage="http://www.apple.com/quicktime/download/" | |
`Close()[1:]`> | |
</object>${6} | |
snippet fieldset | |
<fieldset id="$1"> | |
<legend>${1:name}</legend> | |
${3} | |
</fieldset> | |
snippet field | |
<div class="field"> | |
<label for="${1}">${2}</label> | |
<input type="text" name="${3}" class="textinput" value="${4}" /> | |
</div> | |
{$5} | |
snippet form | |
<form action="${1:`Filename('$1_submit')`}" method="${2:get}" accept-charset="utf-8"> | |
${3} | |
<input type="submit" value="Save →" /> | |
</form> | |
snippet h1 | |
<h1 id="${1:heading}">${2:$1}</h1> | |
snippet input | |
<input type="${1:text}" name="${2:some_name}" class="${2:textinput}" value="${3}"`Close()`>${4} | |
snippet label | |
<label for="${2:$1}">${1:name}</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="${5}" id="${6:$2}"`Close()`>${7} | |
snippet link | |
<link rel="${1:stylesheet}" href="${2:/css/master.css}" type="text/css" media="${3:screen}" charset="utf-8" />${4} | |
snippet mailto | |
<a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a> | |
snippet meta | |
<meta name="${1:name}" content="${2:content}"`Close()`>${3} | |
snippet opt | |
<option value="${1:option}">${2:$1}</option>${3} | |
snippet optt | |
<option>${1:option}</option>${2} | |
snippet select | |
<select name="${1:some_name}" id="${2:$1}"> | |
<option value="${3:option}">${4:$3}</option> | |
</select>${5} | |
snippet table | |
<table class="${1}"> | |
<thead> | |
<tr> | |
<th></th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td></td> | |
</tr> | |
</tbody> | |
</table>${2} | |
snippet textarea | |
<textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">${4}</textarea>${5} | |
# Arnor snippets: | |
snippet tag | |
<${1:tag}>${2:$1}</$1>${4} | |
snippet ready | |
$(document).ready(function(){ | |
${1:// js code here :)} | |
}); | |
snippet span | |
<span class="${1:class}">${2:content}</span>${3} | |
snippet clear | |
<div class="clear"><!-- clear --></div>${1} | |
snippet sr | |
<script${1: type="text/javascript"}> | |
$(document).ready(function(){ | |
${2:// js code here :)} | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snippet php | |
<?php ${1} ?> | |
snippet phpif | |
<?php if (${1:/* condition */}) { ?> | |
${2:// code...} | |
<?php } ?> | |
snippet phpifel | |
<?php if (${1:/* condition */}) { ?> | |
${2:// code...} | |
<?php } else { ?> | |
${3:// code...} | |
<?php } ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" enable plugins | |
:filetype plugin on | |
" tabstops.. | |
:set tabstop=4 | |
:set sw=4 | |
" set c-style indenting according to brackets - for autoindent magic | |
:set cindent | |
" choose a better font | |
:set guifont=Inconsolata:h14 | |
" show line numbers | |
:set number | |
" start maximized: | |
au GUIEnter * simalt ~x | |
set encoding=utf-8 | |
" don't want lines to wrap... | |
:set nowrap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment