Compare commits

...

27 Commits

Author SHA1 Message Date
61046b519b released v1.46.0 2025-02-13 16:12:20 +08:00
8af3950731 doc: update README.md. 2025-02-13 08:10:35 +00:00
3f329c15ec doc: update CONTRIBUTING.md. 2025-02-13 08:10:35 +00:00
485d80489b doc: Update README.md 2025-02-13 16:09:38 +08:00
0eb3ac6165 doc: Update README.md 2025-02-12 11:08:53 +08:00
869f3de520 doc: Update README.md 2025-01-28 00:40:58 +08:00
da9780f4a7 doc: update docs/yazi.md 2025-01-24 21:48:08 +08:00
8807e483fc doc: update README.md. 2025-01-24 13:07:10 +00:00
d5d79d72c6 doc: update CONTRIBUTING.md. 2025-01-24 13:07:09 +00:00
db215dcb2d feat: add docs/yazi.md (#919)
* add yazi

* update yazi.md

* update yazi.md
2025-01-24 21:05:49 +08:00
7f4fd32453 doc: update README.md. 2025-01-23 04:27:27 +00:00
81d60eacaf doc: update CONTRIBUTING.md. 2025-01-23 04:27:27 +00:00
453a8b9a05 doc: Update README.md #102 2025-01-23 12:26:28 +08:00
b00b74f695 doc: Update README.md 2025-01-12 16:57:52 +08:00
21b8c17818 doc: update README.md. 2025-01-10 06:54:16 +00:00
a54ceebf02 doc: update CONTRIBUTING.md. 2025-01-10 06:54:15 +00:00
2771b42a96 doc: Update emoji.md (#915)
now!
2025-01-10 14:53:16 +08:00
579d1de673 doc: Update README.md 2025-01-06 23:11:20 +08:00
daaa4c5f09 doc: Update README.md 2025-01-05 22:55:21 +08:00
b414893b15 doc: update README.md. 2025-01-04 07:20:54 +00:00
072ddcca73 doc: update CONTRIBUTING.md. 2025-01-04 07:20:53 +00:00
5e773f0696 doc: update README.md 2025-01-04 15:19:42 +08:00
3bcb61d409 doc: update java.md (#914)
* method intern can get a ref of the same string in the string pool

* doc: update java.md
2025-01-02 11:11:06 +08:00
ad9aaf759e doc: update README.md. 2025-01-01 13:36:17 +00:00
211809a177 doc: update CONTRIBUTING.md. 2025-01-01 13:36:16 +00:00
e7b8958368 doc: update c.md document (#913) 2025-01-01 21:33:24 +08:00
d7df8bc6fe doc: update c.md document (#913)
* modify c tutor

* Modify c.md
2025-01-01 17:30:51 +08:00
7 changed files with 728 additions and 208 deletions

View File

@ -337,7 +337,7 @@ jobs:
<a href="https://github.com/LesterChang0987" title="Steve Hartwell"><img src="https://avatars.githubusercontent.com/u/114913921?v=4" width="42;" alt="Steve Hartwell"/></a>
<a href="https://github.com/h7ml" title="h7ml"><img src="https://avatars.githubusercontent.com/u/55233292?v=4" width="42;" alt="h7ml"/></a>
<a href="https://github.com/nangongchengfeng" title="南宫乘风"><img src="https://avatars.githubusercontent.com/u/46562911?v=4" width="42;" alt="南宫乘风"/></a>
<a href="https://github.com/aixcyi" title="砹小翼"><img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="砹小翼"/></a>
<a href="https://github.com/aixcyi" title="阿羽"><img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="阿羽"/></a>
<a href="https://github.com/alex-reinfoce" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></a>
<a href="https://github.com/LufsX" title="LufsX"><img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/></a>
<a href="https://github.com/mailbaoer" title="baoer"><img src="https://avatars.githubusercontent.com/u/5282978?v=4" width="42;" alt="baoer"/></a>
@ -354,6 +354,7 @@ jobs:
<a href="https://github.com/chaos-cn" title="chaos"><img src="https://avatars.githubusercontent.com/u/71205599?v=4" width="42;" alt="chaos"/></a>
<a href="https://github.com/xia0ne" title="YuRuiH"><img src="https://avatars.githubusercontent.com/u/32591223?v=4" width="42;" alt="YuRuiH"/></a>
<a href="https://github.com/Willxup" title="Willxup"><img src="https://avatars.githubusercontent.com/u/51990395?v=4" width="42;" alt="Willxup"/></a>
<a href="https://github.com/long-910" title="Small Long"><img src="https://avatars.githubusercontent.com/u/7323488?v=4" width="42;" alt="Small Long"/></a>
<a href="https://github.com/LiuYuan-SHU" title="Yuan Liu"><img src="https://avatars.githubusercontent.com/u/96400967?v=4" width="42;" alt="Yuan Liu"/></a>
<a href="https://github.com/AmosHuKe" title="Amos"><img src="https://avatars.githubusercontent.com/u/32262985?v=4" width="42;" alt="Amos"/></a>
<a href="https://github.com/1834423612" title="kjch"><img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/></a>
@ -373,13 +374,13 @@ jobs:
<a href="https://github.com/jasnzhuang" title="Jason Zhuang"><img src="https://avatars.githubusercontent.com/u/16612921?v=4" width="42;" alt="Jason Zhuang"/></a>
<a href="https://github.com/Jovins" title="Jovins"><img src="https://avatars.githubusercontent.com/u/17738992?v=4" width="42;" alt="Jovins"/></a>
<a href="https://github.com/Kisa-Dong" title="Kisa-Dong"><img src="https://avatars.githubusercontent.com/u/84782008?v=4" width="42;" alt="Kisa-Dong"/></a>
<a href="https://github.com/long-910" title="Small Long"><img src="https://avatars.githubusercontent.com/u/7323488?v=4" width="42;" alt="Small Long"/></a>
<a href="https://github.com/SuperDiscovery" title="SuperDiscovery"><img src="https://avatars.githubusercontent.com/u/49646863?v=4" width="42;" alt="SuperDiscovery"/></a>
<a href="https://github.com/XYZscratcher" title="XYZ"><img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"/></a>
<a href="https://github.com/izven" title="Zhang"><img src="https://avatars.githubusercontent.com/u/2149051?v=4" width="42;" alt="Zhang"/></a>
<a href="https://github.com/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/3909023?v=4" width="42;" alt="findnr"/></a>
<a href="https://github.com/greyhao" title="greyhao"><img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"/></a>
<a href="https://github.com/infanx" title="infanx"><img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/></a>
<a href="https://github.com/greyhao" title="greyhao"><img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"/></a>
<a href="https://github.com/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/3909023?v=4" width="42;" alt="findnr"/></a>
<a href="https://github.com/izven" title="Zhang"><img src="https://avatars.githubusercontent.com/u/2149051?v=4" width="42;" alt="Zhang"/></a>
<a href="https://github.com/XYZscratcher" title="XYZ"><img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"/></a>
<a href="https://github.com/ThanatosXingYu" title="Thanatos"><img src="https://avatars.githubusercontent.com/u/53430376?v=4" width="42;" alt="Thanatos"/></a>
<a href="https://github.com/SuperDiscovery" title="SuperDiscovery"><img src="https://avatars.githubusercontent.com/u/49646863?v=4" width="42;" alt="SuperDiscovery"/></a>
<a href="https://github.com/hua03" title="hua03"><img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/></a>
<a href="https://github.com/yanxuplay" title="hupilan"><img src="https://avatars.githubusercontent.com/u/69749541?v=4" width="42;" alt="hupilan"/></a>
<a href="https://github.com/hweining" title="hweining"><img src="https://avatars.githubusercontent.com/u/8973985?v=4" width="42;" alt="hweining"/></a>
@ -393,7 +394,7 @@ jobs:
<a href="https://github.com/kubeme" title="kubernetes for me"><img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"/></a>
<a href="https://github.com/larry-xue" title="yujian(larry) xue"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="yujian(larry) xue"/></a>
<a href="https://github.com/leauny" title="leauny"><img src="https://avatars.githubusercontent.com/u/42369176?v=4" width="42;" alt="leauny"/></a>
<a href="https://github.com/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></a>
<a href="https://github.com/gzttcydxx" title="gzttcydxx"><img src="https://avatars.githubusercontent.com/u/50025185?v=4" width="42;" alt="gzttcydxx"/></a>
<a href="https://github.com/sunny0826" title="Xudong Guo"><img src="https://avatars.githubusercontent.com/u/24563928?v=4" width="42;" alt="Xudong Guo"/></a>
<a href="https://github.com/nodjoy" title="gowshwah"><img src="https://avatars.githubusercontent.com/u/145280043?v=4" width="42;" alt="gowshwah"/></a>
@ -401,17 +402,18 @@ jobs:
<a href="https://github.com/gi-b716" title="Gavin"><img src="https://avatars.githubusercontent.com/u/78394473?v=4" width="42;" alt="Gavin"/></a>
<a href="https://github.com/fjqz177" title="fjqz177"><img src="https://avatars.githubusercontent.com/u/83070583?v=4" width="42;" alt="fjqz177"/></a>
<a href="https://github.com/fakevn" title="fakevn"><img src="https://avatars.githubusercontent.com/u/11464386?v=4" width="42;" alt="fakevn"/></a>
<a href="https://github.com/emoji-share" title="emoji-share🤪"><img src="https://avatars.githubusercontent.com/u/192275245?v=4" width="42;" alt="emoji-share🤪"/></a>
<a href="https://github.com/cool9203" title="cool9203"><img src="https://avatars.githubusercontent.com/u/29609607?v=4" width="42;" alt="cool9203"/></a>
<a href="https://github.com/gaoxiaoduan" title="Coder Duan"><img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="Coder Duan"/></a>
<a href="https://github.com/lijc210" title="cizai"><img src="https://avatars.githubusercontent.com/u/10651081?v=4" width="42;" alt="cizai"/></a>
<a href="https://github.com/chyok" title="chyok"><img src="https://avatars.githubusercontent.com/u/32629225?v=4" width="42;" alt="chyok"/></a>
<a href="https://github.com/zlfyuan" title="bgbgPang"><img src="https://avatars.githubusercontent.com/u/19658018?v=4" width="42;" alt="bgbgPang"/></a>
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm"><img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"/></a>
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"/></a>
<a href="https://github.com/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></a>
<a href="https://github.com/binscor" title="Zheng Nai Bin"><img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"/></a>
<a href="https://github.com/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/></a>
<a href="https://github.com/lisheng741" title="芦荟柚子茶"><img src="https://avatars.githubusercontent.com/u/53617305?v=4" width="42;" alt="芦荟柚子茶"/></a>
<a href="https://github.com/rainbowatcher" title="看彩虹的人"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="看彩虹的人"/></a>
<a href="https://github.com/rainbowatcher" title="rainbowatcher"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="rainbowatcher"/></a>
<a href="https://github.com/HChenX" title="焕晨HChen"><img src="https://avatars.githubusercontent.com/u/123531821?v=4" width="42;" alt="焕晨HChen"/></a>
<a href="https://github.com/LebranceBW" title="落叶乌龟"><img src="https://avatars.githubusercontent.com/u/19501514?v=4" width="42;" alt="落叶乌龟"/></a>
<a href="https://github.com/LongYinStudio" title="敬培全"><img src="https://avatars.githubusercontent.com/u/42208852?v=4" width="42;" alt="敬培全"/></a>
@ -429,13 +431,13 @@ jobs:
<a href="https://github.com/swift-fs" title="swift-fs"><img src="https://avatars.githubusercontent.com/u/77133741?v=4" width="42;" alt="swift-fs"/></a>
<a href="https://github.com/suyangzuo" title="suyangzuo"><img src="https://avatars.githubusercontent.com/u/50766353?v=4" width="42;" alt="suyangzuo"/></a>
<a href="https://github.com/Mowmowj" title="nexo"><img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="nexo"/></a>
<a href="https://github.com/ri-fumo" title="ri-fumo"><img src="https://avatars.githubusercontent.com/u/190000479?v=4" width="42;" alt="ri-fumo"/></a>
<a href="https://github.com/phygerr" title="phygerr"><img src="https://avatars.githubusercontent.com/u/42068889?v=4" width="42;" alt="phygerr"/></a>
<a href="https://github.com/openapphub" title="openapphub"><img src="https://avatars.githubusercontent.com/u/175949671?v=4" width="42;" alt="openapphub"/></a>
<a href="https://github.com/onewesong" title="onewesong"><img src="https://avatars.githubusercontent.com/u/17920822?v=4" width="42;" alt="onewesong"/></a>
<a href="https://github.com/miclon-dev" title="miclon-dev"><img src="https://avatars.githubusercontent.com/u/111753685?v=4" width="42;" alt="miclon-dev"/></a>
<a href="https://github.com/lykjjj" title="lykjjj"><img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"/></a>
<a href="https://github.com/lozhu20" title="lozhu"><img src="https://avatars.githubusercontent.com/u/44923922?v=4" width="42;" alt="lozhu"/></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></a>
<a href="https://github.com/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"/></a>
<a href="https://github.com/lvelvee" title="Lve Lvee"><img src="https://avatars.githubusercontent.com/u/25785753?v=4" width="42;" alt="Lve Lvee"/></a>
<a href="https://github.com/likeadmin-likeshop" title="likeadmin通过管理后台-likeshop全开源商城"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="likeadmin通过管理后台-likeshop全开源商城"/></a>
@ -452,6 +454,7 @@ jobs:
<a href="https://github.com/demigodliu" title="DemigodLiu"><img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/></a>
<a href="https://github.com/dasferco" title="Dasferco"><img src="https://avatars.githubusercontent.com/u/92622404?v=4" width="42;" alt="Dasferco"/></a>
<a href="https://github.com/Damao2250" title="Damao"><img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/></a>
<a href="https://github.com/daining810" title="dain"><img src="https://avatars.githubusercontent.com/u/125986872?v=4" width="42;" alt="dain"/></a>
<a href="https://github.com/DEEMO101" title="DEEMO101"><img src="https://avatars.githubusercontent.com/u/35123091?v=4" width="42;" alt="DEEMO101"/></a>
<a href="https://github.com/ohto-ai" title="Choo"><img src="https://avatars.githubusercontent.com/u/46275725?v=4" width="42;" alt="Choo"/></a>
<a href="https://github.com/CharlotteZeng" title="hanchZ"><img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/></a>
@ -475,7 +478,6 @@ jobs:
<a href="https://github.com/BATTLEHAWK00" title="While True: learn()"><img src="https://avatars.githubusercontent.com/u/45313304?v=4" width="42;" alt="While True: learn()"/></a>
<a href="https://github.com/dwgeneral" title="Happy-Engineer"><img src="https://avatars.githubusercontent.com/u/8654993?v=4" width="42;" alt="Happy-Engineer"/></a>
<a href="https://github.com/whb1998a" title="Wafer"><img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="Wafer"/></a>
<a href="https://github.com/ThanatosXingYu" title="Thanatos"><img src="https://avatars.githubusercontent.com/u/53430376?v=4" width="42;" alt="Thanatos"/></a>
<a href="https://github.com/YLee9527" title="Terry Young"><img src="https://avatars.githubusercontent.com/u/18697332?v=4" width="42;" alt="Terry Young"/></a>
<a href="https://github.com/TRDSCSH" title="TRDSCSH"><img src="https://avatars.githubusercontent.com/u/125717891?v=4" width="42;" alt="TRDSCSH"/></a>
<a href="https://github.com/Xiwin" title="Xiwin"><img src="https://avatars.githubusercontent.com/u/107191230?v=4" width="42;" alt="Xiwin"/></a>
@ -492,7 +494,8 @@ jobs:
<a href="https://github.com/mo3et" title="Monet Lee"><img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"/></a>
<a href="https://github.com/Moeyuuko" title="Moeyuuko"><img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/></a>
<a href="https://github.com/malcolmyu" title="Minghao Yu"><img src="https://avatars.githubusercontent.com/u/3203962?v=4" width="42;" alt="Minghao Yu"/></a>
<a href="https://github.com/Mieriki" title="Mieriki"><img src="https://avatars.githubusercontent.com/u/142009318?v=4" width="42;" alt="Mieriki"/></a><!--GAMFC-END-->
<a href="https://github.com/Mieriki" title="Mieriki"><img src="https://avatars.githubusercontent.com/u/142009318?v=4" width="42;" alt="Mieriki"/></a>
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"/></a><!--GAMFC-END-->
上图贡献者列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 自动生成贡献者图片。

View File

@ -181,6 +181,7 @@ Quick Reference
[Tmux](./docs/tmux.md)<!--rehype:style=background: rgb(99 99 99);-->
[Taskset](./docs/taskset.md)<!--rehype:style=background: rgb(99 99 99);-->
[tar](./docs/tar.md)<!--rehype:style=background: rgb(215 89 62);&class=tag&data-lang=解压缩-->
[Yazi](./docs/yazi.md)<!--rehype:style=background: rgb(255 165 0);&class=tag&data-lang=文件管理器;&class=contributing-->
[Zip](./docs/zip.md)<!--rehype:style=background: rgb(99 99 99);&class=tag&data-lang=解压缩-->
[FTP](./docs/ftp.md)<!--rehype:style=background: rgb(99 99 99);-->
<!--rehype:class=home-card-->
@ -300,7 +301,7 @@ Quick Reference
<a href="https://github.com/LesterChang0987" title="Steve Hartwell"><img src="https://avatars.githubusercontent.com/u/114913921?v=4" width="42;" alt="Steve Hartwell"/></a>
<a href="https://github.com/h7ml" title="h7ml"><img src="https://avatars.githubusercontent.com/u/55233292?v=4" width="42;" alt="h7ml"/></a>
<a href="https://github.com/nangongchengfeng" title="南宫乘风"><img src="https://avatars.githubusercontent.com/u/46562911?v=4" width="42;" alt="南宫乘风"/></a>
<a href="https://github.com/aixcyi" title="砹小翼"><img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="砹小翼"/></a>
<a href="https://github.com/aixcyi" title="阿羽"><img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="阿羽"/></a>
<a href="https://github.com/alex-reinfoce" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></a>
<a href="https://github.com/LufsX" title="LufsX"><img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/></a>
<a href="https://github.com/mailbaoer" title="baoer"><img src="https://avatars.githubusercontent.com/u/5282978?v=4" width="42;" alt="baoer"/></a>
@ -317,6 +318,7 @@ Quick Reference
<a href="https://github.com/chaos-cn" title="chaos"><img src="https://avatars.githubusercontent.com/u/71205599?v=4" width="42;" alt="chaos"/></a>
<a href="https://github.com/xia0ne" title="YuRuiH"><img src="https://avatars.githubusercontent.com/u/32591223?v=4" width="42;" alt="YuRuiH"/></a>
<a href="https://github.com/Willxup" title="Willxup"><img src="https://avatars.githubusercontent.com/u/51990395?v=4" width="42;" alt="Willxup"/></a>
<a href="https://github.com/long-910" title="Small Long"><img src="https://avatars.githubusercontent.com/u/7323488?v=4" width="42;" alt="Small Long"/></a>
<a href="https://github.com/LiuYuan-SHU" title="Yuan Liu"><img src="https://avatars.githubusercontent.com/u/96400967?v=4" width="42;" alt="Yuan Liu"/></a>
<a href="https://github.com/AmosHuKe" title="Amos"><img src="https://avatars.githubusercontent.com/u/32262985?v=4" width="42;" alt="Amos"/></a>
<a href="https://github.com/1834423612" title="kjch"><img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/></a>
@ -336,13 +338,13 @@ Quick Reference
<a href="https://github.com/jasnzhuang" title="Jason Zhuang"><img src="https://avatars.githubusercontent.com/u/16612921?v=4" width="42;" alt="Jason Zhuang"/></a>
<a href="https://github.com/Jovins" title="Jovins"><img src="https://avatars.githubusercontent.com/u/17738992?v=4" width="42;" alt="Jovins"/></a>
<a href="https://github.com/Kisa-Dong" title="Kisa-Dong"><img src="https://avatars.githubusercontent.com/u/84782008?v=4" width="42;" alt="Kisa-Dong"/></a>
<a href="https://github.com/long-910" title="Small Long"><img src="https://avatars.githubusercontent.com/u/7323488?v=4" width="42;" alt="Small Long"/></a>
<a href="https://github.com/SuperDiscovery" title="SuperDiscovery"><img src="https://avatars.githubusercontent.com/u/49646863?v=4" width="42;" alt="SuperDiscovery"/></a>
<a href="https://github.com/XYZscratcher" title="XYZ"><img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"/></a>
<a href="https://github.com/izven" title="Zhang"><img src="https://avatars.githubusercontent.com/u/2149051?v=4" width="42;" alt="Zhang"/></a>
<a href="https://github.com/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/3909023?v=4" width="42;" alt="findnr"/></a>
<a href="https://github.com/greyhao" title="greyhao"><img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"/></a>
<a href="https://github.com/infanx" title="infanx"><img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/></a>
<a href="https://github.com/greyhao" title="greyhao"><img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"/></a>
<a href="https://github.com/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/3909023?v=4" width="42;" alt="findnr"/></a>
<a href="https://github.com/izven" title="Zhang"><img src="https://avatars.githubusercontent.com/u/2149051?v=4" width="42;" alt="Zhang"/></a>
<a href="https://github.com/XYZscratcher" title="XYZ"><img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"/></a>
<a href="https://github.com/ThanatosXingYu" title="Thanatos"><img src="https://avatars.githubusercontent.com/u/53430376?v=4" width="42;" alt="Thanatos"/></a>
<a href="https://github.com/SuperDiscovery" title="SuperDiscovery"><img src="https://avatars.githubusercontent.com/u/49646863?v=4" width="42;" alt="SuperDiscovery"/></a>
<a href="https://github.com/hua03" title="hua03"><img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/></a>
<a href="https://github.com/yanxuplay" title="hupilan"><img src="https://avatars.githubusercontent.com/u/69749541?v=4" width="42;" alt="hupilan"/></a>
<a href="https://github.com/hweining" title="hweining"><img src="https://avatars.githubusercontent.com/u/8973985?v=4" width="42;" alt="hweining"/></a>
@ -356,7 +358,7 @@ Quick Reference
<a href="https://github.com/kubeme" title="kubernetes for me"><img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"/></a>
<a href="https://github.com/larry-xue" title="yujian(larry) xue"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="yujian(larry) xue"/></a>
<a href="https://github.com/leauny" title="leauny"><img src="https://avatars.githubusercontent.com/u/42369176?v=4" width="42;" alt="leauny"/></a>
<a href="https://github.com/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></a>
<a href="https://github.com/gzttcydxx" title="gzttcydxx"><img src="https://avatars.githubusercontent.com/u/50025185?v=4" width="42;" alt="gzttcydxx"/></a>
<a href="https://github.com/sunny0826" title="Xudong Guo"><img src="https://avatars.githubusercontent.com/u/24563928?v=4" width="42;" alt="Xudong Guo"/></a>
<a href="https://github.com/nodjoy" title="gowshwah"><img src="https://avatars.githubusercontent.com/u/145280043?v=4" width="42;" alt="gowshwah"/></a>
@ -364,17 +366,18 @@ Quick Reference
<a href="https://github.com/gi-b716" title="Gavin"><img src="https://avatars.githubusercontent.com/u/78394473?v=4" width="42;" alt="Gavin"/></a>
<a href="https://github.com/fjqz177" title="fjqz177"><img src="https://avatars.githubusercontent.com/u/83070583?v=4" width="42;" alt="fjqz177"/></a>
<a href="https://github.com/fakevn" title="fakevn"><img src="https://avatars.githubusercontent.com/u/11464386?v=4" width="42;" alt="fakevn"/></a>
<a href="https://github.com/emoji-share" title="emoji-share🤪"><img src="https://avatars.githubusercontent.com/u/192275245?v=4" width="42;" alt="emoji-share🤪"/></a>
<a href="https://github.com/cool9203" title="cool9203"><img src="https://avatars.githubusercontent.com/u/29609607?v=4" width="42;" alt="cool9203"/></a>
<a href="https://github.com/gaoxiaoduan" title="Coder Duan"><img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="Coder Duan"/></a>
<a href="https://github.com/lijc210" title="cizai"><img src="https://avatars.githubusercontent.com/u/10651081?v=4" width="42;" alt="cizai"/></a>
<a href="https://github.com/chyok" title="chyok"><img src="https://avatars.githubusercontent.com/u/32629225?v=4" width="42;" alt="chyok"/></a>
<a href="https://github.com/zlfyuan" title="bgbgPang"><img src="https://avatars.githubusercontent.com/u/19658018?v=4" width="42;" alt="bgbgPang"/></a>
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm"><img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"/></a>
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"/></a>
<a href="https://github.com/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></a>
<a href="https://github.com/binscor" title="Zheng Nai Bin"><img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"/></a>
<a href="https://github.com/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/></a>
<a href="https://github.com/lisheng741" title="芦荟柚子茶"><img src="https://avatars.githubusercontent.com/u/53617305?v=4" width="42;" alt="芦荟柚子茶"/></a>
<a href="https://github.com/rainbowatcher" title="看彩虹的人"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="看彩虹的人"/></a>
<a href="https://github.com/rainbowatcher" title="rainbowatcher"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="rainbowatcher"/></a>
<a href="https://github.com/HChenX" title="焕晨HChen"><img src="https://avatars.githubusercontent.com/u/123531821?v=4" width="42;" alt="焕晨HChen"/></a>
<a href="https://github.com/LebranceBW" title="落叶乌龟"><img src="https://avatars.githubusercontent.com/u/19501514?v=4" width="42;" alt="落叶乌龟"/></a>
<a href="https://github.com/LongYinStudio" title="敬培全"><img src="https://avatars.githubusercontent.com/u/42208852?v=4" width="42;" alt="敬培全"/></a>
@ -392,13 +395,13 @@ Quick Reference
<a href="https://github.com/swift-fs" title="swift-fs"><img src="https://avatars.githubusercontent.com/u/77133741?v=4" width="42;" alt="swift-fs"/></a>
<a href="https://github.com/suyangzuo" title="suyangzuo"><img src="https://avatars.githubusercontent.com/u/50766353?v=4" width="42;" alt="suyangzuo"/></a>
<a href="https://github.com/Mowmowj" title="nexo"><img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="nexo"/></a>
<a href="https://github.com/ri-fumo" title="ri-fumo"><img src="https://avatars.githubusercontent.com/u/190000479?v=4" width="42;" alt="ri-fumo"/></a>
<a href="https://github.com/phygerr" title="phygerr"><img src="https://avatars.githubusercontent.com/u/42068889?v=4" width="42;" alt="phygerr"/></a>
<a href="https://github.com/openapphub" title="openapphub"><img src="https://avatars.githubusercontent.com/u/175949671?v=4" width="42;" alt="openapphub"/></a>
<a href="https://github.com/onewesong" title="onewesong"><img src="https://avatars.githubusercontent.com/u/17920822?v=4" width="42;" alt="onewesong"/></a>
<a href="https://github.com/miclon-dev" title="miclon-dev"><img src="https://avatars.githubusercontent.com/u/111753685?v=4" width="42;" alt="miclon-dev"/></a>
<a href="https://github.com/lykjjj" title="lykjjj"><img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"/></a>
<a href="https://github.com/lozhu20" title="lozhu"><img src="https://avatars.githubusercontent.com/u/44923922?v=4" width="42;" alt="lozhu"/></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></a>
<a href="https://github.com/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"/></a>
<a href="https://github.com/lvelvee" title="Lve Lvee"><img src="https://avatars.githubusercontent.com/u/25785753?v=4" width="42;" alt="Lve Lvee"/></a>
<a href="https://github.com/likeadmin-likeshop" title="likeadmin通过管理后台-likeshop全开源商城"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="likeadmin通过管理后台-likeshop全开源商城"/></a>
@ -415,6 +418,7 @@ Quick Reference
<a href="https://github.com/demigodliu" title="DemigodLiu"><img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/></a>
<a href="https://github.com/dasferco" title="Dasferco"><img src="https://avatars.githubusercontent.com/u/92622404?v=4" width="42;" alt="Dasferco"/></a>
<a href="https://github.com/Damao2250" title="Damao"><img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/></a>
<a href="https://github.com/daining810" title="dain"><img src="https://avatars.githubusercontent.com/u/125986872?v=4" width="42;" alt="dain"/></a>
<a href="https://github.com/DEEMO101" title="DEEMO101"><img src="https://avatars.githubusercontent.com/u/35123091?v=4" width="42;" alt="DEEMO101"/></a>
<a href="https://github.com/ohto-ai" title="Choo"><img src="https://avatars.githubusercontent.com/u/46275725?v=4" width="42;" alt="Choo"/></a>
<a href="https://github.com/CharlotteZeng" title="hanchZ"><img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/></a>
@ -438,7 +442,6 @@ Quick Reference
<a href="https://github.com/BATTLEHAWK00" title="While True: learn()"><img src="https://avatars.githubusercontent.com/u/45313304?v=4" width="42;" alt="While True: learn()"/></a>
<a href="https://github.com/dwgeneral" title="Happy-Engineer"><img src="https://avatars.githubusercontent.com/u/8654993?v=4" width="42;" alt="Happy-Engineer"/></a>
<a href="https://github.com/whb1998a" title="Wafer"><img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="Wafer"/></a>
<a href="https://github.com/ThanatosXingYu" title="Thanatos"><img src="https://avatars.githubusercontent.com/u/53430376?v=4" width="42;" alt="Thanatos"/></a>
<a href="https://github.com/YLee9527" title="Terry Young"><img src="https://avatars.githubusercontent.com/u/18697332?v=4" width="42;" alt="Terry Young"/></a>
<a href="https://github.com/TRDSCSH" title="TRDSCSH"><img src="https://avatars.githubusercontent.com/u/125717891?v=4" width="42;" alt="TRDSCSH"/></a>
<a href="https://github.com/Xiwin" title="Xiwin"><img src="https://avatars.githubusercontent.com/u/107191230?v=4" width="42;" alt="Xiwin"/></a>
@ -455,7 +458,8 @@ Quick Reference
<a href="https://github.com/mo3et" title="Monet Lee"><img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"/></a>
<a href="https://github.com/Moeyuuko" title="Moeyuuko"><img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/></a>
<a href="https://github.com/malcolmyu" title="Minghao Yu"><img src="https://avatars.githubusercontent.com/u/3203962?v=4" width="42;" alt="Minghao Yu"/></a>
<a href="https://github.com/Mieriki" title="Mieriki"><img src="https://avatars.githubusercontent.com/u/142009318?v=4" width="42;" alt="Mieriki"/></a><!--GAMFC-END-->
<a href="https://github.com/Mieriki" title="Mieriki"><img src="https://avatars.githubusercontent.com/u/142009318?v=4" width="42;" alt="Mieriki"/></a>
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"/></a><!--GAMFC-END-->
[贡献者](https://github.com/jaywcjlove/reference/graphs/contributors)列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 根据提交次数的先后顺序自动生成
<!--rehype:style=padding-top:1rem;-->
@ -562,6 +566,8 @@ Quick Reference
[afetera.top](https://note.afetera.top)<!--rehype:target=_blank-->
[trtuaazz.com](https://reference.trtuaazz.com)<!--rehype:target=_blank-->
[anhaoyang.com](http://dev-doc.anhaoyang.com/)<!--rehype:target=_blank-->
[xxcxx.lat](https://xxcxx.lat/)<!--rehype:target=_blank-->
[fishlee.net](https://cr.fishlee.net/)<!--rehype:target=_blank-->
<!--rehype:class=home-card home-links-->
如果你有资源,可以很方便[部署 web 版](https://github.com/jaywcjlove/reference/issues/102#issue-1451649637),这非常简单,只需要克隆 [gh-pages](https://github.com/jaywcjlove/reference/tree/gh-pages) 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。
@ -572,6 +578,33 @@ Quick Reference
- [Quick Reference for VSCode](https://marketplace.visualstudio.com/items?itemName=jackiotyu.quick-reference) 由 [jackiotyu](https://github.com/jackiotyu/vscode-quick-reference) 提供
## 赞助支持
<!--rehype:wrap-style=text-align: center;max-width: 650px;margin: 0 auto;&class=home-title-reset-->
非常感谢那些一直支持我开源工作的朋友们。如果您对我的工作感到满意,可以选择在[这里进行赞助](https://wangchujiang.com/#/sponsor)<!--rehype:target=_blank-->。如果目前经济上不宽裕,也可以通过下载并使用我开发的 [macOS 应用](https://wangchujiang.com/#/app)<!--rehype:target=_blank-->来支持我。以下是我个人开发的 macOS 应用:
<p style="display: inline-block">
<a target="_blank" href="https://wangchujiang.com/key-clicker/" title="KeyClicker for macOS"><img align="center" alt="KeyClicker" height="50" width="50" src="https://github.com/user-attachments/assets/5a19fcb9-cb81-4855-b4ea-31c604d9612a"></a>
<a target="_blank" href="https://wangchujiang.com/daybar/" title="DayBar for macOS"><img align="center" alt="DayBar" height="50" width="50" src="https://github.com/user-attachments/assets/b67d4a2e-92e2-4d8c-8c6f-2a1eb3e2fa93"></a>
<a target="_blank" href="https://wangchujiang.com/iconed/" title="Iconed for macOS"><img align="center" alt="Iconed" height="50" width="50" src="https://github.com/user-attachments/assets/8a35dc7b-4faf-4e2a-9311-f66d6844a896"></a>
<a target="_blank" href="https://wangchujiang.com/rightmenu-master/" title="RightMenu Master for macOS"><img align="center" alt="RightMenu Master" height="50" width="50" src="https://github.com/user-attachments/assets/39a76541-71bf-4de7-a01c-c62f0557dff5"></a>
<a target="_blank" href="https://wangchujiang.com/paste-quick/" title="Paste Quick for macOS"><img align="center" alt="Quick RSS" height="50" width="50" src="https://github.com/user-attachments/assets/bdaad5b7-9810-44ce-8f17-8410864465d2"></a>
<a target="_blank" href="https://wangchujiang.com/quick-rss/" title="Quick RSS for macOS/iOS"><img align="center" alt="Quick RSS" height="50" width="50" src="https://github.com/user-attachments/assets/374106b5-a448-4d1d-9ccb-b04b6bc681ed"></a>
<a target="_blank" href="https://wangchujiang.com/web-serve/" title="Web Serve for macOS"><img align="center" alt="Web Serve" height="50" width="50" src="https://github.com/user-attachments/assets/e1d9f76f-0f3d-4ba5-8a15-253ee173bb1c"></a>
<a target="_blank" href="https://wangchujiang.com/copybook-generator/" title="Copybook Generator for macOS/iOS"><img align="center" alt="Copybook Generator" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/b90e42ff-158b-4534-82ca-5898fd0e8d73"></a>
<a target="_blank" href="https://wangchujiang.com/devtutor/" title="DevTutor for macOS/iOS"><img align="center" alt="DevTutor for SwiftUI" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/f15c154d-0192-48eb-8e0e-9e245ffd974a"></a>
<a target="_blank" href="https://wangchujiang.com/regex-mate/" title="RegexMate for macOS/iOS"><img align="center" alt="RegexMate" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/aabe5aa9-9a96-4390-8bed-c3e4023d0dea"></a>
<a target="_blank" href="https://wangchujiang.com/time-passage/" title="Time Passage for macOS/iOS"><img align="center" alt="Time Passage" height="50" width="50" src="https://github.com/jaywcjlove/time-passage/assets/1680273/6f30e429-e6f3-4dbe-9921-a5effe2a05e9"></a>
<a target="_blank" href="https://wangchujiang.com/IconizeFolder/" title="IconizeFolder for macOS"><img align="center" alt="Iconize Folder" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/fa9d8b9c-1e51-4ded-877c-fa5b21c47220"></a>
<a target="_blank" href="https://wangchujiang.com/TextSoundSaver/" title="Textsound Saver for macOS/iOS"><img align="center" alt="Textsound Saver" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/0595e842-980b-4574-8891-a8ba853a08be"></a>
<a target="_blank" href="https://wangchujiang.com/create-custom-symbols/" title="Create Custom Symbols for macOS"><img align="center" alt="Create Custom Symbols" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/8cd022ce-a3f1-4e89-b7c6-6fbd0d4db77c"></a>
<a target="_blank" href="https://wangchujiang.com/DevHub/" title="DevHub for macOS"><img align="center" alt="DevHub" height="50" width="50" src="https://github.com/user-attachments/assets/4a44a4fd-67ce-430b-af0a-72f18feaa47d"></a>
<a target="_blank" href="https://wangchujiang.com/ResumeRevise/" title="Resume Revise for macOS"><img align="center" alt="Resume Revise" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c9954a20-1905-48de-bdf8-d71837974aa2"></a>
<a target="_blank" href="https://wangchujiang.com/palette-genius/" title="Palette Genius for macOS"><img align="center" alt="Palette Genius" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/27340413-d355-45b2-8f6f-6ac37682d957"></a>
<a target="_blank" href="https://wangchujiang.com/symbol-scribe/" title="Symbol Scribe for macOS"><img align="center" alt="Symbol Scribe" height="50" width="50" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c7249f05-fa70-4def-a1e9-571d5f171fc9"></a>
</p>
<!--rehype:style=padding-top:1rem;max-width: 520px;margin: 0 auto;-->
<!--rehype:ignore:start-->
## 开发

576
docs/c.md
View File

@ -7,7 +7,6 @@ C 备忘清单
----
### hello.c
<!--rehype:wrap-class=row-span-2-->
```c
#include <stdio.h>
@ -35,40 +34,51 @@ $ ./hello
<!--rehype:wrap-class=row-span-2-->
```c
int myNum = 15;
int myNum = 15; // 定义并初始化变量 myNum
int myNum2; // 声明变量 myNum2
// 变量声明后第一次赋值我们称为初始化
// 如果 初始化 和 赋值 在同一行
// 那么我们可以直接称为 定义变量 myNum2
myNum2 = 15;
myNum2 = 15; // 初始化变量 myNum2
int myNum3 = 15; // myNum3 值为 15
myNum3 = 10; // 现在 myNum3 值为 10
int myNum3 = 15; // 定义并初始化变量 myNum3
myNum3 = 10; // 重新赋值 myNum3
```
float myFloatNum = 5.99; // 浮点数
char myLetter = 'D'; // 字符
定义不同类型的变量
int x = 5;
int y = 6;
int sum = x + y; // 添加变量相加
// 声明多个变量
```c
// 定义并初始化浮点数变量
float myFloatNum = 5.99;
// 定义并初始化字符变量
char myLetter = 'D';
```
变量相加
```c
int x = 5, y = 6;
int sum = x + y; // 变量相加
```
声明并初始化多个变量
```c
int x = 5, y = 6, z = 50;
int a, b, c = 10;
```
//仅声明变量不初始化
仅声明变量不初始化
```c
int result;
// 如果未初始化变量的值是未定义的,使用它会导致错误的结果
// 此时,变量的值是随机的,因此在使用该变量之前必须进行初始化。
result = result + 10; // 错误:未初始化的变量 result 会导致不可预测的结果
// 部分编译器会输出 Warning警告未初始化的变量可能导致未定义行为。
// 未初始化变量 result 会导致不可预测的结果
result = result + 10; // 错误:未初始化的变量
// 部分编译器会警告未初始化的变量可能导致未定义行为
```
### 常量 Constants
<!--rehype:wrap-class=row-span-2-->
常量在 C 语言中我们一般理解为不能被改变的值,用常量与符号常量,可以使代码更清晰和安全
常量不能被改变的值,使用常量可以使代码更清晰和安全
```c
const int minutesPerHour = 60;
@ -81,37 +91,53 @@ const float PI = 3.14;
const int BIRTHYEAR = 1980;
```
说明与补充:
1. **常量命名规范**:常量通常使用全大写字母,多个单词之间用下划线分隔(例如 BIRTHYEAR、MAX_LENGTH
#### **命名规范**
<!--rehype:style=text-align: left;-->
2. **`#define``const`**
- **`#define`**:宏常量通常在预处理阶段进行替换,不进行类型检查;
- **`const`**:类型安全的常量,编译器可以检查类型,一般更推荐使用 `const`
常量通常使用全大写字母,单词间用下划线分隔(如 BIRTHYEAR、MAX_LENGTH
3. **数组大小**:可以使用 `const` 来定义数组的常量大小,这样编译器会将其作为编译时常量处理
#### **数组大小**
<!--rehype:style=text-align: left;-->
使用 `const` 定义数组大小,编译器将其作为编译时常量处理。
#### **`#define` 与 `const`**
<!--rehype:style=text-align: left;-->
- `#define`:宏常量在预处理阶段替换,不进行类型检查
- `const`:类型安全的常量,编译器可检查类型,推荐使用
#### **注意事项**
- `const` 常量在定义时必须初始化,否则会导致编译错误。
- `const` 常量的值不能被修改,任何尝试修改 `const` 常量的操作都会导致编译错误。
- 使用 `const` 常量可以提高代码的可读性和可维护性,避免魔法数字的使用。
### 注释
```c
// 这是一个注释
printf("Hello World!"); // 这是一个注释
// 这是一个单行注释
printf("Hello World!"); // 行内注释
/*
多行注释:用于注释跨多行的内容
上面的代码将打印出 Hello World! 到屏幕上
多行注释:
用于注释跨多行的内容
注意:多行注释不能嵌套,否则会导致编译错误
*/
```
**注意**:
单行注释`//`可以嵌套,`////////这种注释也是对的`
但行内注释应避免过长,以免影响代码可读性
多行注释不能嵌套,否则会导致编译错误(详见下文 [### Warning 和 Error](#warning-和-error)
**注意**:
- 单行注释 `//` 可以嵌套,如 `/////`
- 行内注释应避免过长,以免影响代码可读性。
- 多行注释不能嵌套,否则会导致编译错误。
```c
/* 这是一个多行注释的开始
/* 这是嵌套的多行注释C语言不支持 */
/* 嵌套的多行注释C语言不支持 */
*/
```
<!--rehype:style=background:#ff000030;-->
### 打印文本
@ -126,21 +152,34 @@ printf("Value = %f", f);
short a = 0b1010110; // 2 进制数字
int b = 02713; // 8 进制数字
long c = 0X1DAB83; // 16 进制数字
//变量a和c分别为short和long型所以输出必须加上对应的修饰符h和l
```
// 以 8 进制形式输出
变量a和c分别为 `short``long` 型,所以输出必须加上对应的修饰符 `h``l`
#### 以 8 进制形式输出
```c
printf("a=%ho, b=%o, c=%lo\n", a, b, c);
// 输出 => a=126, b=2713, c=7325603
```
// 以 10 进制形式输出
#### 以 10 进制形式输出
```c
printf("a=%hd, b=%d, c=%ld\n", a, b, c);
// 输出 => a=86, b=1483, c=1944451
```
// 以 16 进制形式输出(字母小写)
#### 以 16 进制形式输出(字母小写)
```c
printf("a=%hx, b=%x, c=%lx\n", a, b, c);
// 输出 => a=56, b=5cb, c=1dab83
```
// 以 16 进制形式输出(字母大写)
#### 以 16 进制形式输出(字母大写)
```c
printf("a=%hX, b=%X, c=%lX\n", a, b, c);
// 输出 => a=56, b=5CB, c=1DAB83
```
@ -169,67 +208,75 @@ printf("%-9d %-9d %-9d\n", d1, d2, d3);
34 0 23
```
`%-9d` 中,`d` 表示`10` 进制输出,`9` 表示最少占 `9` 个字符宽度,宽度不足以空格补齐,`-` 表示左对齐,如果不使用左对齐则默认右对齐
解释:`%-9d``d` 表示进制输出,`9` 表示最少占 9 个字符宽度,`-` 表示左对齐,不使用 `-` 则默认右对齐
对于整型数据:
对于整型数据,假设:
```c
int a = 12345;
printf(%md,a);
printf("%md", a);
```
1. 若 m <= 实际数据的宽度,则按实际情况输出
2. 若 m > 实际数据的宽度,则在实际数据的左边用空格补齐
3. `printf(“%0md”,a);` 则实际的结果不够 m 位的在数据的左边用0补齐
对于浮点型数据宽度=整数部分的位数+小数点+小数部分的宽度
假设:
-`m <=` 实际数据宽度,则按实际情况输出。
-`m >` 实际数据宽度,则在左边用空格补齐。
- `printf("%0md", a);` 则在左边用 `0` 补齐。
对于浮点型数据:
```c
float a = 1.2345;
printf(%m.nf,a); //m --整个数据的宽度n--小数位数
printf("%m.nf", a);
// m -- 整个数据宽度n -- 小数位数
```
1. 实际小数位数>n截去小数右边多余的小数截去的第一位要注意四舍五入
2. 实际小数位数< n在小数的最后补0
3. 若m省略则写作%.n 整数部分按照实际输出小数部分按照以上两个规则进行
4. m < n+1自动突破宽度为m的限制按照实际数据进行输出
5. m > n+1整个数据的最左边补空格
- 实际小数位数 `> n`,截去多余小数,注意四舍五入。
- 实际小数位数 `< n`,在小数最后补 `0`
-`m` 省略则写作 `%.n`,整数部分按实际输出,小数部分按以上规则。
-`m < n+1`,自动突破宽度限制,按实际数据输出。
-`m > n+1`,左边补空格。
### 字符串 Strings
### 字符串 (Strings)
在 C 语言中,字符串是以 `\0` 结尾的字符数组,而不是一种单独的数据类型。可以通过字符数组来表示字符串。
#### 定义并打印字符串
```c
char greetings[] = "Hello World!";
printf("%s", greetings);
```
访问字符串
#### 访问字符串中的字符
```c
char greetings[] = "Hello World!";
printf("%c", greetings[0]);
```
修改字符串
访问字符串 `greetings` 的第一个字符 `H`
#### 修改字符串中的字符
```c
char greetings[] = "Hello World!";
greetings[0] = 'J';
greetings[0] = 'J'; // 修改第一个字符为 'J'
printf("%s", greetings);
// 输出 "Jello World!"
```
另一种创建字符串的方法
#### 另一种创建字符串的方法
```c
char greetings[] = {'H','e','l','l','\0'};
printf("%s", greetings);
// 输出 "Hell!"
// 输出 "Hell"
```
`C` **没有** String 类型,使用 `char` 类型并创建一个字符 `array`
**注意**C 语言中没有 `String` 类型,字符串是由字符数组 `char[]` 表示的,且必须以 `\0` 结尾以标识字符串的结束。
### 条件判断
<!--rehype:wrap-class=row-span-2-->
```c
int time = 20;
@ -239,6 +286,7 @@ if (time < 18) {
printf("晚上好!");
}
// 输出 -> "晚上好!"
int time = 22;
if (time < 10) {
printf("早上好!");
@ -259,25 +307,40 @@ if (time > 8) {
// 输出 -> "中午好!"
```
#### 说明
- `if` 语句用于根据条件执行代码块。
- `else` 语句在 `if` 条件不满足时执行。
- `else if` 语句用于检查多个条件。
- 可以嵌套 `if` 语句以检查多个条件。
### 三元运算符
<!--rehype:wrap-class=col-span-2-->
三元运算符(? :)是一种简洁的条件判断方式,用于根据条件选择表达式的值,由三个部分组成:
- 一个条件表达式
三元运算符(`? :`)是一种简洁的条件判断方式,用于根据条件选择表达式的值由三个部分组成:
- 条件表达式
- 条件为真时的结果
- 条件为假时的结果
基本语法:`(condition) ? expression1 : expression2;`
如果`condition`为真,则返回`expression1`否则返回`expression2`
基本语法:`(条件) ? 表达式1 : 表达式2;`
如果 `条件` 为真,则返回 `表达式1`,否则返回 `表达式2`
#### 示例
```c
int time = 20;
(time < 18) ? printf("再会!") : printf("晚上好!");
(time < 18) ? printf("再会!")
: printf("晚上好!");
// 输出 -> "晚上好!"
```
三元运算符可以嵌套使用,但嵌套层级太多会导致代码可读性下降,不建议在实际场景使用
嵌套使用示例(不建议过多嵌套):
```c
int time = 22;
printf((time < 10) ? "早上好!" : (time < 20) ? "再会!" : "晚上好!");
printf((time < 10) ? "早上好!"
: (time < 20) ? "再会!"
: "晚上好!");
// 输出 -> "晚上好!"
```
@ -289,10 +352,36 @@ int day = 4;
switch (day) {
case 3: printf("周三"); break;
case 4: printf("周四"); break;
default:
printf("期待周末");
default: printf("期待周末");
}
// 输出 -> "周四" (day 4)
// 输出 -> "周四"
```
#### 说明
- `switch` 语句根据表达式的值跳转到匹配的 `case` 标签。
- 匹配到 `case` 后执行相应代码,并通过 `break` 跳出 `switch`
- 如果没有匹配到任何 `case`,则执行 `default` 语句(如果存在)。
#### 注意事项
- `switch` 表达式可以是整型、字符型和枚举型。
- `case` 后的常量表达式值不能相同。
- `case` 后可以有多个语句,不需要 `{ }` 括起来。
- `case``default` 语句的顺序不影响程序执行结果。
- `break` 语句用于结束 `switch`,如果没有 `break`,程序会继续执行下一个 `case`
#### 示例
```c
int day = 3;
switch (day) {
case 3: printf("周三");
case 4: printf("周四"); break;
default: printf("期待周末");
}
// 输出 -> "周三周四"
```
### While 循环
@ -304,9 +393,53 @@ while (i < 5) {
printf("%d\n", i);
i++;
}
// 输出 -> 0 1 2 3 4
```
**注意**:不要忘记增加条件中使用的变量,否则循环永远不会结束,成为“死循环”!
#### 解释
- `while` 循环首先检查条件 `i < 5` 是否为真。
- 如果为真,程序进入循环体,执行打印操作并增加 `i` 的值。
- 循环会继续进行,直到 `i` 达到 5此时条件 `i < 5` 不再为真,循环结束。
#### 打印 1 到 10 的数字
```c
int i = 1;
while (i <= 10) {
printf("%d\n", i);
i++;
}
// 输出 -> 1 2 3 4 5 6 7 8 9 10
```
#### 打印偶数
```c
int i = 0;
while (i <= 10) {
if (i % 2 == 0) {
printf("%d\n", i);
}
i++;
}
// 输出 -> 0 2 4 6 8 10
```
#### 无限循环(需手动终止)
```c
int i = 0;
while (1) {
printf("无限循环\n");
i++;
if (i == 5) break; // 添加条件以退出循环
}
// 输出 -> 无限循环 (打印 5 次)
```
### Do/While 循环
@ -317,20 +450,83 @@ do {
printf("%d\n", i);
i++;
} while (i < 5);
// 输出 -> 0 1 2 3 4
```
#### 解释
- `do/while` 循环至少执行一次循环体,因为条件检查在循环体执行之后进行。
- 首先执行 `do` 中的代码,然后检查条件 `i < 5` 是否为真。
- 如果为真,继续执行循环;如果为假,则退出循环。
#### 打印从 5 开始的数字,直到条件不满足
```c
int i = 5;
do {
printf("%d\n", i); // 输出 5
i++;
} while (i < 5);
// 输出 -> 5
```
#### 计算 1 到 10 的和
```c
int i = 1;
int sum = 0;
do {
sum += i;
i++;
} while (i <= 10);
printf("Sum: %d\n", sum);
// 输出 -> Sum: 55
```
### For 循环
```c
for (表达式1; 表达式2; 表达式3) {
循环体语句;
}
```
- 表达式1设置初始条件只执行一次。
- 表达式2循环条件表达式每次循环前检查。
- 表达式3循环体执行后的调整操作。
示例:
```c
int i;
for (i = 0; i < 5; i++) {
printf("%d\n", i);
}
// 输出 -> 0 1 2 3 4
```
### 跳出循环 Break/Continue
<!--rehype:wrap-class=row-span-2-->
#### 注意事项
- `for` 语句的三个表达式不是必须的。
- 当条件表达式表达式2为假时`for` 循环结束。
- 可以在循环体内使用 `break``continue``goto` 语句。
- 如果表达式2为空则表示无限循环`for(;;)` 相当于 `while(1)`
#### 变体
- `for (i = m; i < n; i++)``i = m` 开始到 `i = n-1`,循环 `n - m` 次。
- `for (i = m; i <= n; i++)``i = m``i = n`,循环 `n - m + 1` 次。
### 跳出循环 (Break/Continue/Goto)
<!--rehype:wrap-class=row-span-3-->
#### `break` 语句
跳出当前循环或 `switch` 语句,执行后续代码。
```c
int i;
@ -341,9 +537,12 @@ for (i = 0; i < 10; i++) {
}
printf("%d\n", i);
}
// 输出 -> 0 1 2 3
```
`i` 等于 `4` 时跳出循环
#### `continue` 语句
跳过当前循环的剩余语句,直接进入下一次循环。
```c
int i;
@ -354,72 +553,40 @@ for (i = 0; i < 10; i++) {
}
printf("%d\n", i);
}
// 输出 -> 0 1 2 3 5 6 7 8 9
```
示例跳过 `4` 的值
#### `goto` 语句
### While Break 示例
无条件跳转到指定标签位置。
```c
int i = 0;
while (i < 10) {
if (i == 4) {
break;
goto skip; // 跳转到 skip 标签
}
printf("%d\n", i);
i++;
}
skip:
printf("Exited the loop at i = %d\n", i);
// 输出 -> 0 1 2 3 Exited the loop at i = 4
```
### While continue 示例
#### 注意事项
- 标签必须在当前函数内定义,命名规则与变量相同。
- `goto` 语句应慎用,避免代码逻辑混乱,通常使用循环或条件语句代替。
#### 设置数组大小
```c
int i = 0;
while (i < 10) {
i++;
if (i == 4) {
continue;
}
printf("%d\n", i);
}
```
### 数组 Arrays
<!--rehype:wrap-class=row-span-2-->
```c
int myNumbers[] = {25, 50, 75, 100};
printf("%d", myNumbers[0]);
// 输出 25
```
更改数组元素
```c
int myNumbers[] = {25, 50, 75, 100};
myNumbers[0] = 33;
printf("%d", myNumbers[0]);
```
循环遍历数组
```c
int myNumbers[] = {25, 50, 75, 100};
int i;
for (i = 0; i < 4; i++) {
printf("%d\n", myNumbers[i]);
}
```
设置数组大小
```c
// 声明一个由四个整数组成的数组:
// 声明一个由四个整数组成的数组
int myNumbers[4];
// 添加元素
myNumbers[0] = 25;
myNumbers[1] = 50;
@ -467,6 +634,35 @@ switch(day){
}
```
### 数组 Arrays
#### 定义和访问数组元素
```c
int myNumbers[] = {25, 50, 75, 100};
printf("%d", myNumbers[0]); // 输出 25
```
#### 更改数组元素
```c
int myNumbers[] = {25, 50, 75, 100};
myNumbers[0] = 33;
printf("%d", myNumbers[0]); // 输出 33
```
#### 循环遍历数组
```c
int myNumbers[] = {25, 50, 75, 100};
int i;
for (i = 0; i < 4; i++) {
printf("%d\n", myNumbers[i]);
}
// 输出 -> 25 50 75 100
```
### 用户输入
```c
@ -498,39 +694,27 @@ printf("Hello %s.", firstName);
### 内存地址
创建变量时,会为该变量分配一个内存地址
创建变量时,会为该变量分配一个内存地址
```c
int myAge = 43;
printf("%p", &myAge);
// 输出0x7ffe5367e044
// 输出 myAge 的内存地址,例如0x7ffe5367e044
```
要访问,请使用引用运算符 (`&`)
要访问变量的内存地址,请使用引用运算符 (`&`)
### 创建指针
```c
int myAge = 43; // 一个 int 变量
printf("%d", myAge); // 输出 myAge(43)的值
// 输出 myAge 的内存地址0x7ffe5367e044
printf("%p", &myAge);
```
### 指针变量
<!--rehype:wrap-class=col-span-2-->
```c
int myAge = 43; // 一个 int 变量
int* ptr = &myAge; // 名为 ptr 的指针变量,用于存储 myAge 的地址
int *ptr = &myAge; // 创建指向 myAge 的指针
printf("%d\n", myAge); // 输出 myAge (43) 的值
printf("%p\n", &myAge); // 输出 myAge 的内存地址0x7ffe5367e044
printf("%p\n", ptr); // 用指针0x7ffe5367e044输出myAge的内存地址
printf("%d\n", myAge); // 输出 myAge 的值 -> 43
printf("%p\n", &myAge); // 输出 myAge 的内存地址例如0x7ffe5367e044
printf("%p\n", ptr); // 输出指针 ptr 的值(即 myAge 的内存地址)
printf("%d\n", *ptr); // 通过指针访问 myAge 的值 -> 43
```
### 取消引用
@ -546,6 +730,18 @@ printf("%p\n", ptr);
printf("%d\n", *ptr);
```
### 指针变量
<!--rehype:wrap-class=col-span-2-->
```c
int myAge = 43; // 一个 int 变量
int* ptr = &myAge; // 名为 ptr 的指针变量,用于存储 myAge 的地址
printf("%d\n", myAge); // 输出 myAge (43) 的值
printf("%p\n", &myAge); // 输出 myAge 的内存地址0x7ffe5367e044
printf("%p\n", ptr); // 用指针0x7ffe5367e044输出myAge的内存地址
```
运算符
---
@ -888,46 +1084,78 @@ int main(void) {
### Warning 和 Error
<!--rehype:wrap-class=row-span-2-->
在 C 语言中警告Warning和错误Error是编译器用于标识代码潜在问题或阻止代码编译的两种机制
在 C 语言中警告Warning和错误Error是编译器用于标识代码潜在问题或阻止代码编译的机制
#### 警告
**警告**
警告提示代码中可能存在的问题,但不会阻止代码编译。处理警告可以提升代码质量和可移植性。
**常见警告示例**
1. 未使用的变量
`int x; printf("%d",x);`
2. 类型隐式转换(可能导致数据丢失)
`int x = 3.14; //浮点数被隐式转换`
`int a = 2147483647 + 1; //可能溢出`
3. 函数声明与定义不匹配
#### **常见警告示例**
**错误**
警告提示代码中可能存在的问题,但不会阻止代码编译。处理警告可以提升代码质量和可移植性。
未使用的变量
```c
int x; printf("%d", x);
```
类型隐式转换(可能导致数据丢失)
```c
int x = 3.14; // 浮点数被隐式转换
int a = 2147483647 + 1; // 可能溢出
```
函数声明与定义不匹配
#### 错误
错误会阻止代码编译,必须修复才能继续编译。
**常见错误示例**
1. 语法错误(如缺少分号)
`int x=1 `
2. 函数定义冲突
```C
语法错误(如缺少分号)
```c
int x = 1
```
函数定义冲突
```c
void func(int);
void func(double);
```
3. 函数或变量未定义
`y = 10; printf("%d",y);`
4. 头文件缺失或冲突
`#include <unknown.h>`
**使用编译器指令控制警告和错误**:
1. 抑制警告
函数或变量未定义
```c
y = 10; printf("%d", y);
```
头文件缺失或冲突
```c
#include <unknown.h>
```
### 使用编译器指令控制警告和错误
<!--rehype:wrap-class=col-span-2-->
#### 抑制警告
可以使用编译器选项来关闭特定的警告,例如在 GCC 中:
```GCC
```sh
gcc -w file.c # 禁用所有警告
gcc -Wall file.c # 启用所有常见警告
gcc -Werror file.c # 将警告视为错误
```
2. 使用 #pragma 控制警告
在某些编译器中,可以使用`#pragma`指令启用或禁用警告
```C
#### 使用 `#pragma` 控制警告
在某些编译器中,可以使用 `#pragma` 指令启用或禁用警告:
```c
#include <stdio.h>
#pragma warning(disable : 4996) // 禁用警告(适用于 MSVC 编译器)
@ -937,7 +1165,8 @@ int main() {
}
```
**总结**
#### 总结
| 区别点 | Warning警告 | Error错误 |
|------------------|----------------------------------------|----------------------------------------|
| 严重程度 | 程序可继续编译,但可能存在隐患 | 编译无法完成,必须修复 |
@ -946,7 +1175,6 @@ int main() {
| 修复必要性 | 可选择修复,但建议修复以避免潜在问题 | 必须修复才能继续编译 |
| 编译器选项调整 | 可以忽略或转换为错误(如 `-Werror` | 无法调整,必须修复 |
函数
----

View File

@ -985,6 +985,7 @@ Github emoji 图标标记
--------
- [Emoji searcher](https://emoji.muan.co/) _(muan.co)_
- [Share Emojis-With Your 🥺Fiends With An Great Way And Unique✅ |copy & download|](https://emoji-share.com/) _(emoji-share.com)_
- [Get Emoji — All Emojis to ✂️ Copy and 📋 Paste](https://getemoji.com/) _(getemoji.com)_
- [Emoji Guide 🔥 The Ultimate Emoji Guide: 🌈 Meanings, 🍎 Platforms, 🆘 Codes and 😍 More](https://emojiguide.com/) _(emojiguide.com)_
- [Full Emoji List, v15.0](https://unicode.org/emoji/charts/full-emoji-list.html) _(unicode.org)_

View File

@ -242,10 +242,12 @@ sb.append("!");
### 比较
```java
String s1 = new String("QuickRef");
String s1 = "QuickRef";
String s2 = new String("QuickRef");
s1 == s2 // false
s1.equals(s2) // true
// intern 方法获得字符串常量池中的惟一引用
s1 == s2.intern() // true
"AB".equalsIgnoreCase("ab") // true
```
@ -310,7 +312,7 @@ int[] a3 = new int[]{1, 2, 3};
int[] a4 = new int[3];
a4[0] = 1;
a4[2] = 2;
a4[3] = 3;
a4[3] = 3; // 会出现索引越界异常
```
### 修改 Modify

253
docs/yazi.md Normal file
View File

@ -0,0 +1,253 @@
Yazi 备忘清单
===
这份快速参考备忘单提供了Yazi 快速的终端文件管理的简要概述,以及 Yazi的基本操作
入门
----
### 功能特点
- <code>**跨平台支持**</code>Yazi 支持 Linux、macOS 和 Windows提供一致的跨平台体验
- <code>**轻量高效**</code>:简洁设计,启动和操作快速,资源消耗低
- <code>**插件扩展**</code>:支持插件安装,灵活扩展功能
- <code>**文件操作**</code>:支持复制、剪切、粘贴、删除、重命名等操作,且支持批量和多选功能,提升效率
### 安装
| 系统 | 安装方法 |
| ----- | ----- |
| 使用 Cargo 安装 | `cargo install yazi` |
| Arch Linux | `yay -S yazi` |
| Debian/Ubuntu | 可以使用 `Cargo` 进行安装 |
| macOS (使用 Homebrew) | `brew install yazi` |
| Windows (使用 Carg) | `cargo install yazi` |
| Windows (使用 Scoop) | `scoop install yazi` |
### 使用方法
#### 命令启动 Yazi
```sh
yazi
```
#### 查看 Yazi 的帮助文档
```sh
yazi --help
```
## 常用的快捷键
<!--rehype:body-class=cols-2-->
### 导航
:- | :-
:- | :-
| `h` | 返回上一级目录 |
| `j` | 向下移动选中项 |
| `k` | 向上移动选中项 |
| `l` | 进入选中的目录或打开文件 |
<!--rehype:className=shortcuts-->
### 文件操作
:- | :-
:- | :-
| `y` | 复制选中的文件或目录 |
| `d` | 剪切选中的文件或目录 |
| `p` | 粘贴文件或目录 |
| `x` | 删除选中的文件或目录 |
| `r` | 重命名选中的文件或目录 |
<!--rehype:className=shortcuts-->
### 搜索与过滤
:- | :-
:- | :-
| `/` | 开始搜索模式 |
| `n` | 在搜索模式中跳到下一个匹配项 |
| `N` | 在搜索模式中跳到上一个匹配项 |
<!--rehype:className=shortcuts-->
### 视图操作
:- | :-
:- | :-
| `gg` | 跳到列表的顶部 |
| `G` | 跳到列表的底部 |
| `Ctrl+f` | 向下滚动一页 |
| `Ctrl+b` | 向上滚动一页 |
<!--rehype:className=shortcuts-->
## 自定义配置
### 自定义配置
通过编辑配置文件来自定义 `Yazi`,配置文件通常位于 `$HOME/.config/yazi/xxx.toml`,可修改默认设置如快捷键、主题等。
- `yazi.toml` - 常规配置
- `keymap.toml` - 快捷键绑定
- `theme.toml` - 主题配置
### 配置文件示例yazi.toml
<!--rehype:wrap-class=row-span-2-->
```toml
[general]
# 设置主界面主题为 dark 或 light
theme = "dark"
# 启动时的默认路径
default_path = "~"
# 是否启用自动保存配置
auto_save_config = true
[keybindings]
# 自定义快捷键绑定
quit = "q" # 退出
copy = "y" # 复制文件
paste = "p" # 粘贴文件
delete = "d" # 删除文件
[ui]
# 界面相关配置
preview_enabled = true # 是否启用文件预览
show_hidden_files = true # 显示隐藏文件
columns = 2 # 文件列表列数
[search]
# 搜索行为配置
case_sensitive = false # 搜索是否区分大小写
search_timeout = 30 # 搜索超时时间(秒)
[sorting]
# 排序规则配置
sort_by = "name" # 排序方式: name,size,date
reverse_sort = false # 是否反向排序
[plugins]
# 插件加载配置
enabled_plugins = ["git", "archive"]
```
### keymap.toml 配置示例
<!--rehype:wrap-class=row-span-2-->
```toml
# 全局快捷键配置
[global]
# 全局退出应用程序
quit = "Ctrl+Q"
# 打开文件或目录
open = "Enter"
# 返回上级目录
back = "Backspace"
# 搜索功能触发
search = "/"
# 复制路径
copy_path = "Ctrl+C"
# 窗口控制快捷键
[window]
# 切换窗口
switch_window = "Tab"
# 新建窗口
new_window = "Ctrl+N"
# 关闭窗口
close_window = "Ctrl+W"
# 文件操作快捷键
[file]
# 删除文件
delete_file = "D"
# 重命名文件
rename_file = "R"
# 复制文件
copy_file = "Y"
# 粘贴文件
paste_file = "P"
# 移动文件
move_file = "M"
# 文件选择快捷键
[selection]
# 全选
select_all = "Ctrl+A"
# 取消所有选择
deselect_all = "Ctrl+D"
# 反选
invert_selection = "Ctrl+I"
# 选择当前文件/目录
select_item = "Space"
# 页面导航快捷键
[navigation]
# 向上移动光标
move_up = "K"
# 向下移动光标
move_down = "J"
# 向左切换标签
move_left = "H"
# 向右切换标签
move_right = "L"
# 自定义命令触发键
[custom]
# 触发自定义功能
custom_action_1 = "Ctrl+1"
custom_action_2 = "Ctrl+2"
custom_action_3 = "Ctrl+3"
```
### theme.toml 配置示例
```toml
[general]
# 设置主界面配色方案
background_color = "#1e1e2e" # 背景颜色
foreground_color = "#cdd6f4" # 文本颜色
cursor_color = "#89dceb" # 光标颜色
selection_color = "#585b70" # 选中项背景颜色
highlight_color = "#fab387" # 高亮颜色
# 字体设置
font_family = "FiraCode" # 字体名称
font_size = 14 # 字体大小
[ui]
# 界面边框与间距
border_color = "#45475a" # 边框颜色
padding = 4 # 界面内容的内边距
[file_browser]
# 文件浏览器颜色配置
directory_color = "#89b4fa" # 目录名称颜色
file_color = "#cdd6f4" # 普通文件颜色
symlink_color = "#f5c2e7" # 符号链接颜色
hidden_file_color = "#6c7086" # 隐藏文件颜色
[status_bar]
# 状态栏颜色
background_color = "#313244" # 状态栏背景
foreground_color = "#a6adc8" # 状态栏文字
error_color = "#f38ba8" # 状态栏错误信息
[search]
# 搜索结果配色
match_color = "#a6e3a1" # 搜索结果的匹配高亮
current_match_color = "#fab387" # 当前匹配项的高亮
[progress_bar]
# 进度条的配色
filled_color = "#89dceb" # 已填充部分
empty_color = "#313244" # 未填充部分
```
另见
----
- [Yazi 官方文档](https://yazi-rs.github.io/) _(yazi-rs.github.io)_
- [Yazi Github](https://github.com/sxyazi/yazi) _(github.com)_

View File

@ -1,6 +1,6 @@
{
"name": "@wcj/reference",
"version": "1.45.0",
"version": "1.46.0",
"description": "为开发人员分享快速参考备忘单(主要是方便自己)。",
"author": "jaywcjlove",
"license": "MIT",