Vim: macOs copy and paste chinese will result messy code

Created on 12 Mar 2017  ·  15Comments  ·  Source: VSCodeVim/Vim

What did you do?

copy(⌘-c) 你好 paste(⌘-v)

What did you expect to happen?

你好

What happened instead?

你好

when is disable the vim extension, it is just ok, copy and paste work fine.

Technical details:

  • VSCode Version: 1.10.2
  • VsCodeVim Version: 0.6.3
  • OS: macOs 10.12.3

Most helpful comment

@jpoon I meet with this case, too. After copy(⌘-c) 中国, paste(⌘-v) ‰∏≠ instead. But it's ok when using Edit -> Copy and Edit -> Paste.

  • VSCode is 1.10.2 8076a19fdcab7e1fc1707952d652f0bb6c6db331 2017-03-08T13:54:01.558Z.
  • OS is macOS Sierra 10.12.3.
  • VSCodeVim is 0.6.10.

I don't modify the default settings of VSCodeVim, only just Keyboard Shortcuts as follows.

{ "key": "ctrl+x", "command": "editor.action.clipboardCutAction", "when": "editorTextFocus" },
{ "key": "ctrl+c", "command": "editor.action.clipboardCopyAction", "when": "editorTextFocus" },
{ "key": "ctrl+v", "command": "editor.action.clipboardPasteAction", "when": "editorTextFocus" }

When disabled VSCodeVim, it works, but not when enabled it.

All 15 comments

I can't repro this. Same VSCode/Vim/MacOS versions. Tried yy and cmd+c.

Curiously I can reproduce it just fine on 0.6.5

macOS:10.12.3
vscode: 1.10.2 (1.10.2)
VSCodeVim:0.6.5
if I select some chinese or japanese words, press [command + c], and then [command + v], pasted nothing. But english words is ok.
And if I disable the plugin, everything is ok.

Actually, it happens for every non Latin1 characters, for ex: • (which is Opt+8 on Mac), will become ‚Ä¢ in clipboard.

@jpoon I meet with this case, too. After copy(⌘-c) 中国, paste(⌘-v) ‰∏≠ instead. But it's ok when using Edit -> Copy and Edit -> Paste.

  • VSCode is 1.10.2 8076a19fdcab7e1fc1707952d652f0bb6c6db331 2017-03-08T13:54:01.558Z.
  • OS is macOS Sierra 10.12.3.
  • VSCodeVim is 0.6.10.

I don't modify the default settings of VSCodeVim, only just Keyboard Shortcuts as follows.

{ "key": "ctrl+x", "command": "editor.action.clipboardCutAction", "when": "editorTextFocus" },
{ "key": "ctrl+c", "command": "editor.action.clipboardCopyAction", "when": "editorTextFocus" },
{ "key": "ctrl+v", "command": "editor.action.clipboardPasteAction", "when": "editorTextFocus" }

When disabled VSCodeVim, it works, but not when enabled it.

Same case like @xgfone

Until we fix this, the workaround is simply to put "vim. overrideCopy": false into your preferences json file.

pasted_image_at_2017_03_24_08_37_pm
same problem here

  • VSCode is 1.10.2
  • OS is macOS Sierra 10.12.3
  • VSCodeVim is 0.6.11

Same problem to me.

The messy words only happen when using ⌘-c then ⌘-v, but it's ok when using Edit->Copy then Edit->Paste。

MacOS,VSCodeVim 0.6.14

Same Problem for me.

  • VSCode is 1.11.1
  • OS is macOS 10.11.6
  • VSCodeVim is 0.6.15

This is happening due to the library we use to access the system clipboard, I will see if there is a different library we can try

same problem, looking forward to the update fix

Next release should have this fixed for macOs and Linux, windows is still a work in progress

fixed on master

It happens again on my mac. @xconverge

  • VSCode is 1.15.1
  • OS is macOS 10.12.6
  • VSCodeVim is 0.9.0
Was this page helpful?
0 / 5 - 0 ratings