Git Product home page Git Product logo

cursed.vim's Introduction

cursed.vim

This plugin is no longer maintained. If you are using Neovim, there's a Lua version available at filipekiss/cursed.nvim

Cursed example

Install

Using vim-plug:

Plug 'filipekiss/cursed.vim'

Usage

This plugins add two new User autocmds CursedStartedMoving and CursedStoppedMoving. You can use the events to trigger commands after a delay triggered after the cursor stops moving. For example, you can use to show cursorline only when the cursor has been stopped for a while:

augroup CursedCursorLine
    autocmd!
    autocmd WinEnter * if !cursed#is_disabled() | set cursorline | endif
    autocmd User CursedStartedMoving :set nocursorline
    autocmd User CursedStoppedMoving :set cursorline
augroup END

If you have nvim-blame-line, for example, you may do something like this:

augroup CursedBlameLine
    autocmd!
    autocmd User CursedStoppedMoving silent :SingleBlameLine
augroup END

And the blame will appear after the timer runs out (as seen in the gif above).

Settings

g:cursed_delay_ms

How long after the CursedStartedMoving event the CursedStoppedMoving will be triggered. The default value is the same as updatetime, unless this variable is set.

b:cursed_disabled

Disables the events for the current bufffer

g:cursed_disabled_filetypes

An array of file types in which the events should not be triggered. The events won't trigger in terminal buffers.

" default value
let g:cursed_disabled_filetypes = ['startify', 'fzf']

cursed.vim © 2019+, Filipe Kiss Released under the MIT License.
Authored and maintained by Filipe Kiss.

GitHub @filipekiss  ·  Twitter @filipekiss

cursed.vim's People

Contributors

filipekiss avatar

Watchers

 avatar  avatar  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.