Skip to main content
replaced http://vi.stackexchange.com/ with https://vi.stackexchange.com/
Source Link

If you put the cursor on such a line you can:

  • 0 to put the cursor in the first column.
  • f Space to put the cursor in the first blank.
  • i Enter Esc 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:

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 for details.

From thisthis comment: You can also try the vis or NrrwRgn plugin. Both should handle it just fine. (Thanks @christian-brabandt for the tip).

If you put the cursor on such a line you can:

  • 0 to put the cursor in the first column.
  • f Space to put the cursor in the first blank.
  • i Enter Esc 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:

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 for details.

From this comment: You can also try the vis or NrrwRgn plugin. Both should handle it just fine. (Thanks @christian-brabandt for the tip).

If you put the cursor on such a line you can:

  • 0 to put the cursor in the first column.
  • f Space to put the cursor in the first blank.
  • i Enter Esc 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:

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 for details.

From this comment: You can also try the vis or NrrwRgn plugin. Both should handle it just fine. (Thanks @christian-brabandt for the tip).

added 1 character in body
Source Link
Jair López
  • 1.9k
  • 1
  • 15
  • 24

If you put the cursor on such a line you can:

  • 0 to put the cursor in the first column.
  • f Space to put the cursor in the first blank.
  • i Enter Esc 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:

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 for details.

From this comment: You can also try the vis or NrrwRgn plugin. Both should handle it just fine. (Thanks @christian-brabandt for the tip).

If you put the cursor on such a line you can:

  • 0 to put the cursor in the first column.
  • f Space to put the cursor in the first blank.
  • i Enter Esc 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:

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 for details.

From this comment: You can also try the vis or NrrwRgn plugin. Both should handle it just fine. (Thanks @christian-brabandt for the tip).

If you put the cursor on such a line you can:

  • 0 to put the cursor in the first column.
  • f Space to put the cursor in the first blank.
  • i Enter Esc 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:

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 for details.

From this comment: You can also try the vis or NrrwRgn plugin. Both should handle it just fine. (Thanks @christian-brabandt for the tip).

added 16 characters in body
Source Link
Jair López
  • 1.9k
  • 1
  • 15
  • 24

If you put the cursor on such a line you can:

  • 0 to put the cursor in the first column.
  • f Space to put the cursor in the first blank.
  • i Enter Esc 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:

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 for details.

From this comment: You can also try the vis or NrrwRgn plugin. Both should handle it just fine. (Thanks @christian-brabandt for the tip).

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 Enter Esc 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:

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 for details.

From this comment: You can also try the vis or NrrwRgn plugin. Both should handle it just fine. (Thanks @christian-brabandt for the tip).

If you put the cursor on such a line you can:

  • 0 to put the cursor in the first column.
  • f Space to put the cursor in the first blank.
  • i Enter Esc 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:

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 for details.

From this comment: You can also try the vis or NrrwRgn plugin. Both should handle it just fine. (Thanks @christian-brabandt for the tip).

Source Link
Jair López
  • 1.9k
  • 1
  • 15
  • 24
Loading