
當我按下 Kate 中的製表符時,我想根據我使用的電腦語言獲得不同數量的空格。例如,在 html 檔案中,我希望選項卡產生兩個空格,但在 CI 中希望它產生四個空格。這可能嗎?我該怎麼做?
答案1
透過菜單:
- 設定>配置凱特>打開/儲存>模式/檔案類型
你可以像這樣設置這個例子:
Name: C, C++ and Java settings
Section: Sources
Variables: kate: space-indent on; indent-width 4; mixed-indent off; indent-mode cstyle;
File Extensions: *.h;*.c;*.hh;*.H;*.hp;*.hxx;*.hpp;*.HPP;*.h++;*.tcc;*.cc;*.cp;*.cxx;*.cpp;*.CPP;*.c++;*.C;*.java
Mimetypes: text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java
Priority: 10