diff options
40 files changed, 233 insertions, 341 deletions
diff --git a/.bash_profile b/.bash_profile deleted file mode 100644 index b72e72584651..000000000000 --- a/.bash_profile +++ /dev/null @@ -1,17 +0,0 @@ -# bash profile settings for William Carroll - -# welcome message -echo "Hello, welcome back, William" - -# change bash prompt -PS1='$ ' - -# input mode to Vi -set -o vi - -# shortcuts -alias h="history" -alias vi="vim" -alias c="clear" - -export EDITOR=/usr/bin/vim diff --git a/.escape_codes_bash.py b/.escape_codes_bash.py deleted file mode 100644 index 8510c5eaaf48..000000000000 --- a/.escape_codes_bash.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/python - -""" -Forward and Backward lookups for Bash escape sequences -""" - -import sys, re - - -literal_to_bash = { - 'ESC': '^[', - - 'UP-ARROW': '^[OA', - 'RIGHT-ARROW': '^[OC', - 'DOWN-ARROW': '^[OB', - 'LEFT-ARROW': '^[OD', - - 'F1': '^[OP', - 'F2': '^[OQ', - 'F3': '^[OR', - 'F4': '^[OS', - 'F5': '^[15~', - 'F6': '^[17~', - 'F7': '^[18~', - 'F8': '^[19~', - 'F9': '^[20~', - 'F10': '^[21~', - 'F11': None, - 'F12': '^[24~' -} - -bash_to_literal = { - v: k for k, v in literal_to_bash.items() -} - -el = sys.argv[1] - -print '{0}: "{1}"'.format(el, literal_to_bash[el]) diff --git a/.escape_codes_url.py b/.escape_codes_url.py deleted file mode 100644 index 60aa1c210694..000000000000 --- a/.escape_codes_url.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/python - -""" -Forward and Backward lookups for URL escape sequences -""" - -import sys, re - - -literal_to_esccode = { - ' ': '%20', - '<': '%3C', - '>': '%3E', - '#': '%23', - '%': '%25', - '{': '%7B', - '}': '%7D', - '|': '%7C', - '\\': '%5C', - '^': '%5E', - '~': '%7E', - '[': '%5B', - ']': '%5D', - '`': '%60', - ';': '%3B', - '/': '%2F', - '?': '%3F', - ':': '%3A', - '@': '%40', - '=': '%3D', - '&': '%26', - '$': '%24', -} - - -esccode_to_literal = { - v: k for k, v in literal_to_esccode.items() -} - - -def is_esccode(string): - p = re.compile(r'^%\w\w$') - m = p.match(string) - return bool(p.match(string)) - - -try: - el = sys.argv[1] -except: - el = None - -if not el: - print literal_to_esccode -else: - msg = esccode_to_literal[el] if is_esccode(el) else literal_to_esccode[el] - print '"{0}": "{1}"'.format(el, msg) diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..55d00c567109 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vim diff --git a/.vimrc b/.vimrc deleted file mode 100644 index 926d70f90dd0..000000000000 --- a/.vimrc +++ /dev/null @@ -1,7 +0,0 @@ -syntax on -set number -set tabstop=2 -set expandtab -set shiftwidth=2 -colorscheme murphy - diff --git a/.w_aliases.sh b/aliases.sh index c427af58e9be..c427af58e9be 100644 --- a/.w_aliases.sh +++ b/aliases.sh diff --git a/configs/.tmux.conf b/configs/.tmux.conf new file mode 100644 index 000000000000..5ef3765e86ab --- /dev/null +++ b/configs/.tmux.conf @@ -0,0 +1,7 @@ +set -g default-terminal "screen-256color" + +bind-key -r -T prefix k select-pane -U +bind-key -r -T prefix j select-pane -D +bind-key -r -T prefix h select-pane -L +bind-key -r -T prefix l select-pane -R + diff --git a/.zsh_profile b/configs/.zsh_profile index f56d5f1c2e94..28e21f3ca40c 100644 --- a/.zsh_profile +++ b/configs/.zsh_profile @@ -1,4 +1,7 @@ -export PATH=$HOME/bin:/opt/local/bin:/opt/local/sbin:$PATH +export PATH=$HOME/bin:/opt/local/bin:/opt/local/sbin:/usr/local/go/bin:$PATH + +# make vim the default editor for commit messages etc +export EDITOR=$(which vim) echo "Welcome back, $USER" @@ -6,10 +9,15 @@ echo "Welcome back, $USER" set -o vi # aliases -source $HOME/pc_settings/.w_aliases.sh +source $HOME/pc_settings/aliases.sh # functions -source $HOME/pc_settings/.w_functions.sh +source $HOME/pc_settings/functions/index.sh + + +# setup keybindings for history functions +source $HOME/pc_settings/scripts/setup_keybindings.sh + # BEGIN: bindkeys bindkey "^R" history-incremental-search-backward diff --git a/.git_functions.sh b/functions/git_functions.sh index e22294c37def..6ed195a81253 100644 --- a/.git_functions.sh +++ b/functions/git_functions.sh @@ -49,34 +49,30 @@ function wgcheckout { } -# wgcheckout combined with a fuzzy search -function wgfcheckout { - branchname=$(trim $(git branch | fzf)) +# opens the current ticket-branch in web browser +function wgjira { + base_url="https://jira.hugeinc.com/browse" + ticket=$(wgtix) - [ ! -z "$branchname" ] && wgcheckout "$branchname" || return + open "${base_url}/${ticket}" } -# combine fetch and rebase (git frebase) -function wgfreebase { - if [ -z $1 ]; then - branchname="$(git symbolic-ref HEAD 2> /dev/null | cut -f3 -d'/')" - else - branchname="$1" - fi +# wgcheckout combined with a fuzzy search +function wgfcheckout { + branchname=$(trim $(git branch | fzf)) - git fetch origin "$branchname" && git rebase origin/"$branchname" + [ ! -z "$branchname" ] && wgcheckout "$branchname" || return } -# push to current branch -function wgpush { - if [ -z $1 ]; then - branchname="$(git symbolic-ref HEAD 2> /dev/null | cut -f3 -d'/')" - else - branchname="$1" - fi +# View an author's work within a specified date range. +function wgviewcommits { + author=$([ -z "$1" ] && echo "William Carroll" || echo "$1") + todays_date=$(date +'%Y-%m-%d') + date=$([ -z "$2" ] && echo "${todays_date}" || echo "$2") - git push origin $branchname + git log --all --author="${author}" --after="${date} 00:00" \ + --before="${date} 23:59" } diff --git a/functions/history_functions.sh b/functions/history_functions.sh new file mode 100644 index 000000000000..5f97884b1018 --- /dev/null +++ b/functions/history_functions.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + + +HISTFILE=~/.zsh_history + + +function wh_two_back { + command=$(history | tail -n 2 | head -n 1 | cut -c 8-) + echo -n $command +} + + +function wh_three_back { + command=$(history | tail -n 3 | head -n 1 | cut -c 8-) + echo -n "$command" +} + + +function wh_four_back { + command=$(history | tail -n 4 | head -n 1 | cut -c 8-) + echo -n "$command" +} + + +function wh_five_back { + command=$(history | tail -n 5 | head -n 1 | cut -c 8-) + echo -n "$command" +} + diff --git a/.w_functions.sh b/functions/index.sh index e1a76bd3f60e..a60bc4167ce9 100644 --- a/.w_functions.sh +++ b/functions/index.sh @@ -3,14 +3,22 @@ functon npms() { npm start; } + # custom js functions -source $HOME/pc_settings/.js_to_bash.sh +source $HOME/pc_settings/functions/js_to_bash.sh # custom git functions -source $HOME/pc_settings/.git_functions.sh +source $HOME/pc_settings/functions/git_functions.sh # custom bash helpers functions -source $HOME/pc_settings/.misc_functions.sh +source $HOME/pc_settings/functions/misc_functions.sh + +# custom history functions for zle bindkey +source $HOME/pc_settings/functions/history_functions.sh + +# custom functions to work with vim +source $HOME/pc_settings/functions/vim_functions.sh + # generates placeholder content for FE work function lorem { diff --git a/.js_to_bash.sh b/functions/js_to_bash.sh index 22a70a556077..22a70a556077 100644 --- a/.js_to_bash.sh +++ b/functions/js_to_bash.sh diff --git a/.misc_functions.sh b/functions/misc_functions.sh index a0d36e613bb9..17c13d7a6ae9 100644 --- a/.misc_functions.sh +++ b/functions/misc_functions.sh @@ -33,3 +33,8 @@ function trim { echo "${input//[[:blank:]]/}" } + +function wgreviewers { + echo "BJ Warshaw\nDaniel Wasilewski\nSean Sullivan\nCharles Morrissey\nRyan Balch\nZach Goldstein\nWilliam Anderson" +} + diff --git a/functions/vim_functions.sh b/functions/vim_functions.sh new file mode 100644 index 000000000000..63e01b534b18 --- /dev/null +++ b/functions/vim_functions.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# Easily search for strings within the files within the current directory. +# Specify file extensions and directories to exclude to improve accuracy. +# The file selected from fzf will be opened in vim. +function vfzopen() { + echo -n "Search Term: " + read search_query + echo -n "Filename: " + read filetype + echo -n "Exclude Directory: " + read exclude_dir + + if [ ! -z "$exclude_dirs" ]; then + filename=$(find . -type f -name "$filetype" | \ + xargs grep -l "$search_query" | fzf) + else + filename=$(find . -type f -name "$filetype" -not -path "./${exclude_dir}/*" \ + | xargs grep -l "$search_query" | fzf) + fi + + + if [ ! -z "$filename" ]; then + vim "$filename" + return 0 + else + return 1 + fi +} diff --git a/launchd_scripts/attempt_vim_switch.sh b/launchd_scripts/attempt_vim_switch.sh new file mode 100755 index 000000000000..65f77c342671 --- /dev/null +++ b/launchd_scripts/attempt_vim_switch.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + + +if [ -d /Volumes/usb_vim ] && \ # usb has mounted + [ ! -L "$HOME/.vimrc" ] && \ # .vimrc is a symlink + [ ! -L "$HOME/.vim" ]; then # .vim dir is a symlink + . "/Volumes/usb_vim/vim/vim_point_to_usb.sh" + . "$HOME/pc_settings/launchd_scripts/notice.sh" +else + . "$HOME/pc_settings/launchd_scripts/notice_2.sh" +fi + + diff --git a/launchd_scripts/bootstrap.sh b/launchd_scripts/bootstrap.sh new file mode 100755 index 000000000000..0df2689ae18e --- /dev/null +++ b/launchd_scripts/bootstrap.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + + +# Unload scripts in case there have been changes since it was last loaded. +echo -n "Unloading personal *.plist files... " && +launchctl unload ~/Library/LaunchAgents/watch_volumes.plist && +echo "Done." || echo "Error." + + +# Remove *.plist symlinks created last time. +echo -n "Removing *.plist symlinks... " && +rm ~/Library/LaunchAgents/watch_volumes.plist && +echo "Done." || echo "Error." + + +# Process the *.tpl files, replacing global identifiers with the values +# from vars.json. +echo -n "Processing *.tpl files... " && +. ./process_files.sh && +echo "Done." || echo "Error." + + +# Recreate those symlinks. +echo -n "Recreating *.plist symlinks to ~/Library/LaunchAgents ... " && +ln -s ~/pc_settings/launchd_scripts/watch_volumes.plist \ + ~/Library/LaunchAgents/watch_volumes.plist && +echo "Done." || echo "Error." + + +# Reload scripts in case there have been changes since it was last loaded. +echo -n "Reloading personal *.plist files... " && +launchctl load ~/Library/LaunchAgents/watch_volumes.plist && +echo "Done." || echo "Error." + diff --git a/launchd_scripts/notice.sh b/launchd_scripts/notice.sh new file mode 100755 index 000000000000..1567be3601e4 --- /dev/null +++ b/launchd_scripts/notice.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +osascript -e "tell Application \"System Events\" to display alert\ + \"New volume mounted.\"" + diff --git a/launchd_scripts/notice_2.sh b/launchd_scripts/notice_2.sh new file mode 100755 index 000000000000..188ee813a06c --- /dev/null +++ b/launchd_scripts/notice_2.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +osascript -e "tell Application \"System Events\" to display alert\ + \"Not going to switch!\"" + diff --git a/launchd_scripts/process_files.sh b/launchd_scripts/process_files.sh new file mode 100755 index 000000000000..a5e330d7705b --- /dev/null +++ b/launchd_scripts/process_files.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# This script processes certain files and replaces +# {{<IDENTIFIER>}} with the entries in vars.json + +output_path="./watch_volumes.plist" +template_file="watch_volumes.plist.tpl" +usb_drive_path=$(jq < ./vars.json '.USB_DRIVE_PATH' | \ + sed 's/\//\\\//g' | sed 's/"//g') + +cat "$template_file" | perl -p -e 's/(\{\{[^}]+\}\})/'$usb_drive_path'/g' \ + >"$output_path" + +echo "Done." + diff --git a/launchd_scripts/vars.json b/launchd_scripts/vars.json new file mode 100644 index 000000000000..6b5328c461f4 --- /dev/null +++ b/launchd_scripts/vars.json @@ -0,0 +1,3 @@ +{ + "USB_DRIVE_PATH": "/Volumes/usb_vim/" +} diff --git a/launchd_scripts/watch_volumes.plist b/launchd_scripts/watch_volumes.plist new file mode 100644 index 000000000000..f082952fec76 --- /dev/null +++ b/launchd_scripts/watch_volumes.plist @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" +"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Label</key> + <string>WatchVolumes</string> + + <key>ProgramArguments</key> + <array> + <string>/Users/wcarroll/pc_settings/launchd_scripts/attempt_vim_switch.sh</string> + </array> + + <key>WatchPaths</key> + <array> + <string>/Volumes/usb_vim/</string> + </array> +</dict> +</plist> diff --git a/launchd_scripts/watch_volumes.plist.tpl b/launchd_scripts/watch_volumes.plist.tpl new file mode 100644 index 000000000000..be5cb4ad763d --- /dev/null +++ b/launchd_scripts/watch_volumes.plist.tpl @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" +"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Label</key> + <string>WatchVolumes</string> + + <key>ProgramArguments</key> + <array> + <string>/Users/wcarroll/pc_settings/launchd_scripts/attempt_vim_switch.sh</string> + </array> + + <key>WatchPaths</key> + <array> + <string>{{USB_DRIVE_PATH}}</string> + </array> +</dict> +</plist> diff --git a/scripts/.swp b/scripts/.swp new file mode 100644 index 000000000000..5f747da37c33 --- /dev/null +++ b/scripts/.swp Binary files differdiff --git a/scripts/setup_keybindings.sh b/scripts/setup_keybindings.sh new file mode 100644 index 000000000000..872f3eea429b --- /dev/null +++ b/scripts/setup_keybindings.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + + +# This file is run after history_functions.sh have been sourced. +# It converts the defined functions into zsh widgets that are +# thereafter bound to keys for expedience. + + +zle -N wh_two_back_widget wh_two_back && +bindkey '^@' wh_two_back_widget + diff --git a/usbify/vim/.vim/.DS_Store b/usbify/vim/.vim/.DS_Store deleted file mode 100644 index 5008ddfcf53c..000000000000 --- a/usbify/vim/.vim/.DS_Store +++ /dev/null Binary files differdiff --git a/usbify/vim/.vim/.netrwhist b/usbify/vim/.vim/.netrwhist deleted file mode 100644 index 9172f2595166..000000000000 --- a/usbify/vim/.vim/.netrwhist +++ /dev/null @@ -1,5 +0,0 @@ -let g:netrw_dirhistmax =10 -let g:netrw_dirhist_cnt =3 -let g:netrw_dirhist_1='/Volumes/usb_vim/.Spotlight-V100' -let g:netrw_dirhist_2='/Users/wcarroll' -let g:netrw_dirhist_3='/Users/wcarroll/pc_settings/usbify/vim' diff --git a/usbify/vim/.vim/bundle/L9 b/usbify/vim/.vim/bundle/L9 deleted file mode 160000 -Subproject c822b05ee0886f9a9703227dc85a6d47612c4bf diff --git a/usbify/vim/.vim/bundle/Vundle.vim b/usbify/vim/.vim/bundle/Vundle.vim deleted file mode 160000 -Subproject 4984767509e3d05ca051e253c8a8b37de784be4 diff --git a/usbify/vim/.vim/bundle/command-t b/usbify/vim/.vim/bundle/command-t deleted file mode 160000 -Subproject 354c429dad34f7d163663943c948f819588b53d diff --git a/usbify/vim/.vim/bundle/ctrlp.vim b/usbify/vim/.vim/bundle/ctrlp.vim deleted file mode 160000 -Subproject b9fa920b4abbb54799927a3bc57869fdd556321 diff --git a/usbify/vim/.vim/bundle/nerdtree b/usbify/vim/.vim/bundle/nerdtree deleted file mode 160000 -Subproject 2e2b649232d6ae4d02d74793e5da0ee08480ad8 diff --git a/usbify/vim/.vim/bundle/newL9 b/usbify/vim/.vim/bundle/newL9 deleted file mode 160000 -Subproject a78607c9f63f270137e472126ee1b2c3ae52a84 diff --git a/usbify/vim/.vim/bundle/sparkup b/usbify/vim/.vim/bundle/sparkup deleted file mode 160000 -Subproject d400a570bf64b0c216aa7c8e1795820b911a740 diff --git a/usbify/vim/.vim/bundle/syntastic b/usbify/vim/.vim/bundle/syntastic deleted file mode 160000 -Subproject 6014bdc57f161f5ae5140e4247b144ae149bf89 diff --git a/usbify/vim/.vim/bundle/vim-fugitive b/usbify/vim/.vim/bundle/vim-fugitive deleted file mode 160000 -Subproject c00ebd75ac23f4080c0d0bf9453b16304a3fb31 diff --git a/usbify/vim/.vim/bundle/vim-monokai b/usbify/vim/.vim/bundle/vim-monokai deleted file mode 160000 -Subproject e5d4bfb5dab8c4f122b97fe9c3ed2f2d1e8b3bd diff --git a/usbify/vim/.vim/bundle/yajs.vim b/usbify/vim/.vim/bundle/yajs.vim deleted file mode 160000 -Subproject 5cb4b369cac5b29dd7f2e688b23a2b57263972a diff --git a/usbify/vim/.vim/ftdetect/soy.vim b/usbify/vim/.vim/ftdetect/soy.vim deleted file mode 100644 index 7c9420b0ef47..000000000000 --- a/usbify/vim/.vim/ftdetect/soy.vim +++ /dev/null @@ -1 +0,0 @@ -au BufRead,BufNewFile *.soy set filetype=soy diff --git a/usbify/vim/.vim/gjslint.vim b/usbify/vim/.vim/gjslint.vim deleted file mode 100644 index 336890553d5e..000000000000 --- a/usbify/vim/.vim/gjslint.vim +++ /dev/null @@ -1,46 +0,0 @@ -"============================================================================ -"File: gjslint.vim -"Description: Javascript syntax checker - using gjslint -"Maintainer: Martin Grenfell <martin.grenfell at gmail dot com> -"License: This program is free software. It comes without any warranty, -" to the extent permitted by applicable law. You can redistribute -" it and/or modify it under the terms of the Do What The Fuck You -" Want To Public License, Version 2, as published by Sam Hocevar. -" See http://sam.zoy.org/wtfpl/COPYING for more details. -"============================================================================ - -if exists('g:loaded_syntastic_javascript_gjslint_checker') - finish -endif -let g:loaded_syntastic_javascript_gjslint_checker = 1 - -let s:save_cpo = &cpo -set cpo&vim - -function! SyntaxCheckers_javascript_gjslint_GetLocList() dict - call syntastic#log#deprecationWarn('javascript_gjslint_conf', 'javascript_gjslint_args') - - let makeprg = self.makeprgBuild({ - \ 'args': '--nodebug_indentation', - \ 'args_after': '--check_html --nosummary --unix_mode --nobeep' }) - - let errorformat = - \ "%f:%l:(New Error -%\\?\%n) %m," . - \ "%f:%l:(-%\\?%n) %m," . - \ "%-G1 files checked," . - \ " no errors found.," . - \ "%-G%.%#" - - return SyntasticMake({ - \ 'makeprg': makeprg, - \ 'errorformat': errorformat }) -endfunction - -call g:SyntasticRegistry.CreateAndRegisterChecker({ - \ 'filetype': 'javascript', - \ 'name': 'gjslint'}) - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: set sw=4 sts=4 et fdm=marker: diff --git a/usbify/vim/.vim/syntax/soy.vim b/usbify/vim/.vim/syntax/soy.vim deleted file mode 100644 index 8b25b622be59..000000000000 --- a/usbify/vim/.vim/syntax/soy.vim +++ /dev/null @@ -1,145 +0,0 @@ -" Google Closure templates syntax file. -" Language: Soy -" Maintainer: Dugan Chen (https://github.com/duganchen) -" -if exists("b:current_syntax") - finish -endif - -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syntax clear -syntax case match - -syntax keyword soyConstant contained null -syntax keyword soyConstant contained false -syntax keyword soyConstant contained true - -syntax keyword soyFunction contained isFirst -syntax keyword soyFunction contained isLast -syntax keyword soyFunction contained index -syntax keyword soyFunction contained hasData -syntax keyword soyFunction contained length -syntax keyword soyFunction contained round -syntax keyword soyFunction contained floor -syntax keyword soyFunction contained ceiling -syntax keyword soyFunction contained min -syntax keyword soyFunction contained max -syntax keyword soyFunction contained randomInt -syntax keyword soyFunction contained bidiGlobalDir -syntax keyword soyFunction contained bidiDirAttr -syntax keyword soyFunction contained bidiMark -syntax keyword soyFunction contained bidiMarkAfter -syntax keyword soyFunction contained bidiStartEdge -syntax keyword soyFunction contained bidiEndEdge -syntax keyword soyFunction contained bidiTextDir - -syntax keyword soyStatement contained namespace -syntax keyword soyStatement contained template -syntax keyword soyStatement contained delpackage -syntax keyword soyStatement contained deltemplate - -syntax keyword soyKeyword contained literal -syntax keyword soyKeyword contained print -syntax keyword soyKeyword contained msg -syntax keyword soyKeyword contained call -syntax keyword soyKeyword contained delcall -syntax keyword soyKeyword contained param -syntax keyword soyKeyword contained let -syntax keyword soyKeyword contained css - -syntax keyword soyConditional contained if -syntax keyword soyConditional contained elseif -syntax keyword soyConditional contained else -syntax keyword soyConditional contained switch -syntax keyword soyConditional contained case -syntax keyword soyConditional contained default -syntax keyword soyConditional contained ifempty - -syntax keyword soyRepeat contained foreach -syntax keyword soyRepeat contained for -syntax keyword soyRepeat contained in -syntax keyword soyRepeat contained range - -syntax keyword soyCharacter contained sp -syntax keyword soyCharacter contained nil -syntax keyword soyCharacter contained r -syntax keyword soyCharacter contained n -syntax keyword soyCharacter contained t -syntax keyword soyCharacter contained lb -syntax keyword soyCharacter contained rb - -syntax keyword soyDirective contained private -syntax keyword soyDirective contained autoescape -syntax keyword soyDirective contained noAutoescape -syntax keyword soyDirective contained id -syntax keyword soyDirective contained escapeCssString -syntax keyword soyDirective contained escapeHtml -syntax keyword soyDirective contained escapeHtmlRcdata -syntax keyword soyDirective contained escapeHtmlAttribute -syntax keyword soyDirective contained escapeHtmlAttributeNospace -syntax keyword soyDirective contained escapeUri -syntax keyword soyDirective contained escapeJs -syntax keyword soyDirective contained escapeJsRegex -syntax keyword soyDirective contained escapeJsString -syntax keyword soyDirective contained escapeJsValue -syntax keyword soyDirective contained truncate -syntax keyword soyDirective contained insertWordBreaks -syntax keyword soyDirective contained changeNewlineToBr -syntax keyword soyDirective contained desc -syntax keyword soyDirective contained meaning -syntax keyword soyDirective contained data -syntax keyword soyDirective contained kind -syntax keyword soyDirective contained variant -syntax keyword soyDirective contained bidiSpanWrap -syntax keyword soyDirective contained bidiUnicodeWrap - -syntax match soySpecialComment /@param?\?/ contained - -syntax region soyCommand start="{" end="}" contains=soyKeyword, soyDirective, soyIdentifier, soyString, soyTemplate, soyConstant, soyInteger, soyCharacter, soyFloat, soySci, soyOperator, soyFunction, soyRepeat, soyConditional, soyStatement, soyLabel - -syntax region soyString contained start="\'" end="\'" -syntax region soyString contained start="\"" end="\"" - -syntax match soyIdentifier /\$[a-zA-Z0-9._]*\>/ contained -syntax region soyComment start=/\/\*/ end='\\*\/' contains=soySpecialComment - -syntax match soyComment /\/\/.*$/ -syntax match soyTemplate /\s\+\.\w\+\>/ contained - -syntax match soyInteger /\-\?\(0x\)\?[A-F0-9]\+\>/ contained - -syntax match soyNumber /\-\?\d\+\(e\-\?\d\+\)\?\>/ contained - -syntax match soyFloat /\-\?\d\+\.\d\+\>/ contained -syntax match soySci /\-\?\d\+e\-\?\d\+\>/ contained - -syntax match soyOperator /\<\(not\|and\|or\)\>/ contained - -syntax match soyLabel /\<\w\+:/ contained - -" Yes, this causes the - in -1 to show as an operator. This is a bug. -syntax match soyOperator /[-*/%+<>=!?:]/ contained - -highlight def link soyOperator Operator -highlight def link soyKeyword Statement -highlight def link soyDirective Type -highlight def link soyIdentifier Identifier -highlight def link soyString String -highlight def link soyComment Comment -highlight def link soyTemplate Identifier -highlight def link soyInteger Number -highlight def link soyFloat Float -highlight def link soySci Float -highlight def link soyConstant Constant -highlight def link soyCharacter Character -highlight def link soyFunction Function -highlight def link soyRepeat Repeat -highlight def link soyConditional Conditional -highlight def link soyStatement Statement -highlight def link soySpecialComment SpecialComment -highlight def link soyLabel Identifier |