1
Linux에서 Atom 편집기를 사용하면 가장 최근에 활성화 된 Atom 창에서 파일 관리자를 사용하여 파일을 여는 옵션을 찾지 못했습니다. 대신, 항상 생성 된 첫 번째 Atom 창에서 열립니다.내가 처음 열었던 Atom 창 대신 가장 최근에 활성화 된 Atom 편집기 창에서 파일을 열려면 어떻게합니까?
어떻게 수정합니까?
Linux에서 Atom 편집기를 사용하면 가장 최근에 활성화 된 Atom 창에서 파일 관리자를 사용하여 파일을 여는 옵션을 찾지 못했습니다. 대신, 항상 생성 된 첫 번째 Atom 창에서 열립니다.내가 처음 열었던 Atom 창 대신 가장 최근에 활성화 된 Atom 편집기 창에서 파일을 열려면 어떻게합니까?
어떻게 수정합니까?
이에 대한 옵션이 있습니다 :
-a, --add Open path as a new project in last used window. [boolean]
...하지만 예상대로 어쨌든, 그것은 작동하지 않습니다. 그러나, 나는 workaround를 발견했다.
이 코드는 라인 (862) src/main-process/atom-application.js
의 주위 어딘가에 위치 :
if (existingWindow == null) {
if (currentWindow = window != null ? window : this.lastFocusedWindow) {
if (addToLastWindow || currentWindow.devMode === devMode && (stats.every(function(stat) {
return typeof stat.isFile === "function" ? stat.isFile() : void 0;
}) || stats.some(function(stat) {
return (typeof stat.isDirectory === "function" ? stat.isDirectory() : void 0) && !currentWindow.hasProjectPath();
}))) {
existingWindow = currentWindow;
}
}
}
주석으로 첫 번째 줄과 그 이전 닫는 대괄호 :
// if (existingWindow == null) {
if (currentWindow = window != null ? window : this.lastFocusedWindow) {
if (addToLastWindow || currentWindow.devMode === devMode && (stats.every(function(stat) {
return typeof stat.isFile === "function" ? stat.isFile() : void 0;
}) || stats.some(function(stat) {
return (typeof stat.isDirectory === "function" ? stat.isDirectory() : void 0) && !currentWindow.hasProjectPath();
}))) {
existingWindow = currentWindow;
}
}
// }
... aaaand함으로써 해결할!
불행하게도 모든 원자 업데이트 후 재실행 할 필요가있는 모든^_^
이를 후에하는 해킹이 불가능한 텍스트 편집기를 그것은'. – Raj
@Raj의 경우, [atom Github page] (https://github.com/atom/atom/issues)에서 문제를 제기하는 것이 더 좋지 않습니까? 현재의 행동은 분명히 예상 된 행동이 아닙니다. – hidefromkgb
그리고 BTW는 코드를 좀 더 읽었습니다. 정정이 합법적이라고 확신합니다. 왜냐하면 모든 것이'this.windowForPaths'와'this.lastFocusedWindow'의 우선 순위를 바꾸기 때문입니다. – hidefromkgb