In this section, I’ll outline all the cool tips and tricks I have for developing SML in Vim.īut first, if you’ve never taken a look into how to configure Vim, I suggest you start out by walking through this quick workshop called Vim as an IDE. For me, this means striving to get the most out of Vim. Programming is so much more enjoyable when you’re not fighting your editor.
To get started, you’ll have to change how you launch the SML/NJ REPL. Speaking of the little things, when using the SML REPL, you don’t have access to all the usual command line niceties like command history and access to arrow keys for editing, let alone Vi-like keybindings. introduced tab completion (because the shell has filename completion).
One thing that I’ve seen far too many times from course documentation is that they tell students to run their code like this: The rest of these steps should apply regardless of whether you’re working on SML locally or remotely. If that matters to you, consider following the the SML/NJ and MLton installation instructions directly. Note for Ubuntu users: the versions of these two that ship in the default package distribution are frequently out of date.
Note for macOS users: if you’ve never used Homebrew before, you’ll need to install it first. # macOS - one or both of: brew install smlnj brew install mlton # Ubuntu - one or both of: sudo apt-get install smlnj sudo apt-get install mltonįeel free to install both they’ll play nicely with each other, and each offers advantages over the other.
(I have a separate post on using SML to release software publically with more details). It has better support for compiling SML programs to standalone executables which can be shared from one machine to another. To play around with releasing programs written in SML to other people, install MLton. Take the time to install a version of SML right now:Īt CMU we use SML/NJ, which is convenient because it has a REPL that for playing around with SML interactively. On macOS and Ubuntu, the two most popular implementations of SML are already packaged. While developing SML in a remote environment like the shared Andrew Unix machines makes it easy to dive right in, I prefer doing development on my laptop-it doesn’t get slow when there are many people logged in, there’s no nightly reboots, and it doesn’t matter whether I have a strong WiFi connection. Note: I updated this post to more accurately reflect my SML dev setup in December 2019.
I have a slight preference for Vim (Neovim) on macOS, but many of these steps are platform agnostic. We’re going to be walking through a couple easy steps to make developing SML feel more fluid. I quite enjoy programming in SML, due in no small part to my collection of workflow hacks that make editing and developing with SML responsive and interactive. It’s clear that extensive thought has gone into its design and implementation. When it comes right down to it, SML is a pretty great language.
To install, copy the Python code for Sublime Text 3 found here.Once installed, you can use PackageĬontrol to install/remove/upgrade all other ST3 packages. To begin taking advantage of the various packages for extending Sublime’s functionality, you need to install the package manager called Package Control If u didnt installed sublime in linux than vist here for steps. In this post i am going to tech you steps to install sublime package control and python