Giter VIP home page Giter VIP logo

drawit's Introduction

DrawIt.vim

╔══════════╗        ┌──────┐        ┌─────┐
║VIM Plugin║--for-->│arrows│──and──>│boxes│
╚══════════╝   |    └──────┘        └─────┘
            ┌──▼────┐ ^     ╲
            │drawing├─┘      and lines!
            └───────┘     

Introduction

This is my fork of the fantastic DrawIt vim plugin by DrChip.

Fork changes

  • removes the <space> mapping in favor of <Leader>x
  • adds <shift-hjkl> and <shift-yubn> to draw
  • fixes for known bugs (see :h drawit-history)
  • updated documentation
  • based on latest version 15a from DrChip.org

Docs

Use :h drawit to access the full help

Install

Using vim-plug:

  Plug 'normen/DrawIt'

Setup

Mappings
  • <Leader>di - start DrawIt mode
  • <Leader>ds - stop DrawIt mode

To change/free the default mapping just map these functions otherwise, the defaults won't be used.

  map <Leader>dr <Plug>DrawItStart
  map <Leader>dx <Plug>DrawItStop
Options

To always start out in utf-single-line mode set

  let g:drawit_mode = 'S'
Statusline

To embed the DrawIt status in a statusline plugin use this function:

  function DrawItMode()
    if !exists("b:dodrawit") | return '' | endif
    return b:dodrawit && b:di_erase ? "ERASE" : b:dodrawit ? "DRAW" : ""
  endfunction

Then e.g. for lightline use:

let g:lightline = { 
  \   'left': [
  \             [ 'mode', 'paste', 'drawit_mode'],
  (....)
  \           ],
  \ 'component_function': {
  \   'drawit_mode': 'DrawItMode',
  \ },
\ }

drawit's People

Contributors

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