I am writing html-code in sublime text 3.

I copy a word from the <p> to insert it into the <i> . However, not one word is inserted, but all the way from the beginning <p> and everything that comes after it to the point. And the word consectetur , which I wanted to insert, is not inserted.

Expected Result:

 <p>Lorem ipsum <br> dolor <b>sit</b> , <i>consectetur<i> adipisicing elit. 

Actual result:

 <p>Lorem ipsum <br> dolor <b>sit</b> , <i> ><p { >Lorem ipsum <br { > dolor <b { >sit</b { , i adipisicing . , .</p { } } } } } </i> adipisicing elit. Et, possimus.</p> 
  • The essence of the question is what? - Dmitriy
  • How to insert one word consectetur, instead of all this is the way, I just need to insert one word, and not a bunch of this) can I somehow not correctly express myself? - KoshtaPenthouse
  • should look like this: <p> Lorem ipsum <br> dolor <b> sit </ b>, <i> consectetur <i> adipisicing elit. - KoshtaPenthouse
  • 3
    может я как-то не верно изъясняюсь? Yeah, somehow escapes the essence of what is happening. What and where are you inserting, whereby? Try to look at what you have written with the eyes of a completely stranger. What exactly are you doing? Ctrl + C / Ctrl + V? Find and replace? - vp_arth
  • one
    KoshtaPenthouse, the truth is poorly understood (. You probably have a question that is easier to show than to explain in words. I would most likely have shot a GIF or video demonstrating what I did in your place. Programs that can help you in Thank you. - Sasha Chernykh

2 answers 2

In general, the copy-paste process is quite magical. First we need to define a piece of text that needs to be copied somewhere. Those. from Ut non semper leo. Integer molestie elit volutpat pulvinar egestas. In hac habitasse platea dictumst. Nullam tristique faucibus leo non volutpat. Suspendisse dignissim leo at mauris ornare, eu posuere est aliquam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras sodales sodales nisl. Suspendisse potenti. Ut non semper leo. Integer molestie elit volutpat pulvinar egestas. In hac habitasse platea dictumst. Nullam tristique faucibus leo non volutpat. Suspendisse dignissim leo at mauris ornare, eu posuere est aliquam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras sodales sodales nisl. Suspendisse potenti. I select only a piece of Nullam tristique faucibus leo non volutpat. . the text is colored in a different color. Further, very carefully: I press the key combination ctrl + c on the keyboard. Then go to the place where you need to insert this piece. For example, <p></p> . I poke the mouse exactly in the middle between the tags (the selected piece of text loses the selection and becomes the same as the whole text !!!), and press the key combination ctrl + v, which would make something <p>Nullam tristique faucibus leo non volutpat.</p> . As a rule, such a sequence of actions works in 99% of cases. if I did not answer your question, write in the comments where our actions diverge.

  • one
    After poking the mouse between the tags, the part of the text I have selected has lost its coloring. This is normal? - vp_arth
  • @vp_arth sensible remark, perhaps worthy of editing the answer! - Dmitriy
  • Dmitry, pay attention to the package ExpandRegion - paragraph 2.1 . Perhaps this will help you to significantly reduce the time compared to mouse selections. I click 1 or several times on Win+Y , and almost always what is needed is highlighted. Thank. - Sasha Chernykh
  • Is Sublime trying to copy-save while preserving the structure? - Nick Volynkin
 <b { >sit</b { <b> {sit </b { 

forgot to close the tag

  • not this now. - Dmitriy
  • To make the code look like code, add four spaces before each line. Or select and press Ctrl + K. )) - Nick Volynkin