https://github.com/tpope/timl Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} tpope / timl Public * * Notifications * Fork 17 * Star 668 Clojure like language which compiles down to VimL 668 stars 17 forks Star Notifications * Code * Issues 3 * Pull requests 1 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights tpope/timl This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/t] Use Git or checkout with SVN using the web URL. [gh repo clone tpope/] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @tpope tpope Merge pull request #22 from eraserhd/thread_last ... 01deb94 Jan 19, 2015 Merge pull request #22 from eraserhd/thread_last Implement thread-last (->>) 01deb94 Git stats * 784 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time autoload Merge pull request #22 from eraserhd/thread_last January 19, 2015 17:00 doc Implement/document ns macro. Add varargs to refer-timl. April 5, 2014 21:03 ftplugin Fix up comment options December 29, 2013 13:31 indent Rename : to execute December 15, 2013 11:18 plugin Fix function autoloading April 1, 2014 19:20 syntax Fix erroneous & highlighting as option on 7.4 March 31, 2014 00:30 test/timl Add missing file December 14, 2013 21:22 .gitignore gitignore November 29, 2013 07:03 README.markdown Implement/document ns macro. Add varargs to refer-timl. April 5, 2014 21:03 epl-v10.html EPL, baby! March 31, 2014 22:36 View code Welcome to the future (of the past) Is this a joke? Language features VimL interop Getting started License README.markdown Welcome to the future (of the past) TimL is a Lisp dialect implemented in and compiling down to VimL, the scripting language provided by the Vim text editor. Think Clojure meets VimL. Is this a joke? If you mean the 6,000 lines of working code, then no, I poured hundreds upon hundreds of very serious hours into that. But if you're referring to the fact it's woefully underdocumented, adds considerable overhead to an already slow host platform, and ultimately unlikely to gain any traction, then yeah, probably. Language features * Clojure like syntax and API, including everything from rich syntax literals to destructuring. * Namespaces, including refer and alias. * timl.core, a tiny but growing API resembling clojure.core. * The same persistent collection types and interfaces, including vectors, hash maps, hash sets, lists, and lazy sequences. * Macros, including syntax quoting and the implicit &form and &env. * Metadata. (Some collection types don't support it yet.) * Reference types, including vars, atoms, futures. * Extensible type system, including defmethod for duck typing. (This is the most significant departure from Clojure.) * Caching compiler generates real VimL. VimL interop * TimL functions are actually VimL dictionaries (objects) containing a dictionary function (method) and a reference to the enclosing scope. * Defining a symbol baz in namespace foo.bar actually defines g:foo #bar.baz. If that symbol refers to something callable (like a function), calling foo#bar#baz() on the VimL side will invoke it. * Arbitrary Vim variables and options can be referred to using VimL notation: b:did_ftplugin, v:version, &expandtab. You can also change them with set!: (set! &filetype "timl"). * #*function returns a reference to a built-in or user defined function. You can call it like any other function: (#*toupper "TimL is pretty neat"). * Interact with VimL exceptions with throw/try/catch/finally. * Call a Vim command with execute: (execute "wq"). * Lisp macros are a wonderful way to encapsulate and hide a lot of the pain points of VimL. The current standard library barely scratches the surface here. Getting started If you don't have a preferred installation method, I recommend installing pathogen.vim, and then simply copy and paste: cd ~/.vim/bundle git clone git://github.com/tpope/timl.git Once help tags have been generated, you can view the manual with :help timl. There's not a whole lot there, yet. If you know Clojure, you can probably guess a bunch of the function names. Start a repl with :TLrepl. Tab complete is your friend. The first time may take several seconds (if your computer is a piece of shit), but compilation is cached, so subsequent invocations will be super quick, even if Vim is restarted. The familiar ns macro from Clojure is mostly identical in TimL. :refer-clojure is now :refer-timl, which is identical to (refer 'timl.core opts). :use only supports symbol arguments. (ns my.ns (:refer-timl :exclude [+]) (:use timl.repl) (:require [timl.file :as file] [timl.test])) You can use Clojure's in-ns, require, refer, alias, and use, however use and require are limited to a single argument. (in-ns 'my.ns) (use 'timl.repl) (require 'timl.file) (alias 'file 'timl.file) Put files in autoload/*.tim in the runtime path and they will be requirable. License Copyright (c) Tim Pope. The use and distribution terms for this software are covered by the Eclipse Public License 1.0, which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. About Clojure like language which compiles down to VimL Resources Readme Stars 668 stars Watchers 26 watching Forks 17 forks Report repository Releases No releases published Sponsor this project Sponsor Learn more about GitHub Sponsors Packages 0 No packages published Contributors 4 * @tpope tpope Tim Pope * @frenchy64 frenchy64 Ambrose Bonnaire-Sergeant * @eraserhd eraserhd Jason Felice * @justinj justinj Justin Jaffray Languages * Vim Script 100.0% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.