Skip to content

mogenslund/liquid-vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vim like extension for Liquid Text Editor

NOTICE: This extensions is outdated and not needed anymore, since core Liquid has vim-like keybindings as default now.

This extension adds vim like features for Liquid Text Editor

Status

The extension is in experimental state, for exploration of the possibilities.

Feel free to add more features and create pull requests. Take a look at the code base. It is not that big, as much can be build on top of existing functionality in Liquid.

In this experimental phase I aim for functionality matching vim. Making pretty, adjusting details and doing autocompletion, I know will be possible later. So right now, either a command works or nothing happens.

Video

IMAGE ALT TEXT

Installation

For a general introduction to installing Liquid extensions take a look at Basic Setup.

It is possible to make an "easier" installation than descibed below, but I prefer to encourage the most general and flexible way, so you will be rewarded understanding the setup. Feel free the adjust the suggested folders and to skip cloning projects that are already cloned.

The procedure will work on Linux and probably Mac. I will assume you already have installed

  • Java
  • Git
  • Clojure 1.9 with clj command. See clojure.org

Clone liquid and liquid-vim

Execute the commands below in ~/proj:

git clone https://github.com/mogenslund/liquid.git
git clone https://github.com/mogenslund/liquid-vim.git

Now Liquid and Liquid-vim extensions are installed.

Load Liquid and Liquid-vim into your own setup

Following the convensions in Basic Setup I assume you have have folder ~/liq as your own entry point for starting Liquid.

Add releative links to liquid and liquid-vim in the ~/liq/deps.edn file, so it looks like

{:deps {org.clojure/data.json {:mvn/version "0.2.6"}
        org.clojure/core.async {:mvn/version "0.3.465"}}
 :paths ["src"
         "../proj/liquid/src"
         "../proj/liquid/resources"
         "../proj/liquid-vim/src"]}

With some extra dependencies for illustration. (Of cause if you have other extensions they should stay in the file.)

Adjust local core.clj to target liquid-vim

Again I will assume, like in Basic Setup, that you have a file ~/liq/src/liana/core.clj.

Adjust this file to use the new extension. It might look like:

(ns liana.core
  (:require [dk.salza.liquid-vim.core :as vimcore])
  (:gen-class))


(defn -main
  [& args]
  (apply vimcore/-main args))

Starting with local core

In ~/liq/src execute:

clj -m liquid.core

Docker

There is a Dockerfile for running the demo project. It can be used as just demo, but also for experimenting.

Start the container

To build the container execute

docker build -t liquid-vim .

To boot the container afterwards execute

docker run -i -t --rm=true liquid-vim /bin/bash

To start Liquid with the vim extension run the following inside the container

clj -m liana.core

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published