ソースを参照

google specifics

raylu 5 年 前
コミット
afa9baef3a
7 ファイル変更155 行追加3 行削除
  1. 6 0
      blazerc
  2. 32 1
      hgrc
  3. 5 0
      hirc
  4. 1 0
      screenrc
  5. 15 0
      ssh/config
  6. 72 0
      vimrc
  7. 24 2
      zshrc

+ 6 - 0
blazerc

@@ -0,0 +1,6 @@
+import %workspace%/frameworks/boq/devtools/blazerc
+#import %workspace%/javascript/typescript/blazerc
+
+#build -c opt
+#build --stamp 
+build --trim_test_configuration

+ 32 - 1
hgrc

@@ -1,18 +1,29 @@
 [ui]
-username = raylu <lurayl@gmail.com>
+username = raylu <raylu@google.com>
 editor = vim
 
 [diff]
 git = True
 
+[alias]
+dsf = !HGPLAIN=1 $HG diff --pager=on --config pager.pager=diff-so-fancy
+
 [extensions]
 progress =
 graphlog =
 color =
 journal =
 extdiff =
+unsupported.alices =
+unsupported.colorgraph =
+
+[alices]
+findings.extra_args = --proxy
+summarize.extra_args = --proxy
 
 [color]
+color.purple = 93
+
 status.modified = red bold
 status.added = green bold
 status.removed = red
@@ -30,7 +41,27 @@ diff.deleted = red
 diff.inserted = green
 diff.changed = white
 diff.trailingwhitespace = bold red_background
+graph.edge0=brightblack
+graph.edge1=magenta
+graph.edge2=niceblue
+graph.edge3=red
+graph.edge4=green
+graph.edge5=yellow
+graph.edge6=cyan
 
 [extdiff]
 cmd.kd = kitty
 opts.kd = +kitten diff
+
+[graph]
+color.aggressively-recycle = True
+
+[trainingwheels]
+prevent-push-dirty=false
+
+[templatealias]
+# hide running and complete findings: http://google3/devtools/piper/hgfission/client/config/google-ui-tweaks.rc;l=720;rcl=392089234
+alices_findings = '{separate(" ", alices_findings_actionable, alices_findings_unknown)}'
+
+[google_hgext]
+branches.allow-commit-outside-branch = true

+ 5 - 0
hirc

@@ -0,0 +1,5 @@
+privacy: {
+  export_from_git5: true
+  export_from_local: true
+}
+user_consents_to_publishing_history: true

+ 1 - 0
screenrc

@@ -2,3 +2,4 @@ vbell off
 defutf8 on
 startup_message off
 escape ^Ss
+zombie xy

+ 15 - 0
ssh/config

@@ -4,3 +4,18 @@ ControlMaster auto
 ControlPath ~/.ssh/%r@%h:%p
 ControlPersist 5
 ServerAliveInterval 180
+
+Host foor.raylu.net
+	IdentityFile ~/.ssh/id_ed25519
+Host git.raylu.net
+	IdentityFile ~/.ssh/id_ed25519
+Host xis.raylu.net
+	IdentityFile ~/.ssh/id_ed25519
+Host xis
+	IdentityFile ~/.ssh/id_ed25519
+Host github.com
+	IdentityFile ~/.ssh/id_ed25519
+Host gitlab.com
+	IdentityFile ~/.ssh/id_ed25519
+Host openstudyroom.org
+	IdentityFile ~/.ssh/id_ed25519

+ 72 - 0
vimrc

