Joep Schuurkes (Posts about vim)https://smallsheds.garden/categories/vim.atom2023-11-26T10:50:52ZJoep SchuurkesNikola(clj 2) Setting up Vim for Clojurehttps://smallsheds.garden/blog/clojure/2020/clj2-setting-up-vim/2020-05-05T21:55:15+02:002020-05-05T21:55:15+02:00Joep Schuurkes<div><p>As mentioned in my <a href="https://smallsheds.garden/blog/clojure/2020/clj1-deciding-on-an-editor/">previous post</a> I've decided to use <a href="https://www.vim.org/">Vim</a> as my Clojure editor. That leaves me with three things to do: getting reacquainted with Vim, updating my Vim config in the .<code>vimrc</code> file, and installing both general and Clojure-specific Vim plugins.</p>
<h3>Getting reacquainted with Vim</h3>
<p>Ever since I learned Vim basics a long time ago I have been using it once in a while to make small edits to a config file or a commit message, but not for anything more complicated than that. So that's the first thing I wanted to address: refresh my basics and make sure I know where to find more information when I need it.</p>
<h4>Vimtutor</h4>
<p>I figured that a good way to get back into Vim was the <a href="https://vimhelp.org/usr_01.txt.html#vimtutor">Vimtutor</a>. It's a 30-minute interactive tutorial where you edit a file with instructions with vim. I kept notes of what it covers, which you can find <a href="https://smallsheds.garden/my-projects/vimtutor">here</a>. Vim's help also includes a <a href="https://vimhelp.org/quickref.txt.html">quickref</a>, an "Overview of the most common commands you will use", which is intimidatingly long considering that description. As a reference to look things up in, it should be useful, though.</p>
<p><a href="https://smallsheds.garden/blog/clojure/2020/clj2-setting-up-vim/">Read more…</a> (5 min remaining to read)</p></div>(clj 1) Deciding on a Clojure editorhttps://smallsheds.garden/blog/clojure/2020/clj1-deciding-on-an-editor/2020-05-01T18:00:15+02:002020-05-01T18:00:15+02:00Joep Schuurkes<div><p>The second chapter of "<a href="https://www.braveclojure.com/">Clojure for the Brave and True</a>" is all about Emacs, "an excellent Clojure editor". Now you might wonder: does your choice of editor really matter that much? You're learning the language, so you don't need advanced IDE features. Some syntax highlighting, some code completion, something to help you manage all those parantheses perhaps, done. That would be true if not for the Clojure REPL.</p>
<h3>The Clojure REPL</h3>
<p>The <a href="https://clojure.org/guides/repl/introduction">REPL</a> is definitely a Thing™️ in Clojure. It gives you a prompt where you can type code and it will execute it immediately. You can also load files with code into it, interacting with the functions and data defined in those. So that's a signifcantly faster feedback loop than having to compile and then run - which is how you'd normally run something written in Clojure, since its primary platform is the JVM. There are <a href="https://clojure.org/guides/repl/launching_a_basic_repl">different ways</a> of launching a REPL, but most guides I found tell you to use <a href="https://leiningen.org/">Leiningen</a>. Oh, and REPL stands for Read-Evaluate-Print_Loop, because that's what the REPL does.</p>
<p>It definitely feels like this REPL is a bigger deal than I appreciate right now. Probably because I have only just begun learning Clojure. On the other hand, I may have also been spoiled by the quick feedback provided by Python and its <a href="https://docs.python.org/3/library/idle.html">IDLE</a>. On the third hand, it's only because of learning of the Clojure REPL, I looked into importing files into Python's IDLE and found out that's indeed a thing it can do.</p>
<p><a href="https://smallsheds.garden/blog/clojure/2020/clj1-deciding-on-an-editor/">Read more…</a> (5 min remaining to read)</p></div>