Permalink
Browse files

Merge branch 'master' of https://github.com/seejohnrun/dotfiles

Conflicts:
	.screenrc
	.vim/ftdetect/io.vim
  • Loading branch information...
2 parents c5e8fdc + ccdac72 commit 3836d040ee4682b91217bf2de5fec6be7940bd41 @seejohnrun committed Mar 6, 2012
Showing with 342 additions and 163 deletions.
  1. +9 −5 .bash_profile
  2. +4 −0 .screenrc
  3. +1 −1 .vim/ftdetect/io.vim
  4. +77 −0 .vim/syntax/json.vim
  5. +57 −13 .vim/syntax/mkd.vim
  6. +192 −144 .vim/syntax/ruby.vim
  7. +2 −0 .vimrc
View
@@ -1,21 +1,23 @@
# Set the path
-export PATH="~/Scripts:$PATH"
-. /usr/local/rvm/scripts/rvm
+export PATH="~/Scripts:~/pear/bin:$PATH"
# Alias vim to vi
alias vim="vi"
+ulimit -n 1024
+
# Colors!
export CLICOLOR=1
-# some aliases
-alias ack=ack-grep
-
# i work for brewster
export BREWSTER_USER=john
+export GREP_OPTIONS='--color=auto -R -i -n'
+export GREP_COLOR='0;93'
+
# ps1 with git
GIT_COMPLETION_PATH=/etc/bash_completion.d/git
+GIT_COMPLETION_PATH=/usr/local/Cellar/git/1.7.8.4/etc/bash_completion.d/git-completion.bash
if [ -f $GIT_COMPLETION_PATH ]; then
. $GIT_COMPLETION_PATH
GIT_PS1_SHOWDIRTYSTATE=true # */+ for dirty
@@ -25,3 +27,5 @@ fi
# Give some nice prompt, with git inside of it
export PS1="\e[0;33m\w\e[0;91m\$(__git_ps1 ' (%s)')\e[0;96m \$\e[0m "
+
+export TERM=xterm-256color
View
@@ -3,3 +3,7 @@ termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
defbce "on"
term "screen-256color"
shell -$SHELL
+
+hardstatus on
+hardstatus alwayslastline
+hardstatus string "%w"
@@ -3,4 +3,4 @@
" URL: http://github.com/xhr/vim-io
" License: MIT
-autocmd BufNewFile,BufRead *.io set filetype=coffee
+autocmd BufNewFile,BufRead *.io set filetype=io
View
@@ -0,0 +1,77 @@
+" Vim syntax file
+" Language: JSON
+" Maintainer: Jeroen Ruigrok van der Werven <asmodai@in-nomine.org>
+" Last Change: 2009-06-16
+" Version: 0.4
+" {{{1
+
+" Syntax setup {{{2
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+
+if !exists("main_syntax")
+ if version < 600
+ syntax clear
+ elseif exists("b:current_syntax")
+ finish
+ endif
+ let main_syntax = 'json'
+endif
+
+" Syntax: Strings {{{2
+syn region jsonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=jsonEscape
+" Syntax: JSON does not allow strings with single quotes, unlike JavaScript.
+syn region jsonStringSQ start=+'+ skip=+\\\\\|\\"+ end=+'+
+
+" Syntax: Escape sequences {{{3
+syn match jsonEscape "\\["\\/bfnrt]" contained
+syn match jsonEscape "\\u\x\{4}" contained
+
+" Syntax: Strings should always be enclosed with quotes.
+syn match jsonNoQuotes "\<\a\+\>"
+
+" Syntax: Numbers {{{2
+syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>"
+
+" Syntax: An integer part of 0 followed by other digits is not allowed.
+syn match jsonNumError "-\=\<0\d\.\d*\>"
+
+" Syntax: Boolean {{{2
+syn keyword jsonBoolean true false
+
+" Syntax: Null {{{2
+syn keyword jsonNull null
+
+" Syntax: Braces {{{2
+syn match jsonBraces "[{}\[\]]"
+
+" Define the default highlighting. {{{1
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_json_syn_inits")
+ if version < 508
+ let did_json_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+ HiLink jsonString String
+ HiLink jsonEscape Special
+ HiLink jsonNumber Number
+ HiLink jsonBraces Operator
+ HiLink jsonNull Function
+ HiLink jsonBoolean Boolean
+
+ HiLink jsonNumError Error
+ HiLink jsonStringSQ Error
+ HiLink jsonNoQuotes Error
+ delcommand HiLink
+endif
+
+let b:current_syntax = "json"
+if main_syntax == 'json'
+ unlet main_syntax
+endif
+
+" Vim settings {{{2
+" vim: ts=8 fdm=marker
View
@@ -2,12 +2,11 @@
" Language: Markdown
" Maintainer: Ben Williams <benw@plasticboy.com>
" URL: http://plasticboy.com/markdown-vim-mode/
-" Version: 8
-" Last Change: 2008 April 29
+" Version: 9
+" Last Change: 2009 May 18
" Remark: Uses HTML syntax file
" Remark: I don't do anything with angle brackets (<>) because that would too easily
" easily conflict with HTML syntax
-" TODO: Do something appropriate with image syntax
" TODO: Handle stuff contained within stuff (e.g. headings within blockquotes)
@@ -37,13 +36,26 @@ syn case ignore
syn sync linebreaks=1
"additions to HTML groups
-syn region htmlBold start=/\(^\|\s\)\*\@<!\*\*\*\@!/ end=/\*\@<!\*\*\*\@!\($\|\s\)/ contains=@Spell,htmlItalic
-syn region htmlItalic start=/\(^\|\s\)\*\@<!\*\*\@!/ end=/\*\@<!\*\*\@!\($\|\s\)/ contains=htmlBold,@Spell
-syn region htmlBold start=/\(^\|\s\)_\@<!___\@!/ end=/_\@<!___\@!\($\|\s\)/ contains=htmlItalic,@Spell
-syn region htmlItalic start=/\(^\|\s\)_\@<!__\@!/ end=/_\@<!__\@!\($\|\s\)/ contains=htmlBold,@Spell
-syn region htmlString start="]("ms=s+2 end=")"me=e-1
-syn region htmlLink start="\["ms=s+1 end="\]"me=e-1 contains=@Spell
-syn region htmlString start="\(\[.*]: *\)\@<=.*" end="$"
+syn region htmlBold start=/\\\@<!\(^\|\A\)\@=\*\@<!\*\*\*\@!/ end=/\\\@<!\*\@<!\*\*\*\@!\($\|\A\)\@=/ contains=@Spell,htmlItalic
+syn region htmlItalic start=/\\\@<!\(^\|\A\)\@=\*\@<!\*\*\@!/ end=/\\\@<!\*\@<!\*\*\@!\($\|\A\)\@=/ contains=htmlBold,@Spell
+syn region htmlBold start=/\\\@<!\(^\|\A\)\@=_\@<!___\@!/ end=/\\\@<!_\@<!___\@!\($\|\A\)\@=/ contains=htmlItalic,@Spell
+syn region htmlItalic start=/\\\@<!\(^\|\A\)\@=_\@<!__\@!/ end=/\\\@<!_\@<!__\@!\($\|\A\)\@=/ contains=htmlBold,@Spell
+
+" [link](URL) | [link][id] | [link][]
+syn region mkdLink matchgroup=mkdDelimiter start="\!\?\[" end="\]\ze\s*[[(]" contains=@Spell nextgroup=mkdURL,mkdID skipwhite
+syn region mkdID matchgroup=mkdDelimiter start="\[" end="\]" contained
+syn region mkdURL matchgroup=mkdDelimiter start="(" end=")" contained
+" mkd inline links: protocol optional user:pass@ sub/domain .com, .co.uk, etc optional port path/querystring/hash fragment
+" ------------ _____________________ --------------------------- ________________________ ----------------- __
+syntax match mkdInlineURL /https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z][-_0-9A-Za-z]*\.\)\{1,}\(\w\{2,}\.\?\)\{1,}\(:[0-9]\{1,5}\)\?\S*/
+
+" Link definitions: [id]: URL (Optional Title)
+" TODO handle automatic links without colliding with htmlTag (<URL>)
+syn region mkdLinkDef matchgroup=mkdDelimiter start="^ \{,3}\zs\[" end="]:" oneline nextgroup=mkdLinkDefTarget skipwhite
+syn region mkdLinkDefTarget start="<\?\zs\S" excludenl end="\ze[>[:space:]\n]" contained nextgroup=mkdLinkTitle,mkdLinkDef skipwhite skipnl oneline
+syn region mkdLinkTitle matchgroup=mkdDelimiter start=+"+ end=+"+ contained
+syn region mkdLinkTitle matchgroup=mkdDelimiter start=+'+ end=+'+ contained
+syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained
"define Markdown groups
syn match mkdLineContinue ".$" contained
@@ -54,10 +66,12 @@ syn match mkdRule /^\s*-\{3,}$/
syn match mkdRule /^\s*\*\{3,5}$/
syn match mkdListItem "^\s*[-*+]\s\+"
syn match mkdListItem "^\s*\d\+\.\s\+"
-syn match mkdCode /^\s*\n\(\(\s\{4,}\|[\t]\+\)[^*-+ ].*\n\)\+/
-syn region mkdCode start=/`/ end=/`/
+syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/
+syn match mkdLineBreak / \+$/
+syn region mkdCode start=/\\\@<!`/ end=/\\\@<!`/
syn region mkdCode start=/\s*``[^`]*/ end=/[^`]*``\s*/
-syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLineContinue,@Spell
+syn region mkdCode start=/\s*```[^`]*/ end=/[^`]*```\s*/
+syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell
syn region mkdCode start="<pre[^>]*>" end="</pre>"
syn region mkdCode start="<code[^>]*>" end="</code>"
@@ -71,14 +85,44 @@ syn region htmlH6 start="^\s*######" end="\($\|#\+\)" contain
syn match htmlH1 /^.\+\n=\+$/ contains=@Spell
syn match htmlH2 /^.\+\n-\+$/ contains=@Spell
+
+
+" fold region for headings
+syn region mkdHeaderFold
+ \ start="^\s*\z(#\+\)"
+ \ skip="^\s*\z1#\+"
+ \ end="^\(\s*#\)\@="
+ \ fold contains=TOP
+
+" fold region for lists
+syn region mkdListFold
+ \ start="^\z(\s*\)\*\z(\s*\)"
+ \ skip="^\z1 \z2\s*[^#]"
+ \ end="^\(.\)\@="
+ \ fold contains=TOP
+
+syn sync fromstart
+setlocal foldmethod=syntax
+
+
+
"highlighting for Markdown groups
HtmlHiLink mkdString String
HtmlHiLink mkdCode String
HtmlHiLink mkdBlockquote Comment
HtmlHiLink mkdLineContinue Comment
HtmlHiLink mkdListItem Identifier
HtmlHiLink mkdRule Identifier
+HtmlHiLink mkdLineBreak Todo
+HtmlHiLink mkdLink htmlLink
+HtmlHiLink mkdURL htmlString
+HtmlHiLink mkdInlineURL htmlLink
+HtmlHiLink mkdID Identifier
+HtmlHiLink mkdLinkDef mkdID
+HtmlHiLink mkdLinkDefTarget mkdURL
+HtmlHiLink mkdLinkTitle htmlString
+HtmlHiLink mkdDelimiter Delimiter
let b:current_syntax = "mkd"
Oops, something went wrong. Retry.

0 comments on commit 3836d04

Please sign in to comment.