If you put the cursor on such a line you can: * `0` to put the cursor in the first column. * `f ` to put the cursor in the first blank. * `i` <kbd>Enter</kbd> <kbd>Esc</kbd> to split the line. * `l` to move the cursor one line up. * `.!date +\%Y\%m\%d` to execute the command. * `J` to join the lines again. From [`:h :visual_example`](http://vimdoc.sourceforge.net/htmldoc/visual.html#:visual_example): > Currently the ":" command works on whole lines only. When you select part of a line, doing something like ":!date" will replace the whole line. If you want only part of the line to be replaced you will have to make a mapping for it. In a future release ":" may work on partial lines. See also [`:h visual-operators`](http://vimdoc.sourceforge.net/htmldoc/visual.html#visual-operators) for details. From [this](http://vi.stackexchange.com/questions/6898/how-to-modify-visually-selected-block-with-external-command/6899#comment11226_6898) comment: You can also try the [vis](http://www.drchip.org/astronaut/vim/#VIS) or [NrrwRgn](https://github.com/chrisbra/NrrwRgn) plugin. Both should handle it just fine. (Thanks @christian-brabandt for the tip).