Thursday, January 12, 2023

Yanking doesn't yank

[Originally sent through Gmane.io; apologies for possible duplicates]


I've been using Vim for almost 4 years now and I haven't got it right yet.

I have a block of text (say, 10 lines) that I want to copy from
somewhere to somewhere else.

I put the cursor on the first line, press capital v (shift + v); this
will highlight the line; then press down arrow until I have selected the
whole block. So far so good.

Then I press 'y'. If then I move the cursor down, it will still continue
to highlight the following text, which is not what I want.

As a workaround, after selecting text, I press 'd', then 'p' to but it
back where it was and then move down and press 'p' again.

I wonder why it will keep on selecting text after pressing 'y'.

I'm missing something obvious here.

My .vimrc.

$ cat .vim/vimrc
source $VIMRUNTIME/defaults.vim

"set shellcmdflag=-ic
set dir=~/.vim/tmp
set expandtab
set autoindent
set mouse=r

digraph bl 8226 " Insert Bullet with <CTRL>+k bl


iabbrev cwd <C-R>=strftime("%a %d/%m %H:%M")
iabbrev mydate <C-R>=strftime("%a %d/%m/%Y")
iabbrev mydate2 <C-R>=strftime("%Y%m%d")

map <f5> :1m$<cr>


--
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAEJNuHy8zJ8-kUiaYXKwW5%3D1Q06hzeor4Gu299VS-WW1nP26eQ%40mail.gmail.com.

No comments: