git email set to work email, uncommented hg aliases, vimrc plugin

main
Petr Nyc 1 year ago
parent cb9e5e3a95
commit b07394fe05
  1. 4
      .gitconfig
  2. 6
      .hgrc
  3. 1
      .vimrc

@ -8,7 +8,7 @@
pager = less -FRX pager = less -FRX
editor = vim editor = vim
[alias] [alias]
glog = log --graph --decorate --all glog = log --graph --decorate
glogs = log --graph --stat glogs = log --graph --stat
ci = commit ci = commit
st = status st = status
@ -27,7 +27,7 @@
[user] [user]
name = Petr Nyc name = Petr Nyc
email = jet.jetpac@gmail.com email = petr.nyc@oracle.com
[merge] [merge]
tool = vimdiff tool = vimdiff

@ -44,7 +44,7 @@ vimdiff.premerge = keep
[alias] [alias]
# glog # glog
# g = !USER=$($HG showconfig ui.username); A=$( $HG log -r qbase..qtip --template '{rev}|' 2>/dev/null ); $HG glog --template "{rev}:{node|short} \033[33m{branch}\033[0m {phase} {author}\n{desc}\n\n" $@ | perl -pe 's/(^[| o@+-]+\d+:[0-9a-f]{12} \S+ (?!public))(\S+)(.*)/\1\033[31m\2\033[0m\3/; s/(\Q'"${USER//@/\\E\\@\\Q}"'\E)/\033[32m\1\033[0m\3/; s/(^[| o@+-]+)('${A:+(${A%|})}':[0-9a-f]{12})/\1\033[34m\2\033[0m/' 2>/dev/null | less -FRX g = !USER=$($HG showconfig ui.username); A=$( $HG log -r qbase..qtip --template '{rev}|' 2>/dev/null ); $HG glog --template "{rev}:{node|short} \033[33m{branch}\033[0m {phase} {author}\n{desc}\n\n" $@ | perl -pe 's/(^[| o@+-]+\d+:[0-9a-f]{12} \S+ (?!public))(\S+)(.*)/\1\033[31m\2\033[0m\3/; s/(\Q'"${USER//@/\\E\\@\\Q}"'\E)/\033[32m\1\033[0m\3/; s/(^[| o@+-]+)('${A:+(${A%|})}':[0-9a-f]{12})/\1\033[34m\2\033[0m/' 2>/dev/null | less -FRX
# glog on branch # glog on branch
gb = !$HG g -b . $@ gb = !$HG g -b . $@
@ -57,8 +57,8 @@ he = !/bin/bash -O extglob -c '$HG --config extensions.histedit= help histedit 2
d = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- -c $($HG parent --template '{rev}');; +([0-9])|$h$h$h) set -- -c "$1";; esac; $HG diff ${@}' blah $@ d = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- -c $($HG parent --template '{rev}');; +([0-9])|$h$h$h) set -- -c "$1";; esac; $HG diff ${@}' blah $@
# clever log (requires also the 'style' alias) # clever log (requires also the 'style' alias)
# l = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- -r $($HG parent --template '{rev}');; +([0-9])|$h$h$h) set -- -r "$1" ;; esac; $HG log -v --style <(hg style) ${@}' blah $@ l = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- -r $($HG parent --template '{rev}');; +([0-9])|$h$h$h) set -- -r "$1" ;; esac; $HG log -v --style <(hg style) ${@}' blah $@
# style = !echo $'changeset = \'changeset: {rev}:{node|short}\\\\n{branches}{tags}{parents}user: {author}\\\\ndate: {date|date}\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n\'\nchangeset_quiet = \'{rev}:{node|short}\\\\n\'\nchangeset_verbose = \'\\\\n\\\\033[33mchangeset: {rev}:{node|short}\\\\033[0m\\\\n{branches}{tags}{parents}user: {author}\\\\ndate: {date|date}\\\\n\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n{file_mods}{file_adds}{file_dels}{file_copies}\\\\n\'\nchangeset_debug = \'changeset: {rev}:{node}\\\\n{branches}{tags}{parents}{manifest}{extras}user: {author}\\\\ndate: {date|date}\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n{file_mods}{file_adds}{file_dels}{file_copies}\\\\n\'\nstart_files = \'files:\\\\n\'\nfile = \' {file}\\\\n\'\nend_files = \'\'\nstart_file_mods = \'\\\\033[34mmodified:\\\\033[0m\\\\n\'\nfile_mod = \' {file_mod}\\\\n\'\nend_file_mods = \'\'\nstart_file_adds = \'\\\\033[32madded:\\\\033[0m\\\\n\'\nfile_add = \' {file_add}\\\\n\'\nend_file_adds = \'\'\nstart_file_dels = \'\\\\033[31mremoved:\\\\033[0m\\\\n\'\nfile_del = \' {file_del}\\\\n\'\nend_file_dels = \'\'\nstart_file_copies = \'copied:\\\\n\'\nfile_copy = \' {name}\\\\n (from {source})\\\\n\'\nend_file_copies = \'\'\nparent = \'parent: {rev}:{node|formatnode}\\\\n\'\nmanifest = \'manifest: {rev}:{node}\\\\n\'\nbranch = \'branch: {branch}\\\\n\'\ntag = \'tag: {tag}\\\\n\'\nextra = \'extra: {key}={value|stringescape}\\\\n\'' style = !echo $'changeset = \'changeset: {rev}:{node|short}\\\\n{branches}{tags}{parents}user: {author}\\\\ndate: {date|date}\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n\'\nchangeset_quiet = \'{rev}:{node|short}\\\\n\'\nchangeset_verbose = \'\\\\n\\\\033[33mchangeset: {rev}:{node|short}\\\\033[0m\\\\n{branches}{tags}{parents}user: {author}\\\\ndate: {date|date}\\\\n\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n{file_mods}{file_adds}{file_dels}{file_copies}\\\\n\'\nchangeset_debug = \'changeset: {rev}:{node}\\\\n{branches}{tags}{parents}{manifest}{extras}user: {author}\\\\ndate: {date|date}\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n{file_mods}{file_adds}{file_dels}{file_copies}\\\\n\'\nstart_files = \'files:\\\\n\'\nfile = \' {file}\\\\n\'\nend_files = \'\'\nstart_file_mods = \'\\\\033[34mmodified:\\\\033[0m\\\\n\'\nfile_mod = \' {file_mod}\\\\n\'\nend_file_mods = \'\'\nstart_file_adds = \'\\\\033[32madded:\\\\033[0m\\\\n\'\nfile_add = \' {file_add}\\\\n\'\nend_file_adds = \'\'\nstart_file_dels = \'\\\\033[31mremoved:\\\\033[0m\\\\n\'\nfile_del = \' {file_del}\\\\n\'\nend_file_dels = \'\'\nstart_file_copies = \'copied:\\\\n\'\nfile_copy = \' {name}\\\\n (from {source})\\\\n\'\nend_file_copies = \'\'\nparent = \'parent: {rev}:{node|formatnode}\\\\n\'\nmanifest = \'manifest: {rev}:{node}\\\\n\'\nbranch = \'branch: {branch}\\\\n\'\ntag = \'tag: {tag}\\\\n\'\nextra = \'extra: {key}={value|stringescape}\\\\n\''
# status with paths relative to current directory # status with paths relative to current directory
s = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- $($HG root) ;; +([0-9])|$h$h$h) set -- --rev "$1^:$1" ;; esac; $HG status ${@}' blah $@ s = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- $($HG root) ;; +([0-9])|$h$h$h) set -- --rev "$1^:$1" ;; esac; $HG status ${@}' blah $@

@ -46,6 +46,7 @@ Plug 'bling/vim-bufferline'
Plug 'tpope/vim-characterize' Plug 'tpope/vim-characterize'
Plug 'tpope/vim-endwise' Plug 'tpope/vim-endwise'
Plug 'doums/darcula' " pycharm scheme reproduction Plug 'doums/darcula' " pycharm scheme reproduction
Plug 'hashivim/vim-terraform'
if s:usecopilot == 1 if s:usecopilot == 1
Plug 'github/copilot.vim', { 'on': 'Copilot' } Plug 'github/copilot.vim', { 'on': 'Copilot' }

Loading…
Cancel
Save