Best way to duplicate block of html after copying it with yat command

Marcin Doliwa

I have small html code:

<div class="form-group">
  <label for="" class="col-sm-2 control-label">Name</label>
  <div class="col-sm-10">
    <input type="text" class="form-control">
  </div>
</div>

Prompt on 3rd line <div class="col-sm-10"> on letter m. Now I type yat to copy this div. What's the best way to paste it below this div, so I get:

<div class="form-group">
  <label for="" class="col-sm-2 control-label">Name</label>
  <div class="col-sm-10">
    <input type="text" class="form-control">
  </div>
  <div class="col-sm-10">
    <input type="text" class="form-control">
  </div>
</div>

For now I'm doing: yat jj o <esc> p ==

Ingo Karkat

With built-in commands, I would do:

vatVyP

The V turns the characterwise selection into a linewise one, so it can be pasted as-is. I paste above with P to avoid moving.

Plugin solution

With my LineJuggler plugin, there's a visual mode duplicate mapping ]d, giving the short:

vat]d

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Best way to update html after promise result

From Dev

Best way to recreate a command interpreter inside HTML landing page?

From Dev

Best way to duplicate Linux server

From Dev

Why clone() is the best way for copying arrays?

From Dev

Best way to clone an installation (copying to identical hardware)

From Dev

Best way to clone an installation (copying to identical hardware)

From Dev

Best way to return a function value and call another method after async animation block or timer has ended

From Dev

Best DRY way to show the same html block in multiple django template files

From Dev

What is the best way to create a duplicate package?

From Dev

Best way to find duplicate fields in Sitecore

From Dev

The best way to remove duplicate strings in an array

From Dev

What's the best way to duplicate Rails code?

From Dev

Best way to remove duplicate strings with different spacing?

From Dev

Best way for dict with duplicate keys in python

From Dev

Best way to save attribute inside save block?

From Dev

In bash, what's the best way to exit with the status of a previous command after cleaning up

From Dev

In bash, what's the best way to exit with the status of a previous command after cleaning up

From Dev

The best way to skip a line in html?

From Dev

What is the best way to hide a command prompt window

From Dev

Best way to verify that an option is supported by a command

From Dev

Best way to write python postgres insert command

From Dev

Is there a way to dynamically update block textures after initialization?

From Dev

Is there a way to dynamically update block textures after initialization?

From Dev

Best way to prevent duplicate data on copy csv postgresql

From Dev

Best way to to average duplicate properties in C++ vector

From Dev

Best way to Duplicate a Laptop's Hard Drive One-to-One

From Dev

What is the best FREE way to remove duplicate files from iTunes?

From Dev

Ember - Best way to reload model after change

From Dev

The best way to do a Callback after For in NodeJS?

Related Related

  1. 1

    Best way to update html after promise result

  2. 2

    Best way to recreate a command interpreter inside HTML landing page?

  3. 3

    Best way to duplicate Linux server

  4. 4

    Why clone() is the best way for copying arrays?

  5. 5

    Best way to clone an installation (copying to identical hardware)

  6. 6

    Best way to clone an installation (copying to identical hardware)

  7. 7

    Best way to return a function value and call another method after async animation block or timer has ended

  8. 8

    Best DRY way to show the same html block in multiple django template files

  9. 9

    What is the best way to create a duplicate package?

  10. 10

    Best way to find duplicate fields in Sitecore

  11. 11

    The best way to remove duplicate strings in an array

  12. 12

    What's the best way to duplicate Rails code?

  13. 13

    Best way to remove duplicate strings with different spacing?

  14. 14

    Best way for dict with duplicate keys in python

  15. 15

    Best way to save attribute inside save block?

  16. 16

    In bash, what's the best way to exit with the status of a previous command after cleaning up

  17. 17

    In bash, what's the best way to exit with the status of a previous command after cleaning up

  18. 18

    The best way to skip a line in html?

  19. 19

    What is the best way to hide a command prompt window

  20. 20

    Best way to verify that an option is supported by a command

  21. 21

    Best way to write python postgres insert command

  22. 22

    Is there a way to dynamically update block textures after initialization?

  23. 23

    Is there a way to dynamically update block textures after initialization?

  24. 24

    Best way to prevent duplicate data on copy csv postgresql

  25. 25

    Best way to to average duplicate properties in C++ vector

  26. 26

    Best way to Duplicate a Laptop's Hard Drive One-to-One

  27. 27

    What is the best FREE way to remove duplicate files from iTunes?

  28. 28

    Ember - Best way to reload model after change

  29. 29

    The best way to do a Callback after For in NodeJS?

HotTag

Archive