Skip to content

Latest commit

 

History

History
95 lines (68 loc) · 2.07 KB

README.md

File metadata and controls

95 lines (68 loc) · 2.07 KB

Indent Tools

GitHub tag (latest by date) License

This Neovim plugin provides mappings and textobj for indentations.

  1. Demo
  2. Requirements
  3. Installation
  4. License

Demo

Jumping along the indents ([i, ]i):

jumping

Text object (dii, cai, yii, vai, etc.):

textobj

Requirements

This library supports Neovim 0.7.0 or newer.

This plugin depends are the following libraries. Please make sure to add them as dependencies in your package manager:

Installation

Use your favourite package manager to install this library. Packer example:

use({
  "arsham/indent-tools.nvim",
  requires = { "arsham/arshlib.nvim" },
  config = function() require("indent-tools").config({}) end,
})

Config

By default this pluging adds all necessary mappings. However you can change or disable them to your liking.

To disable set them to false. For example:

require("indent-tools").config({
  textobj = false,
})

Here is the default settings:

{
  normal = {
    up   = "[i",
    down = "]i",
  },
  textobj = {
    ii = "ii",
    ai = "ai",
  },
}

Lazy Loading

You can let your package manager to load this plugin when a key-mapping event is fired. Packer example:

use({
  "arsham/indent-tools.nvim",
  requires = { "arsham/arshlib.nvim" },
  config = function() require("indent-tools").config({}) end,
  keys = { "]i", "[i", { "v", "ii" }, { "o", "ii" } },
})

License

Licensed under the MIT License. Check the LICENSE file for details.