All Projects → briandoll → Change Inside Surroundings.vim

briandoll / Change Inside Surroundings.vim

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

Projects that are alternatives of or similar to Change Inside Surroundings.vim

Yavide
Modern C/C++ integrated development environment
Stars: ✭ 1,306 (+3085.37%)
Mutual labels:  viml, editor
Veloedit
Eclipse editor for the Velocity Template Language (VTL)
Stars: ✭ 40 (-2.44%)
Mutual labels:  editor
Vim Opengrok
opengrok interface for vim
Stars: ✭ 37 (-9.76%)
Mutual labels:  viml
Cm3d2.maidfiddler
A real-time game editor for CM3D2
Stars: ✭ 39 (-4.88%)
Mutual labels:  editor
Vim Easytags
Automated tag file generation and syntax highlighting of tags in Vim
Stars: ✭ 990 (+2314.63%)
Mutual labels:  viml
Github Commit Comment.vim
Vim Plugin for Commit Comment of GitHub
Stars: ✭ 39 (-4.88%)
Mutual labels:  viml
Chapa.vim
VIM plugin to move (or visually select) the next/previous class, method or function
Stars: ✭ 36 (-12.2%)
Mutual labels:  viml
Zwerg
Distance Field Editor (experimental)
Stars: ✭ 41 (+0%)
Mutual labels:  editor
Slack Memo Vim
Simple memo manager with Vim using Slack.
Stars: ✭ 40 (-2.44%)
Mutual labels:  viml
Header
Header Tool for Editor.js 2.0
Stars: ✭ 39 (-4.88%)
Mutual labels:  editor
Chmap
The Windows `charmap` utility for Linux
Stars: ✭ 39 (-4.88%)
Mutual labels:  character
Minibufexpl.vim
Elegant buffer explorer - takes very little screen space
Stars: ✭ 991 (+2317.07%)
Mutual labels:  viml
Env
Stars: ✭ 39 (-4.88%)
Mutual labels:  viml
Unite Workflow
unite.vim extentions for convenience similar to alfred-workflow
Stars: ✭ 37 (-9.76%)
Mutual labels:  viml
Php Foldexpr.vim
Vim folding for PHP with foldexpr
Stars: ✭ 40 (-2.44%)
Mutual labels:  viml
Snipmate
TextMate-style snippets for Vim
Stars: ✭ 36 (-12.2%)
Mutual labels:  viml
Csapprox
Make gvim-only colorschemes work transparently in terminal vim
Stars: ✭ 38 (-7.32%)
Mutual labels:  viml
Vim Hardy
Arduino IDE intregation for vim.
Stars: ✭ 39 (-4.88%)
Mutual labels:  viml
Vim Colors duotones
deprecated - please use Base2Tone-vim
Stars: ✭ 41 (+0%)
Mutual labels:  viml
Minimum Awesome
A Vim setup that will get you into Vim and make it so that you don't want to pull your hair out.
Stars: ✭ 40 (-2.44%)
Mutual labels:  viml

change-inside-surroundings.vim

change-inside-surroundings.vim provides a single command :ChangeInsideSurrounding (also accessible via <leader>ci) that will change the contents of the innermost 'surrounding'.

Examples

Vim already provides fairly easy ways to change the 'surrounding' as long as you specify the opening 'surrounding' character. Vim also understands HTML and XML tags, so you can change inside those as well. I wanted a single command that would intelligently just do the right thing.

Normal Vim can do this:

Change inside an HTML tag:

  • Given: <div>London Calling</div>
  • To replace the contents of the div tag I can use: cit

Change inside curly braces:

  • Given: { death: "or glory!" }
  • To replace the contents of the curly braces I can use: ci{

Change inside brackets:

  • Given: [ Clampdown those Spanish Bombs ]
  • To replace the contents of the square brackets I can use: ci[

Change inside quotes:

  • Given: "The Guns of Brixton"
  • To replace the contents of the quotes I can use: ci"

I wanted something simpler. This plugin provides a single command that works for all of these examples.

Currently supported surroundings are: {}, (), "", ><, [], '', ``

Use

:ChangeInsideSurrounding or <leader>ci will remove the contents of the innermost 'surrounding', leaving you in insert mode.

:ChangeAroundSurrounding or <leader>cas will remove the entire text object, including the 'surrounding' characters, leaving you in insert mode.

Installation

If you're using pathogen.vim, just copy and paste:

cd ~/.vim/bundle
git clone git://github.com/briandoll/change-inside-surroundings.vim.git

License

Copyright (c) Brian Doll. Distributed under the same terms as Vim itself. See :help license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].