33. 凌波微步:wagon
+
VS
Code
的輕功哲學
⾃自動存檔
• 讓檔案⾃自動存檔,不⽤用⼀一直按 Ctrl + S
{
//
Controls
auto
save
of
dirty
files.
Accepted
values:
"off",
"afterDelay",
"onFocusChange".
If
set
to
"afterDelay"
you
can
configure
the
delay
in
"files.autoSaveDelay".
"files.autoSave":
"off",
//
Controls
the
delay
in
ms
after
which
a
dirty
file
is
saved
automatically.
Only
applies
when
"files.autoSave"
is
set
to
"afterDelay"
"files.autoSaveDelay":
1000
}
改成 onFocusChange
34. 凌波微步:wagon
+
VS
Code
的輕功哲學
編輯區縮放
• 讓滑⿏鼠滾輪調整編輯區的字型⼤大⼩小
{
//
Zoom
the
font
of
the
editor
when
using
mouse
wheel
and
holding
Ctrl
"editor.mouseWheelZoom":
false,
} 改成 true
★ 整個VS Code 視窗內容放⼤大縮⼩小可⽤用 Ctrl + + 及 Ctrl + -
35. 凌波微步:wagon
+
VS
Code
的輕功哲學
程式碼縮排導引線
• 讓滑⿏鼠滾輪調整編輯區的字型⼤大⼩小
{
//
Controls
whether
the
editor
should
render
indent
guides
"editor.renderIndentGuides":
false,
} 改成 true
47. 凌波微步:wagon
+
VS
Code
的輕功哲學
• VS Code 預設使⽤用 PATH 裡的 PHP interpreter
• 可以直接將路徑指向 wagon 裡的 php.exe
客製化 PHP 設定
{
//
PHP
//
Whether
php
validation
is
enabled
or
not.
"php.validate.enable":
true,
//
Points
to
the
php
executable.
"php.validate.executablePath":
null,
//
Whether
the
linter
is
run
on
save
or
on
type.
"php.validate.run":
"onSave"
}
改成 wagonuwampbinphp…php.exe
改成 onType
61. 凌波微步:wagon
+
VS
Code
的輕功哲學
PHP Formatter
• 先裝 PHP-CS-Fixer
• 設定 PHP Formatter
$
composer
global
require
friendsofphp/php-‐cs-‐fixer
{
//
PHP
Formatter
Settings
//
Whether
the
php-‐cs-‐fixer
library
has
been
installed
using
Composer.
If
true,
the
extension
will
override
pharPath
and
assume
you
have
added
Composer
to
your
PATH.
"phpformatter.composer":
false,
//
Whether
files
should
be
fixed
on
save.
"phpformatter.onSave":
false
}
改成 true
改成 true
62. 凌波微步:wagon
+
VS
Code
的輕功哲學
PHP Debug
• 設定 UwAmp 的 XDebug Remote Auto Start