masui / atom-dynamic-macro Goto Github PK
View Code? Open in Web Editor NEWDynamic Macro for Atom editor
License: MIT License
Dynamic Macro for Atom editor
License: MIT License
[Enter steps to reproduce below:]
asdf\nasdf\n
ctrl+t
Atom Version: 1.5.2
System: Mac OS X 10.10.5
Thrown From: atom-dynamic-macro package, v0.7.0
Uncaught TypeError: Cannot read property 'length' of undefined
At /Users/sho/.atom/packages/atom-dynamic-macro/lib/atom-dynamic-macro.coffee:4
TypeError: Cannot read property 'length' of undefined
at Object.module.exports.AtomDynamicMacro.execute (/Users/sho/.atom/packages/atom-dynamic-macro/lib/atom-dynamic-macro.coffee:4:3)
at atom-workspace.subscriptions.add.atom.commands.add.atom-dynamic-macro:execute (/Users/sho/.atom/packages/atom-dynamic-macro/lib/atom-dynamic-macro.coffee:9:94)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)
-1:13.3.0 settings-view:open (atom-text-editor.editor.is-focused)
-1:08.0 core:confirm (atom-text-editor.editor.mini.is-focused)
2x -0:04.3.0 editor:newline (atom-text-editor.editor.is-focused)
2x -0:00.6.0 atom-dynamic-macro:execute (atom-text-editor.editor.is-focused.autocomplete-active)
{
"core": {
"themes": [
"atom-dark-ui",
"atom-dark-syntax"
]
}
}
# User
atom-dynamic-macro, v0.7.0
# Dev
No dev packages
Endキー押下が再生時に無視される。
Window固有かも。
たとえば
https://gyazo.com/e203e03d003714607f18e8d9b126fad8
Windows固有の問題なのでしょうか?
個別対応は可能かもしれませんが、こういう操作はたくさんありそう(たとえば、coffeeスクリプトのダブルクオーテーション文字列内で#をタイプすると、#{}を自動挿入してくれる操作とか)なので、完全対応するのは難しいかも。
マクロ再生中にAtomの自動補完系の機能を完全に切って、再生終了時に自動補完機能を元に戻す、的な対応ができるとかなり安心できるのですが。
パッケージ入れるだけであらゆるキー入力のログが取れるようにしたい
#気づいた問題を忘れないようにバグレポも上げておきます。
seq の末尾が
(Ctrl+T) (Ctrl+T) なら問題なく再実行されるが
一度手を離して
(Ctrl+T) (Ctrl) (Ctrl+T) になるとマクロが再実行されない、という問題です。
容易に回避可能。
スペースキーの挙動も不審である
実装がダサいので接尾辞配列とかBurrows-Wheeler変換とかを使ってカコヨくしたい。
(実用的には無意味だけど)
Atom Version: 1.12.6
Electron Version: 1.3.9
System: Linux Mint
Thrown From: atom-dynamic-macro package, v1.2.0
Failed to load the atom-dynamic-macro package
At Duplicate key 'ctrl-t'
Error: Duplicate key 'ctrl-t'
at Object.detectDuplicateKeys (/usr/share/atom/resources/app.asar/node_modules/season/lib/cson.js:268:13)
at /usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:115:38
at Array.reduce (native)
at Obj (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:107:30)
at transformNode (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:197:12)
at Value (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:79:14)
at transformNode (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:197:12)
at /usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:114:17
at Array.reduce (native)
at Obj (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:107:30)
at transformNode (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:197:12)
at Value (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:79:14)
at transformNode (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:197:12)
at Block (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:76:14)
at transformNode (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:197:12)
at Object.parse (/usr/share/atom/resources/app.asar/node_modules/cson-parser/lib/parse.js:203:12)
at parseObject (/usr/share/atom/resources/app.asar/node_modules/season/lib/cson.js:42:23)
at parseContentsSync (/usr/share/atom/resources/app.asar/node_modules/season/lib/cson.js:68:16)
at Object.readFileSync (/usr/share/atom/resources/app.asar/node_modules/season/lib/cson.js:170:14)
at /usr/share/atom/resources/app.asar/src/package.js:387:38
at Array.map (native)
at Package.module.exports.Package.loadKeymaps (/usr/share/atom/resources/app.asar/src/package.js:384:46)
at /usr/share/atom/resources/app.asar/src/package.js:110:19
at Package.module.exports.Package.measure (/usr/share/atom/resources/app.asar/src/package.js:92:15)
at Package.module.exports.Package.load (/usr/share/atom/resources/app.asar/src/package.js:106:12)
at PackageManager.module.exports.PackageManager.loadPackage (/usr/share/atom/resources/app.asar/src/package-manager.js:466:14)
at /usr/share/atom/resources/app.asar/src/package-manager.js:410:19
at Config.module.exports.Config.transact (/usr/share/atom/resources/app.asar/src/config.js:312:16)
at PackageManager.module.exports.PackageManager.loadPackages (/usr/share/atom/resources/app.asar/src/package-manager.js:405:19)
at /usr/share/atom/resources/app.asar/src/atom-environment.js:772:28
{
"core": {
"telemetryConsent": "no",
"themes": [
"one-dark-ui",
"atom-dark-syntax"
]
}
}
# User
atom-dynamic-macro, v1.2.0 (inactive)
atom-wrap-in-tag, v0.6.0 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.45.0 (inactive)
base16-tomorrow-dark-theme, v1.3.0 (inactive)
base16-tomorrow-light-theme, v1.3.0 (inactive)
one-dark-ui, v1.6.2 (inactive)
one-light-ui, v1.6.2 (inactive)
one-dark-syntax, v1.5.0 (inactive)
one-light-syntax, v1.5.0 (inactive)
solarized-dark-syntax, v1.0.5 (inactive)
solarized-light-syntax, v1.0.5 (inactive)
about, v1.7.0 (inactive)
archive-view, v0.62.0 (inactive)
autocomplete-atom-api, v0.10.0 (inactive)
autocomplete-css, v0.13.1 (inactive)
autocomplete-html, v0.7.2 (inactive)
autocomplete-plus, v2.31.4 (inactive)
autocomplete-snippets, v1.11.0 (inactive)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (inactive)
background-tips, v0.26.1 (inactive)
bookmarks, v0.42.0 (inactive)
bracket-matcher, v0.82.2 (inactive)
command-palette, v0.39.0 (inactive)
deprecation-cop, v0.54.1 (inactive)
dev-live-reload, v0.47.0 (inactive)
encoding-selector, v0.22.0 (inactive)
exception-reporting, v0.40.0 (inactive)
find-and-replace, v0.202.2 (inactive)
fuzzy-finder, v1.4.0 (inactive)
git-diff, v1.1.0 (inactive)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (inactive)
image-view, v0.60.0 (inactive)
incompatible-packages, v0.26.1 (inactive)
keybinding-resolver, v0.35.0 (inactive)
line-ending-selector, v0.5.0 (inactive)
link, v0.31.2 (inactive)
markdown-preview, v0.158.8 (inactive)
metrics, v1.1.2 (inactive)
notifications, v0.65.1 (inactive)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.1 (inactive)
settings-view, v0.243.1 (inactive)
snippets, v1.0.4 (inactive)
spell-check, v0.68.4 (inactive)
status-bar, v1.4.1 (inactive)
styleguide, v0.47.2 (inactive)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.0 (inactive)
timecop, v0.33.2 (inactive)
tree-view, v0.210.0 (inactive)
update-package-dependencies, v0.10.0 (inactive)
welcome, v0.35.1 (inactive)
whitespace, v0.35.0 (inactive)
wrap-guide, v0.38.2 (inactive)
language-c, v0.54.0 (inactive)
language-clojure, v0.22.1 (inactive)
language-coffee-script, v0.48.0 (inactive)
language-csharp, v0.13.0 (inactive)
language-css, v0.40.1 (inactive)
language-gfm, v0.88.0 (inactive)
language-git, v0.15.0 (inactive)
language-go, v0.43.0 (inactive)
language-html, v0.47.1 (inactive)
language-hyperlink, v0.16.1 (inactive)
language-java, v0.24.0 (inactive)
language-javascript, v0.122.0 (inactive)
language-json, v0.18.3 (inactive)
language-less, v0.29.6 (inactive)
language-make, v0.22.2 (inactive)
language-mustache, v0.13.0 (inactive)
language-objective-c, v0.15.1 (inactive)
language-perl, v0.37.0 (inactive)
language-php, v0.37.3 (inactive)
language-property-list, v0.8.0 (inactive)
language-python, v0.45.1 (inactive)
language-ruby, v0.70.2 (inactive)
language-ruby-on-rails, v0.25.1 (inactive)
language-sass, v0.57.0 (inactive)
language-shellscript, v0.23.0 (inactive)
language-source, v0.9.0 (inactive)
language-sql, v0.25.0 (inactive)
language-text, v0.7.1 (inactive)
language-todo, v0.29.1 (inactive)
language-toml, v0.18.1 (inactive)
language-xml, v0.34.12 (inactive)
language-yaml, v0.27.1 (inactive)
# Dev
No dev packages
現在は決め打ち
apmでインストールできるようにする
パッケージのスコープ内の変数で大丈夫になったと思うので
Windows固有の問題かもしれません。
atom.keymaps.handleKeyboardEvent にタブキー押下イベントを渡しても何も起きません。
スペースやEnter対策で使っている editor.insertText を使うと、'\t' が挿入されますが、元操作では現在のカーソル位置依存でいい感じの数の半角スペースが入力されていたりするので、元操作とマクロ再生で結果が異なってしまいます。かなり詰んでる感があります。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.