Hi, recently I have done a merge request for my nrepl-branch: <a href="https://gitorious.org/evil/evil/merge_requests/33" target="_blank">https://gitorious.org/evil/evil/merge_requests/33</a><br><br>That got me thinking, we should really have a system for providing mode-specific operators or motions.<br>
Of course one could just say that the end user just have to redefine the associated function, but I think we could do better.<br><br>Dispatch on major-mode and on optional list of minor-modes.<br>I think many of the operations can be a simple dispatch on "(eq type 'line)".<br>
Then doing a eventual modification on the beg-end area.<br><br>I am not really familiar with elisp though, what are the equivalence of multimethods as found in clojure for example?<br><br>We can do context aware stuff like:<br>
<br>"cW" stopping in the case of structure(parenthesis etc) when in lispy-modes.<br>"gd" Using whatever we have available for definition.<br>"i" Going to the first available actual input-area. (mostly for repls) <br>
<br>I would leave visual selection as is.<br>
All this can be done inline in the relevant function, but the core quickly gets messy, so I would like the code to reside in evil-integration.el<br>Also the end user should be able to easy define a code path for their mode without copy-pasting the original function.<br>
<br>This would be a bit of work though, but I would like if Evil could offer sane operators for many frequently used modes.<br><br>I would like some feedback before I start hacking on this, since I have very limited experience with both elisp and evil.<br>
<br>Thanks<br>