JunSuzukiJapan / atom-keyboard-macros-vim

MIT License
17 stars 7 forks source link

Failed to activate the atom-keyboard-macros-vim package #16

Open ghost opened 7 years ago

ghost commented 7 years ago

[Enter steps to reproduce:]

  1. Open a file
  2. hit qa

Atom: 1.16.0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.4 Thrown From: atom-keyboard-macros-vim package 0.1.6

Stack Trace

Failed to activate the atom-keyboard-macros-vim package

At Cannot read property 'on' of undefined

TypeError: Cannot read property 'on' of undefined
    at FindAndReplace.module.exports.FindAndReplace.getFindAndReplaceMethods (/packages/atom-keyboard-macros-vim/node_modules/atom-keyboard-macros/lib/find-and-replace.coffee:121:26)
    at FindAndReplace.module.exports.FindAndReplace.activate (/packages/atom-keyboard-macros-vim/node_modules/atom-keyboard-macros/lib/find-and-replace.coffee:29:6)
    at Object.activate (/packages/atom-keyboard-macros-vim/node_modules/atom-keyboard-macros/lib/atom-keyboard-macros.coffee:90:11)
    at Object.activate (/packages/atom-keyboard-macros-vim/lib/atom-keyboard-macros-vim.coffee:25:24)
    at Package.module.exports.Package.activateNow (/app.asar/src/package.js:218:19)
    at /app.asar/src/package.js:876:25
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:240:20)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

     -1:26.8.0 vim-mode-plus:activate-insert-mode (input.hidden-input)
 98x -1:25.9.0 core:move-right (input.hidden-input)
  2x -1:05.9.0 core:move-down (input.hidden-input)
     -1:04.1.0 vim-mode-plus:activate-normal-mode (input.hidden-input)
  5x -1:03.8.0 vim-mode-plus:move-down (input.hidden-input)
  2x -1:01.9.0 vim-mode-plus:move-up (input.hidden-input)
     -1:01.5.0 vim-mode-plus:move-right (input.hidden-input)
 10x -1:01.2.0 vim-mode-plus:move-left (input.hidden-input)
     -0:59.1.0 vim-mode-plus:insert-after (input.hidden-input)
 23x -0:57.6.0 core:move-right (input.hidden-input)
     -0:53.1.0 core:move-left (input.hidden-input)
 77x -0:51.7.0 core:move-right (input.hidden-input)
     -0:36.9.0 core:move-left (input.hidden-input)
     -0:12.4.0 vim-mode-plus:activate-normal-mode (input.hidden-input)
     -0:11.2.0 core:save (input.hidden-input)
  5x -0:05.0 blur (input.hidden-input)

Non-Core Packages

atom-keyboard-macros 0.9.2 
atom-keyboard-macros-vim 0.1.6 
busy-signal 1.3.0 
contrast-ui 0.53.0 
editorconfig 2.2.2 
git-diff-details 1.4.0 
git-projects 1.17.0 
git-status 0.3.4 
intentions 1.1.2 
language-dotfiles 1.0.0 
language-markdown 0.20.0 
language-puppet 0.22.0 
linter 2.1.2 
linter-puppet-lint 0.8.2 
linter-shellcheck 1.4.4 
linter-ui-default 1.2.2 
merge-conflicts 1.4.4 
min-ui 0.0.4 
vim-mode-plus 0.89.0 
vim-mode-plus-ex-mode 0.9.0 
Timu57 commented 7 years ago

same here, but the package is running nevertheless

chadwtaylor commented 7 years ago

Is this being worked on? Macros is a way of life for me. :)

joaomilho commented 7 years ago

also had that, any news?

FrankelJb commented 7 years ago

I just installed the plugin, had this issue, created the key-bindings in keymap.cson below and the problem was resolved.

'atom-text-editor.vim-mode-plus:not(.insert-mode)':
    'q': 'atom-keyboard-macros-vim:toggle_record_macro_vim'
    '@': 'atom-keyboard-macros-vim:execute_macro_vim'
    'Q': 'atom-keyboard-macros:call_last_kbd_macro'
ryanolsonx commented 6 years ago

This is still a problem for me. Is anything being done to resolve this?

storypixel commented 6 years ago

me too

storypixel commented 6 years ago

what helped me was to manually go up the menu and manually toggle (Packages > atom-keyboard-macros-vim > Toggle macro recording) ... from there I could type 'q' and do my thing

TomBugnon commented 6 years ago

Still an issue here

damaru2 commented 6 years ago

Still an issue here as well. I mean, what @storypixel has suggested works but you have to click manually on Toggle macro recording every time you open atom.

youngmoon01 commented 6 years ago

In my case, solution suggested by @storypixel didn't work. As a temporary solution, I manually commented out three lines which produces error message. Below is the step to comment out those lines.

  1. Open the Settings(ctrl+comma) and click the 'open config folder' below the 'Install' button (or manually navigate/open the config directory)

  2. Open a coffee script file below .atom/packages/atom-keyboard-macros-vim/node_modules/atom-keyboard-macros/lib/find-and-replace.coffee

  3. Comment out these three lines with '#': 121, 126, 131

  4. The error message will never appear unless you uninstall and reinstall the package.

*** This is a temporary solution just to get rid of the error message. Most of my use case works with those three lines commented out. I don't know much of the coffee script but I guess some command sequences related to the 'find and replace' feature might not be recorded as the result of commenting out. I'm not sure but it seems that there is version incompatibility between this package(old version of coffee scripts?) and current java-vim-plus package(javascript ES6 based?)