Loading ...
Sorry, an error occurred while loading the content.

Is it possible to set up GVIM to work with multiple file encodings? (I can not)

Expand Messages
  • Valery Kondakoff
    Hello, Bram! ... BM The Win32 clipboard code in Vim doesn t do conversion of encoding and BM doesn t indicate what encoding is being used. This suggests
    Message 1 of 6 , Apr 11, 2002
    • 0 Attachment
      Hello, Bram!

      11 Àïðåëü 2002 ã., you wrote to me:

      >> I get this, too; pasting non-ASCII text to and from gvim doesn't work
      >> for me.

      BM> The Win32 clipboard code in Vim doesn't do conversion of encoding and
      BM> doesn't indicate what encoding is being used. This suggests something
      BM> is missing here. Hopefully someone who knows about Win32 clipboard
      BM> stuff can look into this.

      Thank you for your reply (and one more thank for VIM).

      Excuse me, if I'm wrong, but I was thinking, that the best way to
      solve this issue is to convert win32 clipboard to '&termencoding'
      value.

      So, when I'm setting IM like this:

      let &termencoding = &encoding " this is 'cp1251'
      set encoding=utf-8
      set fileencodings=ucs-bom,cp1251,cp866,koi8-r

      The clipboard will always be converted to the encoding, I'm using for
      _writing_ text.

      What do you think? Is this reasonable? Or am I wrong?

      Please, please, multibyte developers, do somethig with this! :)
      It's almost impossible to use a text editor without an ability to
      exchange text with other apps using clipboard!

      And one more question: why file encoding conversion works properly
      _only_ when 'encoding' is set to 'utf-8'? And after setting 'encoding',
      for example to 'cp1251', I can't convert file encoding for the same
      files, that were successfully converted using 'set encoding=utf-8'?
      Or (maybe) this is a bug?

      Thank you once again!

      --
      Best regards,
      Valery Kondakoff mailto:strauss@...
      http://www.nbk.orc.ru Ne Bey Kopytom
      http://www.nbk.orc.ru/mtb MTB riding in Moscow

      Chip Salzenberg sent me a complete patch to add System V IPC (msg, sem andshm calls), so I added them. If that bothers you, you can always undefinethem in config.sh. :-)
      --Larry Wall

      np: Belly - Untogether (Star)
    • Glenn Maynard
      ... Setting imsearch=0 fixed this. (The oddity of the IME turning off was due to a forgotten IME keybinding I made: ^U in the IME turns it off. I was hitting
      Message 2 of 6 , Apr 12, 2002
      • 0 Attachment
        On Thu, Apr 11, 2002 at 08:22:29PM +0200, Bram Moolenaar wrote:
        > Something with the 'imsearch' option?

        Setting imsearch=0 fixed this. (The oddity of the IME turning off was
        due to a forgotten IME keybinding I made: ^U in the IME turns it off. I
        was hitting ^U in Vim, to clear the IME input, but it was really the IME
        keybinding.)

        I'd suggesting documenting the fact that iminsert and imsearch follow
        the IME status regardless of how it's turned on or off. Most IME2K
        users are likely to use IME bindings to toggle it, not Vim bindings (as
        they're system-wide).

        "Note that this option changes when the input method is toggled
        in Insert mode, such as with CTRL-^ |c_CTRL-^|." (Or something
        clearer.)

        I'd still like to see iminsert (and now imsearch) default to 0 rather
        than 2 when using this IME. (Or, perhaps, default to the state the IME
        was in when Vim loads; that might help to give Vim the same IME behavior
        in input mode as other applications give with other IMEs.)

        --
        Glenn Maynard
      Your message has been successfully submitted and would be delivered to recipients shortly.