├── .curlrc ├── .editorconfig ├── .gdbinit ├── .gitattributes ├── .gitconfig ├── .gitignore ├── .gitmodules ├── .gvimrc ├── .hgignore ├── .hushlogin ├── .inputrc ├── .osx ├── .screenrc ├── .vim ├── UltiSnips │ ├── all.snippets │ ├── eelixir.snippets │ ├── elixir.snippets │ ├── python.snippets │ └── sshconfig.snippets ├── backups │ └── .gitignore ├── colors │ └── solarized.vim ├── swaps │ └── .gitignore ├── syntax │ └── json.vim └── undo │ └── .gitignore ├── .vimrc ├── .wgetrc ├── LICENSE-MIT.txt ├── README.md ├── bash ├── .aliases ├── .bash_profile ├── .bash_prompt ├── .bashrc ├── .exports └── .functions ├── bin ├── bash ├── concat-video ├── httpcompression ├── init │ ├── Preferences.sublime-settings │ ├── Solarized Dark xterm-256color.terminal │ └── Solarized Dark.itermcolors ├── mergeh ├── mergev ├── mov2mp4 ├── strong_pw ├── subl ├── who_listen └── youtube-mp3 ├── bootstrap.sh ├── brew.sh └── misc ├── README.md ├── 《哈利波特》大全【官方推荐】.scel ├── 中国历史词汇大全【官方推荐】 (1).scel ├── 中国历史词汇大全【官方推荐】.scel ├── 古今中外各界名人词库.scel ├── 古代战争集锦(802次).scel ├── 古文-格言联璧(学问类).scel ├── 古文观止选编.scel ├── 古诗词名句【官方推荐】.scel ├── 史记【官方推荐】.scel ├── 哲学词汇大全【官方推荐】.scel ├── 唐诗300首【官方推荐】.scel ├── 地理地质词汇大全【官方推荐】.scel ├── 宋词精选【官方推荐】.scel ├── 庄子全集【官方推荐】.scel ├── 开发大神专用词库【官方推荐】.scel ├── 心理学词汇大全【官方推荐】.scel ├── 成语俗语【官方推荐】.scel ├── 数学词汇大全【官方推荐】.scel ├── 李白诗集【官方推荐】.scel ├── 杜甫诗集【官方推荐】.scel ├── 柳宗元诗词【官方推荐】.scel ├── 歇后语集锦【官方推荐】.scel ├── 毛泽东诗词精选【官方推荐】.scel ├── 物理词汇大全【官方推荐】.scel ├── 白居易诗集【官方推荐】.scel ├── 离骚-词句.scel ├── 红楼梦【官方推荐】.scel ├── 苏东坡诗词大全【官方推荐】.scel ├── 计算机词汇大全【官方推荐】.scel ├── 陆游经典名句【官方推荐】.scel ├── 韩愈诗句【官方推荐】.scel └── 鲁迅经典语【官方推荐】.scel /.curlrc: -------------------------------------------------------------------------------- 1 | # Disguise as IE 9 on Windows 7. 2 | user-agent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" 3 | 4 | # When following a redirect, automatically set the previous URL as referer. 5 | referer = ";auto" 6 | 7 | # Wait 60 seconds before timing out. 8 | connect-timeout = 60 9 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = tab 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | -------------------------------------------------------------------------------- /.gdbinit: -------------------------------------------------------------------------------- 1 | set disassembly-flavor intel 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Automatically normalize line endings for all text-based files 2 | #* text=auto 3 | # Disabled because of https://github.com/mathiasbynens/dotfiles/issues/149 :( 4 | -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | [alias] 2 | 3 | # View abbreviated SHA, description, and history graph of the latest 20 commits 4 | l = log --pretty=oneline -n 20 --graph --abbrev-commit 5 | 6 | # View the current working tree status using the short format 7 | s = status -s 8 | 9 | # Show the diff between the latest commit and the current state 10 | d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" 11 | 12 | # `git di $number` shows the diff between the state `$number` revisions ago and the current state 13 | di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" 14 | 15 | # Pull in remote changes for the current repository and all its submodules 16 | p = !"git pull; git submodule foreach git pull origin master" 17 | 18 | # Clone a repository including all submodules 19 | c = clone --recursive 20 | 21 | # Commit all changes 22 | ca = !git add -A && git commit -av 23 | 24 | # Switch to a branch, creating it if necessary 25 | go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" 26 | 27 | # Show verbose output about tags, branches or remotes 28 | tags = tag -l 29 | branches = branch -a 30 | remotes = remote -v 31 | 32 | # Amend the currently staged files to the latest commit 33 | amend = commit --amend --reuse-message=HEAD 34 | 35 | # Credit an author on the latest commit 36 | credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" 37 | 38 | # Interactive rebase with the given number of latest commits 39 | reb = "!r() { git rebase -i HEAD~$1; }; r" 40 | 41 | # Remove the old tag with this name and tag the latest commit with it. 42 | retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r" 43 | 44 | # Find branches containing commit 45 | fb = "!f() { git branch -a --contains $1; }; f" 46 | 47 | # Find tags containing commit 48 | ft = "!f() { git describe --always --contains $1; }; f" 49 | 50 | # Find commits by source code 51 | fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f" 52 | 53 | # Find commits by commit message 54 | fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" 55 | 56 | # Remove branches that have already been merged with master 57 | # a.k.a. ‘delete merged’ 58 | dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" 59 | 60 | # List contributors with number of commits 61 | contributors = shortlog --summary --numbered 62 | 63 | # Merge GitHub pull request on top of the `master` branch 64 | mpr = "!f() { \ 65 | if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \ 66 | git fetch origin refs/pull/$1/head:pr/$1 && \ 67 | git rebase master pr/$1 && \ 68 | git checkout master && \ 69 | git merge pr/$1 && \ 70 | git branch -D pr/$1 && \ 71 | git commit --amend -m \"$(git log -1 --pretty=%B)\n\nCloses #$1.\"; \ 72 | fi \ 73 | }; f" 74 | update = !git pull && git submodule update --init --recursive 75 | 76 | [apply] 77 | 78 | # Detect whitespace errors when applying a patch 79 | whitespace = fix 80 | 81 | [core] 82 | 83 | # Use custom `.gitignore` and `.gitattributes` 84 | excludesfile = ~/.gitignore 85 | attributesfile = ~/.gitattributes 86 | 87 | # Treat spaces before tabs and all kinds of trailing whitespace as an error 88 | # [default] trailing-space: looks for spaces at the end of a line 89 | # [default] space-before-tab: looks for spaces before tabs at the beginning of a line 90 | whitespace = space-before-tab,-indent-with-non-tab,trailing-space 91 | 92 | # Make `git rebase` safer on OS X 93 | # More info: 94 | trustctime = false 95 | 96 | # Prevent showing files whose names contain non-ASCII symbols as unversioned. 97 | # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html 98 | precomposeunicode = false 99 | 100 | [color] 101 | 102 | # Use colors in Git commands that are capable of colored output when 103 | # outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.) 104 | ui = auto 105 | 106 | [color "branch"] 107 | 108 | current = yellow reverse 109 | local = yellow 110 | remote = green 111 | 112 | [color "diff"] 113 | 114 | meta = yellow bold 115 | frag = magenta bold # line info 116 | old = red # deletions 117 | new = green # additions 118 | 119 | [color "status"] 120 | 121 | added = yellow 122 | changed = green 123 | untracked = cyan 124 | 125 | [diff] 126 | 127 | # Detect copies as well as renames 128 | renames = copies 129 | 130 | [help] 131 | 132 | # Automatically correct and execute mistyped commands 133 | autocorrect = 1 134 | 135 | [merge] 136 | 137 | # Include summaries of merged commits in newly created merge commit messages 138 | log = true 139 | 140 | [push] 141 | 142 | # Use the Git 1.x.x default to avoid errors on machines with old Git 143 | # installations. To use `simple` instead, add this to your `~/.extra` file: 144 | # `git config --global push.default simple`. See http://git.io/mMah-w. 145 | default = matching 146 | 147 | # URL shorthands 148 | 149 | [url "git@github.com:"] 150 | 151 | insteadOf = "gh:" 152 | pushInsteadOf = "github:" 153 | pushInsteadOf = "git://github.com/" 154 | 155 | [url "git://github.com/"] 156 | 157 | insteadOf = "github:" 158 | 159 | [url "git@gist.github.com:"] 160 | 161 | insteadOf = "gst:" 162 | pushInsteadOf = "gist:" 163 | pushInsteadOf = "git://gist.github.com/" 164 | 165 | [url "git://gist.github.com/"] 166 | 167 | insteadOf = "gist:" 168 | [user] 169 | name = Tyr Chen 170 | email = tyr.chen@gmail.com 171 | 172 | [difftool "vscode"] 173 | cmd = code --wait --diff $LOCAL $REMOTE 174 | [gpg] 175 | program = bpb 176 | [commit] 177 | gpgsign = true 178 | [protocol] 179 | version = 1 180 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Python files 2 | *.pyc 3 | 4 | # Folder view configuration files 5 | .DS_Store 6 | Desktop.ini 7 | 8 | # Thumbnail cache files 9 | ._* 10 | Thumbs.db 11 | 12 | # Files that might appear on external disks 13 | .Spotlight-V100 14 | .Trashes 15 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "liquidprompt"] 2 | path = liquidprompt 3 | url = https://github.com/nojhan/liquidprompt.git 4 | -------------------------------------------------------------------------------- /.gvimrc: -------------------------------------------------------------------------------- 1 | " Use the Solarized Dark theme 2 | set background=dark 3 | colorscheme solarized 4 | " Use 14pt Monaco 5 | set guifont=Monaco:h14 6 | " Better line-height 7 | set linespace=8 8 | -------------------------------------------------------------------------------- /.hgignore: -------------------------------------------------------------------------------- 1 | # Use shell-style glob syntax 2 | syntax: glob 3 | 4 | # Compiled Python files 5 | *.pyc 6 | 7 | # Folder view configuration files 8 | .DS_Store 9 | Desktop.ini 10 | 11 | # Thumbnail cache files 12 | ._* 13 | Thumbs.db 14 | 15 | # Files that might appear on external disks 16 | .Spotlight-V100 17 | .Trashes 18 | -------------------------------------------------------------------------------- /.hushlogin: -------------------------------------------------------------------------------- 1 | # The mere presence of this file in the home directory disables the system 2 | # copyright notice, the date and time of the last login, the message of the 3 | # day as well as other information that may otherwise appear on login. 4 | # See `man login`. 5 | -------------------------------------------------------------------------------- /.inputrc: -------------------------------------------------------------------------------- 1 | # Make Tab autocomplete regardless of filename case 2 | set completion-ignore-case on 3 | 4 | # List all matches in case multiple possible completions are possible 5 | set show-all-if-ambiguous on 6 | 7 | # Immediately add a trailing slash when autocompleting symlinks to directories 8 | set mark-symlinked-directories on 9 | 10 | # Use the text that has already been typed as the prefix for searching through 11 | # commands (i.e. more intelligent Up/Down behavior) 12 | "\e[B": history-search-forward 13 | "\e[A": history-search-backward 14 | 15 | # Do not autocomplete hidden files unless the pattern explicitly begins with a dot 16 | set match-hidden-files off 17 | 18 | # Show all autocomplete results at once 19 | set page-completions off 20 | 21 | # If there are more than 200 possible completions for a word, ask to show them all 22 | set completion-query-items 200 23 | 24 | # Show extra file information when completing, like `ls -F` does 25 | set visible-stats on 26 | 27 | # Be more intelligent when autocompleting by also looking at the text after 28 | # the cursor. For example, when the current line is "cd ~/src/mozil", and 29 | # the cursor is on the "z", pressing Tab will not autocomplete it to "cd 30 | # ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the 31 | # Readline used by Bash 4.) 32 | set skip-completed-text on 33 | 34 | # Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456' 35 | set input-meta on 36 | set output-meta on 37 | set convert-meta off 38 | 39 | # Use Alt/Meta + Delete to delete the preceding word 40 | "\e[3;3~": kill-word 41 | -------------------------------------------------------------------------------- /.osx: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # ~/.osx — https://mths.be/osx 4 | 5 | # Ask for the administrator password upfront 6 | sudo -v 7 | 8 | # Keep-alive: update existing `sudo` time stamp until `.osx` has finished 9 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & 10 | 11 | ############################################################################### 12 | # General UI/UX # 13 | ############################################################################### 14 | 15 | # Set computer name (as done via System Preferences → Sharing) 16 | #sudo scutil --set ComputerName "0x6D746873" 17 | #sudo scutil --set HostName "0x6D746873" 18 | #sudo scutil --set LocalHostName "0x6D746873" 19 | #sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "0x6D746873" 20 | 21 | # Set standby delay to 24 hours (default is 1 hour) 22 | sudo pmset -a standbydelay 86400 23 | 24 | # Disable the sound effects on boot 25 | sudo nvram SystemAudioVolume=" " 26 | 27 | # Disable transparency in the menu bar and elsewhere on Yosemite 28 | defaults write com.apple.universalaccess reduceTransparency -bool true 29 | 30 | # Menu bar: hide the Time Machine, Volume, and User icons 31 | for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do 32 | defaults write "${domain}" dontAutoLoad -array \ 33 | "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \ 34 | "/System/Library/CoreServices/Menu Extras/Volume.menu" \ 35 | "/System/Library/CoreServices/Menu Extras/User.menu" 36 | done 37 | defaults write com.apple.systemuiserver menuExtras -array \ 38 | "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \ 39 | "/System/Library/CoreServices/Menu Extras/AirPort.menu" \ 40 | "/System/Library/CoreServices/Menu Extras/Battery.menu" \ 41 | "/System/Library/CoreServices/Menu Extras/Clock.menu" 42 | 43 | # Set highlight color to green 44 | defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" 45 | 46 | # Set sidebar icon size to medium 47 | defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 48 | 49 | # Always show scrollbars 50 | defaults write NSGlobalDomain AppleShowScrollBars -string "Always" 51 | # Possible values: `WhenScrolling`, `Automatic` and `Always` 52 | 53 | # Disable smooth scrolling 54 | # (Uncomment if you’re on an older Mac that messes up the animation) 55 | #defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false 56 | 57 | # Increase window resize speed for Cocoa applications 58 | defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 59 | 60 | # Expand save panel by default 61 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true 62 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true 63 | 64 | # Expand print panel by default 65 | defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true 66 | defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true 67 | 68 | # Save to disk (not to iCloud) by default 69 | defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false 70 | 71 | # Automatically quit printer app once the print jobs complete 72 | defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true 73 | 74 | # Disable the “Are you sure you want to open this application?” dialog 75 | defaults write com.apple.LaunchServices LSQuarantine -bool false 76 | 77 | # Remove duplicates in the “Open With” menu (also see `lscleanup` alias) 78 | /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user 79 | 80 | # Display ASCII control characters using caret notation in standard text views 81 | # Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` 82 | defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true 83 | 84 | # Disable Resume system-wide 85 | defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false 86 | 87 | # Disable automatic termination of inactive apps 88 | defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true 89 | 90 | # Disable the crash reporter 91 | #defaults write com.apple.CrashReporter DialogType -string "none" 92 | 93 | # Set Help Viewer windows to non-floating mode 94 | defaults write com.apple.helpviewer DevMode -bool true 95 | 96 | # Fix for the ancient UTF-8 bug in QuickLook (https://mths.be/bbo) 97 | # Commented out, as this is known to cause problems in various Adobe apps :( 98 | # See https://github.com/mathiasbynens/dotfiles/issues/237 99 | #echo "0x08000100:0" > ~/.CFUserTextEncoding 100 | 101 | # Reveal IP address, hostname, OS version, etc. when clicking the clock 102 | # in the login window 103 | sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName 104 | 105 | # Restart automatically if the computer freezes 106 | sudo systemsetup -setrestartfreeze on 107 | 108 | # Never go into computer sleep mode 109 | sudo systemsetup -setcomputersleep Off > /dev/null 110 | 111 | # Check for software updates daily, not just once per week 112 | defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 113 | 114 | # Disable Notification Center and remove the menu bar icon 115 | launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null 116 | 117 | # Disable smart quotes as they’re annoying when typing code 118 | defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false 119 | 120 | # Disable smart dashes as they’re annoying when typing code 121 | defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false 122 | 123 | # Set a custom wallpaper image. `DefaultDesktop.jpg` is already a symlink, and 124 | # all wallpapers are in `/Library/Desktop Pictures/`. The default is `Wave.jpg`. 125 | #rm -rf ~/Library/Application Support/Dock/desktoppicture.db 126 | #sudo rm -rf /System/Library/CoreServices/DefaultDesktop.jpg 127 | #sudo ln -s /path/to/your/image /System/Library/CoreServices/DefaultDesktop.jpg 128 | 129 | ############################################################################### 130 | # SSD-specific tweaks # 131 | ############################################################################### 132 | 133 | # Disable local Time Machine snapshots 134 | sudo tmutil disablelocal 135 | 136 | # Disable hibernation (speeds up entering sleep mode) 137 | sudo pmset -a hibernatemode 0 138 | 139 | # Remove the sleep image file to save disk space 140 | sudo rm /Private/var/vm/sleepimage 141 | # Create a zero-byte file instead… 142 | sudo touch /Private/var/vm/sleepimage 143 | # …and make sure it can’t be rewritten 144 | sudo chflags uchg /Private/var/vm/sleepimage 145 | 146 | # Disable the sudden motion sensor as it’s not useful for SSDs 147 | sudo pmset -a sms 0 148 | 149 | ############################################################################### 150 | # Trackpad, mouse, keyboard, Bluetooth accessories, and input # 151 | ############################################################################### 152 | 153 | # Trackpad: enable tap to click for this user and for the login screen 154 | defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true 155 | defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 156 | defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 157 | 158 | # Trackpad: map bottom right corner to right-click 159 | defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2 160 | defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true 161 | defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1 162 | defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true 163 | 164 | # Disable “natural” (Lion-style) scrolling 165 | defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false 166 | 167 | # Increase sound quality for Bluetooth headphones/headsets 168 | defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 169 | 170 | # Enable full keyboard access for all controls 171 | # (e.g. enable Tab in modal dialogs) 172 | defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 173 | 174 | # Use scroll gesture with the Ctrl (^) modifier key to zoom 175 | defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true 176 | defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 177 | # Follow the keyboard focus while zoomed in 178 | defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true 179 | 180 | # Disable press-and-hold for keys in favor of key repeat 181 | defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false 182 | 183 | # Set a blazingly fast keyboard repeat rate 184 | defaults write NSGlobalDomain KeyRepeat -int 0 185 | 186 | # Set language and text formats 187 | # Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with 188 | # `Inches`, `en_GB` with `en_US`, and `true` with `false`. 189 | defaults write NSGlobalDomain AppleLanguages -array "en" "nl" 190 | defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR" 191 | defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" 192 | defaults write NSGlobalDomain AppleMetricUnits -bool true 193 | 194 | # Set the timezone; see `sudo systemsetup -listtimezones` for other values 195 | sudo systemsetup -settimezone "Europe/Brussels" > /dev/null 196 | 197 | # Disable auto-correct 198 | defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false 199 | 200 | # change snapshots folder 201 | defaults write com.apple.screencapture location /Users/tchen/snapshots 202 | 203 | # Stop iTunes from responding to the keyboard media keys 204 | #launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null 205 | 206 | ############################################################################### 207 | # Screen # 208 | ############################################################################### 209 | 210 | # Require password immediately after sleep or screen saver begins 211 | defaults write com.apple.screensaver askForPassword -int 1 212 | defaults write com.apple.screensaver askForPasswordDelay -int 0 213 | 214 | # Save screenshots to the desktop 215 | defaults write com.apple.screencapture location -string "${HOME}/Desktop" 216 | 217 | # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) 218 | defaults write com.apple.screencapture type -string "png" 219 | 220 | # Disable shadow in screenshots 221 | defaults write com.apple.screencapture disable-shadow -bool true 222 | 223 | # Enable subpixel font rendering on non-Apple LCDs 224 | defaults write NSGlobalDomain AppleFontSmoothing -int 2 225 | 226 | # Enable HiDPI display modes (requires restart) 227 | sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true 228 | 229 | ############################################################################### 230 | # Finder # 231 | ############################################################################### 232 | 233 | # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons 234 | defaults write com.apple.finder QuitMenuItem -bool true 235 | 236 | # Finder: disable window animations and Get Info animations 237 | defaults write com.apple.finder DisableAllAnimations -bool true 238 | 239 | # Set Desktop as the default location for new Finder windows 240 | # For other paths, use `PfLo` and `file:///full/path/here/` 241 | defaults write com.apple.finder NewWindowTarget -string "PfDe" 242 | defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" 243 | 244 | # Show icons for hard drives, servers, and removable media on the desktop 245 | defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true 246 | defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true 247 | defaults write com.apple.finder ShowMountedServersOnDesktop -bool true 248 | defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true 249 | 250 | # Finder: show hidden files by default 251 | #defaults write com.apple.finder AppleShowAllFiles -bool true 252 | 253 | # Finder: show all filename extensions 254 | defaults write NSGlobalDomain AppleShowAllExtensions -bool true 255 | 256 | # Finder: show status bar 257 | defaults write com.apple.finder ShowStatusBar -bool true 258 | 259 | # Finder: show path bar 260 | defaults write com.apple.finder ShowPathbar -bool true 261 | 262 | # Finder: allow text selection in Quick Look 263 | defaults write com.apple.finder QLEnableTextSelection -bool true 264 | 265 | # Display full POSIX path as Finder window title 266 | defaults write com.apple.finder _FXShowPosixPathInTitle -bool true 267 | 268 | # When performing a search, search the current folder by default 269 | defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" 270 | 271 | # Disable the warning when changing a file extension 272 | defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false 273 | 274 | # Enable spring loading for directories 275 | defaults write NSGlobalDomain com.apple.springing.enabled -bool true 276 | 277 | # Remove the spring loading delay for directories 278 | defaults write NSGlobalDomain com.apple.springing.delay -float 0 279 | 280 | # Avoid creating .DS_Store files on network volumes 281 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 282 | 283 | # Disable disk image verification 284 | defaults write com.apple.frameworks.diskimages skip-verify -bool true 285 | defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true 286 | defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true 287 | 288 | # Automatically open a new Finder window when a volume is mounted 289 | defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true 290 | defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true 291 | defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true 292 | 293 | # Show item info near icons on the desktop and in other icon views 294 | /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist 295 | /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist 296 | /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist 297 | 298 | # Show item info to the right of the icons on the desktop 299 | /usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist 300 | 301 | # Enable snap-to-grid for icons on the desktop and in other icon views 302 | /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 303 | /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 304 | /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 305 | 306 | # Increase grid spacing for icons on the desktop and in other icon views 307 | /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist 308 | /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist 309 | /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist 310 | 311 | # Increase the size of icons on the desktop and in other icon views 312 | /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist 313 | /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist 314 | /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist 315 | 316 | # Use list view in all Finder windows by default 317 | # Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` 318 | defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" 319 | 320 | # Disable the warning before emptying the Trash 321 | defaults write com.apple.finder WarnOnEmptyTrash -bool false 322 | 323 | # Empty Trash securely by default 324 | defaults write com.apple.finder EmptyTrashSecurely -bool true 325 | 326 | # Enable AirDrop over Ethernet and on unsupported Macs running Lion 327 | defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true 328 | 329 | # Enable the MacBook Air SuperDrive on any Mac 330 | sudo nvram boot-args="mbasd=1" 331 | 332 | # Show the ~/Library folder 333 | chflags nohidden ~/Library 334 | 335 | # Remove Dropbox’s green checkmark icons in Finder 336 | file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns 337 | [ -e "${file}" ] && mv -f "${file}" "${file}.bak" 338 | 339 | # Expand the following File Info panes: 340 | # “General”, “Open with”, and “Sharing & Permissions” 341 | defaults write com.apple.finder FXInfoPanesExpanded -dict \ 342 | General -bool true \ 343 | OpenWith -bool true \ 344 | Privileges -bool true 345 | 346 | ############################################################################### 347 | # Dock, Dashboard, and hot corners # 348 | ############################################################################### 349 | 350 | # Enable highlight hover effect for the grid view of a stack (Dock) 351 | defaults write com.apple.dock mouse-over-hilite-stack -bool true 352 | 353 | # Set the icon size of Dock items to 36 pixels 354 | defaults write com.apple.dock tilesize -int 36 355 | 356 | # Change minimize/maximize window effect 357 | defaults write com.apple.dock mineffect -string "scale" 358 | 359 | # Minimize windows into their application’s icon 360 | defaults write com.apple.dock minimize-to-application -bool true 361 | 362 | # Enable spring loading for all Dock items 363 | defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true 364 | 365 | # Show indicator lights for open applications in the Dock 366 | defaults write com.apple.dock show-process-indicators -bool true 367 | 368 | # Wipe all (default) app icons from the Dock 369 | # This is only really useful when setting up a new Mac, or if you don’t use 370 | # the Dock to launch apps. 371 | #defaults write com.apple.dock persistent-apps -array 372 | 373 | # Don’t animate opening applications from the Dock 374 | defaults write com.apple.dock launchanim -bool false 375 | 376 | # Speed up Mission Control animations 377 | defaults write com.apple.dock expose-animation-duration -float 0.1 378 | 379 | # Don’t group windows by application in Mission Control 380 | # (i.e. use the old Exposé behavior instead) 381 | defaults write com.apple.dock expose-group-by-app -bool false 382 | 383 | # Disable Dashboard 384 | defaults write com.apple.dashboard mcx-disabled -bool true 385 | 386 | # Don’t show Dashboard as a Space 387 | defaults write com.apple.dock dashboard-in-overlay -bool true 388 | 389 | # Don’t automatically rearrange Spaces based on most recent use 390 | defaults write com.apple.dock mru-spaces -bool false 391 | 392 | # Remove the auto-hiding Dock delay 393 | defaults write com.apple.dock autohide-delay -float 0 394 | # Remove the animation when hiding/showing the Dock 395 | defaults write com.apple.dock autohide-time-modifier -float 0 396 | 397 | # Automatically hide and show the Dock 398 | defaults write com.apple.dock autohide -bool true 399 | 400 | # Make Dock icons of hidden applications translucent 401 | defaults write com.apple.dock showhidden -bool true 402 | 403 | # Disable the Launchpad gesture (pinch with thumb and three fingers) 404 | #defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 405 | 406 | # Reset Launchpad, but keep the desktop wallpaper intact 407 | find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete 408 | 409 | # Add iOS Simulator to Launchpad 410 | sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app" "/Applications/iOS Simulator.app" 411 | 412 | # Add a spacer to the left side of the Dock (where the applications are) 413 | #defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' 414 | # Add a spacer to the right side of the Dock (where the Trash is) 415 | #defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}' 416 | 417 | # Hot corners 418 | # Possible values: 419 | # 0: no-op 420 | # 2: Mission Control 421 | # 3: Show application windows 422 | # 4: Desktop 423 | # 5: Start screen saver 424 | # 6: Disable screen saver 425 | # 7: Dashboard 426 | # 10: Put display to sleep 427 | # 11: Launchpad 428 | # 12: Notification Center 429 | # Top left screen corner → Mission Control 430 | defaults write com.apple.dock wvous-tl-corner -int 2 431 | defaults write com.apple.dock wvous-tl-modifier -int 0 432 | # Top right screen corner → Desktop 433 | defaults write com.apple.dock wvous-tr-corner -int 4 434 | defaults write com.apple.dock wvous-tr-modifier -int 0 435 | # Bottom left screen corner → Start screen saver 436 | defaults write com.apple.dock wvous-bl-corner -int 5 437 | defaults write com.apple.dock wvous-bl-modifier -int 0 438 | 439 | ############################################################################### 440 | # Safari & WebKit # 441 | ############################################################################### 442 | 443 | # Privacy: don’t send search queries to Apple 444 | defaults write com.apple.Safari UniversalSearchEnabled -bool false 445 | defaults write com.apple.Safari SuppressSearchSuggestions -bool true 446 | 447 | # Press Tab to highlight each item on a web page 448 | defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true 449 | defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true 450 | 451 | # Show the full URL in the address bar (note: this still hides the scheme) 452 | defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true 453 | 454 | # Set Safari’s home page to `about:blank` for faster loading 455 | defaults write com.apple.Safari HomePage -string "about:blank" 456 | 457 | # Prevent Safari from opening ‘safe’ files automatically after downloading 458 | defaults write com.apple.Safari AutoOpenSafeDownloads -bool false 459 | 460 | # Allow hitting the Backspace key to go to the previous page in history 461 | defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true 462 | 463 | # Hide Safari’s bookmarks bar by default 464 | defaults write com.apple.Safari ShowFavoritesBar -bool false 465 | 466 | # Hide Safari’s sidebar in Top Sites 467 | defaults write com.apple.Safari ShowSidebarInTopSites -bool false 468 | 469 | # Disable Safari’s thumbnail cache for History and Top Sites 470 | defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 471 | 472 | # Enable Safari’s debug menu 473 | defaults write com.apple.Safari IncludeInternalDebugMenu -bool true 474 | 475 | # Make Safari’s search banners default to Contains instead of Starts With 476 | defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false 477 | 478 | # Remove useless icons from Safari’s bookmarks bar 479 | defaults write com.apple.Safari ProxiesInBookmarksBar "()" 480 | 481 | # Enable the Develop menu and the Web Inspector in Safari 482 | defaults write com.apple.Safari IncludeDevelopMenu -bool true 483 | defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 484 | defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true 485 | 486 | # Add a context menu item for showing the Web Inspector in web views 487 | defaults write NSGlobalDomain WebKitDeveloperExtras -bool true 488 | 489 | ############################################################################### 490 | # Mail # 491 | ############################################################################### 492 | 493 | # Disable send and reply animations in Mail.app 494 | defaults write com.apple.mail DisableReplyAnimations -bool true 495 | defaults write com.apple.mail DisableSendAnimations -bool true 496 | 497 | # Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app 498 | defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false 499 | 500 | # Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app 501 | defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" -string "@\\U21a9" 502 | 503 | # Display emails in threaded mode, sorted by date (oldest at the top) 504 | defaults write com.apple.mail DraftsViewerAttributes -dict-add "DisplayInThreadedMode" -string "yes" 505 | defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortedDescending" -string "yes" 506 | defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortOrder" -string "received-date" 507 | 508 | # Disable inline attachments (just show the icons) 509 | defaults write com.apple.mail DisableInlineAttachmentViewing -bool true 510 | 511 | # Disable automatic spell checking 512 | defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" 513 | 514 | ############################################################################### 515 | # Spotlight # 516 | ############################################################################### 517 | 518 | # Hide Spotlight tray-icon (and subsequent helper) 519 | #sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search 520 | # Disable Spotlight indexing for any volume that gets mounted and has not yet 521 | # been indexed before. 522 | # Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. 523 | sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" 524 | # Change indexing order and disable some search results 525 | # Yosemite-specific search results (remove them if your are using OS X 10.9 or older): 526 | # MENU_DEFINITION 527 | # MENU_CONVERSION 528 | # MENU_EXPRESSION 529 | # MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) 530 | # MENU_WEBSEARCH (send search queries to Apple) 531 | # MENU_OTHER 532 | defaults write com.apple.spotlight orderedItems -array \ 533 | '{"enabled" = 1;"name" = "APPLICATIONS";}' \ 534 | '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ 535 | '{"enabled" = 1;"name" = "DIRECTORIES";}' \ 536 | '{"enabled" = 1;"name" = "PDF";}' \ 537 | '{"enabled" = 1;"name" = "FONTS";}' \ 538 | '{"enabled" = 0;"name" = "DOCUMENTS";}' \ 539 | '{"enabled" = 0;"name" = "MESSAGES";}' \ 540 | '{"enabled" = 0;"name" = "CONTACT";}' \ 541 | '{"enabled" = 0;"name" = "EVENT_TODO";}' \ 542 | '{"enabled" = 0;"name" = "IMAGES";}' \ 543 | '{"enabled" = 0;"name" = "BOOKMARKS";}' \ 544 | '{"enabled" = 0;"name" = "MUSIC";}' \ 545 | '{"enabled" = 0;"name" = "MOVIES";}' \ 546 | '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ 547 | '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ 548 | '{"enabled" = 0;"name" = "SOURCE";}' \ 549 | '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ 550 | '{"enabled" = 0;"name" = "MENU_OTHER";}' \ 551 | '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ 552 | '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ 553 | '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ 554 | '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' 555 | # Load new settings before rebuilding the index 556 | killall mds > /dev/null 2>&1 557 | # Make sure indexing is enabled for the main volume 558 | sudo mdutil -i on / > /dev/null 559 | # Rebuild the index from scratch 560 | sudo mdutil -E / > /dev/null 561 | 562 | ############################################################################### 563 | # Terminal & iTerm 2 # 564 | ############################################################################### 565 | 566 | # Only use UTF-8 in Terminal.app 567 | defaults write com.apple.terminal StringEncodings -array 4 568 | 569 | # Use a modified version of the Solarized Dark theme by default in Terminal.app 570 | osascript < /dev/null && sudo tmutil disablelocal 636 | 637 | ############################################################################### 638 | # Activity Monitor # 639 | ############################################################################### 640 | 641 | # Show the main window when launching Activity Monitor 642 | defaults write com.apple.ActivityMonitor OpenMainWindow -bool true 643 | 644 | # Visualize CPU usage in the Activity Monitor Dock icon 645 | defaults write com.apple.ActivityMonitor IconType -int 5 646 | 647 | # Show all processes in Activity Monitor 648 | defaults write com.apple.ActivityMonitor ShowCategory -int 0 649 | 650 | # Sort Activity Monitor results by CPU usage 651 | defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" 652 | defaults write com.apple.ActivityMonitor SortDirection -int 0 653 | 654 | ############################################################################### 655 | # Address Book, Dashboard, iCal, TextEdit, and Disk Utility # 656 | ############################################################################### 657 | 658 | # Enable the debug menu in Address Book 659 | defaults write com.apple.addressbook ABShowDebugMenu -bool true 660 | 661 | # Enable Dashboard dev mode (allows keeping widgets on the desktop) 662 | defaults write com.apple.dashboard devmode -bool true 663 | 664 | # Enable the debug menu in iCal (pre-10.8) 665 | defaults write com.apple.iCal IncludeDebugMenu -bool true 666 | 667 | # Use plain text mode for new TextEdit documents 668 | defaults write com.apple.TextEdit RichText -int 0 669 | # Open and save files as UTF-8 in TextEdit 670 | defaults write com.apple.TextEdit PlainTextEncoding -int 4 671 | defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 672 | 673 | # Enable the debug menu in Disk Utility 674 | defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true 675 | defaults write com.apple.DiskUtility advanced-image-options -bool true 676 | 677 | ############################################################################### 678 | # Mac App Store # 679 | ############################################################################### 680 | 681 | # Enable the WebKit Developer Tools in the Mac App Store 682 | defaults write com.apple.appstore WebKitDeveloperExtras -bool true 683 | 684 | # Enable Debug Menu in the Mac App Store 685 | defaults write com.apple.appstore ShowDebugMenu -bool true 686 | 687 | ############################################################################### 688 | # Messages # 689 | ############################################################################### 690 | 691 | # Disable automatic emoji substitution (i.e. use plain text smileys) 692 | defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false 693 | 694 | # Disable smart quotes as it’s annoying for messages that contain code 695 | defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false 696 | 697 | # Disable continuous spell checking 698 | defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false 699 | 700 | ############################################################################### 701 | # Google Chrome & Google Chrome Canary # 702 | ############################################################################### 703 | 704 | # Allow installing user scripts via GitHub Gist or Userscripts.org 705 | defaults write com.google.Chrome ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*" 706 | defaults write com.google.Chrome.canary ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*" 707 | 708 | # Disable the all too sensitive backswipe 709 | defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false 710 | defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false 711 | 712 | # Use the system-native print preview dialog 713 | defaults write com.google.Chrome DisablePrintPreview -bool true 714 | defaults write com.google.Chrome.canary DisablePrintPreview -bool true 715 | 716 | ############################################################################### 717 | # GPGMail 2 # 718 | ############################################################################### 719 | 720 | # Disable signing emails by default 721 | defaults write ~/Library/Preferences/org.gpgtools.gpgmail SignNewEmailsByDefault -bool false 722 | 723 | ############################################################################### 724 | # SizeUp.app # 725 | ############################################################################### 726 | 727 | # Start SizeUp at login 728 | defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true 729 | 730 | # Don’t show the preferences window on next start 731 | defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false 732 | 733 | ############################################################################### 734 | # Sublime Text # 735 | ############################################################################### 736 | 737 | # Install Sublime Text settings 738 | cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null 739 | 740 | ############################################################################### 741 | # Transmission.app # 742 | ############################################################################### 743 | 744 | # Use `~/Documents/Torrents` to store incomplete downloads 745 | defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true 746 | defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents" 747 | 748 | # Don’t prompt for confirmation before downloading 749 | defaults write org.m0k.transmission DownloadAsk -bool false 750 | 751 | # Trash original torrent files 752 | defaults write org.m0k.transmission DeleteOriginalTorrent -bool true 753 | 754 | # Hide the donate message 755 | defaults write org.m0k.transmission WarningDonate -bool false 756 | # Hide the legal disclaimer 757 | defaults write org.m0k.transmission WarningLegal -bool false 758 | 759 | ############################################################################### 760 | # Twitter.app # 761 | ############################################################################### 762 | 763 | # Disable smart quotes as it’s annoying for code tweets 764 | defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false 765 | 766 | # Show the app window when clicking the menu bar icon 767 | defaults write com.twitter.twitter-mac MenuItemBehavior -int 1 768 | 769 | # Enable the hidden ‘Develop’ menu 770 | defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true 771 | 772 | # Open links in the background 773 | defaults write com.twitter.twitter-mac openLinksInBackground -bool true 774 | 775 | # Allow closing the ‘new tweet’ window by pressing `Esc` 776 | defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true 777 | 778 | # Show full names rather than Twitter handles 779 | defaults write com.twitter.twitter-mac ShowFullNames -bool true 780 | 781 | # Hide the app in the background if it’s not the front-most window 782 | defaults write com.twitter.twitter-mac HideInBackground -bool true 783 | 784 | ############################################################################### 785 | # Spectacle.app # 786 | ############################################################################### 787 | 788 | # Set up my preferred keyboard shortcuts 789 | defaults write com.divisiblebyzero.Spectacle MakeLarger -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 790 | defaults write com.divisiblebyzero.Spectacle MakeSmaller -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 791 | defaults write com.divisiblebyzero.Spectacle MoveToBottomDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 792 | defaults write com.divisiblebyzero.Spectacle MoveToBottomHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 793 | defaults write com.divisiblebyzero.Spectacle MoveToCenter -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 794 | defaults write com.divisiblebyzero.Spectacle MoveToFullscreen -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 795 | defaults write com.divisiblebyzero.Spectacle MoveToLeftDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 796 | defaults write com.divisiblebyzero.Spectacle MoveToLeftHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 797 | defaults write com.divisiblebyzero.Spectacle MoveToLowerLeft -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 798 | defaults write com.divisiblebyzero.Spectacle MoveToLowerRight -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 799 | defaults write com.divisiblebyzero.Spectacle MoveToNextDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 800 | defaults write com.divisiblebyzero.Spectacle MoveToNextThird -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 801 | defaults write com.divisiblebyzero.Spectacle MoveToPreviousDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 802 | defaults write com.divisiblebyzero.Spectacle MoveToPreviousThird -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 803 | defaults write com.divisiblebyzero.Spectacle MoveToRightDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 804 | defaults write com.divisiblebyzero.Spectacle MoveToRightHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 805 | defaults write com.divisiblebyzero.Spectacle MoveToTopDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 806 | defaults write com.divisiblebyzero.Spectacle MoveToTopHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 807 | defaults write com.divisiblebyzero.Spectacle MoveToUpperLeft -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 808 | defaults write com.divisiblebyzero.Spectacle MoveToUpperRight -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 809 | defaults write com.divisiblebyzero.Spectacle RedoLastMove -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 810 | defaults write com.divisiblebyzero.Spectacle UndoLastMove -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 811 | 812 | ############################################################################### 813 | # Kill affected applications # 814 | ############################################################################### 815 | 816 | for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \ 817 | "Dock" "Finder" "Mail" "Messages" "Safari" "SizeUp" "Spectacle" \ 818 | "SystemUIServer" "Terminal" "Transmission" "Twitter" "iCal"; do 819 | killall "${app}" > /dev/null 2>&1 820 | done 821 | echo "Done. Note that some of these changes require a logout/restart to take effect." 822 | -------------------------------------------------------------------------------- /.screenrc: -------------------------------------------------------------------------------- 1 | # Disable the startup message 2 | startup_message off 3 | 4 | # Set a large scrollback buffer 5 | defscrollback 32000 6 | 7 | # Always start `screen` with UTF-8 enabled (`screen -U`) 8 | defutf8 on 9 | -------------------------------------------------------------------------------- /.vim/UltiSnips/all.snippets: -------------------------------------------------------------------------------- 1 | snippet todo "This is a TODO reminder" i 2 | TODO: `echo $USER` ${1:desc} `!v strftime("%c")` 3 | endsnippet 4 | 5 | snippet var$ "make a jquery dom access code" b 6 | var \$${1:name} = $('$2$1'); 7 | endsnippet 8 | -------------------------------------------------------------------------------- /.vim/UltiSnips/eelixir.snippets: -------------------------------------------------------------------------------- 1 | extends html 2 | -------------------------------------------------------------------------------- /.vim/UltiSnips/elixir.snippets: -------------------------------------------------------------------------------- 1 | snippet def "defines a new function with a multiline block" !b 2 | def ${1:name}(${2:params}) do 3 | $3 4 | end 5 | endsnippet 6 | 7 | snippet defl "defines a new function" !b 8 | def ${1:name}(${2:params}), do: $3 9 | endsnippet 10 | 11 | snippet defp "defines a private method with a multiline block" !b 12 | defp ${1:name}(${2:params}) do 13 | $3 14 | end 15 | endsnippet 16 | 17 | snippet defpl "defines a new private function" !b 18 | defp ${1:name}(${2:params}), do: $3 19 | endsnippet 20 | 21 | snippet defmod "defines a new module" !b 22 | defmodule ${1:name} do 23 | $3 24 | end 25 | endsnippet 26 | 27 | snippet defi "defines a new implementation" b 28 | defimpl ${1:name}, for: $2 do 29 | $3 30 | end 31 | endsnippet 32 | 33 | snippet defc "defines a callback" b 34 | defcallback ${1:name} :: $2 35 | endsnippet 36 | 37 | snippet defpro "defines a new protocol" b 38 | defprotocol ${1:name} do 39 | $2 40 | end 41 | endsnippet 42 | 43 | snippet ht "inserts a [head | tail]" !i 44 | [head | tail] 45 | endsnippet 46 | 47 | snippet test "add a test case" !b 48 | test "${1:description}"${2:, context} do 49 | $3 50 | end 51 | endsnippet 52 | 53 | snippet server "incorporate the GenServer behaviour" !b 54 | use GenServer.Behaviour 55 | endsnippet 56 | 57 | snippet fsm "incorporate the GenFSM behaviour" !b 58 | use GenFSM.Behaviour 59 | endsnippet 60 | 61 | snippet if "add an if block" !b 62 | if ${1:condition} do 63 | $2 64 | end 65 | endsnippet 66 | 67 | snippet ife "add an if-else block" !b 68 | if ${1:condition} do 69 | $2 70 | else 71 | $3 72 | end 73 | endsnippet 74 | 75 | snippet doc "define function documentation with example" b 76 | @doc """ 77 | $1. Example: 78 | 79 | iex> $2 80 | $3 81 | 82 | """ 83 | endsnippet 84 | snippet mdoc "define module document" i 85 | @moduledoc """ 86 | $1 87 | 88 | """ 89 | endsnippet 90 | 91 | snippet ex "add example" i 92 | Example: 93 | 94 | iex> $1 95 | $2 96 | 97 | endsnippet 98 | 99 | snippet defsup "define a supervisor module" b 100 | defmodule ${1:name} do 101 | @moduledoc """ 102 | $2 103 | """ 104 | use Supervisor 105 | 106 | def start_link do 107 | :supervisor.start_link __MODULE__, [] 108 | end 109 | 110 | def init(${3:params}) do 111 | child_processes = [ 112 | worker($4, $3) 113 | ] 114 | supervise child_processes, strategy: :$5 115 | end 116 | end 117 | endsnippet 118 | 119 | snippet defgen "define a GenServer module" b 120 | defmodule ${1:name} do 121 | @moduledoc """ 122 | $2 123 | """ 124 | use GenServer 125 | 126 | ### Public API 127 | 128 | def start_link do 129 | {:ok, server} = :gen_server.start_link __MODULE__, ${3:[]}, ${4:[]} 130 | end 131 | 132 | ### GenServer API 133 | def init(${5:state}) do 134 | {:ok, $5} 135 | end 136 | 137 | def handle_call(, _from, state) do 138 | 139 | end 140 | 141 | def handle_cast(, state) do 142 | 143 | end 144 | end 145 | endsnippet 146 | 147 | snippet deftest "define a test module" b 148 | defmodule ${1:name} do 149 | use ExUnit.Case 150 | 151 | test "$2" do 152 | $3 153 | end 154 | 155 | $4 156 | end 157 | endsnippet 158 | 159 | snippet defst "define a new structure" b 160 | defmodule ${1:name} do 161 | defstruct $2: ${3:nil}, 162 | $4: ${5:nil} 163 | end 164 | endsnippet 165 | 166 | snippet quo "define a quote" b 167 | quote do 168 | $1 169 | end 170 | endsnippet 171 | 172 | snippet ben "define a new benchmark test" b 173 | bench "${1:name}" do 174 | $2 175 | end 176 | endsnippet 177 | 178 | snippet defben "define a bench module" b 179 | defmodule ${1:name} do 180 | use Benchfella 181 | 182 | bench "${2:bname}" do 183 | $3 184 | end 185 | end 186 | endsnippet 187 | 188 | snippet task "define a new mix task" b 189 | defmodule Mix.Tasks.${1:Name} do 190 | use Mix.Task 191 | 192 | @shortdoc "$2" 193 | 194 | @moduledoc """ 195 | $3 196 | """ 197 | 198 | def run(args) do 199 | {opts, args, _} = OptionParser.parse(args, strict: [dev: :boolean]) 200 | run(args, opts) 201 | end 202 | 203 | def run(args, opts) do 204 | $4 205 | end 206 | end 207 | endsnippet 208 | -------------------------------------------------------------------------------- /.vim/UltiSnips/python.snippets: -------------------------------------------------------------------------------- 1 | snippet tnd_rh "tornado request handler" b 2 | class $1Handler(RequestHandler): 3 | def get(self): 4 | $2 5 | 6 | endsnippet 7 | -------------------------------------------------------------------------------- /.vim/UltiSnips/sshconfig.snippets: -------------------------------------------------------------------------------- 1 | snippet ho "add a new Host entry" b 2 | Host ${1:name} 3 | Hostname $2 4 | IdentityFile ~/.ssh/${3:id_rsa} 5 | 6 | endsnippet 7 | -------------------------------------------------------------------------------- /.vim/backups/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/.vim/backups/.gitignore -------------------------------------------------------------------------------- /.vim/colors/solarized.vim: -------------------------------------------------------------------------------- 1 | " Name: Solarized vim colorscheme 2 | " Author: Ethan Schoonover 3 | " URL: http://ethanschoonover.com/solarized 4 | " (see this url for latest release & screenshots) 5 | " License: OSI approved MIT license (see end of this file) 6 | " Created: In the middle of the night 7 | " Modified: 2011 Apr 14 8 | " 9 | " Usage "{{{ 10 | " 11 | " --------------------------------------------------------------------- 12 | " ABOUT: 13 | " --------------------------------------------------------------------- 14 | " Solarized is a carefully designed selective contrast colorscheme with dual 15 | " light and dark modes that runs in both GUI, 256 and 16 color modes. 16 | " 17 | " See the homepage above for screenshots and details. 18 | " 19 | " --------------------------------------------------------------------- 20 | " INSTALLATION: 21 | " --------------------------------------------------------------------- 22 | " 23 | " Two options for installation: manual or pathogen 24 | " 25 | " MANUAL INSTALLATION OPTION: 26 | " --------------------------------------------------------------------- 27 | " 28 | " 1. Put the files in the right place! 29 | " 2. Move `solarized.vim` to your `.vim/colors` directory. 30 | " 31 | " RECOMMENDED PATHOGEN INSTALLATION OPTION: 32 | " --------------------------------------------------------------------- 33 | " 34 | " 1. Download and install Tim Pope's Pathogen from: 35 | " https://github.com/tpope/vim-pathogen 36 | " 37 | " 2. Next, move or clone the `vim-colors-solarized` directory so that it is 38 | " a subdirectory of the `.vim/bundle` directory. 39 | " 40 | " a. **clone with git:** 41 | " 42 | " $ cd ~/.vim/bundle 43 | " $ git clone git://github.com/altercation/vim-colors-solarized.git 44 | " 45 | " b. **or move manually into the pathogen bundle directory:** 46 | " In the parent directory of vim-colors-solarized: 47 | " 48 | " $ mv vim-colors-solarized ~/.vim/bundle/ 49 | " 50 | " MODIFY VIMRC: 51 | " 52 | " After either Option 1 or Option 2 above, put the following two lines in your 53 | " .vimrc: 54 | " 55 | " syntax enable 56 | " set background=dark 57 | " colorscheme solarized 58 | " 59 | " or, for the light background mode of Solarized: 60 | " 61 | " syntax enable 62 | " set background=light 63 | " colorscheme solarized 64 | " 65 | " I like to have a different background in GUI and terminal modes, so I can use 66 | " the following if-then. However, I find vim's background autodetection to be 67 | " pretty good and, at least with MacVim, I can leave this background value 68 | " assignment out entirely and get the same results. 69 | " 70 | " if has('gui_running') 71 | " set background=light 72 | " else 73 | " set background=dark 74 | " endif 75 | " 76 | " See the Solarized homepage at http://ethanschoonover.com/solarized for 77 | " screenshots which will help you select either the light or dark background. 78 | " 79 | " Other options are detailed below. 80 | " 81 | " IMPORTANT NOTE FOR TERMINAL USERS: 82 | " 83 | " If you are going to use Solarized in Terminal mode (i.e. not in a GUI version 84 | " like gvim or macvim), **please please please** consider setting your terminal 85 | " emulator's colorscheme to used the Solarized palette. I've included palettes 86 | " for some popular terminal emulator as well as Xdefaults in the official 87 | " Solarized download available from [Solarized homepage]. If you use 88 | " Solarized *without* these colors, Solarized will need to be told to degrade 89 | " its colorscheme to a set compatible with the limited 256 terminal palette 90 | " (whereas by using the terminal's 16 ansi color values, you can set the 91 | " correct, specific values for the Solarized palette). 92 | " 93 | " If you do use the custom terminal colors, solarized.vim should work out of 94 | " the box for you. If you are using a terminal emulator that supports 256 95 | " colors and don't want to use the custom Solarized terminal colors, you will 96 | " need to use the degraded 256 colorscheme. To do so, simply add the following 97 | " line *before* the `colorschem solarized` line: 98 | " 99 | " let g:solarized_termcolors=256 100 | " 101 | " Again, I recommend just changing your terminal colors to Solarized values 102 | " either manually or via one of the many terminal schemes available for import. 103 | " 104 | " --------------------------------------------------------------------- 105 | " TOGGLE BACKGROUND FUNCTION: 106 | " --------------------------------------------------------------------- 107 | " 108 | " Solarized comes with a Toggle Background plugin that by default will map to 109 | " if that mapping is available. If it is not available you will need to 110 | " either map the function manually or change your current mapping to 111 | " something else. If you wish to map the function manually, enter the following 112 | " lines in your .vimrc: 113 | " 114 | " nmap ToggleBackground 115 | " imap ToggleBackground 116 | " vmap ToggleBackground 117 | " 118 | " Note that it is important to *not* use the noremap map variants. The plugin 119 | " uses noremap internally. You may run `:help togglebg` for more information. 120 | " 121 | " --------------------------------------------------------------------- 122 | " OPTIONS 123 | " --------------------------------------------------------------------- 124 | " 125 | " Set these in your vimrc file prior to calling the colorscheme. 126 | " 127 | " option name default optional 128 | " ------------------------------------------------ 129 | " g:solarized_termcolors= 16 | 256 130 | " g:solarized_termtrans = 0 | 1 131 | " g:solarized_degrade = 0 | 1 132 | " g:solarized_bold = 1 | 0 133 | " g:solarized_underline = 1 | 0 134 | " g:solarized_italic = 1 | 0 135 | " g:solarized_contrast = "normal"| "high" or "low" 136 | " g:solarized_visibility= "normal"| "high" or "low" 137 | " ------------------------------------------------ 138 | " 139 | " OPTION DETAILS 140 | " 141 | " ------------------------------------------------ 142 | " g:solarized_termcolors= 256 | 16 143 | " ------------------------------------------------ 144 | " The most important option if you are using vim in terminal (non gui) mode! 145 | " This tells Solarized to use the 256 degraded color mode if running in a 256 146 | " color capable terminal. Otherwise, if set to `16` it will use the terminal 147 | " emulators colorscheme (best option as long as you've set the emulators colors 148 | " to the Solarized palette). 149 | " 150 | " If you are going to use Solarized in Terminal mode (i.e. not in a GUI 151 | " version like gvim or macvim), **please please please** consider setting your 152 | " terminal emulator's colorscheme to used the Solarized palette. I've included 153 | " palettes for some popular terminal emulator as well as Xdefaults in the 154 | " official Solarized download available from: 155 | " http://ethanschoonover.com/solarized . If you use Solarized without these 156 | " colors, Solarized will by default use an approximate set of 256 colors. It 157 | " isn't bad looking and has been extensively tweaked, but it's still not quite 158 | " the real thing. 159 | " 160 | " ------------------------------------------------ 161 | " g:solarized_termtrans = 0 | 1 162 | " ------------------------------------------------ 163 | " If you use a terminal emulator with a transparent background and Solarized 164 | " isn't displaying the background color transparently, set this to 1 and 165 | " Solarized will use the default (transparent) background of the terminal 166 | " emulator. *urxvt* required this in my testing; iTerm2 did not. 167 | " 168 | " Note that on Mac OS X Terminal.app, solarized_termtrans is set to 1 by 169 | " default as this is almost always the best option. The only exception to this 170 | " is if the working terminfo file supports 256 colors (xterm-256color). 171 | " 172 | " ------------------------------------------------ 173 | " g:solarized_degrade = 0 | 1 174 | " ------------------------------------------------ 175 | " For test purposes only; forces Solarized to use the 256 degraded color mode 176 | " to test the approximate color values for accuracy. 177 | " 178 | " ------------------------------------------------ 179 | " g:solarized_bold = 1 | 0 180 | " ------------------------------------------------ 181 | " ------------------------------------------------ 182 | " g:solarized_underline = 1 | 0 183 | " ------------------------------------------------ 184 | " ------------------------------------------------ 185 | " g:solarized_italic = 1 | 0 186 | " ------------------------------------------------ 187 | " If you wish to stop Solarized from displaying bold, underlined or 188 | " italicized typefaces, simply assign a zero value to the appropriate 189 | " variable, for example: `let g:solarized_italic=0` 190 | " 191 | " ------------------------------------------------ 192 | " g:solarized_contrast = "normal"| "high" or "low" 193 | " ------------------------------------------------ 194 | " Stick with normal! It's been carefully tested. Setting this option to high 195 | " or low does use the same Solarized palette but simply shifts some values up 196 | " or down in order to expand or compress the tonal range displayed. 197 | " 198 | " ------------------------------------------------ 199 | " g:solarized_visibility = "normal"| "high" or "low" 200 | " ------------------------------------------------ 201 | " Special characters such as trailing whitespace, tabs, newlines, when 202 | " displayed using ":set list" can be set to one of three levels depending on 203 | " your needs. 204 | " 205 | " --------------------------------------------------------------------- 206 | " COLOR VALUES 207 | " --------------------------------------------------------------------- 208 | " Download palettes and files from: http://ethanschoonover.com/solarized 209 | " 210 | " L\*a\*b values are canonical (White D65, Reference D50), other values are 211 | " matched in sRGB space. 212 | " 213 | " SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB 214 | " --------- ------- ---- ------- ----------- ---------- ----------- ----------- 215 | " base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 216 | " base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 217 | " base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46 218 | " base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51 219 | " base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 220 | " base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 221 | " base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93 222 | " base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 223 | " yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 224 | " orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 225 | " red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 226 | " magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 227 | " violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 228 | " blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 229 | " cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 230 | " green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 231 | " 232 | " --------------------------------------------------------------------- 233 | " COLORSCHEME HACKING 234 | " --------------------------------------------------------------------- 235 | " 236 | " Useful commands for testing colorschemes: 237 | " :source $VIMRUNTIME/syntax/hitest.vim 238 | " :help highlight-groups 239 | " :help cterm-colors 240 | " :help group-name 241 | " 242 | " Useful links for developing colorschemes: 243 | " http://www.vim.org/scripts/script.php?script_id=2937 244 | " http://vimcasts.org/episodes/creating-colorschemes-for-vim/ 245 | " http://www.frexx.de/xterm-256-notes/" 246 | " 247 | " 248 | " }}} 249 | " Default option values"{{{ 250 | " --------------------------------------------------------------------- 251 | if !exists("g:solarized_termtrans") 252 | if ($TERM_PROGRAM ==? "apple_terminal" && &t_Co < 256) 253 | let g:solarized_termtrans = 1 254 | else 255 | let g:solarized_termtrans = 0 256 | endif 257 | endif 258 | if !exists("g:solarized_degrade") 259 | let g:solarized_degrade = 0 260 | endif 261 | if !exists("g:solarized_bold") 262 | let g:solarized_bold = 1 263 | endif 264 | if !exists("g:solarized_underline") 265 | let g:solarized_underline = 1 266 | endif 267 | if !exists("g:solarized_italic") 268 | let g:solarized_italic = 1 269 | endif 270 | if !exists("g:solarized_termcolors") 271 | let g:solarized_termcolors = 16 272 | endif 273 | if !exists("g:solarized_contrast") 274 | let g:solarized_contrast = "normal" 275 | endif 276 | if !exists("g:solarized_visibility") 277 | let g:solarized_visibility = "normal" 278 | endif 279 | "}}} 280 | " Colorscheme initialization "{{{ 281 | " --------------------------------------------------------------------- 282 | hi clear 283 | if exists("syntax_on") 284 | syntax reset 285 | endif 286 | let colors_name = "solarized" 287 | 288 | "}}} 289 | " GUI & CSApprox hexadecimal palettes"{{{ 290 | " --------------------------------------------------------------------- 291 | " 292 | " Set both gui and terminal color values in separate conditional statements 293 | " Due to possibility that CSApprox is running (though I suppose we could just 294 | " leave the hex values out entirely in that case and include only cterm colors) 295 | " We also check to see if user has set solarized (force use of the 296 | " neutral gray monotone palette component) 297 | if (has("gui_running") && g:solarized_degrade == 0) 298 | let s:vmode = "gui" 299 | let s:base03 = "#002b36" 300 | let s:base02 = "#073642" 301 | let s:base01 = "#586e75" 302 | let s:base00 = "#657b83" 303 | let s:base0 = "#839496" 304 | let s:base1 = "#93a1a1" 305 | let s:base2 = "#eee8d5" 306 | let s:base3 = "#fdf6e3" 307 | let s:yellow = "#b58900" 308 | let s:orange = "#cb4b16" 309 | let s:red = "#dc322f" 310 | let s:magenta = "#d33682" 311 | let s:violet = "#6c71c4" 312 | let s:blue = "#268bd2" 313 | let s:cyan = "#2aa198" 314 | let s:green = "#859900" 315 | elseif (has("gui_running") && g:solarized_degrade == 1) 316 | " These colors are identical to the 256 color mode. They may be viewed 317 | " while in gui mode via "let g:solarized_degrade=1", though this is not 318 | " recommened and is for testing only. 319 | let s:vmode = "gui" 320 | let s:base03 = "#1c1c1c" 321 | let s:base02 = "#262626" 322 | let s:base01 = "#4e4e4e" 323 | let s:base00 = "#585858" 324 | let s:base0 = "#808080" 325 | let s:base1 = "#8a8a8a" 326 | let s:base2 = "#d7d7af" 327 | let s:base3 = "#ffffd7" 328 | let s:yellow = "#af8700" 329 | let s:orange = "#d75f00" 330 | let s:red = "#af0000" 331 | let s:magenta = "#af005f" 332 | let s:violet = "#5f5faf" 333 | let s:blue = "#0087ff" 334 | let s:cyan = "#00afaf" 335 | let s:green = "#5f8700" 336 | elseif g:solarized_termcolors != 256 && &t_Co >= 16 337 | let s:vmode = "cterm" 338 | let s:base03 = "8" 339 | let s:base02 = "0" 340 | let s:base01 = "10" 341 | let s:base00 = "11" 342 | let s:base0 = "12" 343 | let s:base1 = "14" 344 | let s:base2 = "7" 345 | let s:base3 = "15" 346 | let s:yellow = "3" 347 | let s:orange = "9" 348 | let s:red = "1" 349 | let s:magenta = "5" 350 | let s:violet = "13" 351 | let s:blue = "4" 352 | let s:cyan = "6" 353 | let s:green = "2" 354 | elseif g:solarized_termcolors == 256 355 | let s:vmode = "cterm" 356 | let s:base03 = "234" 357 | let s:base02 = "235" 358 | let s:base01 = "239" 359 | let s:base00 = "240" 360 | let s:base0 = "244" 361 | let s:base1 = "245" 362 | let s:base2 = "187" 363 | let s:base3 = "230" 364 | let s:yellow = "136" 365 | let s:orange = "166" 366 | let s:red = "124" 367 | let s:magenta = "125" 368 | let s:violet = "61" 369 | let s:blue = "33" 370 | let s:cyan = "37" 371 | let s:green = "64" 372 | else 373 | let s:vmode = "cterm" 374 | let s:bright = "* term=bold cterm=bold" 375 | let s:base03 = "0".s:bright 376 | let s:base02 = "0" 377 | let s:base01 = "2".s:bright 378 | let s:base00 = "3".s:bright 379 | let s:base0 = "4".s:bright 380 | let s:base1 = "6".s:bright 381 | let s:base2 = "7" 382 | let s:base3 = "7".s:bright 383 | let s:yellow = "3" 384 | let s:orange = "1".s:bright 385 | let s:red = "1" 386 | let s:magenta = "5" 387 | let s:violet = "13" 388 | let s:blue = "4" 389 | let s:cyan = "6" 390 | let s:green = "2" 391 | endif 392 | "}}} 393 | " Formatting options and null values for passthrough effect "{{{ 394 | " --------------------------------------------------------------------- 395 | let s:none = "NONE" 396 | let s:none = "NONE" 397 | let s:t_none = "NONE" 398 | let s:n = "NONE" 399 | let s:c = ",undercurl" 400 | let s:r = ",reverse" 401 | let s:s = ",standout" 402 | let s:ou = "" 403 | let s:ob = "" 404 | "}}} 405 | " Background value based on termtrans setting "{{{ 406 | " --------------------------------------------------------------------- 407 | if (has("gui_running") || g:solarized_termtrans == 0) 408 | let s:back = s:base03 409 | else 410 | let s:back = "NONE" 411 | endif 412 | "}}} 413 | " Alternate light scheme "{{{ 414 | " --------------------------------------------------------------------- 415 | if &background == "light" 416 | let s:temp03 = s:base03 417 | let s:temp02 = s:base02 418 | let s:temp01 = s:base01 419 | let s:temp00 = s:base00 420 | let s:base03 = s:base3 421 | let s:base02 = s:base2 422 | let s:base01 = s:base1 423 | let s:base00 = s:base0 424 | let s:base0 = s:temp00 425 | let s:base1 = s:temp01 426 | let s:base2 = s:temp02 427 | let s:base3 = s:temp03 428 | if (s:back != "NONE") 429 | let s:back = s:base03 430 | endif 431 | endif 432 | "}}} 433 | " Optional contrast schemes "{{{ 434 | " --------------------------------------------------------------------- 435 | if g:solarized_contrast == "high" 436 | let s:base01 = s:base00 437 | let s:base00 = s:base0 438 | let s:base0 = s:base1 439 | let s:base1 = s:base2 440 | let s:base2 = s:base3 441 | let s:back = s:back 442 | endif 443 | if g:solarized_contrast == "low" 444 | let s:back = s:base02 445 | let s:ou = ",underline" 446 | endif 447 | "}}} 448 | " Overrides dependent on user specified values"{{{ 449 | " --------------------------------------------------------------------- 450 | if g:solarized_bold == 1 451 | let s:b = ",bold" 452 | else 453 | let s:b = "" 454 | endif 455 | 456 | if g:solarized_underline == 1 457 | let s:u = ",underline" 458 | else 459 | let s:u = "" 460 | endif 461 | 462 | if g:solarized_italic == 1 463 | let s:i = ",italic" 464 | else 465 | let s:i = "" 466 | endif 467 | "}}} 468 | " Highlighting primitives"{{{ 469 | " --------------------------------------------------------------------- 470 | 471 | exe "let s:bg_none = ' ".s:vmode."bg=".s:none ."'" 472 | exe "let s:bg_back = ' ".s:vmode."bg=".s:back ."'" 473 | exe "let s:bg_base03 = ' ".s:vmode."bg=".s:base03 ."'" 474 | exe "let s:bg_base02 = ' ".s:vmode."bg=".s:base02 ."'" 475 | exe "let s:bg_base01 = ' ".s:vmode."bg=".s:base01 ."'" 476 | exe "let s:bg_base00 = ' ".s:vmode."bg=".s:base00 ."'" 477 | exe "let s:bg_base0 = ' ".s:vmode."bg=".s:base0 ."'" 478 | exe "let s:bg_base1 = ' ".s:vmode."bg=".s:base1 ."'" 479 | exe "let s:bg_base2 = ' ".s:vmode."bg=".s:base2 ."'" 480 | exe "let s:bg_base3 = ' ".s:vmode."bg=".s:base3 ."'" 481 | exe "let s:bg_green = ' ".s:vmode."bg=".s:green ."'" 482 | exe "let s:bg_yellow = ' ".s:vmode."bg=".s:yellow ."'" 483 | exe "let s:bg_orange = ' ".s:vmode."bg=".s:orange ."'" 484 | exe "let s:bg_red = ' ".s:vmode."bg=".s:red ."'" 485 | exe "let s:bg_magenta = ' ".s:vmode."bg=".s:magenta."'" 486 | exe "let s:bg_violet = ' ".s:vmode."bg=".s:violet ."'" 487 | exe "let s:bg_blue = ' ".s:vmode."bg=".s:blue ."'" 488 | exe "let s:bg_cyan = ' ".s:vmode."bg=".s:cyan ."'" 489 | 490 | exe "let s:fg_none = ' ".s:vmode."fg=".s:none ."'" 491 | exe "let s:fg_back = ' ".s:vmode."fg=".s:back ."'" 492 | exe "let s:fg_base03 = ' ".s:vmode."fg=".s:base03 ."'" 493 | exe "let s:fg_base02 = ' ".s:vmode."fg=".s:base02 ."'" 494 | exe "let s:fg_base01 = ' ".s:vmode."fg=".s:base01 ."'" 495 | exe "let s:fg_base00 = ' ".s:vmode."fg=".s:base00 ."'" 496 | exe "let s:fg_base0 = ' ".s:vmode."fg=".s:base0 ."'" 497 | exe "let s:fg_base1 = ' ".s:vmode."fg=".s:base1 ."'" 498 | exe "let s:fg_base2 = ' ".s:vmode."fg=".s:base2 ."'" 499 | exe "let s:fg_base3 = ' ".s:vmode."fg=".s:base3 ."'" 500 | exe "let s:fg_green = ' ".s:vmode."fg=".s:green ."'" 501 | exe "let s:fg_yellow = ' ".s:vmode."fg=".s:yellow ."'" 502 | exe "let s:fg_orange = ' ".s:vmode."fg=".s:orange ."'" 503 | exe "let s:fg_red = ' ".s:vmode."fg=".s:red ."'" 504 | exe "let s:fg_magenta = ' ".s:vmode."fg=".s:magenta."'" 505 | exe "let s:fg_violet = ' ".s:vmode."fg=".s:violet ."'" 506 | exe "let s:fg_blue = ' ".s:vmode."fg=".s:blue ."'" 507 | exe "let s:fg_cyan = ' ".s:vmode."fg=".s:cyan ."'" 508 | 509 | exe "let s:fmt_none = ' ".s:vmode."=NONE". " term=NONE". "'" 510 | exe "let s:fmt_bold = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'" 511 | exe "let s:fmt_bldi = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'" 512 | exe "let s:fmt_undr = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'" 513 | exe "let s:fmt_undb = ' ".s:vmode."=NONE".s:u.s:b. " term=NONE".s:u.s:b."'" 514 | exe "let s:fmt_undi = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'" 515 | exe "let s:fmt_uopt = ' ".s:vmode."=NONE".s:ou. " term=NONE".s:ou."'" 516 | exe "let s:fmt_curl = ' ".s:vmode."=NONE".s:c. " term=NONE".s:c."'" 517 | exe "let s:fmt_ital = ' ".s:vmode."=NONE". " term=NONE". "'" 518 | exe "let s:fmt_revr = ' ".s:vmode."=NONE".s:r. " term=NONE".s:r."'" 519 | exe "let s:fmt_stnd = ' ".s:vmode."=NONE".s:s. " term=NONE".s:s."'" 520 | 521 | if has("gui_running") 522 | exe "let s:sp_none = ' guisp=".s:none ."'" 523 | exe "let s:sp_back = ' guisp=".s:back ."'" 524 | exe "let s:sp_base03 = ' guisp=".s:base03 ."'" 525 | exe "let s:sp_base02 = ' guisp=".s:base02 ."'" 526 | exe "let s:sp_base01 = ' guisp=".s:base01 ."'" 527 | exe "let s:sp_base00 = ' guisp=".s:base00 ."'" 528 | exe "let s:sp_base0 = ' guisp=".s:base0 ."'" 529 | exe "let s:sp_base1 = ' guisp=".s:base1 ."'" 530 | exe "let s:sp_base2 = ' guisp=".s:base2 ."'" 531 | exe "let s:sp_base3 = ' guisp=".s:base3 ."'" 532 | exe "let s:sp_green = ' guisp=".s:green ."'" 533 | exe "let s:sp_yellow = ' guisp=".s:yellow ."'" 534 | exe "let s:sp_orange = ' guisp=".s:orange ."'" 535 | exe "let s:sp_red = ' guisp=".s:red ."'" 536 | exe "let s:sp_magenta = ' guisp=".s:magenta."'" 537 | exe "let s:sp_violet = ' guisp=".s:violet ."'" 538 | exe "let s:sp_blue = ' guisp=".s:blue ."'" 539 | exe "let s:sp_cyan = ' guisp=".s:cyan ."'" 540 | else 541 | let s:sp_none = "" 542 | let s:sp_back = "" 543 | let s:sp_base03 = "" 544 | let s:sp_base02 = "" 545 | let s:sp_base01 = "" 546 | let s:sp_base00 = "" 547 | let s:sp_base0 = "" 548 | let s:sp_base1 = "" 549 | let s:sp_base2 = "" 550 | let s:sp_base3 = "" 551 | let s:sp_green = "" 552 | let s:sp_yellow = "" 553 | let s:sp_orange = "" 554 | let s:sp_red = "" 555 | let s:sp_magenta = "" 556 | let s:sp_violet = "" 557 | let s:sp_blue = "" 558 | let s:sp_cyan = "" 559 | endif 560 | 561 | "}}} 562 | " Basic highlighting"{{{ 563 | " --------------------------------------------------------------------- 564 | " note that link syntax to avoid duplicate configuration doesn't work with the 565 | " exe compiled formats 566 | 567 | exe "hi! Normal" .s:fmt_none .s:fg_base0 .s:bg_back 568 | 569 | exe "hi! Comment" .s:fmt_ital .s:fg_base01 .s:bg_none 570 | " *Comment any comment 571 | 572 | exe "hi! Constant" .s:fmt_none .s:fg_cyan .s:bg_none 573 | " *Constant any constant 574 | " String a string constant: "this is a string" 575 | " Character a character constant: 'c', '\n' 576 | " Number a number constant: 234, 0xff 577 | " Boolean a boolean constant: TRUE, false 578 | " Float a floating point constant: 2.3e10 579 | 580 | exe "hi! Identifier" .s:fmt_none .s:fg_blue .s:bg_none 581 | " *Identifier any variable name 582 | " Function function name (also: methods for classes) 583 | " 584 | exe "hi! Statement" .s:fmt_none .s:fg_green .s:bg_none 585 | " *Statement any statement 586 | " Conditional if, then, else, endif, switch, etc. 587 | " Repeat for, do, while, etc. 588 | " Label case, default, etc. 589 | " Operator "sizeof", "+", "*", etc. 590 | " Keyword any other keyword 591 | " Exception try, catch, throw 592 | 593 | exe "hi! PreProc" .s:fmt_none .s:fg_orange .s:bg_none 594 | " *PreProc generic Preprocessor 595 | " Include preprocessor #include 596 | " Define preprocessor #define 597 | " Macro same as Define 598 | " PreCondit preprocessor #if, #else, #endif, etc. 599 | 600 | exe "hi! Type" .s:fmt_none .s:fg_yellow .s:bg_none 601 | " *Type int, long, char, etc. 602 | " StorageClass static, register, volatile, etc. 603 | " Structure struct, union, enum, etc. 604 | " Typedef A typedef 605 | 606 | exe "hi! Special" .s:fmt_none .s:fg_red .s:bg_none 607 | " *Special any special symbol 608 | " SpecialChar special character in a constant 609 | " Tag you can use CTRL-] on this 610 | " Delimiter character that needs attention 611 | " SpecialComment special things inside a comment 612 | " Debug debugging statements 613 | 614 | exe "hi! Underlined" .s:fmt_none .s:fg_violet .s:bg_none 615 | " *Underlined text that stands out, HTML links 616 | 617 | exe "hi! Ignore" .s:fmt_none .s:fg_none .s:bg_none 618 | " *Ignore left blank, hidden |hl-Ignore| 619 | 620 | exe "hi! Error" .s:fmt_bold .s:fg_red .s:bg_none 621 | " *Error any erroneous construct 622 | 623 | exe "hi! Todo" .s:fmt_bold .s:fg_magenta.s:bg_none 624 | " *Todo anything that needs extra attention; mostly the 625 | " keywords TODO FIXME and XXX 626 | " 627 | "}}} 628 | " Extended highlighting "{{{ 629 | " --------------------------------------------------------------------- 630 | if (g:solarized_visibility=="high") 631 | exe "hi! SpecialKey" .s:fmt_revr .s:fg_red .s:bg_none 632 | exe "hi! NonText" .s:fmt_bold .s:fg_base1 .s:bg_none 633 | elseif (g:solarized_visibility=="low") 634 | exe "hi! SpecialKey" .s:fmt_bold .s:fg_base02 .s:bg_none 635 | exe "hi! NonText" .s:fmt_bold .s:fg_base02 .s:bg_none 636 | else 637 | exe "hi! SpecialKey" .s:fmt_bold .s:fg_red .s:bg_none 638 | exe "hi! NonText" .s:fmt_bold .s:fg_base01 .s:bg_none 639 | endif 640 | if (has("gui_running")) || &t_Co > 8 641 | exe "hi! StatusLine" .s:fmt_none .s:fg_base02 .s:bg_base1 642 | exe "hi! StatusLineNC" .s:fmt_none .s:fg_base02 .s:bg_base00 643 | "exe "hi! Visual" .s:fmt_stnd .s:fg_none .s:bg_base02 644 | exe "hi! Visual" .s:fmt_none .s:fg_base03 .s:bg_base01 645 | else 646 | exe "hi! StatusLine" .s:fmt_none .s:fg_base02 .s:bg_base2 647 | exe "hi! StatusLineNC" .s:fmt_none .s:fg_base02 .s:bg_base2 648 | exe "hi! Visual" .s:fmt_none .s:fg_none .s:bg_base2 649 | endif 650 | exe "hi! Directory" .s:fmt_none .s:fg_blue .s:bg_none 651 | exe "hi! ErrorMsg" .s:fmt_revr .s:fg_red .s:bg_none 652 | exe "hi! IncSearch" .s:fmt_stnd .s:fg_orange .s:bg_none 653 | exe "hi! Search" .s:fmt_revr .s:fg_yellow .s:bg_none 654 | exe "hi! MoreMsg" .s:fmt_none .s:fg_blue .s:bg_none 655 | exe "hi! ModeMsg" .s:fmt_none .s:fg_blue .s:bg_none 656 | exe "hi! LineNr" .s:fmt_none .s:fg_base01 .s:bg_base02 657 | exe "hi! Question" .s:fmt_bold .s:fg_cyan .s:bg_none 658 | exe "hi! VertSplit" .s:fmt_bold .s:fg_base00 .s:bg_base00 659 | exe "hi! Title" .s:fmt_bold .s:fg_orange .s:bg_none 660 | exe "hi! VisualNOS" .s:fmt_stnd .s:fg_none .s:bg_base02 661 | exe "hi! WarningMsg" .s:fmt_bold .s:fg_red .s:bg_none 662 | exe "hi! WildMenu" .s:fmt_none .s:fg_base2 .s:bg_base02 663 | exe "hi! Folded" .s:fmt_undb .s:fg_base0 .s:bg_base02 .s:sp_base03 664 | exe "hi! FoldColumn" .s:fmt_bold .s:fg_base0 .s:bg_base02 665 | exe "hi! DiffAdd" .s:fmt_revr .s:fg_green .s:bg_none 666 | exe "hi! DiffChange" .s:fmt_revr .s:fg_yellow .s:bg_none 667 | exe "hi! DiffDelete" .s:fmt_revr .s:fg_red .s:bg_none 668 | exe "hi! DiffText" .s:fmt_revr .s:fg_blue .s:bg_none 669 | exe "hi! SignColumn" .s:fmt_none .s:fg_base0 .s:bg_base02 670 | exe "hi! Conceal" .s:fmt_none .s:fg_blue .s:bg_none 671 | exe "hi! SpellBad" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_red 672 | exe "hi! SpellCap" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_violet 673 | exe "hi! SpellRare" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_cyan 674 | exe "hi! SpellLocal" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_yellow 675 | exe "hi! Pmenu" .s:fmt_none .s:fg_base0 .s:bg_base02 676 | exe "hi! PmenuSel" .s:fmt_none .s:fg_base2 .s:bg_base01 677 | exe "hi! PmenuSbar" .s:fmt_none .s:fg_base0 .s:bg_base2 678 | exe "hi! PmenuThumb" .s:fmt_none .s:fg_base03 .s:bg_base0 679 | exe "hi! TabLine" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0 680 | exe "hi! TabLineSel" .s:fmt_undr .s:fg_base2 .s:bg_base01 .s:sp_base0 681 | exe "hi! TabLineFill" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0 682 | exe "hi! CursorColumn" .s:fmt_none .s:fg_none .s:bg_base02 683 | exe "hi! CursorLine" .s:fmt_uopt .s:fg_none .s:bg_base02 .s:sp_base1 684 | exe "hi! ColorColumn" .s:fmt_none .s:fg_none .s:bg_base02 685 | exe "hi! Cursor" .s:fmt_none .s:fg_base03 .s:bg_base0 686 | hi! link lCursor Cursor 687 | exe "hi! MatchParen" .s:fmt_bold .s:fg_red .s:bg_base01 688 | 689 | "}}} 690 | " vim syntax highlighting "{{{ 691 | " --------------------------------------------------------------------- 692 | exe "hi! vimLineComment" . s:fg_base01 .s:bg_none .s:fmt_ital 693 | exe "hi! vimCommentString".s:fg_violet .s:bg_none .s:fmt_none 694 | hi! link vimVar Identifier 695 | hi! link vimFunc Function 696 | hi! link vimUserFunc Function 697 | exe "hi! vimCommand" . s:fg_yellow .s:bg_none .s:fmt_none 698 | exe "hi! vimCmdSep" . s:fg_blue .s:bg_none .s:fmt_bold 699 | exe "hi! helpExample" . s:fg_base1 .s:bg_none .s:fmt_none 700 | hi! link helpSpecial Special 701 | exe "hi! helpOption" . s:fg_cyan .s:bg_none .s:fmt_none 702 | exe "hi! helpNote" . s:fg_magenta.s:bg_none .s:fmt_none 703 | exe "hi! helpVim" . s:fg_magenta.s:bg_none .s:fmt_none 704 | exe "hi! helpHyperTextJump" .s:fg_blue .s:bg_none .s:fmt_undr 705 | exe "hi! helpHyperTextEntry".s:fg_green .s:bg_none .s:fmt_none 706 | exe "hi! vimIsCommand" . s:fg_base00 .s:bg_none .s:fmt_none 707 | exe "hi! vimSynMtchOpt" . s:fg_yellow .s:bg_none .s:fmt_none 708 | exe "hi! vimSynType" . s:fg_cyan .s:bg_none .s:fmt_none 709 | exe "hi! vimHiLink" . s:fg_blue .s:bg_none .s:fmt_none 710 | exe "hi! vimHiGroup" . s:fg_blue .s:bg_none .s:fmt_none 711 | exe "hi! vimGroup" . s:fg_blue .s:bg_none .s:fmt_undb 712 | "}}} 713 | " html highlighting "{{{ 714 | " --------------------------------------------------------------------- 715 | exe "hi! htmlTag" . s:fg_base01 .s:bg_none .s:fmt_none 716 | exe "hi! htmlEndTag" . s:fg_base01 .s:bg_none .s:fmt_none 717 | exe "hi! htmlTagN" . s:fg_base1 .s:bg_none .s:fmt_bold 718 | exe "hi! htmlTagName" . s:fg_blue .s:bg_none .s:fmt_bold 719 | exe "hi! htmlSpecialTagName". s:fg_blue .s:bg_none .s:fmt_ital 720 | exe "hi! htmlArg" . s:fg_base00 .s:bg_none .s:fmt_none 721 | exe "hi! javaScript" . s:fg_yellow .s:bg_none .s:fmt_none 722 | "}}} 723 | " perl highlighting "{{{ 724 | " --------------------------------------------------------------------- 725 | exe "hi! perlHereDoc" . s:fg_base1 .s:bg_back .s:fmt_none 726 | exe "hi! perlVarPlain" . s:fg_yellow .s:bg_back .s:fmt_none 727 | exe "hi! perlStatementFileDesc". s:fg_cyan.s:bg_back.s:fmt_none 728 | 729 | "}}} 730 | " tex highlighting "{{{ 731 | " --------------------------------------------------------------------- 732 | exe "hi! texStatement" . s:fg_cyan .s:bg_back .s:fmt_none 733 | exe "hi! texMathZoneX" . s:fg_yellow .s:bg_back .s:fmt_none 734 | exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none 735 | exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none 736 | exe "hi! texRefLabel" . s:fg_yellow .s:bg_back .s:fmt_none 737 | "}}} 738 | " ruby highlighting "{{{ 739 | " --------------------------------------------------------------------- 740 | exe "hi! rubyDefine" . s:fg_base1 .s:bg_back .s:fmt_bold 741 | "rubyInclude 742 | "rubySharpBang 743 | "rubyAccess 744 | "rubyPredefinedVariable 745 | "rubyBoolean 746 | "rubyClassVariable 747 | "rubyBeginEnd 748 | "rubyRepeatModifier 749 | "hi! link rubyArrayDelimiter Special " [ , , ] 750 | "rubyCurlyBlock { , , } 751 | 752 | "hi! link rubyClass Keyword 753 | "hi! link rubyModule Keyword 754 | "hi! link rubyKeyword Keyword 755 | "hi! link rubyOperator Operator 756 | "hi! link rubyIdentifier Identifier 757 | "hi! link rubyInstanceVariable Identifier 758 | "hi! link rubyGlobalVariable Identifier 759 | "hi! link rubyClassVariable Identifier 760 | "hi! link rubyConstant Type 761 | "}}} 762 | " haskell syntax highlighting"{{{ 763 | " --------------------------------------------------------------------- 764 | " For use with syntax/haskell.vim : Haskell Syntax File 765 | " http://www.vim.org/scripts/script.php?script_id=3034 766 | " See also Steffen Siering's github repository: 767 | " http://github.com/urso/dotrc/blob/master/vim/syntax/haskell.vim 768 | " --------------------------------------------------------------------- 769 | " 770 | " Treat True and False specially, see the plugin referenced above 771 | let hs_highlight_boolean=1 772 | " highlight delims, see the plugin referenced above 773 | let hs_highlight_delimiters=1 774 | 775 | exe "hi! cPreCondit". s:fg_orange.s:bg_none .s:fmt_none 776 | 777 | exe "hi! VarId" . s:fg_blue .s:bg_none .s:fmt_none 778 | exe "hi! ConId" . s:fg_yellow .s:bg_none .s:fmt_none 779 | exe "hi! hsImport" . s:fg_magenta.s:bg_none .s:fmt_none 780 | exe "hi! hsString" . s:fg_base00 .s:bg_none .s:fmt_none 781 | 782 | exe "hi! hsStructure" . s:fg_cyan .s:bg_none .s:fmt_none 783 | exe "hi! hs_hlFunctionName" . s:fg_blue .s:bg_none 784 | exe "hi! hsStatement" . s:fg_cyan .s:bg_none .s:fmt_none 785 | exe "hi! hsImportLabel" . s:fg_cyan .s:bg_none .s:fmt_none 786 | exe "hi! hs_OpFunctionName" . s:fg_yellow .s:bg_none .s:fmt_none 787 | exe "hi! hs_DeclareFunction" . s:fg_orange .s:bg_none .s:fmt_none 788 | exe "hi! hsVarSym" . s:fg_cyan .s:bg_none .s:fmt_none 789 | exe "hi! hsType" . s:fg_yellow .s:bg_none .s:fmt_none 790 | exe "hi! hsTypedef" . s:fg_cyan .s:bg_none .s:fmt_none 791 | exe "hi! hsModuleName" . s:fg_green .s:bg_none .s:fmt_undr 792 | exe "hi! hsModuleStartLabel" . s:fg_magenta.s:bg_none .s:fmt_none 793 | hi! link hsImportParams Delimiter 794 | hi! link hsDelimTypeExport Delimiter 795 | hi! link hsModuleStartLabel hsStructure 796 | hi! link hsModuleWhereLabel hsModuleStartLabel 797 | 798 | " following is for the haskell-conceal plugin 799 | " the first two items don't have an impact, but better safe 800 | exe "hi! hsNiceOperator" . s:fg_cyan .s:bg_none .s:fmt_none 801 | exe "hi! hsniceoperator" . s:fg_cyan .s:bg_none .s:fmt_none 802 | 803 | "}}} 804 | " pandoc markdown syntax highlighting "{{{ 805 | " --------------------------------------------------------------------- 806 | 807 | "PandocHiLink pandocNormalBlock 808 | exe "hi! pandocTitleBlock" .s:fg_blue .s:bg_none .s:fmt_none 809 | exe "hi! pandocTitleBlockTitle" .s:fg_blue .s:bg_none .s:fmt_bold 810 | exe "hi! pandocTitleComment" .s:fg_blue .s:bg_none .s:fmt_bold 811 | exe "hi! pandocComment" .s:fg_base01 .s:bg_none .s:fmt_ital 812 | exe "hi! pandocVerbatimBlock" .s:fg_yellow .s:bg_none .s:fmt_none 813 | hi! link pandocVerbatimBlockDeep pandocVerbatimBlock 814 | hi! link pandocCodeBlock pandocVerbatimBlock 815 | hi! link pandocCodeBlockDelim pandocVerbatimBlock 816 | exe "hi! pandocBlockQuote" .s:fg_blue .s:bg_none .s:fmt_none 817 | exe "hi! pandocBlockQuoteLeader1" .s:fg_blue .s:bg_none .s:fmt_none 818 | exe "hi! pandocBlockQuoteLeader2" .s:fg_cyan .s:bg_none .s:fmt_none 819 | exe "hi! pandocBlockQuoteLeader3" .s:fg_yellow .s:bg_none .s:fmt_none 820 | exe "hi! pandocBlockQuoteLeader4" .s:fg_red .s:bg_none .s:fmt_none 821 | exe "hi! pandocBlockQuoteLeader5" .s:fg_base0 .s:bg_none .s:fmt_none 822 | exe "hi! pandocBlockQuoteLeader6" .s:fg_base01 .s:bg_none .s:fmt_none 823 | exe "hi! pandocListMarker" .s:fg_magenta.s:bg_none .s:fmt_none 824 | exe "hi! pandocListReference" .s:fg_magenta.s:bg_none .s:fmt_undr 825 | 826 | " Definitions 827 | " --------------------------------------------------------------------- 828 | let s:fg_pdef = s:fg_violet 829 | exe "hi! pandocDefinitionBlock" .s:fg_pdef .s:bg_none .s:fmt_none 830 | exe "hi! pandocDefinitionTerm" .s:fg_pdef .s:bg_none .s:fmt_stnd 831 | exe "hi! pandocDefinitionIndctr" .s:fg_pdef .s:bg_none .s:fmt_bold 832 | exe "hi! pandocEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_ital 833 | exe "hi! pandocEmphasisNestedDefinition" .s:fg_pdef .s:bg_none .s:fmt_bldi 834 | exe "hi! pandocStrongEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_bold 835 | exe "hi! pandocStrongEmphasisNestedDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi 836 | exe "hi! pandocStrongEmphasisEmphasisDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi 837 | exe "hi! pandocStrikeoutDefinition" .s:fg_pdef .s:bg_none .s:fmt_revr 838 | exe "hi! pandocVerbatimInlineDefinition" .s:fg_pdef .s:bg_none .s:fmt_none 839 | exe "hi! pandocSuperscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none 840 | exe "hi! pandocSubscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none 841 | 842 | " Tables 843 | " --------------------------------------------------------------------- 844 | let s:fg_ptable = s:fg_blue 845 | exe "hi! pandocTable" .s:fg_ptable.s:bg_none .s:fmt_none 846 | exe "hi! pandocTableStructure" .s:fg_ptable.s:bg_none .s:fmt_none 847 | hi! link pandocTableStructureTop pandocTableStructre 848 | hi! link pandocTableStructureEnd pandocTableStructre 849 | exe "hi! pandocTableZebraLight" .s:fg_ptable.s:bg_base03.s:fmt_none 850 | exe "hi! pandocTableZebraDark" .s:fg_ptable.s:bg_base02.s:fmt_none 851 | exe "hi! pandocEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_ital 852 | exe "hi! pandocEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi 853 | exe "hi! pandocStrongEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bold 854 | exe "hi! pandocStrongEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi 855 | exe "hi! pandocStrongEmphasisEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bldi 856 | exe "hi! pandocStrikeoutTable" .s:fg_ptable.s:bg_none .s:fmt_revr 857 | exe "hi! pandocVerbatimInlineTable" .s:fg_ptable.s:bg_none .s:fmt_none 858 | exe "hi! pandocSuperscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none 859 | exe "hi! pandocSubscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none 860 | 861 | " Headings 862 | " --------------------------------------------------------------------- 863 | let s:fg_phead = s:fg_orange 864 | exe "hi! pandocHeading" .s:fg_phead .s:bg_none.s:fmt_bold 865 | exe "hi! pandocHeadingMarker" .s:fg_yellow.s:bg_none.s:fmt_bold 866 | exe "hi! pandocEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bldi 867 | exe "hi! pandocEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi 868 | exe "hi! pandocStrongEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bold 869 | exe "hi! pandocStrongEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi 870 | exe "hi! pandocStrongEmphasisEmphasisHeading".s:fg_phead .s:bg_none.s:fmt_bldi 871 | exe "hi! pandocStrikeoutHeading" .s:fg_phead .s:bg_none.s:fmt_revr 872 | exe "hi! pandocVerbatimInlineHeading" .s:fg_phead .s:bg_none.s:fmt_bold 873 | exe "hi! pandocSuperscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold 874 | exe "hi! pandocSubscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold 875 | 876 | " Links 877 | " --------------------------------------------------------------------- 878 | exe "hi! pandocLinkDelim" .s:fg_base01 .s:bg_none .s:fmt_none 879 | exe "hi! pandocLinkLabel" .s:fg_blue .s:bg_none .s:fmt_undr 880 | exe "hi! pandocLinkText" .s:fg_blue .s:bg_none .s:fmt_undb 881 | exe "hi! pandocLinkURL" .s:fg_base00 .s:bg_none .s:fmt_undr 882 | exe "hi! pandocLinkTitle" .s:fg_base00 .s:bg_none .s:fmt_undi 883 | exe "hi! pandocLinkTitleDelim" .s:fg_base01 .s:bg_none .s:fmt_undi .s:sp_base00 884 | exe "hi! pandocLinkDefinition" .s:fg_cyan .s:bg_none .s:fmt_undr .s:sp_base00 885 | exe "hi! pandocLinkDefinitionID" .s:fg_blue .s:bg_none .s:fmt_bold 886 | exe "hi! pandocImageCaption" .s:fg_violet .s:bg_none .s:fmt_undb 887 | exe "hi! pandocFootnoteLink" .s:fg_green .s:bg_none .s:fmt_undr 888 | exe "hi! pandocFootnoteDefLink" .s:fg_green .s:bg_none .s:fmt_bold 889 | exe "hi! pandocFootnoteInline" .s:fg_green .s:bg_none .s:fmt_undb 890 | exe "hi! pandocFootnote" .s:fg_green .s:bg_none .s:fmt_none 891 | exe "hi! pandocCitationDelim" .s:fg_magenta.s:bg_none .s:fmt_none 892 | exe "hi! pandocCitation" .s:fg_magenta.s:bg_none .s:fmt_none 893 | exe "hi! pandocCitationID" .s:fg_magenta.s:bg_none .s:fmt_undr 894 | exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none 895 | 896 | " Main Styles 897 | " --------------------------------------------------------------------- 898 | exe "hi! pandocStyleDelim" .s:fg_base01 .s:bg_none .s:fmt_none 899 | exe "hi! pandocEmphasis" .s:fg_base0 .s:bg_none .s:fmt_ital 900 | exe "hi! pandocEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi 901 | exe "hi! pandocStrongEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bold 902 | exe "hi! pandocStrongEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi 903 | exe "hi! pandocStrongEmphasisEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bldi 904 | exe "hi! pandocStrikeout" .s:fg_base01 .s:bg_none .s:fmt_revr 905 | exe "hi! pandocVerbatimInline" .s:fg_yellow .s:bg_none .s:fmt_none 906 | exe "hi! pandocSuperscript" .s:fg_violet .s:bg_none .s:fmt_none 907 | exe "hi! pandocSubscript" .s:fg_violet .s:bg_none .s:fmt_none 908 | 909 | exe "hi! pandocRule" .s:fg_blue .s:bg_none .s:fmt_bold 910 | exe "hi! pandocRuleLine" .s:fg_blue .s:bg_none .s:fmt_bold 911 | exe "hi! pandocEscapePair" .s:fg_red .s:bg_none .s:fmt_bold 912 | exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none 913 | exe "hi! pandocNonBreakingSpace" . s:fg_red .s:bg_none .s:fmt_revr 914 | hi! link pandocEscapedCharacter pandocEscapePair 915 | hi! link pandocLineBreak pandocEscapePair 916 | 917 | " Embedded Code 918 | " --------------------------------------------------------------------- 919 | exe "hi! pandocMetadataDelim" .s:fg_base01 .s:bg_none .s:fmt_none 920 | exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_none 921 | exe "hi! pandocMetadataKey" .s:fg_blue .s:bg_none .s:fmt_none 922 | exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_bold 923 | hi! link pandocMetadataTitle pandocMetadata 924 | 925 | "}}} 926 | " Utility autocommand "{{{ 927 | " --------------------------------------------------------------------- 928 | " In cases where Solarized is initialized inside a terminal vim session and 929 | " then transferred to a gui session via the command `:gui`, the gui vim process 930 | " does not re-read the colorscheme (or .vimrc for that matter) so any `has_gui` 931 | " related code that sets gui specific values isn't executed. 932 | " 933 | " Currently, Solarized sets only the cterm or gui values for the colorscheme 934 | " depending on gui or terminal mode. It's possible that, if the following 935 | " autocommand method is deemed excessively poor form, that approach will be 936 | " used again and the autocommand below will be dropped. 937 | " 938 | " However it seems relatively benign in this case to include the autocommand 939 | " here. It fires only in cases where vim is transferring from terminal to gui 940 | " mode (detected with the script scope s:vmode variable). It also allows for 941 | " other potential terminal customizations that might make gui mode suboptimal. 942 | " 943 | autocmd GUIEnter * if (s:vmode != "gui") | exe "colorscheme " . g:colors_name | endif 944 | "}}} 945 | " License "{{{ 946 | " --------------------------------------------------------------------- 947 | " 948 | " Copyright (c) 2011 Ethan Schoonover 949 | " 950 | " Permission is hereby granted, free of charge, to any person obtaining a copy 951 | " of this software and associated documentation files (the "Software"), to deal 952 | " in the Software without restriction, including without limitation the rights 953 | " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 954 | " copies of the Software, and to permit persons to whom the Software is 955 | " furnished to do so, subject to the following conditions: 956 | " 957 | " The above copyright notice and this permission notice shall be included in 958 | " all copies or substantial portions of the Software. 959 | " 960 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 961 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 962 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 963 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 964 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 965 | " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 966 | " THE SOFTWARE. 967 | " 968 | " vim:foldmethod=marker:foldlevel=0 969 | "}}} 970 | -------------------------------------------------------------------------------- /.vim/swaps/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/.vim/swaps/.gitignore -------------------------------------------------------------------------------- /.vim/syntax/json.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: JSON 3 | " Maintainer: Jeroen Ruigrok van der Werven 4 | " Last Change: 2009-06-16 5 | " Version: 0.4 6 | " {{{1 7 | 8 | " Syntax setup {{{2 9 | " For version 5.x: Clear all syntax items 10 | " For version 6.x: Quit when a syntax file was already loaded 11 | 12 | if !exists("main_syntax") 13 | if version < 600 14 | syntax clear 15 | elseif exists("b:current_syntax") 16 | finish 17 | endif 18 | let main_syntax = 'json' 19 | endif 20 | 21 | " Syntax: Strings {{{2 22 | syn region jsonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=jsonEscape 23 | " Syntax: JSON does not allow strings with single quotes, unlike JavaScript. 24 | syn region jsonStringSQ start=+'+ skip=+\\\\\|\\"+ end=+'+ 25 | 26 | " Syntax: Escape sequences {{{3 27 | syn match jsonEscape "\\["\\/bfnrt]" contained 28 | syn match jsonEscape "\\u\x\{4}" contained 29 | 30 | " Syntax: Strings should always be enclosed with quotes. 31 | syn match jsonNoQuotes "\<\a\+\>" 32 | 33 | " Syntax: Numbers {{{2 34 | syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" 35 | 36 | " Syntax: An integer part of 0 followed by other digits is not allowed. 37 | syn match jsonNumError "-\=\<0\d\.\d*\>" 38 | 39 | " Syntax: Boolean {{{2 40 | syn keyword jsonBoolean true false 41 | 42 | " Syntax: Null {{{2 43 | syn keyword jsonNull null 44 | 45 | " Syntax: Braces {{{2 46 | syn match jsonBraces "[{}\[\]]" 47 | 48 | " Define the default highlighting. {{{1 49 | " For version 5.7 and earlier: only when not done already 50 | " For version 5.8 and later: only when an item doesn't have highlighting yet 51 | if version >= 508 || !exists("did_json_syn_inits") 52 | if version < 508 53 | let did_json_syn_inits = 1 54 | command -nargs=+ HiLink hi link 55 | else 56 | command -nargs=+ HiLink hi def link 57 | endif 58 | HiLink jsonString String 59 | HiLink jsonEscape Special 60 | HiLink jsonNumber Number 61 | HiLink jsonBraces Operator 62 | HiLink jsonNull Function 63 | HiLink jsonBoolean Boolean 64 | 65 | HiLink jsonNumError Error 66 | HiLink jsonStringSQ Error 67 | HiLink jsonNoQuotes Error 68 | delcommand HiLink 69 | endif 70 | 71 | let b:current_syntax = "json" 72 | if main_syntax == 'json' 73 | unlet main_syntax 74 | endif 75 | -------------------------------------------------------------------------------- /.vim/undo/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/.vim/undo/.gitignore -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | set nocompatible " be iMproved, required 2 | filetype off " required 3 | " Change mapleader 4 | let mapleader="," 5 | 6 | " set the runtime path to include Vundle and initialize 7 | set rtp+=~/.vim/bundle/Vundle.vim 8 | call vundle#begin() 9 | 10 | " let Vundle manage Vundle, required 11 | Plugin 'gmarik/Vundle.vim' 12 | 13 | " Elixir syntax 14 | " Plugin 'elixir-lang/vim-elixir' 15 | 16 | " Track the engine. 17 | Plugin 'SirVer/ultisnips' 18 | 19 | " " Snippets are separated from the engine. Add this if you want them: 20 | Plugin 'honza/vim-snippets' 21 | 22 | " " Trigger configuration. Do not use if you use 23 | " https://github.com/Valloric/YouCompleteMe. 24 | let g:UltiSnipsExpandTrigger="" 25 | let g:UltiSnipsJumpForwardTrigger="" 26 | let g:UltiSnipsJumpBackwardTrigger="" 27 | 28 | " If you want :UltiSnipsEdit to split your window. 29 | let g:UltiSnipsEditSplit="vertical" 30 | 31 | " filesystem tree 32 | Plugin 'scrooloose/nerdtree' 33 | autocmd StdinReadPre * let s:std_in=1 34 | autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif 35 | autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif 36 | map :NERDTreeToggle 37 | map n :NERDTree %:p:h 38 | 39 | Plugin 'godlygeek/tabular' 40 | " Plugin 'plasticboy/vim-markdown' 41 | " let g:vim_markdown_folding_disabled=1 42 | 43 | " Plugin 'Valloric/YouCompleteMe' 44 | 45 | Plugin 'jiangmiao/auto-pairs' 46 | 47 | " quick google search 48 | Plugin 'szw/vim-g' 49 | 50 | " Plugin 'vim-ruby/vim-ruby' 51 | 52 | Plugin 'wlangstroth/vim-racket' 53 | 54 | " Plugin 'fatih/vim-go' 55 | 56 | Plugin 'cakebaker/scss-syntax.vim' 57 | 58 | Plugin 'chrisbra/Colorizer' 59 | 60 | :let g:colorizer_auto_color = 1 61 | :let g:colorizer_auto_filetype='less,sass,scss,js,css,html' 62 | let g:colorizer_syntax = 1 63 | 64 | Plugin 'tpope/vim-commentary' 65 | 66 | Plugin 'Chiel92/vim-autoformat' 67 | noremap :Autoformat 68 | 69 | Plugin 'Lokaltog/vim-easymotion' 70 | 71 | Plugin 'rking/ag.vim' 72 | 73 | Plugin 'vim-scripts/DrawIt' 74 | 75 | Plugin 'tpope/vim-eunuch' 76 | 77 | Plugin 'vim-scripts/DeleteTrailingWhitespace' 78 | 79 | " all lanugage support 80 | Plugin 'sheerun/vim-polyglot' 81 | 82 | " change surroundins - cs/ds/ysiw/yss 83 | Plugin 'tpope/vim-surround' 84 | 85 | " do syntax check 86 | Plugin 'scrooloose/syntastic' 87 | 88 | " fuzzy file find 89 | Plugin 'kien/ctrlp.vim' 90 | 91 | " vim cscope 92 | " Plugin 'vim-scripts/cscope.vim' 93 | 94 | " Elm lang 95 | Plugin 'lambdatoast/elm.vim' 96 | 97 | " ansible yaml support 98 | Plugin 'chase/vim-ansible-yaml' 99 | 100 | " fireplace for clojure 101 | Plugin 'tpope/vim-fireplace' 102 | Plugin 'tpope/vim-classpath' 103 | Plugin 'tpope/vim-dispatch' 104 | 105 | " precision editing for s-expression 106 | Plugin 'guns/vim-sexp' 107 | 108 | " clojure runtime files 109 | Plugin 'guns/vim-clojure-static' 110 | Plugin 'guns/vim-clojure-highlight' 111 | Plugin 'kien/rainbow_parentheses.vim' 112 | 113 | " All of your Plugins must be added before the following line 114 | call vundle#end() " required 115 | filetype plugin indent on " required 116 | 117 | " Use the Solarized Dark theme 118 | set background=light 119 | colorscheme solarized 120 | let g:solarized_termtrans=1 121 | 122 | " Use the OS clipboard by default (on versions compiled with `+clipboard`) 123 | set clipboard=unnamed 124 | " Enhance command-line completion 125 | set wildmenu 126 | " Allow cursor keys in insert mode 127 | set esckeys 128 | " Allow backspace in insert mode 129 | set backspace=indent,eol,start 130 | " Optimize for fast terminal connections 131 | set ttyfast 132 | " Add the g flag to search/replace by default 133 | set gdefault 134 | " Use UTF-8 without BOM 135 | set encoding=utf-8 nobomb 136 | " Don’t add empty newlines at the end of files 137 | set binary 138 | set noeol 139 | " Centralize backups, swapfiles and undo history 140 | set backupdir=~/.vim/backups 141 | set directory=~/.vim/swaps 142 | if exists("&undodir") 143 | set undodir=~/.vim/undo 144 | endif 145 | 146 | " Don’t create backups when editing files in certain directories 147 | set backupskip=/tmp/*,/private/tmp/* 148 | 149 | " Respect modeline in files 150 | set modeline 151 | set modelines=4 152 | " Enable per-directory .vimrc files and disable unsafe commands in them 153 | set exrc 154 | set secure 155 | " Enable line numbers 156 | set number 157 | " Enable syntax highlighting 158 | syntax on 159 | " Highlight current line 160 | set cursorline 161 | " Make tabs as wide as two spaces 162 | set tabstop=2 163 | set expandtab 164 | " Show “invisible” characters 165 | " set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_ 166 | set lcs=tab:▸\ ,trail:· 167 | set list 168 | " Highlight searches 169 | set hlsearch 170 | " Ignore case of searches 171 | set ignorecase 172 | " Highlight dynamically as pattern is typed 173 | set incsearch 174 | " Always show status line 175 | set laststatus=2 176 | " Enable mouse in all modes 177 | set mouse=a 178 | " Disable error bells 179 | set noerrorbells 180 | " Don’t reset cursor to start of line when moving around. 181 | set nostartofline 182 | " Show the cursor position 183 | set ruler 184 | " Don’t show the intro message when starting Vim 185 | set shortmess=atI 186 | " Show the current mode 187 | set showmode 188 | " Show the filename in the window titlebar 189 | set title 190 | " Show the (partial) command as it’s being typed 191 | set showcmd 192 | " Use relative line numbers 193 | "if exists("&relativenumber") 194 | " set relativenumber 195 | " au BufReadPost * set relativenumber 196 | "endif 197 | " Start scrolling three lines before the horizontal window border 198 | set scrolloff=3 199 | 200 | " Strip trailing whitespace (,ss) 201 | function! StripWhitespace() 202 | let save_cursor = getpos(".") 203 | let old_query = getreg('/') 204 | :%s/\s\+$//e 205 | call setpos('.', save_cursor) 206 | call setreg('/', old_query) 207 | endfunction 208 | noremap ss :call StripWhitespace() 209 | " Save a file as root (,W) 210 | noremap W :w !sudo tee % > /dev/null 211 | 212 | " Automatic commands 213 | if has("autocmd") 214 | " Enable file type detection 215 | filetype on 216 | " Treat .json files as .js 217 | autocmd BufNewFile,BufRead *.json setfiletype json syntax=javascript 218 | " Treat .md files as Markdown 219 | autocmd BufNewFile,BufRead *.md setlocal filetype=markdown 220 | endif 221 | 222 | au FileType scss setl sw=2 sts=2 et 223 | au FileType html setl sw=2 sts=2 et 224 | au FileType css setl sw=2 sts=2 et 225 | au FileType elm setl sw=2 sts=2 et 226 | au FileType go setl sw=2 sts=2 et 227 | 228 | set t_Co=256 229 | 230 | " Enable Rainbow Parentheses when dealing with Clojure files 231 | au FileType clojure RainbowParenthesesActivate 232 | au Syntax * RainbowParenthesesLoadRound 233 | 234 | " This should enable Emacs like indentation 235 | let g:clojure_fuzzy_indent=1 236 | let g:clojure_align_multiline_strings = 1 237 | 238 | " Add some words which should be indented like defn etc: Compojure/compojure-api, midje and schema stuff mostly. 239 | let g:clojure_fuzzy_indent_patterns=['^GET', '^POST', '^PUT', '^DELETE', '^ANY', '^HEAD', '^PATCH', '^OPTIONS', '^def'] 240 | autocmd FileType clojure setlocal lispwords+=describe,it,testing,facts,fact,provided 241 | 242 | " Disable some irritating mappings 243 | let g:sexp_enable_insert_mode_mappings = 0" 244 | 245 | " basic keymapping 246 | noremap c :! compass compile 247 | 248 | " elixir keymapping 249 | noremap ed :! mix deps.get 250 | noremap ec :! mix compile 251 | noremap et :! mix test 252 | noremap xt :! mix test 253 | 254 | " clojure keymapping 255 | noremap cd :! lein deps 256 | noremap cc :! lein compile 257 | noremap ce :! lein test 258 | noremap ce :Eval 259 | 260 | " golang keymapping 261 | noremap gd :! go get 262 | noremap gc :! make 263 | noremap gt :! make test 264 | 265 | " tcl keymapping 266 | noremap tt :set noexpandtab 267 | 268 | 269 | " web page 270 | noremap eh :! open http://elixir-lang.org/docs/stable/elixir/ 271 | noremap exh :! open http://www.phoenixframework.org/v0.9.0/docs 272 | noremap ehp :! open https://hex.pm 273 | 274 | noremap gh :! open https://github.com 275 | 276 | -------------------------------------------------------------------------------- /.wgetrc: -------------------------------------------------------------------------------- 1 | # Use the server-provided last modification date, if available 2 | timestamping = on 3 | 4 | # Do not go up in the directory structure when downloading recursively 5 | no_parent = on 6 | 7 | # Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. (The default read timeout is 15 minutes!) 8 | timeout = 60 9 | 10 | # Retry a few times when a download fails, but don’t overdo it. (The default is 20!) 11 | tries = 3 12 | 13 | # Retry even when the connection was refused 14 | retry_connrefused = on 15 | 16 | # Use the last component of a redirection URL for the local file name 17 | trust_server_names = on 18 | 19 | # Follow FTP links from HTML documents by default 20 | follow_ftp = on 21 | 22 | # Add a `.html` extension to `text/html` or `application/xhtml+xml` files that lack one, or a `.css` extension to `text/css` files that lack one 23 | adjust_extension = on 24 | 25 | # Use UTF-8 as the default system encoding 26 | # Disabled as it makes `wget` builds that don’t support this feature unusable. 27 | # Does anyone know how to conditionally configure a wget setting? 28 | # http://unix.stackexchange.com/q/34730/6040 29 | #local_encoding = UTF-8 30 | 31 | # Ignore `robots.txt` and `` 32 | robots = off 33 | 34 | # Print the HTTP and FTP server responses 35 | server_response = on 36 | 37 | # Disguise as IE 9 on Windows 7 38 | user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) 39 | -------------------------------------------------------------------------------- /LICENSE-MIT.txt: -------------------------------------------------------------------------------- 1 | Copyright Mathias Bynens 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tyr's dotfiles 2 | 3 | Below is my shell prompt: 4 | 5 | ![Screenshot of my shell prompt](http://i.imgur.com/hBEsvYg.png) 6 | 7 | Below is my vim (Nerdtree, YouCompleteMe, UltiSnip and a lot more...): 8 | 9 | ![Screenshot of my vim](http://i.imgur.com/gPvOSLP.png) 10 | 11 | 12 | 13 | This is a derived work from Mathias's dotfiles. Consider to use his setup directly. See: https://github.com/mathiasbynens/dotfiles. 14 | 15 | Disclaimer: I have tuned the dotfiles for my own use. Some of the setup may not be good for you. 16 | 17 | Chaged to Mathias's dotfiles: 18 | 19 | * use [liquidprompt](https://github.com/nojhan/liquidprompt) for shell prompt. 20 | * use [vundle](https://github.com/gmarik/Vundle.vi://github.com/gmarik/Vundle.vim) for vim plugin management. 21 | * added lots of vim plugins. 22 | 23 | ## Installation 24 | 25 | ### Quick installation 26 | 27 | ```bash 28 | cd $HOME 29 | git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles 30 | git submodule init && git submodule update 31 | source bootstrap.sh 32 | ``` 33 | 34 | After everything is done, you can start vim and run command: `:BundleInstall`. You should get all the plugins installed. `YouCompleteMe` may report error. Please follow https://github.com/Valloric/YouCompleteMe to properly install it. 35 | 36 | If you are a OSX homebrew user, you can further run: 37 | 38 | ```bash 39 | source brew.sh 40 | ``` 41 | 42 | to get your homebrew formulas updated. Have fun! 43 | 44 | (the following guide is from Mathias's project. Read on if you want to know more.) 45 | 46 | ### Using Git and the bootstrap script 47 | 48 | You can clone the repository wherever you want. (I like to keep it in `~/Projects/dotfiles`, with `~/dotfiles` as a symlink.) The bootstrapper script will pull in the latest version and copy the files to your home folder. 49 | 50 | ```bash 51 | git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && source bootstrap.sh 52 | ``` 53 | 54 | To update, `cd` into your local `dotfiles` repository and then: 55 | 56 | ```bash 57 | source bootstrap.sh 58 | ``` 59 | 60 | Alternatively, to update while avoiding the confirmation prompt: 61 | 62 | ```bash 63 | set -- -f; source bootstrap.sh 64 | ``` 65 | 66 | ### Git-free install 67 | 68 | To install these dotfiles without Git: 69 | 70 | ```bash 71 | cd; curl -#L https://github.com/mathiasbynens/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh,LICENSE-MIT.txt} 72 | ``` 73 | 74 | To update later on, just run that command again. 75 | 76 | ### Specify the `$PATH` 77 | 78 | If `~/.path` exists, it will be sourced along with the other files, before any feature testing (such as [detecting which version of `ls` is being used](https://github.com/mathiasbynens/dotfiles/blob/aff769fd75225d8f2e481185a71d5e05b76002dc/.aliases#L21-26)) takes place. 79 | 80 | Here’s an example `~/.path` file that adds `/usr/local/bin` to the `$PATH`: 81 | 82 | ```bash 83 | export PATH="/usr/local/bin:$PATH" 84 | ``` 85 | 86 | ### Add custom commands without creating a new fork 87 | 88 | If `~/.extra` exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository. 89 | 90 | My `~/.extra` looks something like this: 91 | 92 | ```bash 93 | # Git credentials 94 | # Not in the repository, to prevent people from accidentally committing under my name 95 | GIT_AUTHOR_NAME="Mathias Bynens" 96 | GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" 97 | git config --global user.name "$GIT_AUTHOR_NAME" 98 | GIT_AUTHOR_EMAIL="mathias@mailinator.com" 99 | GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" 100 | git config --global user.email "$GIT_AUTHOR_EMAIL" 101 | ``` 102 | 103 | You could also use `~/.extra` to override settings, functions and aliases from my dotfiles repository. It’s probably better to [fork this repository](https://github.com/mathiasbynens/dotfiles/fork) instead, though. 104 | 105 | ### Sensible OS X defaults 106 | 107 | When setting up a new Mac, you may want to set some sensible OS X defaults: 108 | 109 | ```bash 110 | ./.osx 111 | ``` 112 | 113 | ### Install Homebrew formulae 114 | 115 | When setting up a new Mac, you may want to install some common [Homebrew](http://brew.sh/) formulae (after installing Homebrew, of course): 116 | 117 | ```bash 118 | ./brew.sh 119 | ``` 120 | 121 | ## Feedback 122 | 123 | Suggestions/improvements 124 | [welcome](https://github.com/mathiasbynens/dotfiles/issues)! 125 | 126 | ## Author 127 | 128 | | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | 129 | |---| 130 | | [Mathias Bynens](https://mathiasbynens.be/) | 131 | 132 | ## Thanks to… 133 | 134 | * @ptb and [his _OS X Lion Setup_ repository](https://github.com/ptb/Mac-OS-X-Lion-Setup) 135 | * [Ben Alman](http://benalman.com/) and his [dotfiles repository](https://github.com/cowboy/dotfiles) 136 | * [Chris Gerke](http://www.randomsquared.com/) and his [tutorial on creating an OS X SOE master image](http://chris-gerke.blogspot.com/2012/04/mac-osx-soe-master-image-day-7.html) + [_Insta_ repository](https://github.com/cgerke/Insta) 137 | * [Cătălin Mariș](https://github.com/alrra) and his [dotfiles repository](https://github.com/alrra/dotfiles) 138 | * [Gianni Chiappetta](http://gf3.ca/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles) 139 | * [Jan Moesen](http://jan.moesen.nu/) and his [ancient `.bash_profile`](https://gist.github.com/1156154) + [shiny _tilde_ repository](https://github.com/janmoesen/tilde) 140 | * [Lauri ‘Lri’ Ranta](http://lri.me/) for sharing [loads of hidden preferences](http://osxnotes.net/defaults.html) 141 | * [Matijs Brinkhuis](http://hotfusion.nl/) and his [dotfiles repository](https://github.com/matijs/dotfiles) 142 | * [Nicolas Gallagher](http://nicolasgallagher.com/) and his [dotfiles repository](https://github.com/necolas/dotfiles) 143 | * [Sindre Sorhus](http://sindresorhus.com/) 144 | * [Tom Ryder](http://blog.sanctum.geek.nz/) and his [dotfiles repository](https://github.com/tejr/dotfiles) 145 | * [Kevin Suttle](http://kevinsuttle.com/) and his [dotfiles repository](https://github.com/kevinSuttle/dotfiles) and [OSXDefaults project](https://github.com/kevinSuttle/OSXDefaults), which aims to provide better documentation for [`~/.osx`](https://mths.be/osx) 146 | * [Haralan Dobrev](http://hkdobrev.com/) 147 | * anyone who [contributed a patch](https://github.com/mathiasbynens/dotfiles/contributors) or [made a helpful suggestion](https://github.com/mathiasbynens/dotfiles/issues) 148 | -------------------------------------------------------------------------------- /bash/.aliases: -------------------------------------------------------------------------------- 1 | # Easier navigation: .., ..., ...., ....., ~ and - 2 | alias ..="cd .." 3 | alias ...="cd ../.." 4 | alias ....="cd ../../.." 5 | alias .....="cd ../../../.." 6 | alias ~="cd ~" # `cd` is probably faster to type though 7 | alias -- -="cd -" 8 | 9 | # Shortcuts 10 | alias d="cd ~/Documents/Dropbox" 11 | alias dl="cd ~/Downloads" 12 | alias dt="cd ~/Desktop" 13 | alias p="cd ~/projects" 14 | alias g="git" 15 | alias h="history" 16 | alias j="jobs" 17 | 18 | # Detect which `ls` flavor is in use 19 | if ls --color > /dev/null 2>&1; then # GNU `ls` 20 | colorflag="--color" 21 | else # OS X `ls` 22 | colorflag="-G" 23 | fi 24 | 25 | # List all files colorized in long format 26 | alias l="ls -lF ${colorflag}" 27 | 28 | # List all files colorized in long format, including dot files 29 | alias la="ls -laF ${colorflag}" 30 | 31 | # List only directories 32 | alias lsd="ls -lF ${colorflag} | grep --color=never '^d'" 33 | 34 | # Always use color output for `ls` 35 | alias ls="command ls ${colorflag}" 36 | export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' 37 | 38 | # Enable aliases to be sudo’ed 39 | alias sudo='sudo ' 40 | 41 | # Get week number 42 | alias week='date +%V' 43 | 44 | # Stopwatch 45 | alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' 46 | 47 | # Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages 48 | alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update' 49 | 50 | # IP addresses 51 | alias ip="dig +short myip.opendns.com @resolver1.opendns.com" 52 | alias localip="ipconfig getifaddr en0" 53 | alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" 54 | 55 | # Flush Directory Service cache 56 | alias flush="dscacheutil -flushcache && killall -HUP mDNSResponder" 57 | 58 | # Clean up LaunchServices to remove duplicates in the “Open With” menu 59 | alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder" 60 | 61 | # View HTTP traffic 62 | alias sniff="sudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'" 63 | alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\"" 64 | 65 | # Canonical hex dump; some systems have this symlinked 66 | command -v hd > /dev/null || alias hd="hexdump -C" 67 | 68 | # OS X has no `md5sum`, so use `md5` as a fallback 69 | command -v md5sum > /dev/null || alias md5sum="md5" 70 | 71 | # OS X has no `sha1sum`, so use `shasum` as a fallback 72 | command -v sha1sum > /dev/null || alias sha1sum="shasum" 73 | 74 | # JavaScriptCore REPL 75 | jscbin="/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc"; 76 | [ -e "${jscbin}" ] && alias jsc="${jscbin}"; 77 | unset jscbin; 78 | 79 | # Trim new lines and copy to clipboard 80 | alias c="tr -d '\n' | pbcopy" 81 | 82 | # Recursively delete `.DS_Store` files 83 | alias cleanup="find . -type f -name '*.DS_Store' -ls -delete" 84 | 85 | # Empty the Trash on all mounted volumes and the main HDD 86 | # Also, clear Apple’s System Logs to improve shell startup speed 87 | alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl" 88 | 89 | # Show/hide hidden files in Finder 90 | alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" 91 | alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" 92 | 93 | # Hide/show all desktop icons (useful when presenting) 94 | alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" 95 | alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" 96 | 97 | # URL-encode strings 98 | alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"' 99 | 100 | # Merge PDF files 101 | # Usage: `mergepdf -o output.pdf input{1,2,3}.pdf` 102 | alias mergepdf='/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py' 103 | 104 | # Disable Spotlight 105 | alias spotoff="sudo mdutil -a -i off" 106 | # Enable Spotlight 107 | alias spoton="sudo mdutil -a -i on" 108 | 109 | # PlistBuddy alias, because sometimes `defaults` just doesn’t cut it 110 | alias plistbuddy="/usr/libexec/PlistBuddy" 111 | 112 | # Ring the terminal bell, and put a badge on Terminal.app’s Dock icon 113 | # (useful when executing time-consuming commands) 114 | alias badge="tput bel" 115 | 116 | # Intuitive map function 117 | # For example, to list all directories that contain a certain file: 118 | # find . -name .gitattributes | map dirname 119 | alias map="xargs -n1" 120 | 121 | # One of @janmoesen’s ProTip™s 122 | for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do 123 | alias "$method"="lwp-request -m '$method'" 124 | done 125 | 126 | # Make Grunt print stack traces by default 127 | command -v grunt > /dev/null && alias grunt="grunt --stack" 128 | 129 | # Stuff I never really use but cannot delete either because of http://xkcd.com/530/ 130 | alias stfu="osascript -e 'set volume output muted true'" 131 | alias pumpitup="osascript -e 'set volume 7'" 132 | 133 | # Kill all the tabs in Chrome to free up memory 134 | # [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description 135 | alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill" 136 | 137 | # Lock the screen (when going AFK) 138 | alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend" 139 | 140 | # Reload the shell (i.e. invoke as a login shell) 141 | alias reload="exec $SHELL -l" 142 | 143 | # Easily switch between `io.js` and `Node.js` 144 | alias use-iojs="brew unlink node && brew link --force iojs" 145 | alias use-node="brew unlink iojs && brew link --force node" 146 | 147 | # force to use macvim instead of normal vim 148 | if [ -f /usr/local/bin/mvim ]; then 149 | alias vim="mvim -v" 150 | fi 151 | 152 | alias route="netstat -r" 153 | alias listport="netstat -a | egrep 'Proto|LISTEN'" 154 | alias pylintc="pylint --rcfile=pylint.rc" 155 | alias nw="/Applications/nwjs.app/Contents/MacOS/nwjs" 156 | alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl" 157 | 158 | # send color to anybar 159 | function anydot { echo -n $1 | nc -4u -w0 localhost ${2:-1738}; } 160 | -------------------------------------------------------------------------------- /bash/.bash_profile: -------------------------------------------------------------------------------- 1 | # Add `~/bin` to the `$PATH` 2 | export PATH="$HOME/bin:$PATH"; 3 | 4 | # Load the shell dotfiles, and then some: 5 | # * ~/.path can be used to extend `$PATH`. 6 | # * ~/.extra can be used for other settings you don’t want to commit. 7 | # removed bash_prompt from default setting. we use didferent bash prompt 8 | for file in ~/.{path,exports,aliases,functions,extra,bash_local}; do 9 | [ -r "$file" ] && [ -f "$file" ] && source "$file"; 10 | done; 11 | unset file; 12 | 13 | # Case-insensitive globbing (used in pathname expansion) 14 | shopt -s nocaseglob; 15 | 16 | # Append to the Bash history file, rather than overwriting it 17 | shopt -s histappend; 18 | 19 | # Autocorrect typos in path names when using `cd` 20 | shopt -s cdspell; 21 | 22 | # Enable some Bash 4 features when possible: 23 | # * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux` 24 | # * Recursive globbing, e.g. `echo **/*.txt` 25 | for option in autocd globstar; do 26 | shopt -s "$option" 2> /dev/null; 27 | done; 28 | 29 | # Add tab completion for many Bash commands 30 | if which brew > /dev/null && [ -f "$(brew --prefix)/etc/bash_completion" ]; then 31 | source "$(brew --prefix)/etc/bash_completion"; 32 | elif [ -f /etc/bash_completion ]; then 33 | source /etc/bash_completion; 34 | fi; 35 | 36 | # Enable tab completion for `g` by marking it as an alias for `git` 37 | if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then 38 | complete -o default -o nospace -F _git g; 39 | fi; 40 | 41 | # Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards 42 | [ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh; 43 | 44 | # Add tab completion for `defaults read|write NSGlobalDomain` 45 | # You could just use `-g` instead, but I like being explicit 46 | complete -W "NSGlobalDomain" defaults; 47 | 48 | # Add `killall` tab completion for common apps 49 | complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; 50 | 51 | if [ -f $DOTFILES/liquidprompt/liquidprompt ]; then 52 | . $DOTFILES/liquidprompt/liquidprompt 53 | fi 54 | -------------------------------------------------------------------------------- /bash/.bash_prompt: -------------------------------------------------------------------------------- 1 | # Shell prompt based on the Solarized Dark theme. 2 | # Screenshot: http://i.imgur.com/EkEtphC.png 3 | # Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles 4 | # iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. 5 | 6 | if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then 7 | export TERM='gnome-256color'; 8 | elif infocmp xterm-256color >/dev/null 2>&1; then 9 | export TERM='xterm-256color'; 10 | fi; 11 | 12 | prompt_git() { 13 | local s=''; 14 | local branchName=''; 15 | 16 | # Check if the current directory is in a Git repository. 17 | if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then 18 | 19 | # check if the current directory is in .git before running git checks 20 | if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then 21 | 22 | # Ensure the index is up to date. 23 | git update-index --really-refresh -q &>/dev/null; 24 | 25 | # Check for uncommitted changes in the index. 26 | if ! $(git diff --quiet --ignore-submodules --cached); then 27 | s+='+'; 28 | fi; 29 | 30 | # Check for unstaged changes. 31 | if ! $(git diff-files --quiet --ignore-submodules --); then 32 | s+='!'; 33 | fi; 34 | 35 | # Check for untracked files. 36 | if [ -n "$(git ls-files --others --exclude-standard)" ]; then 37 | s+='?'; 38 | fi; 39 | 40 | # Check for stashed files. 41 | if $(git rev-parse --verify refs/stash &>/dev/null); then 42 | s+='$'; 43 | fi; 44 | 45 | fi; 46 | 47 | # Get the short symbolic ref. 48 | # If HEAD isn’t a symbolic ref, get the short SHA for the latest commit 49 | # Otherwise, just give up. 50 | branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \ 51 | git rev-parse --short HEAD 2> /dev/null || \ 52 | echo '(unknown)')"; 53 | 54 | [ -n "${s}" ] && s=" [${s}]"; 55 | 56 | echo -e "${1}${branchName}${blue}${s}"; 57 | else 58 | return; 59 | fi; 60 | } 61 | 62 | if tput setaf 1 &> /dev/null; then 63 | tput sgr0; # reset colors 64 | bold=$(tput bold); 65 | reset=$(tput sgr0); 66 | # Solarized colors, taken from http://git.io/solarized-colors. 67 | black=$(tput setaf 0); 68 | blue=$(tput setaf 33); 69 | cyan=$(tput setaf 37); 70 | green=$(tput setaf 64); 71 | orange=$(tput setaf 166); 72 | purple=$(tput setaf 125); 73 | red=$(tput setaf 124); 74 | violet=$(tput setaf 61); 75 | white=$(tput setaf 15); 76 | yellow=$(tput setaf 136); 77 | else 78 | bold=''; 79 | reset="\e[0m"; 80 | black="\e[1;30m"; 81 | blue="\e[1;34m"; 82 | cyan="\e[1;36m"; 83 | green="\e[1;32m"; 84 | orange="\e[1;33m"; 85 | purple="\e[1;35m"; 86 | red="\e[1;31m"; 87 | violet="\e[1;35m"; 88 | white="\e[1;37m"; 89 | yellow="\e[1;33m"; 90 | fi; 91 | 92 | # Highlight the user name when logged in as root. 93 | if [[ "${USER}" == "root" ]]; then 94 | userStyle="${red}"; 95 | else 96 | userStyle="${orange}"; 97 | fi; 98 | 99 | # Highlight the hostname when connected via SSH. 100 | if [[ "${SSH_TTY}" ]]; then 101 | hostStyle="${bold}${red}"; 102 | else 103 | hostStyle="${yellow}"; 104 | fi; 105 | 106 | # Set the terminal title to the current working directory. 107 | PS1="\[\033]0;\w\007\]"; 108 | PS1+="\[${bold}\]\n"; # newline 109 | PS1+="\[${userStyle}\]\u"; # username 110 | PS1+="\[${white}\] at "; 111 | PS1+="\[${hostStyle}\]\h"; # host 112 | PS1+="\[${white}\] in "; 113 | PS1+="\[${green}\]\w"; # working directory 114 | PS1+="\$(prompt_git \"${white} on ${violet}\")"; # Git repository details 115 | PS1+="\n"; 116 | PS1+="\[${white}\]\$ \[${reset}\]"; # `$` (and reset color) 117 | export PS1; 118 | 119 | PS2="\[${yellow}\]→ \[${reset}\]"; 120 | export PS2; 121 | -------------------------------------------------------------------------------- /bash/.bashrc: -------------------------------------------------------------------------------- 1 | [ -n "$PS1" ] && source ~/.bash_profile; 2 | -------------------------------------------------------------------------------- /bash/.exports: -------------------------------------------------------------------------------- 1 | # Make vim the default editor. 2 | export EDITOR='vim'; 3 | 4 | # Increase Bash history size. Allow 32³ entries; the default is 500. 5 | export HISTSIZE='32768'; 6 | export HISTFILESIZE="${HISTSIZE}"; 7 | # Omit duplicates and commands that begin with a space from history. 8 | export HISTCONTROL='ignoreboth'; 9 | 10 | # Prefer US English and use UTF-8. 11 | export LANG='en_US.UTF-8'; 12 | export LC_ALL='en_US.UTF-8'; 13 | 14 | # Highlight section titles in manual pages. 15 | export LESS_TERMCAP_md="${yellow}"; 16 | 17 | # Don’t clear the screen after quitting a manual page. 18 | export MANPAGER='less -X'; 19 | 20 | # Always enable colored `grep` output. 21 | export GREP_OPTIONS='--color=auto'; 22 | 23 | export GOPATH=$HOME/go 24 | 25 | export DOTFILES=$HOME/dotfiles 26 | export ARENA=$HOME/study/arena 27 | export ARENA_E=$ARENA/elixir 28 | export ARENA_ET=$ARENA_E/training 29 | export ARENA_CJ=$ARENA/clojure 30 | export ARENA_PY=$ARENA/python 31 | export ARENA_TL=$ARENA/tcl 32 | export ARENA_EM=$ARENA/elm 33 | 34 | # local elasticsearch deployment 35 | export ESL='http://localhost:9200' 36 | 37 | export CLOJURESCRIPT_HOME=$HOME/projects/clojure/clojurescript 38 | -------------------------------------------------------------------------------- /bash/.functions: -------------------------------------------------------------------------------- 1 | # Simple calculator 2 | function calc() { 3 | local result=""; 4 | result="$(printf "scale=10;$*\n" | bc --mathlib | tr -d '\\\n')"; 5 | # └─ default (when `--mathlib` is used) is 20 6 | # 7 | if [[ "$result" == *.* ]]; then 8 | # improve the output for decimal numbers 9 | printf "$result" | 10 | sed -e 's/^\./0./' `# add "0" for cases like ".5"` \ 11 | -e 's/^-\./-0./' `# add "0" for cases like "-.5"`\ 12 | -e 's/0*$//;s/\.$//'; # remove trailing zeros 13 | else 14 | printf "$result"; 15 | fi; 16 | printf "\n"; 17 | } 18 | 19 | # Create a new directory and enter it 20 | function mkd() { 21 | mkdir -p "$@" && cd "$_"; 22 | } 23 | 24 | # Change working directory to the top-most Finder window location 25 | function cdf() { # short for `cdfinder` 26 | cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')"; 27 | } 28 | 29 | # Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression 30 | function targz() { 31 | local tmpFile="${@%/}.tar"; 32 | tar -cvf "${tmpFile}" --exclude=".DS_Store" "${@}" || return 1; 33 | 34 | size=$( 35 | stat -f"%z" "${tmpFile}" 2> /dev/null; # OS X `stat` 36 | stat -c"%s" "${tmpFile}" 2> /dev/null # GNU `stat` 37 | ); 38 | 39 | local cmd=""; 40 | if (( size < 52428800 )) && hash zopfli 2> /dev/null; then 41 | # the .tar file is smaller than 50 MB and Zopfli is available; use it 42 | cmd="zopfli"; 43 | else 44 | if hash pigz 2> /dev/null; then 45 | cmd="pigz"; 46 | else 47 | cmd="gzip"; 48 | fi; 49 | fi; 50 | 51 | echo "Compressing .tar using \`${cmd}\`…"; 52 | "${cmd}" -v "${tmpFile}" || return 1; 53 | [ -f "${tmpFile}" ] && rm "${tmpFile}"; 54 | echo "${tmpFile}.gz created successfully."; 55 | } 56 | 57 | # Determine size of a file or total size of a directory 58 | function fs() { 59 | if du -b /dev/null > /dev/null 2>&1; then 60 | local arg=-sbh; 61 | else 62 | local arg=-sh; 63 | fi 64 | if [[ -n "$@" ]]; then 65 | du $arg -- "$@"; 66 | else 67 | du $arg .[^.]* *; 68 | fi; 69 | } 70 | 71 | # Use Git’s colored diff when available 72 | hash git &>/dev/null; 73 | if [ $? -eq 0 ]; then 74 | function diff() { 75 | git diff --no-index --color-words "$@"; 76 | } 77 | fi; 78 | 79 | # Create a data URL from a file 80 | function dataurl() { 81 | local mimeType=$(file -b --mime-type "$1"); 82 | if [[ $mimeType == text/* ]]; then 83 | mimeType="${mimeType};charset=utf-8"; 84 | fi 85 | echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')"; 86 | } 87 | 88 | # Create a git.io short URL 89 | function gitio() { 90 | if [ -z "${1}" -o -z "${2}" ]; then 91 | echo "Usage: \`gitio slug url\`"; 92 | return 1; 93 | fi; 94 | curl -i http://git.io/ -F "url=${2}" -F "code=${1}"; 95 | } 96 | 97 | # Start an HTTP server from a directory, optionally specifying the port 98 | function server() { 99 | local port="${1:-8000}"; 100 | sleep 1 && open "http://localhost:${port}/" & 101 | # Set the default Content-Type to `text/plain` instead of `application/octet-stream` 102 | # And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files) 103 | python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"; 104 | } 105 | 106 | # Start a PHP server from a directory, optionally specifying the port 107 | # (Requires PHP 5.4.0+.) 108 | function phpserver() { 109 | local port="${1:-4000}"; 110 | local ip=$(ipconfig getifaddr en1); 111 | sleep 1 && open "http://${ip}:${port}/" & 112 | php -S "${ip}:${port}"; 113 | } 114 | 115 | # Compare original and gzipped file size 116 | function gz() { 117 | local origsize=$(wc -c < "$1"); 118 | local gzipsize=$(gzip -c "$1" | wc -c); 119 | local ratio=$(echo "$gzipsize * 100 / $origsize" | bc -l); 120 | printf "orig: %d bytes\n" "$origsize"; 121 | printf "gzip: %d bytes (%2.2f%%)\n" "$gzipsize" "$ratio"; 122 | } 123 | 124 | # Syntax-highlight JSON strings or files 125 | # Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json` 126 | function json() { 127 | if [ -t 0 ]; then # argument 128 | python -mjson.tool <<< "$*" | pygmentize -l javascript; 129 | else # pipe 130 | python -mjson.tool | pygmentize -l javascript; 131 | fi; 132 | } 133 | 134 | # Run `dig` and display the most useful info 135 | function digga() { 136 | dig +nocmd "$1" any +multiline +noall +answer; 137 | } 138 | 139 | # UTF-8-encode a string of Unicode symbols 140 | function escape() { 141 | printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u); 142 | # print a newline unless we’re piping the output to another program 143 | if [ -t 1 ]; then 144 | echo ""; # newline 145 | fi; 146 | } 147 | 148 | # Decode \x{ABCD}-style Unicode escape sequences 149 | function unidecode() { 150 | perl -e "binmode(STDOUT, ':utf8'); print \"$@\""; 151 | # print a newline unless we’re piping the output to another program 152 | if [ -t 1 ]; then 153 | echo ""; # newline 154 | fi; 155 | } 156 | 157 | # Get a character’s Unicode code point 158 | function codepoint() { 159 | perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))"; 160 | # print a newline unless we’re piping the output to another program 161 | if [ -t 1 ]; then 162 | echo ""; # newline 163 | fi; 164 | } 165 | 166 | # Show all the names (CNs and SANs) listed in the SSL certificate 167 | # for a given domain 168 | function getcertnames() { 169 | if [ -z "${1}" ]; then 170 | echo "ERROR: No domain specified."; 171 | return 1; 172 | fi; 173 | 174 | local domain="${1}"; 175 | echo "Testing ${domain}…"; 176 | echo ""; # newline 177 | 178 | local tmp=$(echo -e "GET / HTTP/1.0\nEOT" \ 179 | | openssl s_client -connect "${domain}:443" -servername "${domain}" 2>&1); 180 | 181 | if [[ "${tmp}" = *"-----BEGIN CERTIFICATE-----"* ]]; then 182 | local certText=$(echo "${tmp}" \ 183 | | openssl x509 -text -certopt "no_aux, no_header, no_issuer, no_pubkey, \ 184 | no_serial, no_sigdump, no_signame, no_validity, no_version"); 185 | echo "Common Name:"; 186 | echo ""; # newline 187 | echo "${certText}" | grep "Subject:" | sed -e "s/^.*CN=//" | sed -e "s/\/emailAddress=.*//"; 188 | echo ""; # newline 189 | echo "Subject Alternative Name(s):"; 190 | echo ""; # newline 191 | echo "${certText}" | grep -A 1 "Subject Alternative Name:" \ 192 | | sed -e "2s/DNS://g" -e "s/ //g" | tr "," "\n" | tail -n +2; 193 | return 0; 194 | else 195 | echo "ERROR: Certificate not found."; 196 | return 1; 197 | fi; 198 | } 199 | 200 | # `s` with no arguments opens the current directory in Sublime Text, otherwise 201 | # opens the given location 202 | function s() { 203 | if [ $# -eq 0 ]; then 204 | subl .; 205 | else 206 | subl "$@"; 207 | fi; 208 | } 209 | 210 | # `a` with no arguments opens the current directory in Atom Editor, otherwise 211 | # opens the given location 212 | function a() { 213 | if [ $# -eq 0 ]; then 214 | atom .; 215 | else 216 | atom "$@"; 217 | fi; 218 | } 219 | 220 | # `v` with no arguments opens the current directory in Vim, otherwise opens the 221 | # given location 222 | function v() { 223 | if [ $# -eq 0 ]; then 224 | vim .; 225 | else 226 | vim "$@"; 227 | fi; 228 | } 229 | 230 | # `o` with no arguments opens the current directory, otherwise opens the given 231 | # location 232 | function o() { 233 | if [ $# -eq 0 ]; then 234 | open .; 235 | else 236 | open "$@"; 237 | fi; 238 | } 239 | 240 | # `tre` is a shorthand for `tree` with hidden files and color enabled, ignoring 241 | # the `.git` directory, listing directories first. The output gets piped into 242 | # `less` with options to preserve color and line numbers, unless the output is 243 | # small enough for one screen. 244 | function tre() { 245 | tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX; 246 | } 247 | -------------------------------------------------------------------------------- /bin/bash: -------------------------------------------------------------------------------- 1 | /usr/local/opt/bash/bin/bash -------------------------------------------------------------------------------- /bin/concat-video: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ffmpeg -i $HOME/Documents/tongjian_pre.mp4 -i $HOME/Downloads/$1.mp4 -i $HOME/Documents/tongjian_post.mp4 -filter_complex "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] concat=n=3:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" ~/Documents/tongjian/$1.mp4 -------------------------------------------------------------------------------- /bin/httpcompression: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # DESCRIPTION: 4 | # 5 | # Provides the content encoding the specified 6 | # resources are served with. 7 | # 8 | # USAGE: 9 | # 10 | # httpcompression URL ... 11 | # 12 | # USEFUL LINKS: 13 | # 14 | # * HTTP/1.1 (RFC 2616) - Content-Encoding 15 | # https://tools.ietf.org/html/rfc2616#section-14.11 16 | # 17 | # * SDCH Specification: 18 | # https://lists.w3.org/Archives/Public/ietf-http-wg/2008JulSep/att-0441/Shared_Dictionary_Compression_over_HTTP.pdf 19 | 20 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 21 | 22 | declare -r -a CURL_DEFAULT_OPTIONS=( 23 | --connect-timeout 30 24 | --header "Accept-Encoding: gzip, deflate, sdch" 25 | --header "Cache-Control: no-cache" # Prevent intermediate proxies 26 | # from caching the response 27 | 28 | --location # If the page was moved to a 29 | # different location, redo the 30 | # request 31 | --max-time 150 32 | --show-error 33 | --silent 34 | --user-agent "Mozilla/5.0 Gecko" # Send a fake UA string for sites 35 | # that sniff it instead of using 36 | # the Accept-Encoding header 37 | ) 38 | 39 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 40 | 41 | check_for_sdch() { 42 | 43 | declare availDicts="" 44 | declare currentHeaders="$1" 45 | declare dict="" 46 | declare dictClientID="" 47 | declare dicts="" 48 | declare i="" 49 | declare url="$2" 50 | 51 | # Check if the server advertised any dictionaries 52 | dicts="$( printf "%s" "$currentHeaders" | 53 | grep -i 'Get-Dictionary:' | 54 | cut -d':' -f2 | 55 | sed s/,/\ /g )" 56 | 57 | # If it does, check to see if it really supports SDCH 58 | if [ -n "$dicts" ]; then 59 | for i in $dicts; do 60 | 61 | dict="" 62 | 63 | # Check if the dictionary location is specified as a path, 64 | # and if it is, construct it's URL from the host name of the 65 | # referrer URL 66 | 67 | [[ "$i" != http* ]] \ 68 | && dict="$( printf "%s" "$url" | 69 | sed -En 's/([^/]*\/\/)?([^/]*)\/?.*/\1\2/p' )" 70 | 71 | dict="$dict$i" 72 | 73 | # Request the dictionaries from the server and 74 | # construct the `Avail-Dictionary` header value 75 | # 76 | # [ The user agent identifier for a dictionary is defined 77 | # as the URL-safe base64 encoding (as described in RFC 78 | # 3548, section 4 [RFC3548]) of the first 48 bits (bits 79 | # 0..47) of the dictionary's SHA-256 digest ] 80 | 81 | dictClientID="$( curl "${CURL_DEFAULT_OPTIONS[@]}" "$dict" | 82 | openssl dgst -sha256 -binary | 83 | openssl base64 | 84 | cut -c 1-8 | 85 | sed -e 's/\+/-/' -e 's/\//_/' )" 86 | 87 | [ -n "$availDicts" ] && availDicts="$availDicts,$dictClientID" \ 88 | || availDicts="$dictClientID" 89 | 90 | done 91 | 92 | # Redo the request (advertising the available dictionaries) 93 | # and replace the old resulted headers with the new ones 94 | 95 | printf "$( curl "${CURL_DEFAULT_OPTIONS[@]}" \ 96 | -H "Avail-Dictionary: $availDicts" \ 97 | --dump-header - \ 98 | --output /dev/null \ 99 | "$url" )" 100 | 101 | else 102 | printf "%s" "$currentHeaders" 103 | fi 104 | } 105 | 106 | get_content_encoding() { 107 | 108 | declare currentHeaders="" 109 | declare encoding="" 110 | declare headers="" 111 | declare indent="" 112 | declare tmp="" 113 | declare url="$1" 114 | 115 | headers="$(curl "${CURL_DEFAULT_OPTIONS[@]}" \ 116 | --dump-header - \ 117 | --output /dev/null \ 118 | "$url" )" \ 119 | && ( \ 120 | 121 | # Iterate over the headers of all redirects 122 | while [ -n "$headers" ]; do 123 | 124 | # Get headers for the "current" URL 125 | currentHeaders="$( printf "%s" "$headers" | sed -n '1,/^HTTP/p' )" 126 | 127 | # Remove the headers for the "current" URL 128 | headers="${headers/"$currentHeaders"/}" 129 | 130 | currentHeaders="$(check_for_sdch "$currentHeaders" "$url")" 131 | 132 | # Get the value of the `Content-Encoding` header 133 | encoding="$( printf "%s" "$currentHeaders" | 134 | grep -i 'Content-Encoding:' | 135 | cut -d' ' -f2 | 136 | tr "\r" "," | 137 | tr -d "\n" | 138 | sed 's/,$//' )" 139 | 140 | # Print the output for the "current" URL 141 | [ -n "$encoding" ] && encoding="[$encoding]" 142 | 143 | if [ "$url" != "$1" ]; then 144 | printf "$indent$url $encoding\n" 145 | indent=" $indent" 146 | else 147 | printf "\n * $1 $encoding\n" 148 | indent=" ↳ " 149 | fi 150 | 151 | # Get the next URL from the series of redirects 152 | tmp="$url" 153 | url="$( printf "%s" "$currentHeaders" | 154 | grep -i 'Location' | 155 | sed -e 's/Location://' | 156 | sed 's/^ *//' | 157 | tr -d '\r' )" 158 | 159 | # In case the `Location` header is specified as a path 160 | [[ "$url" != http* ]] && url="$tmp$url" 161 | 162 | done 163 | ) 164 | } 165 | 166 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 167 | 168 | main() { 169 | 170 | # Check if cURL is installed 171 | if [ -x "$(command -v "curl")" ]; then 172 | while [ $# -ne 0 ]; do 173 | get_content_encoding "$1" 174 | shift 175 | done 176 | printf "\n" 177 | else 178 | printf "cURL is required, please install it!\n" 179 | fi 180 | 181 | } 182 | 183 | main $@ 184 | -------------------------------------------------------------------------------- /bin/init/Preferences.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", 3 | "default_encoding": "UTF-8", 4 | "default_line_ending": "unix", 5 | "detect_indentation": false, 6 | "draw_white_space": "all", 7 | "ensure_newline_at_eof_on_save": false, 8 | "file_exclude_patterns": 9 | [ 10 | ".DS_Store", 11 | "Desktop.ini", 12 | "*.pyc", 13 | "._*", 14 | "Thumbs.db", 15 | ".Spotlight-V100", 16 | ".Trashes" 17 | ], 18 | "folder_exclude_patterns": 19 | [ 20 | ".git", 21 | "node_modules" 22 | ], 23 | "font_face": "Monaco", 24 | "font_size": 13, 25 | "highlight_modified_tabs": true, 26 | "hot_exit": false, 27 | "line_padding_bottom": 5, 28 | "match_brackets": true, 29 | "match_brackets_angle": true, 30 | "remember_open_files": false, 31 | "rulers": 32 | [ 33 | 80 34 | ], 35 | "show_encoding": true, 36 | "show_line_endings": true, 37 | "tab_size": 2, 38 | "translate_tabs_to_spaces": false, 39 | "trim_trailing_white_space_on_save": true, 40 | "word_wrap": true 41 | } 42 | -------------------------------------------------------------------------------- /bin/init/Solarized Dark xterm-256color.terminal: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BackgroundColor 6 | 7 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 8 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECgw 9 | LjAxNTkyNDQwNTMxIDAuMTI2NTIwOTE2OCAwLjE1OTY5NjAxMjcAEAGAAtIQERITWiRj 10 | bGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVjdF8QD05TS2V5ZWRBcmNo 11 | aXZlctEXGFRyb290gAEIERojLTI3O0FITltijY+RlqGqsrW+0NPYAAAAAAAAAQEAAAAA 12 | AAAAGQAAAAAAAAAAAAAAAAAAANo= 13 | 14 | BlinkText 15 | 16 | CursorColor 17 | 18 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 19 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw 20 | LjQ0MDU4MDI0ODggMC41MDk2MjkzMDkyIDAuNTE2ODU3OTgxNwAQAYAC0hAREhNaJGNs 21 | YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp 22 | dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA 23 | AAAZAAAAAAAAAAAAAAAAAAAA2Q== 24 | 25 | Font 26 | 27 | YnBsaXN0MDDUAQIDBAUGGBlYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 28 | AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QVk5TU2l6ZVhOU2ZGbGFnc1ZOU05hbWVWJGNs 29 | YXNzI0AqAAAAAAAAEBCAAoADXU1lbmxvLVJlZ3VsYXLSExQVFlokY2xhc3NuYW1lWCRj 30 | bGFzc2VzVk5TRm9udKIVF1hOU09iamVjdF8QD05TS2V5ZWRBcmNoaXZlctEaG1Ryb290 31 | gAEIERojLTI3PEJLUltiaXJ0dniGi5afpqmyxMfMAAAAAAAAAQEAAAAAAAAAHAAAAAAA 32 | AAAAAAAAAAAAAM4= 33 | 34 | FontAntialias 35 | 36 | FontHeightSpacing 37 | 1.1000000000000001 38 | FontWidthSpacing 39 | 1 40 | ProfileCurrentVersion 41 | 2.02 42 | SelectionColor 43 | 44 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 45 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECgw 46 | LjAzOTM4MDczNjY1IDAuMTYwMTE2NDYzOSAwLjE5ODMzMjc1NjgAEAGAAtIQERITWiRj 47 | bGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVjdF8QD05TS2V5ZWRBcmNo 48 | aXZlctEXGFRyb290gAEIERojLTI3O0FITltijY+RlqGqsrW+0NPYAAAAAAAAAQEAAAAA 49 | AAAAGQAAAAAAAAAAAAAAAAAAANo= 50 | 51 | ShowWindowSettingsNameInTitle 52 | 53 | TerminalType 54 | xterm-256color 55 | TextBoldColor 56 | 57 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 58 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECYw 59 | LjUwNTk5MTkzNTcgMC41NjQ4NTgzNzcgMC41NjM2MzY1NDE0ABABgALSEBESE1okY2xh 60 | c3NuYW1lWCRjbGFzc2VzV05TQ29sb3KiEhRYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2 61 | ZXLRFxhUcm9vdIABCBEaIy0yNztBSE5bYouNj5SfqLCzvM7R1gAAAAAAAAEBAAAAAAAA 62 | ABkAAAAAAAAAAAAAAAAAAADY 63 | 64 | TextColor 65 | 66 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 67 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw 68 | LjQ0MDU4MDI0ODggMC41MDk2MjkzMDkyIDAuNTE2ODU3OTgxNwAQAYAC0hAREhNaJGNs 69 | YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp 70 | dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA 71 | AAAZAAAAAAAAAAAAAAAAAAAA2Q== 72 | 73 | UseBrightBold 74 | 75 | blackColour 76 | 77 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 78 | ZmZmg7JNIT2DkvUjPoO+F0s+AYY= 79 | 80 | blueColour 81 | 82 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 83 | ZmZmgyqcAj6DtOHsPoO+RUg/AYY= 84 | 85 | brightBlackColour 86 | 87 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 88 | ZmZmg+ZzgjyDs44BPoNahyM+AYY= 89 | 90 | brightBlueColour 91 | 92 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 93 | ZmZmg7yT4T6DEXcCP4POUAQ/AYY= 94 | 95 | brightCyanColour 96 | 97 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 98 | ZmZmg7CIAT+Dj5oQP4N8ShA/AYY= 99 | 100 | brightGreenColour 101 | 102 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 103 | ZmZmgzyujT6DFZy2PoOYFsQ+AYY= 104 | 105 | brightMagentaColour 106 | 107 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 108 | ZmZmgxMjsj6D+uazPoNkyTc/AYY= 109 | 110 | brightRedColour 111 | 112 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 113 | ZmZmgyfkPT+D/15aPoMgl5Y9AYY= 114 | 115 | brightWhiteColour 116 | 117 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 118 | ZmZmg49LfT+D0Dt1P4MGM10/AYY= 119 | 120 | brightYellowColour 121 | 122 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 123 | ZmZmg1MTpj6DeHnQPoPQg+A+AYY= 124 | 125 | cyanColour 126 | 127 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 128 | ZmZmg4VRFj6DfyESP4PkZwY/AYY= 129 | 130 | greenColour 131 | 132 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 133 | ZmZmg9lI5j6DIYkKP4PVjKU8AYY= 134 | 135 | magentaColour 136 | 137 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 138 | ZmZmg/4CRz+DBTzdPYMgzt4+AYY= 139 | 140 | name 141 | Solarized Dark xterm-256color 142 | redColour 143 | 144 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 145 | ZmZmg6i7UT+DUATePYMl2hA+AYY= 146 | 147 | type 148 | Window Settings 149 | whiteColour 150 | 151 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 152 | ZmZmgzqGaj+D2tdjP4NYPUw/AYY= 153 | 154 | yellowColour 155 | 156 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm 157 | ZmZmg0DAJT+DB17vPoM4Y8A8AYY= 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /bin/init/Solarized Dark.itermcolors: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ansi 0 Color 7 | 8 | Blue Component 9 | 0.19370138645172119 10 | Green Component 11 | 0.15575926005840302 12 | Red Component 13 | 0.0 14 | 15 | Ansi 1 Color 16 | 17 | Blue Component 18 | 0.14145714044570923 19 | Green Component 20 | 0.10840655118227005 21 | Red Component 22 | 0.81926977634429932 23 | 24 | Ansi 10 Color 25 | 26 | Blue Component 27 | 0.38298487663269043 28 | Green Component 29 | 0.35665956139564514 30 | Red Component 31 | 0.27671992778778076 32 | 33 | Ansi 11 Color 34 | 35 | Blue Component 36 | 0.43850564956665039 37 | Green Component 38 | 0.40717673301696777 39 | Red Component 40 | 0.32436618208885193 41 | 42 | Ansi 12 Color 43 | 44 | Blue Component 45 | 0.51685798168182373 46 | Green Component 47 | 0.50962930917739868 48 | Red Component 49 | 0.44058024883270264 50 | 51 | Ansi 13 Color 52 | 53 | Blue Component 54 | 0.72908437252044678 55 | Green Component 56 | 0.33896297216415405 57 | Red Component 58 | 0.34798634052276611 59 | 60 | Ansi 14 Color 61 | 62 | Blue Component 63 | 0.56363654136657715 64 | Green Component 65 | 0.56485837697982788 66 | Red Component 67 | 0.50599193572998047 68 | 69 | Ansi 15 Color 70 | 71 | Blue Component 72 | 0.86405980587005615 73 | Green Component 74 | 0.95794391632080078 75 | Red Component 76 | 0.98943418264389038 77 | 78 | Ansi 2 Color 79 | 80 | Blue Component 81 | 0.020208755508065224 82 | Green Component 83 | 0.54115492105484009 84 | Red Component 85 | 0.44977453351020813 86 | 87 | Ansi 3 Color 88 | 89 | Blue Component 90 | 0.023484811186790466 91 | Green Component 92 | 0.46751424670219421 93 | Red Component 94 | 0.64746475219726562 95 | 96 | Ansi 4 Color 97 | 98 | Blue Component 99 | 0.78231418132781982 100 | Green Component 101 | 0.46265947818756104 102 | Red Component 103 | 0.12754884362220764 104 | 105 | Ansi 5 Color 106 | 107 | Blue Component 108 | 0.43516635894775391 109 | Green Component 110 | 0.10802463442087173 111 | Red Component 112 | 0.77738940715789795 113 | 114 | Ansi 6 Color 115 | 116 | Blue Component 117 | 0.52502274513244629 118 | Green Component 119 | 0.57082360982894897 120 | Red Component 121 | 0.14679534733295441 122 | 123 | Ansi 7 Color 124 | 125 | Blue Component 126 | 0.79781103134155273 127 | Green Component 128 | 0.89001238346099854 129 | Red Component 130 | 0.91611063480377197 131 | 132 | Ansi 8 Color 133 | 134 | Blue Component 135 | 0.15170273184776306 136 | Green Component 137 | 0.11783610284328461 138 | Red Component 139 | 0.0 140 | 141 | Ansi 9 Color 142 | 143 | Blue Component 144 | 0.073530435562133789 145 | Green Component 146 | 0.21325300633907318 147 | Red Component 148 | 0.74176257848739624 149 | 150 | Background Color 151 | 152 | Blue Component 153 | 0.15170273184776306 154 | Green Component 155 | 0.11783610284328461 156 | Red Component 157 | 0.0 158 | 159 | Bold Color 160 | 161 | Blue Component 162 | 0.56363654136657715 163 | Green Component 164 | 0.56485837697982788 165 | Red Component 166 | 0.50599193572998047 167 | 168 | Cursor Color 169 | 170 | Blue Component 171 | 0.51685798168182373 172 | Green Component 173 | 0.50962930917739868 174 | Red Component 175 | 0.44058024883270264 176 | 177 | Cursor Text Color 178 | 179 | Blue Component 180 | 0.19370138645172119 181 | Green Component 182 | 0.15575926005840302 183 | Red Component 184 | 0.0 185 | 186 | Foreground Color 187 | 188 | Blue Component 189 | 0.51685798168182373 190 | Green Component 191 | 0.50962930917739868 192 | Red Component 193 | 0.44058024883270264 194 | 195 | Selected Text Color 196 | 197 | Blue Component 198 | 0.56363654136657715 199 | Green Component 200 | 0.56485837697982788 201 | Red Component 202 | 0.50599193572998047 203 | 204 | Selection Color 205 | 206 | Blue Component 207 | 0.19370138645172119 208 | Green Component 209 | 0.15575926005840302 210 | Red Component 211 | 0.0 212 | 213 | 214 | 215 | -------------------------------------------------------------------------------- /bin/mergeh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | convert "$@" -append /tmp/merged.jpg -------------------------------------------------------------------------------- /bin/mergev: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | convert "$@" +append /tmp/merged.jpg -------------------------------------------------------------------------------- /bin/mov2mp4: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | ffmpeg -i $1.mov -q:v 0 $1.mp4 -------------------------------------------------------------------------------- /bin/strong_pw: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | pwgen -n1vs $1 3 | -------------------------------------------------------------------------------- /bin/subl: -------------------------------------------------------------------------------- 1 | /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl -------------------------------------------------------------------------------- /bin/who_listen: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #lsof -nP -i4TCP:$1 | grep LISTEN 3 | lsof -i -n -P | grep TCP | grep LISTEN -------------------------------------------------------------------------------- /bin/youtube-mp3: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | youtube-dl -x --audio-format mp3 $1 -------------------------------------------------------------------------------- /bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd "$(dirname "${BASH_SOURCE}")"; 4 | 5 | git pull origin master; 6 | 7 | function doIt() { 8 | rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" \ 9 | --exclude "brew.sh" --exclude "misc/" --exclude ".vim/UltiSnips"\ 10 | --exclude "README.md" --exclude "LICENSE-MIT.txt" --exclude "bash" -avh --no-perms . ~; 11 | # source ~/.bash_profile; 12 | 13 | git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim 14 | if [ ! -d $HOME/.vim/UltiSnips ]; then 15 | ln -s $DOTFILES/.vim/UltiSnips $HOME/.vim/UltiSnips 16 | fi 17 | } 18 | 19 | if [ "$1" == "--force" -o "$1" == "-f" ]; then 20 | doIt; 21 | else 22 | read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; 23 | echo ""; 24 | if [[ $REPLY =~ ^[Yy]$ ]]; then 25 | doIt; 26 | fi; 27 | echo "dotfiles installed completed. Please don't forget to change your git username and email:"; 28 | echo " git config --global user.name \"Your Name\""; 29 | echo " git config --global user.email you@example.com"; 30 | echo ""; 31 | echo "When you first start vim, please use :BundleInstall to install all the plugins." 32 | echo "Have fun!" 33 | fi; 34 | unset doIt; 35 | -------------------------------------------------------------------------------- /brew.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Install command-line tools using Homebrew. 4 | 5 | # Ask for the administrator password upfront. 6 | sudo -v 7 | 8 | # Keep-alive: update existing `sudo` time stamp until the script has finished. 9 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & 10 | 11 | # Make sure we’re using the latest Homebrew. 12 | brew update 13 | 14 | # Upgrade any already-installed formulae. 15 | brew upgrade 16 | 17 | # Install GNU core utilities (those that come with OS X are outdated). 18 | # Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`. 19 | brew install coreutils 20 | sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum 21 | 22 | # Install some other useful utilities like `sponge`. 23 | brew install moreutils 24 | # Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed. 25 | brew install findutils 26 | # Install GNU `sed`, overwriting the built-in `sed`. 27 | brew install gnu-sed --with-default-names 28 | # Install Bash 4. 29 | # Note: don’t forget to add `/usr/local/bin/bash` to `/etc/shells` before 30 | # running `chsh`. 31 | brew install bash 32 | brew install bash-completion 33 | 34 | # Install `wget` with IRI support. 35 | brew install wget --with-iri 36 | 37 | # Install RingoJS and Narwhal. 38 | # Note that the order in which these are installed is important; 39 | # see http://git.io/brew-narwhal-ringo. 40 | # brew install ringojs 41 | # brew install narwhal 42 | 43 | # Install more recent versions of some OS X tools. 44 | brew install vim --override-system-vi 45 | brew install homebrew/dupes/grep 46 | brew install homebrew/dupes/openssh 47 | brew install homebrew/dupes/screen 48 | 49 | # Install font tools. 50 | brew tap bramstein/webfonttools 51 | brew install sfnt2woff 52 | brew install sfnt2woff-zopfli 53 | brew install woff2 54 | 55 | # Install some CTF tools; see https://github.com/ctfs/write-ups. 56 | brew install bfg 57 | brew install binutils 58 | brew install binwalk 59 | brew install cifer 60 | brew install dex2jar 61 | brew install dns2tcp 62 | brew install fcrackzip 63 | brew install foremost 64 | brew install hashpump 65 | brew install hydra 66 | brew install john 67 | brew install knock 68 | brew install nmap 69 | brew install pngcheck 70 | brew install socat 71 | brew install sqlmap 72 | brew install tcpflow 73 | brew install tcpreplay 74 | brew install tcptrace 75 | brew install ucspi-tcp # `tcpserver` etc. 76 | brew install xpdf 77 | brew install xz 78 | 79 | # Install other useful binaries. 80 | brew install ack 81 | #brew install exiv2 82 | brew install git 83 | brew install imagemagick --with-webp 84 | brew install lua 85 | brew install lynx 86 | brew install p7zip 87 | brew install pigz 88 | brew install pv 89 | brew install rename 90 | brew install rhino 91 | brew install speedtest_cli 92 | brew install tree 93 | brew install webkit2png 94 | brew install zopfli 95 | brew install node 96 | brew install ag 97 | brew install dart 98 | 99 | # Remove outdated versions from the cellar. 100 | brew cleanup 101 | -------------------------------------------------------------------------------- /misc/README.md: -------------------------------------------------------------------------------- 1 | # Sogou dict cells 2 | 3 | This contains all the dict cell files for sogou input that I used: https://pinyin.sogou.com/dict/. Unfortunately when syncing sogou input from one computer to another, these won't be sync'ed. So I put them here. 4 | -------------------------------------------------------------------------------- /misc/《哈利波特》大全【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/《哈利波特》大全【官方推荐】.scel -------------------------------------------------------------------------------- /misc/中国历史词汇大全【官方推荐】 (1).scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/中国历史词汇大全【官方推荐】 (1).scel -------------------------------------------------------------------------------- /misc/中国历史词汇大全【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/中国历史词汇大全【官方推荐】.scel -------------------------------------------------------------------------------- /misc/古今中外各界名人词库.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/古今中外各界名人词库.scel -------------------------------------------------------------------------------- /misc/古代战争集锦(802次).scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/古代战争集锦(802次).scel -------------------------------------------------------------------------------- /misc/古文-格言联璧(学问类).scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/古文-格言联璧(学问类).scel -------------------------------------------------------------------------------- /misc/古文观止选编.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/古文观止选编.scel -------------------------------------------------------------------------------- /misc/古诗词名句【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/古诗词名句【官方推荐】.scel -------------------------------------------------------------------------------- /misc/史记【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/史记【官方推荐】.scel -------------------------------------------------------------------------------- /misc/哲学词汇大全【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/哲学词汇大全【官方推荐】.scel -------------------------------------------------------------------------------- /misc/唐诗300首【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/唐诗300首【官方推荐】.scel -------------------------------------------------------------------------------- /misc/地理地质词汇大全【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/地理地质词汇大全【官方推荐】.scel -------------------------------------------------------------------------------- /misc/宋词精选【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/宋词精选【官方推荐】.scel -------------------------------------------------------------------------------- /misc/庄子全集【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/庄子全集【官方推荐】.scel -------------------------------------------------------------------------------- /misc/开发大神专用词库【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/开发大神专用词库【官方推荐】.scel -------------------------------------------------------------------------------- /misc/心理学词汇大全【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/心理学词汇大全【官方推荐】.scel -------------------------------------------------------------------------------- /misc/成语俗语【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/成语俗语【官方推荐】.scel -------------------------------------------------------------------------------- /misc/数学词汇大全【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/数学词汇大全【官方推荐】.scel -------------------------------------------------------------------------------- /misc/李白诗集【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/李白诗集【官方推荐】.scel -------------------------------------------------------------------------------- /misc/杜甫诗集【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/杜甫诗集【官方推荐】.scel -------------------------------------------------------------------------------- /misc/柳宗元诗词【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/柳宗元诗词【官方推荐】.scel -------------------------------------------------------------------------------- /misc/歇后语集锦【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/歇后语集锦【官方推荐】.scel -------------------------------------------------------------------------------- /misc/毛泽东诗词精选【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/毛泽东诗词精选【官方推荐】.scel -------------------------------------------------------------------------------- /misc/物理词汇大全【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/物理词汇大全【官方推荐】.scel -------------------------------------------------------------------------------- /misc/白居易诗集【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/白居易诗集【官方推荐】.scel -------------------------------------------------------------------------------- /misc/离骚-词句.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/离骚-词句.scel -------------------------------------------------------------------------------- /misc/红楼梦【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/红楼梦【官方推荐】.scel -------------------------------------------------------------------------------- /misc/苏东坡诗词大全【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/苏东坡诗词大全【官方推荐】.scel -------------------------------------------------------------------------------- /misc/计算机词汇大全【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/计算机词汇大全【官方推荐】.scel -------------------------------------------------------------------------------- /misc/陆游经典名句【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/陆游经典名句【官方推荐】.scel -------------------------------------------------------------------------------- /misc/韩愈诗句【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/韩愈诗句【官方推荐】.scel -------------------------------------------------------------------------------- /misc/鲁迅经典语【官方推荐】.scel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tyrchen/dotfiles/7903e5d150b603a7119562094983ca70d05283b3/misc/鲁迅经典语【官方推荐】.scel --------------------------------------------------------------------------------