Saturday, November 14, 2015

Re: Console vim beeps with file beeper.txt

On Sat, Nov 14, 2015 at 6:46 PM, 'Suresh Govindachar' via vim_use <vim_use@googlegroups.com> wrote:

Hello,

I copied some lines from a web-page and pasted them into console vim. Now when I scroll (move cursor with k or l or do <ctrl-F> or <ctrl-b>), vim beeps.

To reproduce, use attached beeper.txt.  Also, try yanking the lines in beeper.txt and pasting them -- I hear beeps during the paste.

What's causing this and how to get rid of it?

It's the usual suspect: CP1252 (Windows) encoding.  The character in front of each list item is being represented by 8-bit char 0x95, which is equivalent to \U2022 - BULLET.  Probably, your terminal isn't dealing well with a character it's not expecting to encounter.

You can edit the file properly by doing:

:e ++enc=cp1252 beeper.txt

After that, you can fix the encoding (to UTF-8, for example) with:

:se fenc=utf8

-- 
Best,
Ben

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment