0

I'm trying to save a macro to the file I'm editing.

All goes well until I close and reopen the file. When I reopen the file, the pasted macro

<80><fc>^B Setup^M<80>

has become

■üSetup^M■

I assume this is encoding related but it's beyond me on how to resolve it.

Following are some settings that might be relevant:

  • fileformat=dos
  • fileformats=dos,unix
  • fileencoding=latin1
  • fileencodings=ucs-bom,utf-8,latin1
  • encoding=utf-8

Does anyone have an idea what I need to change to make it work?

Edit

I had no idea where the <80><fc>^B sequence was coming from.

It appears to be inserted into the macro when I type //***** Setup with the SHIFT key pressed up until the S from setup. The macro gets pasted as //*****<80><fc>^B Setup

Note 1: I use an Azerty keyboard. For the keys / and *, I need to press the shift key.

Note 2: A solution is to not hold the SHIFT key when typing the space character between //***** and Setup. Holding the shift key mearly has become an automatism when typing that pretty much used sequence.

Lieven Keersmaekers
  • 57,207
  • 13
  • 112
  • 146
  • Try to reproduce this starting with `vim -u NONE`. – ZyX Dec 08 '10 at 15:10
  • @ZyX - the pasted macro is now immediatly ■üSetup^M■. I do hope that tells you something (it doesn't to me). – Lieven Keersmaekers Dec 08 '10 at 16:23
  • It should tell me whether this is plugin related. How do you paste your macro with `vim -u NONE` (starting from where you copied it)? You should had written steps to reproduce, something like that: 1. `vim -u NONE /path/to/file_with_macro` 2. `22ggV"+y` to visually select and copy it to system clipboard. 3. `vim -u NONE` to start a new vim. 4. `"+p` to paste it into a new buffer. Result: `<80>^B...`, expected `Setup`. And post a file with macro, maybe it already has this characters there. – ZyX Dec 09 '10 at 04:07
  • @ZyX, sorry, you are right. I'm going to delete this question. Perhaps when I get more proficient with vim, I'll someday figure it out. Thank you for the time taken looking into it. – Lieven Keersmaekers Dec 09 '10 at 07:47
  • possible duplicate of [using the -W option of vim ](http://stackoverflow.com/questions/3981535/using-the-w-option-of-vim) – Benoit Dec 09 '10 at 08:26

1 Answers1

0

you are using the gui with -W option? Then read that question. It is really related to it.

Community
  • 1
  • 1
Benoit
  • 76,634
  • 23
  • 210
  • 236