From b5a302a22fba6ec8a91120bed4401ddd5dcb0435 Mon Sep 17 00:00:00 2001 From: Laily Date: Sun, 11 Sep 2022 20:50:20 +0800 Subject: [PATCH] feat: add packer snapshot --- .tmux.conf | 6 +++--- .zshrc | 7 +++++++ git/.gitconfig | 2 +- nvim/get_snapshot.sh | 2 ++ nvim/lock.json | 1 + 5 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 nvim/get_snapshot.sh create mode 100644 nvim/lock.json diff --git a/.tmux.conf b/.tmux.conf index 5168e95..01317f4 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,8 +1,8 @@ setw -g mode-keys vi -unbind ^b +#unbind ^b #set -g prefix 'C-a' -set -g prefix ` -bind-key ` send-prefix +#set -g prefix ` +#bind-key ` send-prefix bind r source-file ~/.tmux.conf \; display-message "Config reloaded" # 切分面板 diff --git a/.zshrc b/.zshrc index e0740b9..acdc169 100644 --- a/.zshrc +++ b/.zshrc @@ -106,6 +106,8 @@ unsetopt BEEP # unsetopt LIST_BEEP # brew +export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git" +export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles" export HOMEBREW_NO_AUTO_UPDATE=true # 禁止 brew 每次安装软件都 upate # go @@ -131,3 +133,8 @@ alias alert='terminal-notifier -title "Terminal" -message "Done with task! Exit # git alias gitb="git branch --show-current | tr -d '\n' | pbcopy" +alias ct="go test -gcflags=all=-l -cover ./..." +alias ci="golangci-lint run ./..." +alias gt="go test -gcflags=all=-l " +alias swg="swag init -o docs -g " +alias sws="swagger serve -F=swagger" diff --git a/git/.gitconfig b/git/.gitconfig index 4ab77b5..7d1e6f0 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -15,7 +15,7 @@ br = branch pl = pull pt = push origin --tags - merge2 = "!f() { git checkout $1 && git merge $2 && git checkout -; }; f" + merge2 = !sh -c '_CURRENT_BRANCH=$(git symbolic-ref --short HEAD) && git checkout $1 && git merge $_CURRENT_BRANCH && git checkout $_CURRENT_BRANCH' - bg = "!f() { git branch | grep $1; }; f" delbr = "!f(){ git branch -D $(git branch | grep \"\b$1\"); };f" can = commit --amend --no-edit diff --git a/nvim/get_snapshot.sh b/nvim/get_snapshot.sh new file mode 100644 index 0000000..4608cdb --- /dev/null +++ b/nvim/get_snapshot.sh @@ -0,0 +1,2 @@ +#!/bin/bash +cp -f ~/.cache/nvim/packer.nvim/lock.json . diff --git a/nvim/lock.json b/nvim/lock.json new file mode 100644 index 0000000..35c6c79 --- /dev/null +++ b/nvim/lock.json @@ -0,0 +1 @@ +{"nvim-toggleterm.lua": {"commit": "d2ceb2c"}, "nvim-dap": {"commit": "d6d8317"}, "nvcode-color-schemes.vim": {"commit": "3a0e624"}, "telescope-fzf-native.nvim": {"commit": "8ec164b"}, "codi.vim": {"commit": "d9a9319"}, "packer.nvim": {"commit": "4dedd3b"}, "nvim-lspconfig": {"commit": "86df1c8"}, "playground": {"commit": "13e2d2d"}, "numb.nvim": {"commit": "453c50a"}, "nvim-treesitter": {"commit": "b4ab9da"}, "which-key.nvim": {"commit": "a3c19ec"}, "telescope-file-browser.nvim": {"commit": "ee355b8"}, "aerial.nvim": {"commit": "7c65ec6"}, "nvim-autopairs": {"commit": "3d7b552"}, "friendly-snippets": {"commit": "6e0881a"}, "vim-vsnip": {"commit": "fd13f3f"}, "nvim-colorizer.lua": {"commit": "36c610a"}, "tabular": {"commit": "339091a"}, "vim-test": {"commit": "2240d7a"}, "gitsigns.nvim": {"commit": "4d8a6e0"}, "glow.nvim": {"commit": "0c76518"}, "nvim-ts-autotag": {"commit": "044a05c"}, "telescope.nvim": {"commit": "4449f70"}, "nvim-compe": {"commit": "d186d73"}, "telescope-project.nvim": {"commit": "d317c3c"}, "trouble.nvim": {"commit": "691d490"}, "nvim-ts-context-commentstring": {"commit": "8834375"}, "lsp_signature.nvim": {"commit": "a9bcfa8"}, "one-monokai-vim": {"commit": "4fdfd93"}, "gruvbox.nvim": {"commit": "cf1b07f"}, "hop.nvim": {"commit": "75f73d3"}, "lush.nvim": {"commit": "87e9039"}, "nvim-spectre": {"commit": "345e5dd"}, "nvim-bqf": {"commit": "65f5a42"}, "vim-matchup": {"commit": "1cb069f"}, "popup.nvim": {"commit": "b7404d3"}, "vim-go-coverage": {"commit": "70b4dad"}, "FTerm.nvim": {"commit": "11ec929"}, "lua-dev.nvim": {"commit": "a0ee777"}, "nvim-dap-virtual-text": {"commit": "1c3560e"}, "rnvimr": {"commit": "65705df"}, "nvim-dap-ui": {"commit": "01f5139"}, "nvim-luapad": {"commit": "3f0d745"}, "monokai.nvim": {"commit": "bff619d"}, "lspsaga.nvim": {"commit": "5309d75"}, "vim-markdown": {"commit": "9068655"}, "dashboard-nvim": {"commit": "d82ddae"}, "barbar.nvim": {"commit": "be65945"}, "nvim-tree.lua": {"commit": "fd2332a"}, "bracey.vim": {"commit": "4e1a22a"}, "fzf-lua": {"commit": "9f19741"}, "nvim-lsp-installer": {"commit": "090c8a8"}, "lsp-rooter.nvim": {"commit": "7c83364"}, "nvim-comment": {"commit": "8619217"}, "plenary.nvim": {"commit": "9069d14"}, "telescope-dap.nvim": {"commit": "b4134ff"}, "markdown-preview.nvim": {"commit": "e5bfe9b"}, "nvim-web-devicons": {"commit": "2033e8e"}, "DAPInstall.nvim": {"commit": "bbda2b0"}, "galaxyline.nvim": {"commit": "d544cb9"}}