copilot / 코딩 / suggest / candidate / 예상 / text expander
espanso, text 확장기, 내설정
- path:
%appdata%\espanso\match\base.yml
# espanso match file
# For a complete introduction, visit the official docs at: https://espanso.org/docs/
# You can use this file to define the base matches (aka snippets)
# that will be available in every application when using espanso.
# Matches are substitution rules: when you type the "trigger" string
# it gets replaced by the "replace" string.
matches:
# NOTE: espanso uses YAML to define matches, so pay attention to the indentation!
# But matches can also be dynamic:
# Print the current date
- trigger: ":now"
replace: "{{mydate}}"
vars:
- name: mydate
type: date
params:
format: "%Y-%m-%d %H:%M"
# Print the output of a shell command
- trigger: ":shell"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "echo 'Hello from your shell'"
# Print the output of a shell command
- trigger: ":s2"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "dir"
- trigger: ":ip"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "curl https://api.ipify.org"
shell: cmd
- trigger: ":dq"
replace: "\\x22"
- trigger: ":dbdump"
replace: "mysqldump.exe -h localhost -u userid -P 7307 -p --single-transaction mydb table1 table2 table3 > mydb-1212.sql"
- trigger: ":db_realdb_snapshot"
replace: "-- created_at은 UTC\n\x22d:\\a\\appss\\MariaDB 10.5\\bin\\mysqldump.exe\x22 -h localhost -u foodpang -P 7317 -p --single-transaction foodpang snapshot_product --where=\x22created_at >= '2023-02-20' AND created_at < '2023-02-21'\x22 --no-create-info > snapshot-20230220.sql"
- trigger: ":db_testdb_insert"
replace: "chcp 65001\n\x22d:\\a\\appss\\MariaDB 10.5\\bin\\mysql.exe\x22 -u foodpang -P 7307 -p foodpang < snapshot-20230220.sql"
- trigger: ":db_delete_all"
replace: "DELETE FROM product_purchase where id > 0;\nALTER TABLE product_purchase AUTO_INCREMENT=1;"
- trigger: ":dbinsert"
replace: "chcp 65001 && \"d:\\a\\appss\\MariaDB 10.5\\bin\\mysql.exe\" -u root -P 3306 -p foodpang_analysis < d:\\a\\prog\\foodpang\\purchase\\rds-mydb.sql"
- trigger: ":dbtimezone"
replace: "SET @original_time_zone = @@session.time_zone;SET time_zone = 'Asia/Seoul';"
- trigger: ":cutf"
replace: "chcp 65001"
- trigger: ":git-flow-feature"
replace: "git flow feature"
- trigger: ":git-undo-commit-to-stage"
replace: "git reset --soft HEAD~1"
- trigger: ":git-checkout"
replace: "git checkout"
- trigger: ":git-commit"
form: |
'git commit -m "[[message]]"'
- trigger: ":git-branch-name-copy"
replace: |
for /f "delims=" %a in ('git --no-pager branch ^| d:\a\apps\fzf\fzf.exe +m') do @set branch=%a && echo !branch:~2,-1! | clip
- trigger: ":git-checkout-branch"
replace: |
for /f "delims=" %a in ('git --no-pager branch ^| d:\a\apps\fzf\fzf.exe +m') do @set branch=%a && git checkout !branch:~2,-1!
- trigger: ":git-delete-branch"
replace: |
echo need cmd /v && for /f "delims=" %a in ('git --no-pager branch ^| d:\a\apps\fzf\fzf.exe +m') do @set branch=%a && git branch !branch:~2,-1! -d
- trigger: ":git-cbranch2"
replace: |
"d:\a\appss\TortoiseGit\bin\TortoiseGitProc.exe" /command:switch
# markdown
- trigger: ":img"
replace: "![]('{{clipboard}}')"
vars:
- name: "clipboard"
type: "clipboard"
# markdown
- trigger: ":ref"
replace: "## References\n"
# And much more! For more information, visit the docs: https://espanso.org/docs/
댓글 없음:
댓글 쓰기