{"action":"created","issue":{"url":"https://api.github.com/repos/chrisdone/structured-haskell-mode/issues/81","labels_url":"https://api.github.com/repos/chrisdone/structured-haskell-mode/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/chrisdone/structured-haskell-mode/issues/81/comments","events_url":"https://api.github.com/repos/chrisdone/structured-haskell-mode/issues/81/events","html_url":"https://github.com/chrisdone/structured-haskell-mode/issues/81","id":42092033,"number":81,"title":"Evil incompatibility","user":{"login":"ian-mi","id":6137994,"avatar_url":"https://avatars.githubusercontent.com/u/6137994?v=3","gravatar_id":"","url":"https://api.github.com/users/ian-mi","html_url":"https://github.com/ian-mi","followers_url":"https://api.github.com/users/ian-mi/followers","following_url":"https://api.github.com/users/ian-mi/following{/other_user}","gists_url":"https://api.github.com/users/ian-mi/gists{/gist_id}","starred_url":"https://api.github.com/users/ian-mi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ian-mi/subscriptions","organizations_url":"https://api.github.com/users/ian-mi/orgs","repos_url":"https://api.github.com/users/ian-mi/repos","events_url":"https://api.github.com/users/ian-mi/events{/privacy}","received_events_url":"https://api.github.com/users/ian-mi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrisdone/structured-haskell-mode/labels/mode-conflict","name":"mode-conflict","color":"009800"},{"url":"https://api.github.com/repos/chrisdone/structured-haskell-mode/labels/question","name":"question","color":"c7def8"},{"url":"https://api.github.com/repos/chrisdone/structured-haskell-mode/labels/wont-fix","name":"wont-fix","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-09-05T21:26:29Z","updated_at":"2015-09-24T12:31:52Z","closed_at":null,"body":"When using evil + shm with minimal configuration, most of shm does not appear to work correctly. For example if I write\r\n\r\nf = foo bar\r\n\r\nand I move my cursor so that bar is the current node and type C-j in order to make a new sibling, bar is split at the cursor position, for example\r\n\r\nf = foo b\r\n           ar\r\n\r\nIs it possible to configure evil to work with shm?\r\n\r\nedit: github ate my whitespace here, but ar should be aligned with b.\r\n\r\nedit: My .emacs config:\r\n(require 'evil)\r\n(require 'shm)\r\n\r\n(evil-mode 1)\r\n\r\n(add-hook 'haskell-mode-hook 'structured-haskell-mode)"},"comment":{"url":"https://api.github.com/repos/chrisdone/structured-haskell-mode/issues/comments/142914978","html_url":"https://github.com/chrisdone/structured-haskell-mode/issues/81#issuecomment-142914978","issue_url":"https://api.github.com/repos/chrisdone/structured-haskell-mode/issues/81","id":142914978,"user":{"login":"unhammer","id":56868,"avatar_url":"https://avatars.githubusercontent.com/u/56868?v=3","gravatar_id":"","url":"https://api.github.com/users/unhammer","html_url":"https://github.com/unhammer","followers_url":"https://api.github.com/users/unhammer/followers","following_url":"https://api.github.com/users/unhammer/following{/other_user}","gists_url":"https://api.github.com/users/unhammer/gists{/gist_id}","starred_url":"https://api.github.com/users/unhammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unhammer/subscriptions","organizations_url":"https://api.github.com/users/unhammer/orgs","repos_url":"https://api.github.com/users/unhammer/repos","events_url":"https://api.github.com/users/unhammer/events{/privacy}","received_events_url":"https://api.github.com/users/unhammer/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T12:31:52Z","updated_at":"2015-09-24T12:31:52Z","body":"`                 (setq evil-auto-indent nil)` at least gets rid of the warnings, although you then have to press TAB after `o`. I ended up defining\r\n\r\n\r\n    (defun evil-shm/open-above (count)\r\n      \"Insert a new line above point and switch to Insert state.\r\n    The insertion will be repeated COUNT times.\"\r\n      (interactive \"p\")\r\n      (back-to-indentation)\r\n      (save-excursion (shm/newline-indent))\r\n      (setq evil-insert-count count\r\n            evil-insert-lines t\r\n            evil-insert-vcount nil)\r\n      (evil-insert-state 1)\r\n      (add-hook 'post-command-hook #'evil-maybe-remove-spaces))\r\n    \r\n    (defun evil-shm/open-below (count)\r\n      \"Insert a new line below point and switch to Insert state.\r\n    The insertion will be repeated COUNT times.\"\r\n      (interactive \"p\")\r\n      (goto-char (line-end-position))\r\n      (shm/newline-indent)\r\n      (setq evil-insert-count count\r\n            evil-insert-lines t\r\n            evil-insert-vcount nil)\r\n      (evil-insert-state 1)\r\n      (add-hook 'post-command-hook #'evil-maybe-remove-spaces))\r\n\r\n      (evil-define-key 'normal shm-map\r\n                   (kbd \"O\") #'evil-shm/open-above\r\n                   (kbd \"o\") #'evil-shm/open-below)\r\n"}}