This commit is contained in:
newbie 2024-01-16 20:16:19 +08:00
parent e6d0b2d1f6
commit e8e3fa6a3d
13 changed files with 223 additions and 219 deletions

View File

@ -42,4 +42,3 @@ G.map({
{ 'n', '<right>', ':vertical resize +5<CR>', opt },
})

View File

@ -69,6 +69,3 @@ G.au({ "VimEnter" }, {
-- if index
-- }
-- })

View File

@ -7,7 +7,6 @@ return {
"<c-e>"
},
config = function()
require 'nvim-web-devicons'.setup {}
require 'nvim-tree'.setup {

View File

@ -80,4 +80,3 @@ return {
end,
},
}

View File

@ -1,6 +1,7 @@
return {
-- amongst your other plugins
{ 'akinsho/toggleterm.nvim',
{
'akinsho/toggleterm.nvim',
version = "*",
config = function()
require("toggleterm").setup {
@ -16,7 +17,6 @@ return {
persist_size = true,
direction = 'horizontal',
}
end
},

26
snippets/c.json Normal file
View File

@ -0,0 +1,26 @@
{
"for": {
"prefix": "for",
"body": [
" for(int $1 = $2; $1 < $3; $1+=$4) {",
" $5",
" }"
]
},
"for1": {
"prefix": "for1",
"body": [
" for(int $1 = $2; $1 < $3; $1++) {",
" $4",
" }"
]
},
"fori": {
"prefix": "fori",
"body": [
" for(int i = $1; i < $2; i++) {",
" $3",
" }"
]
}
}

13
snippets/json.json Normal file
View File

@ -0,0 +1,13 @@
{
"mod": {
"prefix": "mod",
"body": [
" \"$1\": {",
" \"prefix\": \"$1\",",
" \"body\": [",
" $2",
" ]",
" }"
]
}
}

View File

@ -1,32 +1,3 @@
{
"Class_Array_tree": {
"prefix": "Class_Array_tree",
"body": [
"",
"template <class T>",
"class Array_tree {",
" public:",
" Array_tree() {}",
" Array_tree(int n) { this->n = n, tree = vector<T>(n + 1); }",
" void add(int id, T key) {",
" for (int i = id; i <= n; i += lowbit(i)) tree[i] += key;",
" }",
"",
" T get_sum(int id) {",
" T sum = 0;",
" for (int i = id; i; i -= lowbit(i)) sum += tree[i];",
" return sum;",
" }",
"",
" T get_sum(int l, int r) { return get_sum(r) - get_sum(l - 1); }",
"",
" private:",
" int n;",
" vector<T> tree;",
" int lowbit(int x) { return x & -x; }",
"};",
""
]
}
}
}