fix alias and copy-mode
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
globals = {
|
||||
"vim",
|
||||
-- Rerun tests only if their modification time changed.
|
||||
cache = true
|
||||
|
||||
ignore = {
|
||||
"122", -- Setting a read-only field of a global variable.
|
||||
"212", -- Unused argument, In the case of callback function, _arg_name is easier to understand than _, so this option is set to off.
|
||||
}
|
||||
|
||||
-- Global objects defined by the C code
|
||||
read_globals = {
|
||||
"vim",
|
||||
"Snacks",
|
||||
}
|
||||
|
||||
files["snippets/*.lua"] = { ignore = { "211", "631" } }
|
||||
|
||||
@@ -10,23 +10,20 @@ return {
|
||||
config = function()
|
||||
local ls = require("luasnip")
|
||||
local snippets_folder = vim.fn.stdpath("config") .. "/snippets"
|
||||
local function load_snippets()
|
||||
-- Load all Lua files in the snippets directory except init.lua
|
||||
local files = vim.fn.glob(snippets_folder .. "/*.lua", false, true)
|
||||
for _, file in ipairs(files) do
|
||||
local filename = vim.fn.fnamemodify(file, ":t")
|
||||
-- Remove .lua extension to get the filetype
|
||||
local ft = filename:match("(.+)%.lua$")
|
||||
if ft then
|
||||
-- Load the file which should return a table of snippets
|
||||
local ok, snippets = pcall(dofile, file)
|
||||
if ok and type(snippets) == "table" then
|
||||
ls.add_snippets(ft, snippets)
|
||||
end
|
||||
-- Load all Lua files in the snippets directory except init.lua
|
||||
local files = vim.fn.glob(snippets_folder .. "/*.lua", false, true)
|
||||
for _, file in ipairs(files) do
|
||||
local filename = vim.fn.fnamemodify(file, ":t")
|
||||
-- Remove .lua extension to get the filetype
|
||||
local ft = filename:match("(.+)%.lua$")
|
||||
if ft then
|
||||
-- Load the file which should return a table of snippets
|
||||
local ok, snippets = pcall(dofile, file)
|
||||
if ok and type(snippets) == "table" then
|
||||
ls.add_snippets(ft, snippets)
|
||||
end
|
||||
end
|
||||
end
|
||||
load_snippets()
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
|
||||
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
|
||||
|
||||
setw -g mode-keys vi
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
|
||||
set -g set-clipboard on
|
||||
set -g focus-events on
|
||||
|
||||
@@ -101,10 +101,10 @@ alias tfp="tf plan -lock=false"
|
||||
alias tfa="tf apply"
|
||||
alias tfu="tf get -update"
|
||||
alias tg="_terra_cmd terragrunt"
|
||||
alias tgi="tg grunt init"
|
||||
alias tgp="tg grunt plan -lock=false"
|
||||
alias tga="tg grunt apply"
|
||||
alias tgu="tg grunt get -update"
|
||||
alias tgi="tg init"
|
||||
alias tgp="tg plan -lock=false"
|
||||
alias tga="tg apply"
|
||||
alias tgu="tg get -update"
|
||||
|
||||
alias curltime="curl -w \"@$HOME/.curl-format.txt\" -o /dev/null -s "
|
||||
|
||||
|
||||
Reference in New Issue
Block a user