-
-
Save hyuki/8752f17882b563034e4d89526a5a757e to your computer and use it in GitHub Desktop.
yet - VS Codeで未処理ファイル中を検索するためのファイルをカレントディレクトリに作るコマンド
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
YET_FILE = 'yet.code-search' | |
pwd = Dir.pwd.sub(/^#{Dir.home}/, '~') | |
if not File.exists?(YET_FILE) | |
open(YET_FILE, "w") do |f| | |
f.puts <<-"EOD" | |
# Query: 未処理ファイル中の検索文字列 | |
# Including: #{pwd}/*-yet-* | |
# ContextLines: 1 | |
EOD | |
end | |
end | |
system("code #{YET_FILE}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yet
を実行するとyet.code-search
をVS Codeで表示する。なければ作る。未処理ファイルのファイル名には
-yet-
を含めておく(123-mathgirl-yet-euler.txt
のように)。