Atom에서 프로젝트 검색 결과를 클립 보드에 복사하는 방법

그런 다음 [Option+⌘+I]에서 Developer Tool을 열고 Console에서 다음을 수행합니다.
pack = atom.packages.getActivePackage('find-and-replace');
results = pack.mainModule.resultsModel.results;
hoge = Object.values(results).map((result) => { return {filePath: result.filePath, matches: result.matches.map((match) => { return match.lineText })} });
copy(hoge);

클립보드에 다음과 같이 복사됩니다.
[
{
"filePath": "/Users/you/Projects/hoge/app/controllers/api/api_controller.rb",
"matches": [
"class Api::ApiController < ApplicationController"
]
},
{
"filePath": "/Users/you/Projects/hoge/app/controllers/api/bills_controller.rb",
"matches": [
"class Api::BillsController < Api::ApiController"
]
},
{
"filePath": "/Users/you/Projects/hoge/app/controllers/api/clients_controller.rb",
"matches": [
"class Api::ClientsController < Api::ApiController"
]
},
...
]
이상입니다.
Reference
이 문제에 관하여(Atom에서 프로젝트 검색 결과를 클립 보드에 복사하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/isuke/items/fe24b94c31ff4ee7b394텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)