├── gitignore ├── README.md ├── inputrc ├── exrc ├── ssh └── allowed_signers ├── .github └── workflows │ └── assign.yaml ├── Makefile ├── config ├── dlv │ └── config.yml └── nvim │ └── init.vim ├── gitconfig ├── bash_aliases ├── vi └── wordlist └── vimrc /gitignore: -------------------------------------------------------------------------------- 1 | /TODO.thockin* 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | My dotfiles 3 | -------------------------------------------------------------------------------- /inputrc: -------------------------------------------------------------------------------- 1 | # mappings for "page up" and "page down" to step to the beginning/end 2 | # of the history 3 | "\e[5~": beginning-of-history 4 | "\e[6~": end-of-history 5 | 6 | -------------------------------------------------------------------------------- /exrc: -------------------------------------------------------------------------------- 1 | :ab teh the 2 | :ab Teh The 3 | :ab liek like 4 | :ab Liek Like 5 | :ab tehn then 6 | :ab Tehn Then 7 | :ab tehm them 8 | :set showmode 9 | :set wm=5 10 | :set autoindent 11 | :set tabstop=8 12 | :set autowrite 13 | :set magic 14 | :set bg=dark 15 | :source $HOME/.vi/wordlist 16 | :set textwidth=79 17 | -------------------------------------------------------------------------------- /ssh/allowed_signers: -------------------------------------------------------------------------------- 1 | thockin@google.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGeFdN9MVtYvYJ1BxcMEJT/hmbWgrQmOyALRVcfSwS5q 2 | thockin@google.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDvJcIospvcuIcyB4x4zh3d1tT4qb3XJQxr3CBHTmHtW 3 | thockin@google.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKn1VdeBE7w0u7UwU5towYvfJhZ8VHFJU7h9znOcel6 4 | thockin@google.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGc1qVnQMy3W4cFmpzA++dY4m4FAmKkEzjYQNO6LVqga 5 | -------------------------------------------------------------------------------- /.github/workflows/assign.yaml: -------------------------------------------------------------------------------- 1 | name: Assign 2 | 3 | on: 4 | issues: 5 | types: [opened, reopened] 6 | pull_request_target: 7 | types: [opened, reopened] 8 | 9 | jobs: 10 | assign: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/github-script@v6 14 | with: 15 | script: | 16 | github.rest.issues.addAssignees({ 17 | issue_number: context.issue.number, 18 | owner: context.repo.owner, 19 | repo: context.repo.repo, 20 | assignees: ['thockin'] 21 | }) 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo "try 'make install'" 3 | 4 | FILES = \ 5 | bash_aliases \ 6 | gitconfig \ 7 | gitignore \ 8 | ssh/allowed_signers \ 9 | inputrc \ 10 | exrc \ 11 | vimrc \ 12 | vi/wordlist \ 13 | config/dlv/config.yml \ 14 | config/nvim/init.vim 15 | 16 | install: 17 | @for f in $(FILES); do \ 18 | if ! diff -N ~/.$$f $$f >/dev/null; then \ 19 | echo "replacing ~/.$$f"; \ 20 | mkdir -p ~/.$$(dirname $$f); \ 21 | cat $$f > ~/.$$f; \ 22 | fi; \ 23 | done 24 | 25 | pull: 26 | @for f in $(FILES); do \ 27 | if ! diff ~/.$$f $$f >/dev/null; then \ 28 | echo "ingesting $$f"; \ 29 | mkdir -p $$(dirname $$f); \ 30 | cat ~/.$$f > $$f; \ 31 | fi; \ 32 | done 33 | 34 | diff: 35 | @for f in $(FILES); do \ 36 | diff -uN ~/.$$f $$f || true; \ 37 | done 38 | 39 | -------------------------------------------------------------------------------- /config/dlv/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration file for the delve debugger. 2 | 3 | # This is the default configuration file. Available options are provided, but disabled. 4 | # Delete the leading hash mark to enable an item. 5 | 6 | # Uncomment the following line and set your preferred ANSI foreground color 7 | # for source line numbers in the (list) command (if unset, default is 34, 8 | # dark blue) See https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit 9 | # Alternatively a string containing an escape sequence can also be used. 10 | # source-list-line-color: 34 11 | 12 | # Uncomment the following lines to change the colors used by syntax highlighting. 13 | source-list-arrow-color: "\x1b[1;36m" 14 | source-list-line-color: "\x1b[1;33m" 15 | source-list-tab-color: "\x1b[2;37m" 16 | source-list-comment-color: "\x1b[0;36m" 17 | source-list-keyword-color: "\x1b[0;34m" 18 | source-list-string-color: "\x1b[0;35m" 19 | source-list-number-color: "\x1b[0;32m" 20 | prompt-color: "\x1b[1;92m" 21 | 22 | tab: "... " 23 | 24 | # Uncomment to change the number of lines printed above and below cursor when 25 | # listing source code. 26 | source-list-line-count: 10 27 | 28 | # Provided aliases will be added to the default aliases for a given command. 29 | aliases: 30 | display: ["disp"] 31 | help: ["?"] 32 | down: ["do"] 33 | 34 | # Define sources path substitution rules. Can be used to rewrite a source path stored 35 | # in program's debug information, if the sources were moved to a different place 36 | # between compilation and debugging. 37 | # Note that substitution rules will not be used for paths passed to "break" and "trace" 38 | # commands. 39 | substitute-path: 40 | # - {from: path, to: path} 41 | 42 | # Maximum number of elements loaded from an array. 43 | max-array-values: 4 44 | 45 | # Maximum loaded string length. 46 | max-string-len: 256 47 | 48 | # Output evaluation. 49 | max-variable-recurse: 2 50 | 51 | # Uncomment the following line to make the whatis command also print the DWARF location expression of its argument. 52 | # show-location-expr: true 53 | 54 | # Allow user to specify output syntax flavor of assembly, one of this list "intel"(default), "gnu", "go". 55 | # disassemble-flavor: intel 56 | 57 | # List of directories to use when searching for separate debug info files. 58 | debug-info-directories: ["/usr/lib/debug/.build-id"] 59 | -------------------------------------------------------------------------------- /gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Tim Hockin 3 | email = thockin@google.com 4 | [include] 5 | path = ~/.gitconfig.local 6 | [alias] 7 | co = checkout 8 | ci = commit 9 | st = status 10 | br = branch 11 | revert = checkout -- 12 | amend = commit --amend 13 | ama = commit --amend -a 14 | curbr = "!f() { \ 15 | if [ ! -f .git/rebase-merge/head-name ]; then \ 16 | git rev-parse --abbrev-ref HEAD; \ 17 | else \ 18 | echo -n \"rb($(basename \"$(cat .git/rebase-merge/head-name)\")\"; \ 19 | if [ -f .git/rebase-merge/stopped-sha ]; then \ 20 | echo -n ',stopped'; \ 21 | fi; \ 22 | if (( $(git diff --name-only --diff-filter=U --relative | wc -l) != 0 )); then \ 23 | echo -n ',conflict'; \ 24 | fi; \ 25 | echo ')'; \ 26 | fi; \ 27 | }; f" 28 | root = rev-parse --show-toplevel 29 | set-upstream = remote set-head upstream 30 | reset-upstream = remote set-head upstream --auto 31 | head = "!f() { \ 32 | if [ -z \"$1\" ]; then \ 33 | echo 'error: no remote specified' >&2; \ 34 | return 1; \ 35 | fi; \ 36 | git symbolic-ref refs/remotes/$1/HEAD; \ 37 | }; f" 38 | mbr = "!f() { \ 39 | if ! git head upstream >/dev/null 2>&1; then \ 40 | git reset-upstream; \ 41 | fi; \ 42 | set -o pipefail; \ 43 | git head upstream | cut -f4 -d/; \ 44 | }; f" 45 | fup = fetch upstream 46 | rb = rebase 47 | rbup = "!f() { \ 48 | echo \"Rebasing onto $(git mbr)\"; \ 49 | git rebase upstream/$(git mbr) \"$@\"; \ 50 | }; f" 51 | po = push origin 52 | pocur = !git po $(git curbr) 53 | pofcur = !git po -f $(git curbr) 54 | wdiff = diff --color-words 55 | safebr = "!f() { git co master || git co main; }; f" 56 | track = "!f() { \ 57 | if [ -z \"$1\" ]; then \ 58 | echo 'error: no remote or branch specified' >&2; \ 59 | return 1; \ 60 | fi; \ 61 | rmt=upstream; \ 62 | br=$1; \ 63 | if [ -n \"$2\" ]; then \ 64 | rmt=$1; \ 65 | br=$2; \ 66 | fi; \ 67 | git fetch $rmt $br && git co -b $br $rmt/$br; \ 68 | }; f" 69 | retrack = "!f() { \ 70 | if [ -z \"$1\" ]; then \ 71 | echo 'error: no remote or branch specified' >&2; \ 72 | return 1; \ 73 | fi; \ 74 | rmt=upstream; \ 75 | br=$1; \ 76 | if [ -n \"$2\" ]; then \ 77 | rmt=$1; \ 78 | br=$2; \ 79 | fi; \ 80 | git safebr; \ 81 | if [ -n \"$(git br -l $br)\" ]; then \ 82 | git br -D $br || return 1; \ 83 | fi; \ 84 | git track $rmt $br; \ 85 | }; f" 86 | copr = "!f() { \ 87 | if [ -z \"$1\" ]; then \ 88 | echo 'error: no remote or PR specified' >&2; \ 89 | return 1; \ 90 | fi; \ 91 | rmt=upstream; \ 92 | pr=$1; \ 93 | if [ -n \"$2\" ]; then \ 94 | rmt=$1; \ 95 | pr=$2; \ 96 | fi; \ 97 | git fetch $rmt pull/$pr/head:pr-$rmt-$pr; \ 98 | git co pr-$rmt-$pr; \ 99 | }; f" 100 | recopr = "!f() { \ 101 | if [ -z \"$1\" ]; then \ 102 | echo 'error: no remote or PR specified' >&2; \ 103 | return 1; \ 104 | fi; \ 105 | rmt=upstream; \ 106 | pr=$1; \ 107 | if [ -n \"$2\" ]; then \ 108 | rmt=$1; \ 109 | pr=$2; \ 110 | fi; \ 111 | git safebr; \ 112 | git br -D pr-$rmt-$pr; \ 113 | git copr $rmt $pr; \ 114 | }; f" 115 | wip = for-each-ref --sort='committerdate:iso8601' --format=' %(color:green)%(committerdate:relative)%09%(color:white)%(refname:short)' refs/heads 116 | my = "!f() { \ 117 | git log --reverse --no-show-signature --format='format:%C(auto)%h %s' upstream/$(git mbr)..HEAD; echo; \ 118 | }; f" 119 | vs = "!f() { \ 120 | up=$1; \ 121 | test -z \"$1\" && up=upstream/$(git mbr); \ 122 | echo $up; \ 123 | git log --reverse --no-show-signature --format='format:%C(auto)%h %s' ${up}..HEAD; echo; \ 124 | }; f" 125 | unstage = restore --staged 126 | kys = "!f() { \ 127 | curbr=$(git curbr); \ 128 | echo \"Nuking $curbr\"; \ 129 | sleep 3; \ 130 | git safebr && git br -D $curbr; \ 131 | }; f" 132 | [core] 133 | editor = "vim +0" 134 | excludesFile = ~/.gitignore 135 | pager = diff-so-fancy | less --tabs=4 -RF 136 | [merge] 137 | conflictstyle = zdiff3 138 | renamelimit = 4096 139 | [push] 140 | default = current 141 | autoSetupRemote = true 142 | [diff] 143 | algorithm = histogram 144 | srcPrefix = "" 145 | dstPrefix = "" 146 | #colorMoved = default 147 | #colorMovedWS = ignore-space-change 148 | [http "https://gopkg.in"] 149 | followRedirects = true 150 | [advice] 151 | detachedHead = false 152 | skippedCherryPicks = false 153 | [rerere] 154 | enabled = false 155 | [gpg] 156 | format = ssh 157 | [gpg "ssh"] 158 | allowedSignersFile = /home/thockin/.ssh/allowed_signers 159 | [commit] 160 | gpgsign = true 161 | [tag] 162 | gpgsign = true 163 | sort = -version:refname 164 | [pull] 165 | rebase = true 166 | [log] 167 | showSignature = true 168 | [filter "lfs"] 169 | clean = git-lfs clean -- %f 170 | smudge = git-lfs smudge -- %f 171 | process = git-lfs filter-process 172 | required = true 173 | [init] 174 | defaultBranch = main 175 | [url "git@github.com:"] 176 | insteadOf = "gh://" 177 | [transfer] 178 | fsckobjects = true 179 | [fetch] 180 | fsckobjects = true 181 | [receive] 182 | fsckObjects = true 183 | [interactive] 184 | diffFilter = diff-so-fancy --patch 185 | [diff-so-fancy] 186 | markEmptyLines = false 187 | changeHunkIndicators = false 188 | stripLeadingSymbols = false 189 | #rulerWidth = 80 190 | useUnicodeRuler = false 191 | [color] 192 | ui = true 193 | [color "diff-highlight"] 194 | oldNormal = red bold 195 | oldHighlight = red bold 52 196 | newNormal = green bold 197 | newHighlight = green bold 22 198 | [color "diff"] 199 | meta = 11 200 | frag = magenta bold 201 | func = 146 bold 202 | commit = yellow bold 203 | old = red bold 204 | new = green bold 205 | whitespace = red reverse 206 | -------------------------------------------------------------------------------- /bash_aliases: -------------------------------------------------------------------------------- 1 | alias more=less 2 | alias vi=vim 3 | alias ls='ls --color=tty' 4 | alias bashrc='source ~/.bashrc' 5 | alias dos2unix='perl -pi -e "tr/\r//d"' 6 | alias unix2dos='perl -pi -e "s/\n$/\r\n/g"' 7 | alias mac2unix='perl -pi -e "tr/\r/\n/d"' 8 | alias findgrep="find . -print0 | xargs -0 grep" 9 | alias enprint='enscript -h -G -E -2 -r --rotate-even-pages -DDuplex:true' 10 | 11 | function count { 12 | I=$1 13 | while [ $I -le $2 ]; 14 | do echo $I 15 | I=$((I+1)) 16 | done 17 | } 18 | 19 | function field { 20 | awk "{print \$${1}}" 21 | } 22 | 23 | ## General environment setup stuff 24 | function _titlebar { 25 | echo -ne "\033]2;"$@"\a" 26 | } 27 | function titlebar { 28 | unset PROMPT_COMMAND 29 | _titlebar "$@" 30 | } 31 | 32 | function audio_alert { 33 | play ~/alert.wav >/dev/null 2>&1 34 | } 35 | 36 | function _color() { 37 | tput setf $1 38 | } 39 | function _term_reset() { 40 | tput sgr0 41 | } 42 | function color() { 43 | _color $1 44 | shift 45 | echo "$@" 46 | _term_reset 47 | } 48 | 49 | function _tput_if_set { 50 | for arg; do 51 | tput "$arg" 52 | done 53 | } 54 | function _default_ps1 { 55 | err="$1" 56 | 57 | local HC=6 # color = yellow 58 | local HF=(bold smul) # formatting 59 | if [ "$err" != 0 ]; then 60 | HC=4 # red 61 | HF=(rev) 62 | fi 63 | 64 | local lvl="" 65 | if (( "$SHLVL" != 1 )); then 66 | lvl="shlvl=$SHLVL " 67 | fi 68 | 69 | PS1="" 70 | # Titlebar 71 | PS1="${PS1}\[\e]0;\u@\h: \w\a\]" 72 | # Formatted user@host 73 | PS1="${PS1}\[$(_tput_if_set "${HF[@]}")$(_color $HC)\]" 74 | PS1="${PS1}${lvl}" 75 | PS1="${PS1}\u@\h" 76 | PS1="${PS1}:\w\$" 77 | PS1="${PS1}\[$(_term_reset)\]" 78 | PS1="${PS1} " 79 | 80 | } 81 | function _git_ps1 { 82 | err="$1" 83 | 84 | # Change color in case of errors 85 | local HC=6 # yellow 86 | local HF=(bold smul) 87 | if [ "$err" != 0 ]; then 88 | HC=4 # red 89 | HF=(rev) 90 | fi 91 | 92 | # Print shell-level if not 0 93 | local L="" 94 | if (( "$SHLVL" != 1 )); then 95 | L="shlvl=$SHLVL " 96 | fi 97 | 98 | # Notes 99 | local notes=() 100 | if [ -n "${PS1_NOTE:-}" ]; then 101 | notes+=("${PS1_NOTE}") 102 | fi 103 | local N="" 104 | if (( "${#notes[@]}" != 0 )); then 105 | N="($(IFS=','; echo "${notes[*]}")) " 106 | fi 107 | 108 | local H=$(hostname | cut -f1 -d.) 109 | local R=$(basename $(git root)) 110 | local S=$(git rev-parse --short=5 HEAD 2>/dev/null || echo "") 111 | local B=$(git curbr 2>/dev/null) 112 | local D=$(realpath . | sed "s|$(git root)/\?|/|") 113 | 114 | PS1="" 115 | PS1="${PS1}\[$(_tput_if_set "${HF[@]}")$(_color $HC)\]" 116 | PS1="${PS1}$L$H" 117 | PS1="${PS1}\[$(_term_reset)\]" 118 | PS1="${PS1} \[$(_tput_if_set "${HF[@]}")$(_color 1)\]$R" 119 | PS1="${PS1} \[$(_tput_if_set "${HF[@]}")$(_color 3)\]$S $B $N" 120 | PS1="${PS1}\[$(_tput_if_set "${HF[@]}")$(_color 6)\]$D" 121 | PS1="${PS1}\[$(_term_reset)\]" 122 | PS1="${PS1}\$ " 123 | _titlebar "git $R$D" 124 | } 125 | function my_ps1() { 126 | local err=$? 127 | #if [ $err != 0 ]; then 128 | # play ~/alert.wav >/dev/null 2>&1 & 129 | #fi 130 | 131 | if [ -n "$DEMOSH" ]; then 132 | unset PROMPT_COMMAND 133 | PS1='\n\$ ' 134 | return 135 | fi 136 | 137 | PROMPT_COMMAND=my_ps1 138 | 139 | if git root >/dev/null 2>&1; then 140 | _git_ps1 "$err" 141 | return 142 | fi 143 | _default_ps1 "$err" 144 | } 145 | alias config_ps1=my_ps1 # for back-compat 146 | config_ps1 # Always run it 147 | 148 | # Run a demo shell 149 | alias demosh="DEMOSH=1 bash" 150 | 151 | # My environment variables. 152 | export CVS_RSH="ssh" 153 | export GITHUB_USER="$USER" 154 | export PRINTER=animatic-color 155 | export ENV=$HOME/.bashrc 156 | export EDITOR=/usr/bin/vim 157 | export VISUAL=/usr/bin/vim 158 | export TERM=xterm 159 | 160 | # Golang stuff 161 | export GOPATH="$HOME/go" 162 | export PATH="$HOME/bin:$GOPATH/bin:/usr/local/go/bin:$PATH" 163 | 164 | ## Google perforce-related stuff 165 | function g4vi { 166 | g4 edit "$@" 167 | vi "$@" 168 | } 169 | alias p4vi=g4vi 170 | 171 | function do_p4_ps1() { 172 | X=$(pwd | awk -F / '{ 173 | printf("%s %s", $6, gensub("^.*google3/?", "//", "g")); 174 | }' \ 175 | | sed 's|java/com/google|j/c/g|' \ 176 | | sed 's|javatest|j|') 177 | echo -n $X 178 | } 179 | function p4ps1() { 180 | PS1="\$( 181 | echo -ne \\[; tput setf 6; echo -ne \\]; 182 | do_p4_ps1; 183 | echo -ne \\$\\[; tput sgr0; echo -ne \\]; 184 | ) " 185 | } 186 | function g3_root() { 187 | r=$(g4 info | grep "^Client root" | cut -f2 -d:) 188 | if [ -z "$r" ]; then 189 | echo "CWD is not inside a g4 client" > /dev/stderr 190 | return 191 | fi 192 | echo $r/google3 193 | } 194 | 195 | # JQ colors: https://jqlang.github.io/jq/manual/v1.7/#colors 196 | # 197 | # This is an array: 198 | # - color for null 199 | # - color for false 200 | # - color for true 201 | # - color for numbers 202 | # - color for strings 203 | # - color for arrays 204 | # - color for objects 205 | # - color for object keys 206 | # 207 | # Each item is an escape, made of 2 parts. 208 | # 209 | # The first: 210 | # - 0 (normal) 211 | # - 1 (bright) 212 | # - 2 (dim) 213 | # - 4 (underscore) 214 | # - 5 (blink) 215 | # - 7 (reverse) 216 | # - 8 (hidden) 217 | # 218 | # The second: 219 | # - 30 (black) 220 | # - 31 (red) 221 | # - 32 (green) 222 | # - 33 (yellow) 223 | # - 34 (blue) 224 | # - 35 (magenta) 225 | # - 36 (cyan) 226 | # - 37 (white) 227 | export JQ_COLORS='1;31:1;33:1;33:1;36:1;32:0;37:0;37:1;34' 228 | 229 | # Google env vars. 230 | export P4CONFIG=.p4config 231 | #export P4DIFF=/google/src/files/head/depot/google3/devtools/scripts/p4diff 232 | #export P4MERGE=/home/build/public/eng/perforce/mergep4.tcl 233 | export P4EDITOR=$EDITOR 234 | #export G4MULTIDIFF=1 235 | #export P4DIFF="vim -f '+so /home/thockin/.vim/p4diff.vim'" 236 | export DOCKER_CLI_EXPERIMENTAL=enabled 237 | 238 | # The next line updates PATH for the Google Cloud SDK. 239 | source ~thockin/google-cloud-sdk/path.bash.inc 240 | 241 | [ -f ~/bin/usb-hotplug.sh ] && ~/bin/usb-hotplug.sh 242 | 243 | # This file is in git, but we need things that are not appropraite to be 244 | # checked in. 245 | test -f $HOME/.bash_aliases.private && source $HOME/.bash_aliases.private 246 | -------------------------------------------------------------------------------- /vi/wordlist: -------------------------------------------------------------------------------- 1 | " vim 2 | " List of words from Microsoft Word 7, with some additions 3 | " Author: Matt Corks 4 | ab accesories accessories 5 | ab accomodate accommodate 6 | ab acheive achieve 7 | ab acheiving achieving 8 | ab acn can 9 | ab acommodate accommodate 10 | ab acomodate accommodate 11 | ab adn and 12 | ab agian again 13 | ab ahppen happen 14 | ab ahve have 15 | ab ahve have 16 | ab allready already 17 | ab almsot almost 18 | ab alot a lot 19 | ab alreayd already 20 | ab alwasy always 21 | ab amke make 22 | ab anbd and 23 | ab andthe and the 24 | ab appeares appears 25 | ab aplyed applied 26 | ab artical article 27 | ab audeince audience 28 | ab audiance audience 29 | ab awya away 30 | ab bakc back 31 | ab balence balance 32 | ab baout about 33 | ab bcak back 34 | ab beacuse because 35 | ab becasue because 36 | ab becomeing becoming 37 | ab becuase because 38 | ab becuse because 39 | ab befoer before 40 | ab begining beginning 41 | ab beleive believe 42 | ab boxs boxes 43 | ab bve be 44 | ab changeing changing 45 | ab charachter character 46 | ab charecter character 47 | ab charector character 48 | ab cheif chief 49 | ab circut circuit 50 | ab claer clear 51 | ab claerly clearly 52 | ab cna can 53 | ab colection collection 54 | ab comany company 55 | ab comapny company 56 | ab comittee committee 57 | ab commitee committee 58 | ab committe committee 59 | ab committy committee 60 | ab compair compare 61 | ab compleated completed 62 | ab completly completely 63 | ab comunicate communicate 64 | ab comunity community 65 | ab conected connected 66 | ab cotten cotton 67 | ab coudl could 68 | ab cpoy copy 69 | ab cxan can 70 | ab danceing dancing 71 | ab definately definitely 72 | ab develope develop 73 | ab developement development 74 | ab differant different 75 | ab differnt different 76 | ab diffrent different 77 | ab disatisfied dissatisfied 78 | ab doese does 79 | ab doign doing 80 | ab doller dollars 81 | ab donig doing 82 | ab driveing driving 83 | ab drnik drink 84 | ab ehr her 85 | ab embarass embarrass 86 | ab equippment equipment 87 | ab esle else 88 | ab excitment excitement 89 | ab eyt yet 90 | ab familar familiar 91 | ab feild field 92 | ab fianlly finally 93 | ab fidn find 94 | ab firts first 95 | ab follwo follow 96 | ab follwoing following 97 | ab foriegn foreign 98 | ab fro for 99 | ab foudn found 100 | ab foward forward 101 | ab freind friend 102 | ab frmo from 103 | ab fwe few 104 | ab gerat great 105 | ab geting getting 106 | ab giveing giving 107 | ab goign going 108 | ab gonig going 109 | ab govenment government 110 | ab gruop group 111 | ab grwo grow 112 | ab haev have 113 | ab happend happened 114 | ab haveing having 115 | ab hda had 116 | ab helpfull helpful 117 | ab herat heart 118 | ab hge he 119 | ab hismelf himself 120 | ab hsa has 121 | ab hsi his 122 | ab hte the 123 | ab htere there 124 | ab htey they 125 | ab hting thing 126 | ab htink think 127 | ab htis this 128 | ab hvae have 129 | ab hvaing having 130 | ab idae idea 131 | ab idaes ideas 132 | ab ihs his 133 | ab immediatly immediately 134 | ab indecate indicate 135 | ab insted intead 136 | ab inthe in the 137 | ab iwll will 138 | ab iwth with 139 | ab jsut just 140 | ab knwo know 141 | ab knwos knows 142 | ab konw know 143 | ab konws knows 144 | ab levle level 145 | ab libary library 146 | ab librarry library 147 | ab librery library 148 | ab librarry library 149 | ab liek like 150 | ab liekd liked 151 | ab liev live 152 | ab likly likely 153 | ab littel little 154 | ab liuke like 155 | ab liveing living 156 | ab loev love 157 | ab lonly lonely 158 | ab makeing making 159 | ab mkae make 160 | ab mkaes makes 161 | ab mkaing making 162 | ab moeny money 163 | ab mroe more 164 | ab mysefl myself 165 | ab myu my 166 | ab neccessary necessary 167 | ab necesary necessary 168 | ab nkow know 169 | ab nwe new 170 | ab nwo now 171 | ab ocasion occasion 172 | ab occassion occasion 173 | ab occurence occurrence 174 | ab occurrance occurrence 175 | ab ocur occur 176 | ab oging going 177 | ab ohter other 178 | ab omre more 179 | ab onyl only 180 | ab optoin option 181 | ab optoins options 182 | ab opperation operation 183 | ab orginized organized 184 | ab otehr other 185 | ab otu out 186 | ab owrk work 187 | ab peopel people 188 | ab perhasp perhaps 189 | ab perhpas perhaps 190 | ab pleasent pleasant 191 | ab poeple people 192 | ab porblem problem 193 | ab probelm problem 194 | ab protoge protege 195 | ab puting putting 196 | ab pwoer power 197 | ab quater quarter 198 | ab questoin question 199 | ab reccomend recommend 200 | ab reccommend recommend 201 | ab receieve receive 202 | ab recieve receive 203 | ab recieved received 204 | ab recipie recipe 205 | ab recipies recipes 206 | ab recomend recommend 207 | ab reconize recognize 208 | ab recrod record 209 | ab religous religious 210 | ab rwite write 211 | ab rythm rhythm 212 | ab seh she 213 | ab selectoin selection 214 | ab sentance sentence 215 | ab seperate separate 216 | ab shineing shining 217 | ab shiped shipped 218 | ab shoudl should 219 | ab similiar similar 220 | ab smae same 221 | ab smoe some 222 | ab soem some 223 | ab sohw show 224 | ab soudn sound 225 | ab soudns sounds 226 | ab statment statement 227 | ab stnad stand 228 | ab stopry story 229 | ab stoyr story 230 | ab stpo stop 231 | ab strentgh strength 232 | ab struggel struggle 233 | ab sucess success 234 | ab swiming swimming 235 | ab tahn than 236 | ab taht that 237 | ab talekd talked 238 | ab tath that 239 | ab teh the 240 | ab tehir their 241 | ab tehn then 242 | ab tehre there 243 | ab tehse these 244 | ab tehy they 245 | ab tghe the 246 | ab thansk thanks 247 | ab themselfs themselves 248 | ab theri their 249 | ab thgat that 250 | ab thge the 251 | ab thier their 252 | ab thme them 253 | ab thna than 254 | ab thne then 255 | ab thnig thing 256 | ab thnigs things 257 | ab thsi this 258 | ab thsoe those 259 | ab thta that 260 | ab tihs this 261 | ab timne time 262 | ab tje the 263 | ab tjhe the 264 | ab tkae take 265 | ab tkaes takes 266 | ab tkaing taking 267 | ab tlaking talking 268 | ab todya today 269 | ab tongiht tonight 270 | ab tonihgt tonight 271 | ab towrad toward 272 | ab truely truly 273 | ab tyhat that 274 | ab tyhe the 275 | ab useing using 276 | ab veyr very 277 | ab vrey very 278 | ab waht what 279 | ab watn want 280 | ab wehn when 281 | ab whcih which 282 | ab whic which 283 | ab whihc which 284 | ab whta what 285 | ab wief wife 286 | ab wierd weird 287 | ab wihch which 288 | ab wiht with 289 | ab windoes windows 290 | ab withe with 291 | ab wiull will 292 | ab wnat want 293 | ab wnated wanted 294 | ab wnats wants 295 | ab woh who 296 | ab wohle whole 297 | ab wokr work 298 | ab woudl would 299 | ab wriet write 300 | ab wrod word 301 | ab wroking working 302 | ab wtih with 303 | ab wya way 304 | ab yera year 305 | ab yeras years 306 | ab ytou you 307 | ab yuo you 308 | ab yuor your 309 | " Days of weeks 310 | ab monday Monday 311 | ab tuesday Tuesday 312 | ab wednesday Wednesday 313 | ab thursday Thursday 314 | ab friday Friday 315 | ab saturday Saturday 316 | ab sunday Sunday 317 | " Other 318 | ab xmas christmas 319 | ab Xmas Christmas 320 | -------------------------------------------------------------------------------- /vimrc: -------------------------------------------------------------------------------- 1 | set nocompatible " Enables Vim specific features 2 | filetype off " Reset filetype detection 3 | 4 | set rtp+=~/.vim/bundle/Vundle.vim 5 | call vundle#begin() 6 | 7 | " This is the Vundle package, which can be found on GitHub. 8 | " For GitHub repos, you specify plugins using the 9 | " 'user/repository' format 10 | Plugin 'VundleVim/Vundle.vim' 11 | 12 | Plugin 'fatih/vim-go' 13 | let g:go_fmt_command = "goimports" 14 | let g:go_highlight_functions = 1 15 | let g:go_highlight_methods = 1 16 | let g:go_highlight_types = 1 17 | let g:go_highlight_extra_types = 1 18 | let g:go_highlight_fields = 1 19 | let g:go_highlight_structs = 1 20 | let g:go_highlight_interfaces = 1 21 | let g:go_highlight_operators = 1 22 | let g:go_highlight_build_constraints = 1 23 | let g:go_highlight_generate_tags = 1 24 | let g:go_auto_sameids = 0 " FIXME: breaks visual selections 25 | let g:go_fold_enable = ['block', 'import', 'varconst', 'package_comment'] 26 | let g:go_gopls_enabled = 1 27 | nnoremap gp :GoDefPop 28 | "let g:go_gopls_options = ["-rpc.trace", "-logfile=/tmp/gopls.log", "-debug=localhost:8099"] 29 | "let g:go_debug=['lsp', 'shell-commands'] 30 | 31 | Plugin 'Valloric/YouCompleteMe' 32 | let g:ycm_gopls_binary_path = 'gopls' " use $PATH 33 | 34 | Plugin 'github/copilot.vim' 35 | 36 | call vundle#end() 37 | 38 | filetype plugin indent on " Re-enable filetype detection 39 | 40 | set bg=dark " I like dark backgrounds 41 | set ttyfast " Indicate fast terminal conn for faster redraw 42 | set laststatus=1 " Show status line iff 2+ windows 43 | set modeline " Allow file-embedded modelines 44 | set hlsearch " Highlight search terms 45 | set showcmd " Show last command 46 | set completeopt=menuone " Show insertion menu for completions 47 | set list " Show listchars 48 | set listchars=tab:>-,trail:_ " Render tabs and trailing spaces 49 | set tabstop=4 " Tab width 50 | set shiftwidth=4 " How much to shoft text 51 | set ai " Auto-indent 52 | syn on " Syntax highlighting 53 | set textwidth=78 " Default text width 54 | set formatoptions+=t " Textwidth formatting 55 | set backspace=indent,eol,start " Makes backspace key more powerful 56 | set autowrite " Automatically save before :next, :make etc. 57 | set cursorline " Highlight the current line 58 | set formatoptions+=j " Elide comment-leader when joining comment lines 59 | set maxmempattern=10000 " Let plugins use more memory for things like syntax 60 | set foldmethod=indent " FIXME: "syntax" is better but suuuuuuper slow 61 | set nofoldenable 62 | set foldlevel=50 63 | set timeoutlen=1000 ttimeoutlen=0 " kill some flicker 64 | set signcolumn=number " show errors in the line-num column 65 | 66 | " Center search results 67 | nnoremap n nzz 68 | nnoremap N Nzz 69 | 70 | " diff colors 71 | hi diffAdded ctermfg=green 72 | hi diffRemoved ctermfg=red 73 | 74 | " Popup menu colors 75 | highlight Pmenu ctermfg=15 ctermbg=0 guifg=#ffffff guibg=#000000 76 | highlight PmenuSel ctermfg=15 ctermbg=4 guifg=#ffffff guibg=#000000 77 | 78 | " Go error messages 79 | highlight SpellBad term=standout cterm=bold ctermfg=7 ctermbg=1 guifg=White guibg=Red 80 | 81 | " Keyboard shortcuts 82 | nnoremap % :let @/='\<=expand("")\>':set hls 83 | " Jump to next window 84 | nnoremap ww :wincmd w 85 | " Jump to next/prev file 86 | nnoremap :bnext 87 | nnoremap :bprevious 88 | " Go to begin/end 89 | nnoremap gb [{ 90 | nnoremap ge ]} 91 | nnoremap gt :GoDefType 92 | " gd is already mapped to :GoDef 93 | 94 | if has("autocmd") 95 | " When editing a file, always jump to the last cursor position 96 | au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif 97 | endif 98 | 99 | " markdown 100 | au BufRead,BufNewFile *.md set filetype=markdown 101 | 102 | " go 103 | au FileType go setl tabstop=4 104 | au FileType go setl shiftwidth=4 105 | au FileType go setl formatoptions-=t " No textwidth formatting 106 | au FileType go setl number 107 | au FileType go setl nolist 108 | 109 | " yaml 110 | au FileType yaml setl indentkeys-=<:> 111 | au FileType yaml setl tabstop=2 112 | au FileType yaml setl shiftwidth=2 113 | au FileType yaml setl expandtab 114 | au FileType yaml setl number 115 | 116 | " sh 117 | au FileType sh setl expandtab 118 | au FileType sh setl tabstop=4 119 | au FileType sh setl shiftwidth=4 120 | au FileType sh setl list 121 | 122 | """-au FileType python setlocal errorformat=%+P[%f],%t:\ %#%l:%m 123 | """-au FileType python setlocal makeprg=/home/build/static/projects/gpylint/gpylint.par\ % 124 | """- 125 | """-" make tw=0 when lines in the file are already longer than 80. 126 | """-" see :help fo-table 127 | """-au BufEnter * setlocal formatoptions+=l 128 | """- 129 | """-augroup cprog 130 | """- " Remove all cprog autocommands 131 | """- au! 132 | """- 133 | """- " When starting to edit a file: 134 | """- " For *.c and *.h files set formatting of comments and set C-indenting on. 135 | """- " For other files switch it off. 136 | """- " Don't change the order, it's important that the line with * comes first. 137 | """- 138 | """- " i dont like cindent autoindent is fine with me. 139 | """- " autocmd BufRead * set formatoptions=tcql nocindent comments& 140 | """- " autocmd BufRead *.c,*.h set formatoptions=croql nocindent ai comments=sr:/*,mb:*,el:*/,:// 141 | """- "autocmd BufRead *.c,*.h,*.C,*.cc set formatoptions=croql cindent cinoptions={4 shiftwidth=4 comments=sr:/*,mb:*,el:*/,:// 142 | """- "autocmd BufRead *.c,*.h,*.C,*.cc syn region myFold start="{" end="}" transparent fold 143 | """-" autocmd BufRead *.c,*.h,*.C,*.cc syn region myFold start="/\*" skip="/\*" end="\*/" transparent fold 144 | """- "autocmd BufRead *.c,*.h,*.C,*.cc syn region myComment start=.^/\*. skip=./\*. end=.\*/. fold 145 | """- "autocmd BufRead *.c,*.h,*.C,*.cc hi def link myComment Comment 146 | """- 147 | """- "autocmd BufRead *.c,*.h,*.C,*.cc syn sync fromstart 148 | """- "autocmd BufRead *.c,*.h,*.C,*.cc set foldmethod=syntax 149 | """-augroup END 150 | """- 151 | 152 | function! Marks() 153 | marks 154 | echo('Mark: ') 155 | 156 | " getchar() - prompts user for a single character and returns the chars 157 | " ascii representation 158 | " nr2char() - converts ASCII `NUMBER TO CHAR' 159 | 160 | let s:mark = nr2char(getchar()) 161 | " remove the `press any key prompt' 162 | redraw 163 | 164 | " build a string which uses the `normal' command plus the var holding the 165 | " mark - then eval it. 166 | execute "normal! '" . s:mark 167 | endfunction 168 | 169 | nnoremap ' :call Marks() 170 | 171 | source ~/.exrc 172 | 173 | """-:set textwidth=78 174 | """-:set expandtab 175 | """-:set fileformats=unix,dos 176 | """-:set viminfo='50,<200,/100 177 | """-:set history=50 178 | 179 | -------------------------------------------------------------------------------- /config/nvim/init.vim: -------------------------------------------------------------------------------- 1 | set mouse= " Disable nvim mouse handling 2 | set nocompatible " Enables Vim specific features 3 | filetype off " Reset filetype detection 4 | 5 | " This is the Vundle package, which can be found on GitHub. 6 | " For GitHub repos, you specify plugins using the 7 | " 'user/repository' format. 8 | " New installs need to 9 | " mkdir -p ~/.vim/bundle 10 | " git clone https://github.com/VundleVim/Vundle.vim ~/.vim/bundle/Vundle.vim 11 | " Then run :PluginInstall 12 | set rtp+=~/.vim/bundle/Vundle.vim 13 | call vundle#begin() 14 | 15 | Plugin 'VundleVim/Vundle.vim' 16 | 17 | " New installs need to run :GoInstallBinaries or :GoUpdateBinaries 18 | Plugin 'fatih/vim-go' 19 | let g:go_fmt_command = "goimports_gofmt" " my custom wrapper 20 | let g:go_highlight_functions = 1 21 | let g:go_highlight_methods = 1 22 | let g:go_highlight_types = 1 23 | let g:go_highlight_extra_types = 1 24 | let g:go_highlight_fields = 1 25 | let g:go_highlight_structs = 1 26 | let g:go_highlight_interfaces = 1 27 | let g:go_highlight_operators = 1 28 | let g:go_highlight_build_constraints = 1 29 | let g:go_highlight_generate_tags = 1 30 | let g:go_auto_sameids = 0 " FIXME: breaks visual selections 31 | let g:go_fold_enable = ['block', 'import', 'varconst', 'package_comment'] 32 | let g:go_gopls_enabled = 1 33 | nnoremap gp :GoDefPop 34 | "let g:go_gopls_options = ["-rpc.trace", "-logfile=/tmp/gopls.log", "-debug=localhost:8099"] 35 | "let g:go_debug=['lsp', 'shell-commands'] 36 | 37 | " New installs need to run: 38 | " ./install.py --clangd-completer --go-completer 39 | Plugin 'Valloric/YouCompleteMe' 40 | let g:ycm_gopls_binary_path = 'gopls' " use $PATH 41 | 42 | " New installs need to do (in vim): :Copilot setup 43 | Plugin 'github/copilot.vim' 44 | let g:copilot_workspace_folders = ['~/src/kubernetes', '~/src/git-sync-v4'] 45 | 46 | call vundle#end() 47 | 48 | filetype plugin indent on " Re-enable filetype detection 49 | 50 | set bg=dark " I like dark backgrounds 51 | "hi MatchParen cterm=bold,italic ctermbg=none 52 | set guicursor=n-v-c-i:block 53 | set ttyfast " Indicate fast terminal conn for faster redraw 54 | set laststatus=1 " Show status line iff 2+ windows 55 | set modeline " Allow file-embedded modelines 56 | set hlsearch " Highlight search terms 57 | set showcmd " Show last command 58 | set completeopt=menuone " Show insertion menu for completions 59 | set list " Show listchars 60 | set listchars=tab:»-\ ,extends:›,precedes:‹,nbsp:·,trail:· 61 | set tabstop=4 " Tab width 62 | set shiftwidth=4 " How much to shoft text 63 | set ai " Auto-indent 64 | syn on " Syntax highlighting 65 | set textwidth=78 " Default text width 66 | set formatoptions+=t " Textwidth formatting 67 | set backspace=indent,eol,start " Makes backspace key more powerful 68 | set autowrite " Automatically save before :next, :make etc. 69 | set cursorline " Highlight the current line 70 | set formatoptions+=j " Elide comment-leader when joining comment lines 71 | set maxmempattern=10000 " Let plugins use more memory for things like syntax 72 | set foldmethod=indent " FIXME: "syntax" is better but suuuuuuper slow 73 | set nofoldenable 74 | set foldlevel=50 75 | set timeoutlen=1000 ttimeoutlen=0 " kill some flicker 76 | set signcolumn=number " Show errors in the line-num column 77 | set guicursor=a:blinkon100 " Blink the cursor 78 | 79 | " Center search results 80 | nnoremap n nzz 81 | nnoremap N Nzz 82 | 83 | " colors 84 | colorscheme pablo 85 | highlight CurSearch guifg=yellow guibg=NONE gui=bold 86 | 87 | " syntax colors 88 | highlight Comment guifg=#a0c0ff guibg=NONE gui=NONE cterm=NONE 89 | highlight LineNr guifg=#afafaf guibg=NONE gui=NONE cterm=NONE 90 | highlight Type guifg=#60ff60 guibg=NONE gui=NONE cterm=NONE 91 | highlight Special guifg=#ff8888 guibg=NONE gui=NONE cterm=NONE 92 | highlight YcmWarningSection guifg=#ff8844 guibg=NONE gui=NONE cterm=NONE 93 | 94 | " diff colors 95 | highlight diffFile guifg=#ffff00 guibg=NONE gui=bold cterm=NONE 96 | highlight diffIndexLine guifg=#ffff00 guibg=NONE gui=NONE cterm=NONE 97 | highlight diffNewFile guifg=#00ff00 guibg=NONE gui=NONE cterm=NONE 98 | highlight diffOldFile guifg=#ff3300 guibg=NONE gui=NONE cterm=NONE 99 | highlight diffLine guifg=#00ffff guibg=NONE gui=NONE cterm=NONE 100 | highlight diffSubname guifg=#999999 guibg=NONE gui=NONE cterm=NONE 101 | highlight diffAdded guifg=#00ff00 guibg=NONE gui=NONE cterm=NONE 102 | highlight diffRemoved guifg=#ff3300 guibg=NONE gui=NONE cterm=NONE 103 | 104 | " listchars colors 105 | highlight Whitespace guifg=#888888 guibg=NONE gui=NONE cterm=NONE 106 | 107 | " Popup menu colors 108 | highlight Pmenu ctermfg=15 ctermbg=0 guifg=#ffffff guibg=#000000 109 | highlight PmenuSel ctermfg=15 ctermbg=4 guifg=#ffffff guibg=#000000 110 | 111 | " Go error messages 112 | highlight SpellBad term=standout cterm=bold ctermfg=7 ctermbg=1 guifg=White guibg=Red 113 | 114 | 115 | " Keyboard shortcuts 116 | nnoremap % :let @/='\<=expand("")\>':set hls 117 | " Jump to next window 118 | nnoremap ww :wincmd w 119 | " Jump to next/prev file 120 | nnoremap :bnext 121 | nnoremap :bprevious 122 | " Go to begin/end 123 | nnoremap gb [{ 124 | nnoremap ge ]} 125 | nnoremap gt :GoDefType 126 | " gd is already mapped to :GoDef 127 | 128 | if has("autocmd") 129 | " When editing a file, always jump to the last cursor position 130 | au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif 131 | endif 132 | 133 | " markdown 134 | au BufRead,BufNewFile *.md set filetype=markdown 135 | 136 | " go 137 | au FileType go setl tabstop=4 138 | au FileType go setl shiftwidth=4 139 | au FileType go setl formatoptions-=t " No textwidth formatting 140 | au FileType go setl number 141 | au FileType go setl nolist 142 | 143 | " yaml 144 | au FileType yaml setl indentkeys-=<:> 145 | au FileType yaml setl tabstop=2 146 | au FileType yaml setl shiftwidth=2 147 | au FileType yaml setl expandtab 148 | au FileType yaml setl number 149 | 150 | " sh 151 | au FileType sh setl expandtab 152 | au FileType sh setl tabstop=4 153 | au FileType sh setl shiftwidth=4 154 | au FileType sh setl list 155 | 156 | """-au FileType python setlocal errorformat=%+P[%f],%t:\ %#%l:%m 157 | """-au FileType python setlocal makeprg=/home/build/static/projects/gpylint/gpylint.par\ % 158 | """- 159 | """-" make tw=0 when lines in the file are already longer than 80. 160 | """-" see :help fo-table 161 | """-au BufEnter * setlocal formatoptions+=l 162 | """- 163 | """-augroup cprog 164 | """- " Remove all cprog autocommands 165 | """- au! 166 | """- 167 | """- " When starting to edit a file: 168 | """- " For *.c and *.h files set formatting of comments and set C-indenting on. 169 | """- " For other files switch it off. 170 | """- " Don't change the order, it's important that the line with * comes first. 171 | """- 172 | """- " i dont like cindent autoindent is fine with me. 173 | """- " autocmd BufRead * set formatoptions=tcql nocindent comments& 174 | """- " autocmd BufRead *.c,*.h set formatoptions=croql nocindent ai comments=sr:/*,mb:*,el:*/,:// 175 | """- "autocmd BufRead *.c,*.h,*.C,*.cc set formatoptions=croql cindent cinoptions={4 shiftwidth=4 comments=sr:/*,mb:*,el:*/,:// 176 | """- "autocmd BufRead *.c,*.h,*.C,*.cc syn region myFold start="{" end="}" transparent fold 177 | """-" autocmd BufRead *.c,*.h,*.C,*.cc syn region myFold start="/\*" skip="/\*" end="\*/" transparent fold 178 | """- "autocmd BufRead *.c,*.h,*.C,*.cc syn region myComment start=.^/\*. skip=./\*. end=.\*/. fold 179 | """- "autocmd BufRead *.c,*.h,*.C,*.cc hi def link myComment Comment 180 | """- 181 | """- "autocmd BufRead *.c,*.h,*.C,*.cc syn sync fromstart 182 | """- "autocmd BufRead *.c,*.h,*.C,*.cc set foldmethod=syntax 183 | """-augroup END 184 | """- 185 | 186 | function! Marks() 187 | marks 188 | echo('Mark: ') 189 | 190 | " getchar() - prompts user for a single character and returns the chars 191 | " ascii representation 192 | " nr2char() - converts ASCII `NUMBER TO CHAR' 193 | 194 | let s:mark = nr2char(getchar()) 195 | " remove the `press any key prompt' 196 | redraw 197 | 198 | " build a string which uses the `normal' command plus the var holding the 199 | " mark - then eval it. 200 | execute "normal! '" . s:mark 201 | endfunction 202 | 203 | nnoremap ' :call Marks() 204 | 205 | source ~/.exrc 206 | 207 | """-:set textwidth=78 208 | """-:set expandtab 209 | """-:set fileformats=unix,dos 210 | """-:set viminfo='50,<200,/100 211 | """-:set history=50 212 | 213 | --------------------------------------------------------------------------------