All Projects → vim-scripts → Replacewithregister

vim-scripts / Replacewithregister

Replace text with the contents of a register.

Labels

Projects that are alternatives of or similar to Replacewithregister

Vim Project
lcd to the root of the project everytime you BufEnter a file inside a project.
Stars: ✭ 155 (-10.92%)
Mutual labels:  viml
Vim Indentwise
A Vim plugin for indent-level based motion.
Stars: ✭ 160 (-8.05%)
Mutual labels:  viml
Vim Subversive
Vim plugin providing operator motions to quickly replace text
Stars: ✭ 168 (-3.45%)
Mutual labels:  viml
Vim Galore
🎓 All things Vim!
Stars: ✭ 12,610 (+7147.13%)
Mutual labels:  viml
Vimerl
A set of erlang plugins for VIM. This is not maintained, better use som modern fork of this!
Stars: ✭ 159 (-8.62%)
Mutual labels:  viml
Vim Github Comment
Comment commits on GitHub using Vim
Stars: ✭ 162 (-6.9%)
Mutual labels:  viml
Vim Tmuxify
Vim plugin for handling tmux panes.
Stars: ✭ 152 (-12.64%)
Mutual labels:  viml
Vim Shell
Improved integration between Vim and its environment (fullscreen, open URL, background command execution)
Stars: ✭ 171 (-1.72%)
Mutual labels:  viml
Vim Config Python Ide
Symlink the .vim dir and the .vimrc file and start kicking ass
Stars: ✭ 159 (-8.62%)
Mutual labels:  viml
Stackanswers.vim
Vim plugin to fetch and display answers from Stack Overflow
Stars: ✭ 165 (-5.17%)
Mutual labels:  viml
Pdv
PHP Documentor for VIM - Generates PHP docblocks
Stars: ✭ 158 (-9.2%)
Mutual labels:  viml
Vim Markbar
Display all accessible marks and their surrounding lines in a collapsible sidebar.
Stars: ✭ 159 (-8.62%)
Mutual labels:  viml
Paredit.vim
Paredit Mode: Structured Editing of Lisp S-expressions
Stars: ✭ 162 (-6.9%)
Mutual labels:  viml
Vim Operator Flashy
🔦 Highlight yanked area
Stars: ✭ 156 (-10.34%)
Mutual labels:  viml
Vim Argumentative
Argumentative aids with manipulating and moving between function arguments.
Stars: ✭ 169 (-2.87%)
Mutual labels:  viml
Vim Flavored Markdown
Stars: ✭ 153 (-12.07%)
Mutual labels:  viml
Vim Operator User
Vim plugin: Define your own operator easily
Stars: ✭ 161 (-7.47%)
Mutual labels:  viml
Zoomwin
Zoom in/out of windows (toggle between one window and multi-window)
Stars: ✭ 173 (-0.57%)
Mutual labels:  viml
Detectindent
Vim script for automatically detecting indent settings
Stars: ✭ 169 (-2.87%)
Mutual labels:  viml
Wordpress.vim
Vim Plugin for WordPress Development
Stars: ✭ 164 (-5.75%)
Mutual labels:  viml

This is a mirror of http://www.vim.org/scripts/script.php?script_id=2703

DESCRIPTION Replacing an existing text with the contents of a register is a very common task during editing. One typically first deletes the existing text via the d, D or dd commands, then pastes the register with p or P. Most of the time, the unnamed register is involved, with the following pitfall: If you forget to delete into the black-hole register ("_), the replacement text is overwritten!

This plugin offers a two-in-one command that replaces text covered by a {motion}, entire line(s) or the current selection with the contents of a register; the old text is deleted into the black-hole register, i.e. it's gone. (But of course, the command can be easily undone.)

The replacement mode (characters or entire lines) is determined by the replacement command / selection, not by the register contents. This avoids surprises like when the replacement text was a linewise yank, but the replacement is characterwise: In this case, no additional newline is inserted.

SEE ALSO

  • ReplaceWithSameIndentRegister.vim (vimscript #5046) is a companion plugin for the special (but frequent) case of replacing lines while keeping the original indent.
  • LineJugglerCommands.vim (vimscript #4465) provides a similar :Replace [["]x] Ex command.

RELATED WORKS

USAGE [count]["x]gr{motion} Replace {motion} text with the contents of register x. Especially when using the unnamed register, this is quicker than "_d{motion}P or "_c{motion}" [count]["x]grr Replace [count] lines with the contents of register x. To replace from the cursor position to the end of the line use ["x]gr$ {Visual}["x]gr Replace the selection with the contents of register x.

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