Skip to content

Latest commit

 

History

History
131 lines (84 loc) · 1.92 KB

File metadata and controls

131 lines (84 loc) · 1.92 KB

チートシート

コマンドやショートカットの一覧。

チュートリアルで使うものから使ってはいないけど便利なものを掲載。

コンソール

アプリケーションの作成

create-react-app todolist

todolistはアプリケーションの名前。

開発サーバー起動

yarn start

http://localhost:3000/ でサーバーが起動する。

ビルド

yarn build

./buildに出力される。

依存ライブラリの準備

yarn install

./node_modulesに必要なパッケージがインストールされる。

プロジェクトをgit cloneした直後やgit clean -xdf .でカレントディレクトリ以下を綺麗にしたあとなどにyarn installをすることがある。

Visual Studio Code

定義へ移動

F12

ファイルを検索して移動する

ctrl + P

ファイルのシンボルを検索して移動する

ctrl + shift + O

別タブで開いているファイルも含めて検索する場合は次のショートカット。

ctrl + T

複数のファイルの中身を検索する

ctrl + shift + F

ターミナルを開く・閉じる

ctrl + @

コマンドを実行する

ctrl + shift + P

Markdownをプレビューする

ctrl + shift + v

Git

検索する

fooという文字列を検索する。

git grep foo

大文字小文字を無視する。

git grep -i foo

正規表現で検索する。

git grep -e "fo*ba[rz]"

foobarを含む行を検索する(論理積)。

git grep -e foo --and -e bar

fooまたはbarを含む行を検索する(論理和)。

git grep -e foo --or -e bar

Gitで管理しているファイルを一覧する

git ls-files