GithubHelp home page GithubHelp logo

isabella232 / vim-maktaba Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/vim-maktaba

0.0 0.0 0.0 736 KB

Consistent Vimscript

License: Apache License 2.0

Python 2.64% Vim Script 97.36%

vim-maktaba's Introduction

Maktaba is a vimscript plugin library. It is designed for plugin authors. Features include:

  • Plugin objects (for manipulating plugins in vimscript)
  • Plugin flags (used to configure plugins without global settings)
  • Universal logger interface
  • Dependency management tools
  • Real closures

Maktaba advocates a plugin structure that, when adhered to, gives the plugin access to many powerful tools such as configuration flags. Within Google, these conventions standardize behavior across a wide variety of plugins.

Also contained are many utility functions that ease the pain of working with vimscript. This includes, among other things:

  • Exception handling
  • Variable type enforcement
  • Filepath manipulation

Usage example

Maktaba plugins can be installed using any plugin manager. However, maktaba plugins make heavy use of dependency management, so it's recommended to use a plugin manager with dependency management capabilities, like VAM.

Installation of a few plugins using VAM looks something like

set runtimepath+=~/.vim/bundle/vim-addon-manager/
" Loads glaive, vtd, and their maktaba dependency.
call vam#ActivateAddons(['glaive', 'vtd'])
" Initializes all maktaba plugins.
call maktaba#plugin#Detect()

Plugins Using Maktaba

Several vim plugins are already using maktaba. As a user, you can generally expect these plugins to be configurable using Glaive and be more well-behaved in terms of things like defining unwanted global mappings and variables and avoiding annoying side-effects like moving your cursor.

Plugin authors should consider developing plugins using maktaba to simplify code, support modular plugins with hassle-free dependency management, and avoid common pitfalls. If you've written a plugin using maktaba, please add it to the list above and share feedback.

Further reading

In the vroom/ directory you'll find literate test files that walk you through maktaba features in depth. vroom/main.vroom is a good place to start.

In the examples/ directory you can find an example maktaba plugin to give you a feel for how maktaba plugins look.

In the doc/ directory you'll find helpfiles for maktaba. These are also available via :help maktaba if maktaba has been installed and helptags have been generated. The help files document the maktaba API in its entirety.

vim-maktaba's People

Contributors

dbarnett avatar malcolmr avatar stgpetrovic avatar glts avatar chiphogg avatar artasparks avatar blueyed avatar xanderman avatar rocketdonkey avatar yilin-yang avatar flwyd avatar slowki avatar pavoljuhas avatar nfischer avatar okkays avatar ardagnir avatar gregorias avatar nelstrom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.