Skip to content

A Vim indent script for writing correctly indented newlisp code

Notifications You must be signed in to change notification settings

nkmathew/vim-newlisp-yasi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-newlisp-yasi

A tiny indent script for correct newlisp indentation when coding using Vim. It relies on yasi for calculating a line's correct indentation and hence will require your version of Vim to be built with python support.

It also relies on styling provided by this newlisp syntax plugin originally hosted here

Some shortcomings

It's a bit laggy compared to the normal indent script implemented in pure Vimscript like the Clojure one. The slight lag is probably due to the fact that it has to call a python function and receive the returned values through the pyeval or py3eval functions.

The upside is that it only becomes noticeable when you try to indent more than five lines through a command like =5k and even then it's only a bearable half a second or so.

Requirements

pip install yasi

Proof of life

Mini Demo

Installation

Use your plugin manager of choice.

  • Pathogen
    • git clone https://github.com/nkmathew/vim-newlisp-yasi ~/.vim/bundle/vim-newlisp-yasi
  • Vundle
    • Add Plugin 'nkmathew/vim-newlisp-yasi' to .vimrc
    • Run :PluginInstall
  • NeoBundle
    • Add NeoBundle 'nkmathew/vim-newlisp-yasi' to .vimrc
    • Run :NeoBundleInstall
  • vim-plug
    • Add Plug 'nkmathew/vim-newlisp-yasi' to .vimrc
    • Run :PlugInstall

About

A Vim indent script for writing correctly indented newlisp code

Resources

Stars

Watchers

Forks

Packages

No packages published