4 ms·
I have been really enjoying this tutorial. If you wanted to be super timely you could add instructions for doing it in Light Table.
by phren0logy 13y ago
I have been really enjoying this tutorial. If you wanted to be super timely you could add instructions for doing it in Light Table.
- elwell 13y agoI was wondering the same thing. While I don't think Emacs users will ever say that LightTable is better, they should consider: 1. LightTable might be better for new Clojure users who aren't yet attached to Emacs 2. You can use (some) Emacs key bindings in LightTable /not to start an editor war/
- hexasquid 13y agoAt the risk of starting a war - I'm used to Vim. Is there a benefit to looking into LightTable or Emacs if I want to get into Clojure?
- MBlume 13y agoThere may be, I'm not that familiar with either, but do try vim-fireplace, it's pretty darn good.
- grayrest 13y agoLisps work better from an editor that can provide tight REPL integration. I've used vim for 15 years and use it for everything else but it does not do this well. Clojure support via vim-fireplace is better than nothing and I've used it (and it's predecessors) for couple hundred line projects spaced out over the last few years but it's never felt good to me. Fireplace and the nREPL, unlike the older integration schemes, almost always work but my current complaint is that I don't like how the output is presented. Light Table does the integration right. You load up a clojure file, hit eval, and it works without having to mess with it. Additionally, it works well with Clojurescript, which I never really got working with Vim fireplace. The doc system is integrated, autocomplete works. The Light Table vim plugin provides decent but not great vim emulation (e.g. the b text object is missing, which is important for a lisp) and while it's not as nice for editing as my heavily customized home vim setup, I'm happier doing Clojure in LT than in Vim.
- masklinn 13y agoLightTable and Emacs's SLIME (through swank, for clojure) likely provide much better lisp integration than what vim has available. I've got no idea what's available in vim so I may be wrong, but here's SLIME: http://www.cliki.net/SLIME%20Features http://www.cliki.net/SLIME%20Features
- chc 13y agoGrayrest explained why something like LightTable is so nice, but it's probably worth mentioning that LightTable has a built-in Vim keybindings mode as well, so it will hopefully not be too unfamiliar.
- danneu 13y agoI was used to Vim as well, but I decided to jump into Emacs and Clojure at the same time. Once I installed Evil-mode (Vim bindings), an Emacs buffer felt so similar to Vim that I was immediately productive. From there, I could just focus on the other things like how to open a file (C-x f) and how to launch nREPL and begin evaluating code within Clojure source files.
- cgag 13y agoI tried this route for a long time but didn't find it to be worth it at all. All the plugins you use will still have horrible chording style shortcuts. I'm much happier now that I'm just using vim-fireplace.
- s_kilk 13y agoIn a word - Yes. I've been using vim exclusively for the past year, after a brief stint with emacs, but this post prompted me to go back and try emacs again. Over the year of vim use I've never really been satisfied with editing clojure in vim, it just doesn't work as well as emacs for that purpose. This weekend I decided to try out emacs with evil-mode and now I've switched permanently to that set up, it's the best of all worlds, you get to have all the emacs/clojure integration goodness while still having super-powerful vi keybindings and editing capabilities. I'd recommend you give it a shot at least :)
- Derbasti 13y agoI would presume that the author is very proficient with Emacs and not deeply familiar with Light Table. If this is true, the tutorial would probably not teach you the most idiomatic way of using Light Table.
- grayrest 13y agoBasic instructions. I use cmd for the shortcuts below, substitute ctrl on non-mac platforms. 1. Install Leiningen http://leiningen.org/ http://leiningen.org/ you do not need to install clojure, lein will grab clojure for you. 2. `lein new playground` from the command line to create a 'playground' project 3. Open Light Table 4. ctrl-space `woto` for "Toggle Workspace tree" 5. Add the playground project folder you just created 6. cmd-o `core.clj` to open the main clojure file for the project 7. On an empty line type `(+ 1 1)` and hit cmd-enter Things will grind away for a while as all the dependencies are downloaded and the JVM starts up. Get a cup of coffee or something. Eventually you'll see a green `2` show up. You can then type anything in the tutorial and hit cmd-enter to evaluate it or cmd-shift-enter to evaluate the entire file. Think of the file as a shell with an editable history instead of something you'd want to commit to source control. Documentation is searchable via ctrl-shift-d or moving your cursor on top of a function name and hitting ctrl-d. Autocomplete is available on tab, you can jump to definition with cmd-. and back with cmd-,
- dserban 13y agoVery useful! Additional question: I noticed how on the clojurescreencasts site the author of the videos uses InstaREPL in split screen mode. I couldn't figure out how to do that with my own installation of LT. Do you know?
- grayrest 13y agoThe split is 'Tabset: Add a tabset' and you can just drag the instarepl tab over.
- nonrecursive 13y agoThanks for the feedback! I should add a link to Light Table, but I don't think I'll end up writing instructions for it as it seems like the existing docs are pretty good.
- elsherbini 13y agoI recently started using light table. You shouldn't need to install leiningen, just open up light table, hit ctrl/cmd - space, and type instarepl. select the option to open a new instarepl, and it should start writing without any additional setup.