From 648edd2341cda2f4d1aa016a8869c4cee9fd3d7f Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Fri, 26 May 2023 20:01:35 -0700 Subject: [PATCH] Simplify git configs and undo template --- dot_config/bash/bashrc.d/opts.sh | 4 +-- dot_config/git/config-hellotech.tmpl | 7 ---- dot_config/git/config-personal.tmpl | 6 ---- dot_config/git/config.tmpl | 35 +++++++++++++++---- .../vim/autoload/{plug.vim.tmpl => plug.vim} | 0 dot_config/vim/ftplugin/go.vim.tmpl | 4 +++ .../{mappings.vim.tmpl => mappings.vim} | 0 .../vim/init.d/{xdg.vim.tmpl => xdg.vim} | 0 dot_config/vim/plug.d/vim-fancy.vim | 2 -- 9 files changed, 34 insertions(+), 24 deletions(-) delete mode 100644 dot_config/git/config-hellotech.tmpl delete mode 100644 dot_config/git/config-personal.tmpl rename dot_config/vim/autoload/{plug.vim.tmpl => plug.vim} (100%) rename dot_config/vim/init.d/{mappings.vim.tmpl => mappings.vim} (100%) rename dot_config/vim/init.d/{xdg.vim.tmpl => xdg.vim} (100%) diff --git a/dot_config/bash/bashrc.d/opts.sh b/dot_config/bash/bashrc.d/opts.sh index 4787b67..4111f37 100644 --- a/dot_config/bash/bashrc.d/opts.sh +++ b/dot_config/bash/bashrc.d/opts.sh @@ -1,5 +1,3 @@ -#!/usr/bin/env bash -#ft=bash if [[ ${BASH_VERSION} != "3.2*" ]]; then shopt -s autocd fi @@ -10,3 +8,5 @@ shopt -s histappend # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize + +# vim: ft=bash diff --git a/dot_config/git/config-hellotech.tmpl b/dot_config/git/config-hellotech.tmpl deleted file mode 100644 index 4a07c7c..0000000 --- a/dot_config/git/config-hellotech.tmpl +++ /dev/null @@ -1,7 +0,0 @@ -{{ if and .hellotech (lookPath "git") -}} -[url "git@github.com:HelloTech"] - insteadOf = https://github.com/HelloTech - email = buddy@hellotech.com -[init] - templateDir = ~/.config/git/template -{{- end }} diff --git a/dot_config/git/config-personal.tmpl b/dot_config/git/config-personal.tmpl deleted file mode 100644 index 5e347d2..0000000 --- a/dot_config/git/config-personal.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -{{ if lookPath "git" -}} -[url "ssh://git@git.buddy.wtf:2022"] - insteadOf = https://git.buddy.wtf -[url "ssh://git@git.xbudex.com:2022"] - insteadOf = https://git.xbudex.com -{{- end }} diff --git a/dot_config/git/config.tmpl b/dot_config/git/config.tmpl index d3592bc..a81154f 100644 --- a/dot_config/git/config.tmpl +++ b/dot_config/git/config.tmpl @@ -1,18 +1,21 @@ {{ if lookPath "git" -}} [core] editor = vim - excludesfile = ~/.config/git/ignore + excludesfile = {{ .chezmoi.homeDir }}/.config/git/ignore quotepath = false commitGraph = true + [color] branch = auto diff = auto interactive = auto status = auto ui = auto + [user] name = Buddy Sandidge email = git@buddy.wtf + [alias] br = branch ci = commit @@ -32,8 +35,6 @@ p = !git fetch --all sup = submodule update com = "!bash -c 'if [[ $(git rev-parse --verify main 2>/dev/null) ]] ; then git checkout main ; else git checkout master ; fi'" - cod = checkout develop - pod = push origin develop file = show --pretty="format:" --name-only glog = !git log --pretty=oneline | grep dpull = !git svn fetch && git svn rebase @@ -49,18 +50,38 @@ ll = long-list list-date-stap = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short lds = list-date-stap + [push] default = simple -[include] - path = ~/.config/git/config-git.buddy.wtf - path = ~/.config/git/config-git.xbudex.com - path = ~/.config/git/config-hellotech + [init] defaultBranch = main + [receive] advertisePushOptions = true + [gc] writeCommitGraph = true + [fetch] prune = true + +[url "ssh://git@git.buddy.wtf"] + insteadOf = https://git.buddy.wtf + +[url "ssh://git@git.xbudex.com:2022"] + insteadOf = https://git.xbudex.com + +{{ if .hellotech -}} +[url "git@github.com:HelloTech"] + insteadOf = https://github.com/HelloTech + email = buddy@hellotech.com + +{{ if lookPath "node" -}} +[init] + templateDir = {{ .chezmoi.homeDir }}/.config/git/template +{{- end }} +{{- end }} + +# vim: filetype=gitconfig {{- end }} diff --git a/dot_config/vim/autoload/plug.vim.tmpl b/dot_config/vim/autoload/plug.vim similarity index 100% rename from dot_config/vim/autoload/plug.vim.tmpl rename to dot_config/vim/autoload/plug.vim diff --git a/dot_config/vim/ftplugin/go.vim.tmpl b/dot_config/vim/ftplugin/go.vim.tmpl index 707b13b..d9f04d5 100644 --- a/dot_config/vim/ftplugin/go.vim.tmpl +++ b/dot_config/vim/ftplugin/go.vim.tmpl @@ -1,8 +1,10 @@ {{ if lookPath "go" -}} set noexpandtab +{{ if lookPath "goimports" -}} " use goimports for formatting let g:go_fmt_command = "goimports" +{{- end }} " turn highlighting on let g:go_highlight_functions = 1 @@ -14,4 +16,6 @@ let g:go_highlight_build_constraints = 1 " Open go doc in vertical window, horizontal, or tab nnoremap d :GoDef nnoremap t :GoDefType + +" vim: filetype=vim {{- end }} diff --git a/dot_config/vim/init.d/mappings.vim.tmpl b/dot_config/vim/init.d/mappings.vim similarity index 100% rename from dot_config/vim/init.d/mappings.vim.tmpl rename to dot_config/vim/init.d/mappings.vim diff --git a/dot_config/vim/init.d/xdg.vim.tmpl b/dot_config/vim/init.d/xdg.vim similarity index 100% rename from dot_config/vim/init.d/xdg.vim.tmpl rename to dot_config/vim/init.d/xdg.vim diff --git a/dot_config/vim/plug.d/vim-fancy.vim b/dot_config/vim/plug.d/vim-fancy.vim index 234e5cd..82e5f81 100644 --- a/dot_config/vim/plug.d/vim-fancy.vim +++ b/dot_config/vim/plug.d/vim-fancy.vim @@ -1,5 +1,3 @@ -"Plug 'neoclide/coc.nvim', { 'branch': 'release' } - Plug 'SirVer/ultisnips', { 'tag': '3.2' } let g:UltiSnipsSnippetDirectories = [ 'UltiSnips', 'snips' ]