Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I'll try to summarize, I remember my panic when I opened vim for the first time
Option 1:
- Press v (vim switches to visual mode, selects everything from the current cursor position)
- move the cursor (you can use arrows, you can hjkl , you can use web%$ as you like)
- press y
Option 2:
If we are talking about strings, we need to solve this problem
- type :set relativenumber
- determine how many lines to copy by line numbering on the
left
( let
's say
43 )
-
press y43y
There are many options and each d%#@, as he wants.
1) selection of a block of text occurs in selection mode, by pressing either v (character-by-character selection), or V (line-by-line), or Ctrl + v (block, a rectangular block is selected)
2) copy - either y (just copy to vim buffer), or "*y (copy to system clipboard) or "+y (also copy to system clipboard)
3) cut - d. Moreover, you can cut without prior selection, for example, dd will delete the current line, diw - the current word.
4) insert - p, or P
I recommend reading a book on vim
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question