4 ms·
Grasp – JavaScript structural search, replace, and refactor
- nikita2206 9y agoSSR (structural search and replace) is one of the greatest but overlooked features of IntelliJ. It helps with refactorings a lot
- igouy 9y agoPreviously, in Smalltalk, rewrite rules: http://www.refactory.com/tools/refactoring-browser/rewrite-tool http://www.refactory.com/tools/refactoring-browser/rewrite-t...
- crispinb 9y agoI was going to make the same comment. It's amazing how often I see enthusiastic reports on new tools whose equivalent has been just a keyboard shortcut away in IntelliJ for years. Maybe I should add a c2.com wiki page for 'SmugIntelliJWeenie'
- saas_co_de 9y agoExciting tool. I look forward to working with it.
- iovrthoughtthis 9y agoThis is honestly great.
- travmatt 9y agoI remember running across this when I was researching jscodeshift, though that seems to have a steeper learning curve.
- deleted 9y ago[deleted]
- souenzzo 9y agoIt's funny to see how many tools a non-lisp programmer needs...
- ken 9y agoLisp programmer here. This seems genuinely useful, in all languages. Can you describe how you'd do their examples (like "find the word 'remote', but only when used as an identifier") in Lisp?
- notduncansmith 9y agoYou can pry Clojure from my cold, lifeless hands, but this term is popular for a reason: http://wiki.c2.com/?SmugLispWeenie http://wiki.c2.com/?SmugLispWeenie If you really want to convince someone your way is better, you should probably be less condescending (and if not, you’re just gloating).
- nobleach 9y agoI played around with jscodeshift and ASTExplorer a few weekends ago. I found it to be fairly opaque. All I was hoping to do was remove a wrapping function and replace it with its child/children. The documentation for jscodeshift is fairly rudimentary. I had high hopes of creating examples and submitting them as PRs... but alas, a weekend is only so long. Perhaps this weekend will have me giving it another shot with this tool.
- angel_j 9y agonpm star grasp
- angel_j 9y agohaters
- nailer 9y agoI've been able to use this for some basic stuff like renames, but still trying to work on a way to convert old style string concats: 'foo'+bar+'baz' to current JS template literals: `foo${bar}baz` If you do it first, let me know! Otherwise I'll throw mine on npm.