Wednesday, November 3, 2021

Re: Control-V :w : how to write single character?





------ Original Message ------
From: "L A Walsh" <vim@tlinx.org>
To: "Vim Users" <vim_use@googlegroups.com>
Sent: Wednesday, 3 Nov, 2021 At 19:36
Subject: Control-V :w <fname> : how to write single character?

I wanted to write out an unclear character that my
cursor was over, so I tried to go into character VISUAL
selection mode by pressing Ctl-v, then ':w! /tmp/ch'.
Instead of the single character at the cursor, I got
the whole line. I also tried with a lower case 'v'.

When interactive, selecting with either 'v' or 'ctl-v'
and hitting 'y', then pasting it somewhere, only 1
character is selected.
How would I write out only the 1 character I had
selected?

thanks,
-linda
Hi Linda

having yanked your character (as in your last paragraph), open a fresh file

:e a
insert the character
P (or p)
and write it out
:w

regards - Chris


--
--
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/6182E4DB.3040904%40tlinx.org.

No comments: