Skip to content

Commit

Permalink
feat(nvim): add g:gitsign_default_base
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Aug 7, 2024
1 parent 0382001 commit 5d8af50
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 2 deletions.
6 changes: 6 additions & 0 deletions project_files/cpp.project.vim
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ let g:gtest#gtest_command = "path/to/test/executable"

" Copilot
" let g:copilot_workspace_folders = ['~/Projects/myproject']

if has('nvim')
let g:gitsign_default_base = 'HEAD~1'
else
let g:gitgutter_diff_base = 'HEAD~1'
endif
1 change: 1 addition & 0 deletions root/.config/nvim/lua/plugins_setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ function M.gitsigns()
-- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")
end,
base = vim.g.gitsign_default_base or "HEAD"
})
end

Expand Down
9 changes: 9 additions & 0 deletions root/.vim/doc/c-cpp-cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ https://github.com/llvm/llvm-project/blame/80e61e38428964c9c9abac5b7a59bb513b5b1

使用项目:milvus

~/.conan/conan.conf 改存储路径,节省硬盘空间
>
[storage]
# This is the default path, but you can write your own. It must be an absolute path or a
# path beginning with "~" (if the environment var CONAN_USER_HOME is specified, this directory, even
# with "~/", will be relative to the conan user home, not to the system user home)
path = /usr3/jiangyinzuo_data/conan_data
<

*bazel*

使用项目:HA3
Expand Down
3 changes: 1 addition & 2 deletions root/.vim/doc/clean-disk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ https://stackoverflow.com/questions/70946140/docker-desktop-wsl-ext4-vhdx-too-la
select vdisk file="D:\wsl2\ext4.vhdx"
compact vdisk
<
docker ~
docker system prune -a
|docker|
36 changes: 36 additions & 0 deletions root/.vim/doc/docker.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
vim:ft=help
*docker*

-------------------------------------------------------------------------------
Docker磁盘空间清理 ~

https://blog.csdn.net/MinggeQingchun/article/details/125006782

无用的镜像和容器太多 ~

docker system df -v 查看单个image镜像、container容器空间占用细节,以确定是哪个镜像、容器或本地卷占用过高空间
docker system prune 命令可以用于清理磁盘,删除关闭的容器、无用的数据卷和网络,以及dangling镜像(即无tag的镜像)
docker system prune -a 命令清理得更加彻底,可以将没有容器使用Docker镜像都删掉

迁移/var/lib/docker目录 ~

https://cloud.tencent.com/developer/article/2020334
>bash
systemctl stop docker
mkdir -p /usr3/docker_data
rsync -avzP /var/lib/docker /usr3/docker_data
<

修改/lib/systemd/system/docker.service文件:

在ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock后添加--data-root=/usr3/docker_data/docker

`--data-root string Root directory of persistent Docker state (default "/var/lib/docker")`

重启docker
>bash
systemctl daemon-reload
systemctl restart docker
<
删除原目录
>bash
rm -rf /var/lib/docker
<

-------------------------------------------------------------------------------
*nvidia-docker*

Expand Down
8 changes: 8 additions & 0 deletions root/.vim/doc/interview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ Golang的文件名随意,但package name必须是main,这样才能运行`go
}
}
<
--------------------------------
Python ~

深拷贝二维数组
>python
a = [[0,0] for _ in range(4)]
<

--------------------------------
DevDocs ~

Expand Down

0 comments on commit 5d8af50

Please sign in to comment.