TGViewer
Path Secure Path Secure @pathsecure · 3.68K subscribers
Post #69 335
#vim #макросы
Применение макросов для определённых строчек:

Execute the macro stored in register a on lines 5 through 10.
:5,10norm! @a

Execute the macro stored in register a on lines 5 through the end of the file.
:5,$norm! @a

Execute the macro stored in register a on all lines.
:%norm! @a

Execute the macro store in register a on all lines matching pattern.
:g/pattern/norm! @a

Последнее спасло меня от бессмысленной траты времени. В частности, мне нужно было убрать "/" в конце тех строк, в которых "/" есть. Если Вы можете решить эту проблему иначе, то напишите мне в лс. Будет интересно узнать :)

https://stackoverflow.com/questions/390174/in-vim-how-do-i-apply-a-macro-to-a-set-of-lines
Stack Overflow In Vim, how do I apply a macro to a set of lines? I have a file with a bunch of lines. I have recorded a macro that performs an operation on a single line. I want to repeat that macro on all of the remaining lines in the file. Is there a quick ...
More from @pathsecure
  1. Aug 27, 2026Хочу поддержать товарищей по направлению комплаенса и методологии": https://t.me/radcop_on…
  2. Aug 26, 2026Вот и закончилось очередное приключение :)) Очень веселый и кайфовый экзамен. Чувствовал с…
  3. Aug 5, 2026Стараюсь не отставать от трендов и качаюсь в направлении ИИшницы. Есть такие мысли, что ст…
  4. Jun 19, 2026Всем привет! Рынок найма сломан, поэтому решили пойти в эксперимент с сарафанным радио в т…
  5. Apr 16, 2026Хей! Пост немного задержался... Но я принес вам Хабр-статью с моей рефлексией по итогам сд…
  6. Mar 19, 2026Всем привет! Сегодня пришло сообщение об успешной сдаче CRTP! Начал решать в середине янва…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →