Giter Site home page Giter Site logo

vim-deleteto's Introduction

deleteto.vim

Introduction

DeleteTo reads a character from the user, then deletes from the beginning of the line up to and including that character.

If you have a tab delimited file, "dU" will delete the first column of data.

See the Workflow section, below, to see what that means.

To improve this plugin, I recommend installing Tim Pope's vim-repeat plugin.

Workflow

Imagine you're working with a list of files:

./deleteto/plugin/deleteto.vim
./deleteto/README.md
./keyword/plugin/keyword.vim
./keyword/README.md

but you'd like a tidier list without the "./" at the beginning. Type: dU/

deleteto/plugin/deleteto.vim
deleteto/README.md
keyword/plugin/keyword.vim
keyword/README.md

Type dU/ again

plugin/deleteto.vim
README.md
plugin/keyword.vim
README.md

Mappings

By default, DeleteTo creates four mappings:

Type To work on Calls
dU All lines <Plug>DeleteToA
duu This line <Plug>DeleteToL
du{motion} Motion-defined <Plug>DeleteToM
{visual}du Visual region <Plug>DeleteToV

You can disable the default mappings with:

let g:deleteto_create_mappings = 0

Command

The DeleteTo command has the form

:[range]DeleteTo CHAR [COUNT]

Examples

The delimiter will commonly be forward slash, space, comma or tab. However, DeleteTo will work with any character.

Type this Works on Delete up to this character
dU/ Whole file First /
3dU, Whole file Third ,
4duu/ One line Fourth /
vip2du<tab> Visual - paragraph Second <tab>
du9j, Motion - 10 lines First ,
:DeleteTo / Whole file First /
:1,20DeleteTo / Lines 1-20 First /
:DeleteTo , 4 Whole file Fourth ,
:argdo DeleteTo / 2 All args, all lines Second /
:bufdo DeleteTo | All buffers, all lines First |

License

Copyright © Richard Russon (flatcap). Distributed under the GPLv3 http://fsf.org/

See also

vim-deleteto's People

Contributors

flatcap avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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