blog.udcxx.me
Open in
urlscan Pro
160.251.152.101
Public Scan
URL:
https://blog.udcxx.me/article/200408/vscode-files-exclude/_payload.json?100f0fd6-9ffb-4add-bbc1-54cfa9dc0534
Submission: On December 19 via api from US — Scanned from JP
Submission: On December 19 via api from US — Scanned from JP
Form analysis
0 forms found in the DOMText Content
[{"data":1,"prerenderedAt":250},["ShallowReactive",2],{"content-query-4BzlsJloDl":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tags":11,"eyecatch":12,"eyecatchEmoji":13,"body":14,"_type":244,"_id":245,"_source":246,"_file":247,"_stem":248,"_extension":249},"/article/200408/vscode-files-exclude","200408",false,"","VS Codeの隠しフォルダ設定を変更する","VSCodeで隠しフォルダやhtaccessなどの隠しファイルもファイルツリーに表示されるように設定する方法","2020-04-08T00:00:00.000Z","IT","200408.jpg",null,{"type":15,"children":16,"toc":239},"root",[17,25,38,52,65,74,81,94,102,153,165,170,182,191,202,215,219,224,234],{"type":18,"tag":19,"props":20,"children":21},"element","p",{},[22],{"type":23,"value":24},"text","こんにちは、だいちゃんです。",{"type":18,"tag":19,"props":26,"children":27},{},[28,30,36],{"type":23,"value":29},"普段はAtomというエディターをこよなく愛する僕ですが、実はVS Codeの軽快な動作に惹かれてプライベートのMacbook Air(Mid-2014)ではそっちを使っています( ",{"type":18,"tag":31,"props":32,"children":33},"del",{},[34],{"type":23,"value":35},"Atomには秘密ですよ",{"type":23,"value":37}," )",{"type":18,"tag":19,"props":39,"children":40},{},[41,43,50],{"type":23,"value":42},"デフォルトの設定なのか、何かの拍子に設定が書き換わったのかわかりませんが、 ",{"type":18,"tag":44,"props":45,"children":47},"code",{"className":46},[],[48],{"type":23,"value":49},".git",{"type":23,"value":51}," ディレクトリがVS Code内のファイルツリー(エクスプローラーって呼ぶの?)で非表示になっているようでした。",{"type":18,"tag":19,"props":53,"children":54},{},[55,57,63],{"type":23,"value":56},"ちょっと使う用事があったので、 ",{"type":18,"tag":58,"props":59,"children":60},"strong",{},[61],{"type":23,"value":62},"VS Codeのファイルツリーにも隠しフォルダを表示させるように設定を変更",{"type":23,"value":64}," してみました。",{"type":18,"tag":66,"props":67,"children":68},"blockquote",{},[69],{"type":18,"tag":19,"props":70,"children":71},{},[72],{"type":23,"value":73},"ファイルツリーに表示させなくても1つのファイルの中身を確認したいだけだったのでVimとかでサクッと見ちゃえば良かったなぁ、と記事を書きながら思ってますw",{"type":18,"tag":75,"props":76,"children":78},"h2",{"id":77},"設定ファイル-settingsjson-を開く",[79],{"type":23,"value":80},"設定ファイル settings.json を開く",{"type":18,"tag":19,"props":82,"children":83},{},[84,86,92],{"type":23,"value":85},"VS Codeの場合、GUIの設定画面から設定できない細かい制御は ",{"type":18,"tag":44,"props":87,"children":89},{"className":88},[],[90],{"type":23,"value":91},"settings.json",{"type":23,"value":93}," というjsonファイルで管理しているようです。",{"type":18,"tag":66,"props":95,"children":96},{},[97],{"type":18,"tag":19,"props":98,"children":99},{},[100],{"type":23,"value":101},"Atomも似たようなものにconfig.csonがありますよね",{"type":18,"tag":19,"props":103,"children":104},{},[105,107,113,115,121,122,127,129,135,137,143,145,151],{"type":23,"value":106},"Macの場合 ",{"type":18,"tag":44,"props":108,"children":110},{"className":109},[],[111],{"type":23,"value":112},"⌘",{"type":23,"value":114}," ",{"type":18,"tag":44,"props":116,"children":118},{"className":117},[],[119],{"type":23,"value":120},"shift",{"type":23,"value":114},{"type":18,"tag":44,"props":123,"children":125},{"className":124},[],[126],{"type":23,"value":19},{"type":23,"value":128}," を同時押しでコマンドパレットを開き、 ",{"type":18,"tag":44,"props":130,"children":132},{"className":131},[],[133],{"type":23,"value":134},"setting.json",{"type":23,"value":136}," と入力することで設定ファイルを開くことが出来ます。この場合、 ",{"type":18,"tag":44,"props":138,"children":140},{"className":139},[],[141],{"type":23,"value":142},"規定の設定(JSON)を開く",{"type":23,"value":144}," と ",{"type":18,"tag":44,"props":146,"children":148},{"className":147},[],[149],{"type":23,"value":150},"設定(JSON)を開く",{"type":23,"value":152}," がありますが、とりあえず僕は後者に記述しました。",{"type":18,"tag":19,"props":154,"children":155},{},[156,158,163],{"type":23,"value":157},"ちなみに設定ファイルは、設定画面の右上にある ",{"type":18,"tag":44,"props":159,"children":161},{"className":160},[],[162],{"type":23,"value":150},{"type":23,"value":164}," というボタンからも開くことが出来ます。",{"type":18,"tag":75,"props":166,"children":168},{"id":167},"ファイル表示制御の記述をする",[169],{"type":23,"value":167},{"type":18,"tag":19,"props":171,"children":172},{},[173,175,180],{"type":23,"value":174},"既に記載されている設定ファイルの中身を ",{"type":18,"tag":58,"props":176,"children":177},{},[178],{"type":23,"value":179},"書き換えてしまわないように注意しながら、",{"type":23,"value":181}," 下記を追記します。",{"type":18,"tag":183,"props":184,"children":186},"pre",{"code":185},"{\n \"files.exclude\": {\n \"**/.git\": false\n }\n}\n",[187],{"type":18,"tag":44,"props":188,"children":189},{"__ignoreMap":7},[190],{"type":23,"value":185},{"type":18,"tag":19,"props":192,"children":193},{},[194,200],{"type":18,"tag":44,"props":195,"children":197},{"className":196},[],[198],{"type":23,"value":199},"files.exclude",{"type":23,"value":201}," まで入力すると .git・.svn・.hg・CVS・.DS_Store の記述が自動挿入された場合は、gitのところを false に書き換えるだけでOKです。",{"type":18,"tag":19,"props":203,"children":204},{},[205,207,213],{"type":23,"value":206},"また、他に非表示にしたい拡張子があれば、上記の記述を真似て追記すれば良さそうです( ",{"type":18,"tag":44,"props":208,"children":210},{"className":209},[],[211],{"type":23,"value":212},".htaccess",{"type":23,"value":214}," とか)",{"type":18,"tag":216,"props":217,"children":218},"hr",{},[],{"type":18,"tag":19,"props":220,"children":221},{},[222],{"type":23,"value":223},"以上で、VS Codeの隠しフォルダ設定を変更することが出来ました。",{"type":18,"tag":19,"props":225,"children":226},{},[227,229],{"type":23,"value":228},"Finderの設定と一致していないようなので適宜書き換えないといけないのは面倒ですが、逆に.(ピリオド)から始まる一般的な隠しファイルが一括で表示/非表示の切り替えされないのは ",{"type":18,"tag":58,"props":230,"children":231},{},[232],{"type":23,"value":233},"メリットかもしれません。",{"type":18,"tag":19,"props":235,"children":236},{},[237],{"type":23,"value":238},"( .htaccess とかをローカルで書き換えたい!って時に便利かもですね)",{"title":7,"searchDepth":240,"depth":240,"links":241},2,[242,243],{"id":77,"depth":240,"text":80},{"id":167,"depth":240,"text":167},"markdown","content:article:200408:vscode-files-exclude.md","content","article/200408/vscode-files-exclude.md","article/200408/vscode-files-exclude","md",1734081697819]