@@ -1,3 +1,75 @@
+if filereadable("/usr/share/vim/google/google.vim")
+	source /usr/share/vim/google/google.vim
+endif
+
+" Welcome to Vim (http://go/vim).
+
+" Plugin configuration.
+" See http://google3/devtools/editors/vim/examples/ for example configurations
+" and http://go/vim/plugins for more information about vim plugins at Google.
+
+" Plugin loading is commented out below - uncomment the plugins you'd like to
+" load.
+
+" Load google's formatting plugins (http://go/vim/plugins/codefmt-google).
+" The default mapping is \= (or <leader>= if g:mapleader has a custom value),
+" with
+" - \== formatting the current line or selected lines in visual mode
+"   (:FormatLines).
+" - \=b formatting the full buffer (:FormatCode).
+"
+" To bind :FormatLines to the same key in insert and normal mode, add:
+"   noremap <C-K> :FormatLines<CR>
+"   inoremap <C-K> <C-O>:FormatLines<CR>
+"Glug codefmt plugin[mappings] gofmt_executable="goimports"
+"Glug codefmt-google
+
+" Enable autoformatting on save for the languages at Google that enforce
+" formatting, and for which all checked-in code is already conforming (thus,
+" autoformatting will never change unrelated lines in a file).
+" Note formatting changed lines only isn't supported yet
+" (see https://github.com/google/vim-codefmt/issues/9).
+"augroup autoformat_settings
+"  autocmd FileType bzl AutoFormatBuffer buildifier
+"  autocmd FileType go AutoFormatBuffer gofmt
+"  See go/vim/plugins/codefmt-google, :help codefmt-google and :help codefmt
+"  for details about other available formatters.
+"augroup END
+
+" Load YCM (http://go/ycm) for semantic auto-completion and quick syntax
+" error checking. Pulls in a google3-enabled version of YCM itself and
+" a google3-specific default configuration.
+"Glug youcompleteme-google
+
+" Load the automated blaze dependency integration for Go.
+" Note: for Go, blazedeps uses the Go team's glaze tool, which is fully
+" supported by the Go team. The plugin is currently unsupported for other
+" languages.
+"Glug blazedeps auto_filetypes=`['go']`
+
+" Load piper integration (http://go/VimPerforce).
+"Glug piper plugin[mappings]
+
+" Load Critique integration. Use :h critique for more details.
+"Glug critique plugin[mappings]
+
+" Load blaze integration (http://go/blazevim).
+"Glug blaze plugin[mappings]
+
+" Load the syntastic plugin (http://go/vim/plugins/syntastic-google).
+" Note: this requires installing the upstream syntastic plugin from
+" https://github.com/vim-syntastic/syntastic.
+"Glug syntastic-google
+
+" Load the ultisnips plugin (http://go/ultisnips).
+" Note: this requires installing the upstream ultisnips plugin from
+" https://github.com/SirVer/ultisnips.
+"Glug ultisnips-google
+
+" All of your plugins must be added before the following line.
+" See go/vim-plugin-manager if you need help picking a plugin manager and
+" setting it up.
+
 set vb t_vb=
 set backspace=indent,eol,start
 set incsearch

+ 24 - 2
zshrc

@@ -55,8 +55,10 @@ zstyle ':vcs_info:git:*' check-for-changes true
 zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b:%r'
 zstyle ':vcs_info:bzr:*' use-simple true
 zstyle ':vcs_info:*' enable git hg bzr svn cvs
+zstyle ':vcs_info:*' disable-patterns '/google/src/cloud/*|/prodfs/raylu/*'
 precmd () { vcs_info }
 PROMPT="%{$fg_bold[grey]%}%* " # time
+#PROMPT+='$(__hi_prompt_large)'
 PROMPT+="%{${fg_bold[green]}%}%m%{${reset_color}%}:" # host
 PROMPT+="%{${fg_bold[blue]}%}%50<...<%~%<<%{${reset_color}%} " # path
 PROMPT+='${vcs_info_msg_0_} '
@@ -99,6 +101,8 @@ alias vil='vi *(.om[1])'
 alias dt='gnome-terminal --hide-menubar'
 alias sudovi="sudo vi -N -u $HOME/.vimrc"
 alias shrug="echo -n '¯\\(°_o)/¯' | xclip -selection clipboard"
+alias fd='fdfind'
+alias hg='chg'
 function https() {
 	openssl s_client -connect $1:443 -servername $1 < /dev/null | \
 	openssl x509 -noout -text -certopt no_header,no_version,no_serial,no_signame,no_pubkey,no_sigdump
@@ -113,6 +117,14 @@ function cl() {
 function pdf() {
 	atril "$*" &> /dev/null &!
 }
+function revdeps() {
+	stubby call blade:blaze-skygraph-depserver-qa-no-sla \
+		DependencyService.Query \
+		"target: \"$1\"
+		direct: true
+		forward: false"
+
+}
 
 export GOPATH=$HOME/go
 export PYTHONSTARTUP=$HOME/.pystartup.py
@@ -126,8 +138,18 @@ if [ -d $HOME/bin ]; then
 	PATH=$HOME/bin:$PATH
 fi
 
-if [ -x /usr/bin/fzf ]; then
-	source "/usr/share/doc/fzf/examples/key-bindings.zsh"
+if [ -e /usr/share/doc/fzf/examples/key-bindings.zsh ]; then
+	source /usr/share/doc/fzf/examples/key-bindings.zsh
+fi
+
+if [ -e /etc/bash_completion.d/g4d ]; then
+	source /etc/bash_completion.d/g4d
+fi
+if [ -e /etc/bash_completion.d/hgd ]; then
+	source /etc/bash_completion.d/hgd
+fi
+if [ -e /etc/bash.bashrc.d/shell_history_forwarder.sh ]; then
+	source /etc/bash.bashrc.d/shell_history_forwarder.sh
 fi
 
 stty stop undef