Giter Site home page Giter Site logo

briandoll / change-inside-surroundings.vim Goto Github PK

View Code? Open in Web Editor NEW
45.0 45.0 8.0 335 KB

vim plugin to change the contents of the innermost 'surrounding'

Home Page: http://briandoll.github.com/change-inside-surroundings.vim/

Vim Script 100.00%
character editor quotes vim viml

change-inside-surroundings.vim's Introduction

Hello! ๐Ÿ‘‹ I'm Brian, half of Reify, helping companies market and sell more software. Get in touch!

Reify

change-inside-surroundings.vim's People

Contributors

bdoll avatar briandoll avatar hpcbjdic avatar noahfrederick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

change-inside-surroundings.vim's Issues

Handle single apostrophy

In the following: "Brian's vim plugin is broken."

If the cursor is in front of the single apostrophe, the plugin commands will work. If the cursor is placed after the single apostrophe the commands will have no effect beyond leaving you in insert mode.

Allow clearing only to the left/right

Sometimes it would be nice to be able to change only everything on the left or right site of the cursor instead of everything in the surrounding.

single undo of `<Leader>ci`

It would be great if typing <Leader>ci, then some replacement text, then <Esc>, then u would restore the state back to the way things were before the change command. Right now you need to undo twice, once for the actions of the s:ChangeSurrounding function and once for the text added as part of the startinsert that begins at the end of that function.

I tried to hack the script up to use undojoin, especially undojoin | startinsert, but it didn't work. I'm not sure if I'm lacking the vim-fu or if this is a fundamental (and stupid) limitation of vim's undojoin behavior.

Change inside angle brackets

Right now, changing inside xml-style tags works well ("|" marks cursor):

<div> some | text </div>

However, changing inside the tags themselves does not do anything:

<div | class="blah">

It would be awesome if both could be supported.

Integrate with 'next textobject'

Great plugin! It would be even better if we could integrate it with this bit of code by Steve Losh which lets you do something like "cinb" to change inside next bracket. So you don't have to be standing inside the bracket. I might take a crack at this next weekend unless you like this idea and get to it first :)

https://gist.github.com/1171642

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.