LoginSignup
1
3

More than 5 years have passed since last update.

VSCode をKobito っぽく使う

Posted at

VSCode を Kobito っぽく使う

QiitaのKobitoとかMarkdownの共有サービス便利でいいですね。。
なるべくエディタはvscodeに一元管理したいのと、データはgithubにまとめたいなと思ったので、できないか調べてみました。

Step1 VSCodeの拡張機能を入れる

これを使います

Run on Save ファイル保存時に自動でコマンド実行

Auto Run Command プロジェクトを開いたときにコマンド自動実行

Step2 メモ共有用のレポジトリを作りパスワード不要でpull & pushできるようにする

Step3 Workspace settingを書く

VSCodeの自動保存機能と、RunOnSaveでファイル保存時にauto commit & pushの設定。

{
    "files.autoSave": "onFocusChange",
    "emeraldwalk.runonsave": {
        "commands": [
            {
                "match": "\\.md$",
                "cmd": "cd ${workspaceRoot}; git add --all; git commit -a -m 'auto commit'; git push origin master;"
            }
        ]
    },
    "auto-run-command.rules": [
     {
         "command": "workbench.action.git.pull",
         "message": "git pull"
     }
    ]
}

Auto saveについては、こちらを参照

Markdown プレビューは,こちらを参照

# TODO

  • ファイル名を自動で決める

コンフリクトしたら、gitコマンドで修正してください :P

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3