Giter VIP home page Giter VIP logo

curlod's Introduction

Curlod

Lock your Neovim cursor down in a specified region of lines.

The effect is limited to the active Neovim window, making this useful for having a separate, restricted view of a long document, while working on one part, while often referring to another part.

Usage

This will keep the cursor in the region starting at line 20, and ending at the first line that starts with END:

:CurlodEnable 20 /^END/

Arguments are optional, and can be line numbers, or Lua patterns passed to string.match, and wrapped in /s.

Alternatively, make a visual selection and run CurlodEnableRange on it:

:'<,'>CurlodEnableRange

Free your cursor again:

:CurlodDisable

Installation

Using vim-plug:

Plug 'walterl/curlod'

Development

Curlod was developed with Conjure and Aniseed.

Change log level

:CurlodLogLevel debug

Or info (default) or error.

Known limitations

Out-of-region changes are still possible

There are many ways to change text in Vim without moving the cursor. Curlod won't take on the Herculean task of trying to prevent that from happening outside of the Curlod region.

This is considered out of scope for Curlod, since the primary motivation is to keep the cursor bound to the specified region, in order to limit a window's view on a buffer.

Attempts to prevent out-of-region edits are likely to degrade overall user experience with an explosion in corner cases caused by combinations of hard to predict effects.

License

MIT

curlod's People

Contributors

walterl avatar

Watchers

 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.