macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.5k stars 681 forks source link

another macvim icon will jump into dock when paste text into an open macvim #756

Open zhuxk79 opened 5 years ago

zhuxk79 commented 5 years ago

if there's already a macvim opened, and when I use "Cmd+V" to paste a text into it, another macvim icon will jump into dock and keep jumping for a few minutes, eventually it is silent. if i use "p"(the vi cmd) to paste the text, everything looks good. this problem annoys me for quite a long time and sometime I'm thinking to use other text tool to replace macvim. I'm using 8.1.280, but I tried several other versions they are same.

eirnym commented 5 years ago

Could you test it with mvim -u NONE -N?

eirnym commented 5 years ago

And please, tell a bit more about your environment like OS version.

zhuxk79 commented 5 years ago

I'm using High Sierra 10.13.6 For the "mvim -u NONE -N", do you mean open the macvim in terminal with the suffix parameters? unfortunately mvim is not aliased to macvim in my bashrc, shall i do that and try?

zhuxk79 commented 5 years ago

I tried open "mvim -u NONE -N" in terminal, but expect it doesn't use my personal .vimrc configuration, it has no change to previous openning. I also found if I hit "CMD+C" trying to copy some content in current file, the other icon will also keep jumping in dock.

eirnym commented 5 years ago

mvim is a basic command line tool to open MacVim from a command line. And you guessed right, these options tell MacVim not to use your personal settings.

The behavior is quite strange. Please, check a fresh download from github, as well as your system preferences key bindings without your personal settings. If issue has gone for default settings, please, check your personal settings if there's any key bindings are set. Combinations to search for are <D-C> and <D-V> (D means cmd in this case)

PS: In the past I had a similar issue with google chrome canary and only full settings cleanup helped me

zhuxk79 commented 5 years ago

I removed macvim and downloaded a fresh dmg file from this website, also removed .vimrc file. In system preference->keyboard->shortcuts, restored default; after all these, problem still exists. I have another mac with EI Capitan, version 10.11.6, the macvim is very normal. Unfortunately the problematic MAC is my office working laptop, so unable to downgrade to OS X.

eirnym commented 5 years ago

does defaults read org.vim.MacVim look suspicious?

My MacVim defaults are:

{
    MMAutosaveColumns = 84;
    MMAutosaveRows = 57;
    MMCurrentPreferencePane = Advanced;
    MMTopLeftPoint = "{789, 877}";
    MMUseCGLayerAlways = 1;
    NSFontPanelAttributes = "1, 4";
    NSNavLastRootDirectory = "~";
    NSNavPanelExpandedSizeForOpenMode = "{712, 448}";
    NSNavPanelExpandedSizeForSaveMode = "{712, 448}";
    NSQuotedKeystrokeBinding = "";
    NSRepeatCountBinding = "";
    "NSWindow Frame NSFontPanel" = "19 226 592 247 0 0 1440 877 ";
    "NSWindow Frame SUStatusFrame" = "520 572 400 129 0 0 1440 877 ";
    "NSWindow Frame SUUpdateAlert" = "410 374 620 392 0 0 1440 877 ";
    SUAutomaticallyUpdate = 1;
    SUCheckAtStartup = 1;
    SUEnableAutomaticChecks = 1;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2018-10-11 09:33:57 +0000";
    SUSendProfileInfo = 0;
}
zhuxk79 commented 5 years ago

I just tried another experiment: swap CONTROL and COMMAND key in system preference->keyboard->Modifier Keys, after that, when i try <control+C> the icon jumps again :-(

zhuxk79 commented 5 years ago

does defaults read org.vim.MacVim look suspicious?

My MacVim defaults are:

{
    MMAutosaveColumns = 84;
    MMAutosaveRows = 57;
    MMCurrentPreferencePane = Advanced;
    MMTopLeftPoint = "{789, 877}";
    MMUseCGLayerAlways = 1;
    NSFontPanelAttributes = "1, 4";
    NSNavLastRootDirectory = "~";
    NSNavPanelExpandedSizeForOpenMode = "{712, 448}";
    NSNavPanelExpandedSizeForSaveMode = "{712, 448}";
    NSQuotedKeystrokeBinding = "";
    NSRepeatCountBinding = "";
    "NSWindow Frame NSFontPanel" = "19 226 592 247 0 0 1440 877 ";
    "NSWindow Frame SUStatusFrame" = "520 572 400 129 0 0 1440 877 ";
    "NSWindow Frame SUUpdateAlert" = "410 374 620 392 0 0 1440 877 ";
    SUAutomaticallyUpdate = 1;
    SUCheckAtStartup = 1;
    SUEnableAutomaticChecks = 1;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2018-10-11 09:33:57 +0000";
    SUSendProfileInfo = 0;
}

what did you mean by "defaults", is it .vimrc file stored in /users/, which is the macvim config file?

eirnym commented 5 years ago

defaults (command) in macOS is a some kind of registry in Windows,

zhuxk79 commented 5 years ago

defaults (command) in macOS is a some kind of registry in Windows,

could you pls tell how to check those "defaults" in mac?

eirnym commented 5 years ago

you need to run this command in terminal: defaults read org.vim.MacVim

zhuxk79 commented 5 years ago

MMAutosaveColumns = 142; MMAutosaveRows = 43; MMCurrentPreferencePane = Advanced; MMLastWindowClosedBehavior = 2; MMOpenInCurrentWindow = 1; MMRenderer = 1; MMSuppressTerminationAlert = 1; MMTopLeftPoint = "{663, 785}"; NSNavLastRootDirectory = "~/Desktop"; NSNavPanelExpandedSizeForSaveMode = "{712, 448}"; NSNavPanelExpandedStateForSaveMode = 1; NSQuotedKeystrokeBinding = ""; NSRepeatCountBinding = ""; "NSWindow Frame FindAndReplace" = "802 547 490 169 0 0 1440 877 "; SUCheckAtStartup = 0; SUEnableAutomaticChecks = 0; SUHasLaunchedBefore = 1; SUSendProfileInfo = 0;

this is my dump. is there any field suspicious?

ychin commented 5 years ago

Do you only have one version of Vim installed? When the other MacVim icon jumps up in the dock, you can right click on it and select Options -> Show In Finder to see what this mysterious version of MacVim is.

Other things you could try include using the menu to paste by doing Edit -> Paste, and see if the same issue persists.

You may also want to check System Preferences -> Keyboard -> Shortcuts and see if anything is weird there.

If nothing works you can disable the Cmd-V mapping by putting aunmenu Edit.Paste in your gvimrc, and then manually map <D-v> to pasting from clipboard, but I think there's something else to your setup.

eirnym commented 5 years ago

@zhuxk79 Does it still an issue for you?

zhuxk79 commented 5 years ago

@eirnym sorry for late reply...i switched to sublime but now come back to macvim, this problem is still there; checked the keyboard setting and all other suggestions, not working at all

zhuxk79 commented 5 years ago

@ychin when i use Edit->Paste, still same problem

eirnym commented 5 years ago

@zhuxk79, thank you for a reply.

If problem is still there, we want to identify it. Which macOS and MacVim versions do you currently use?

Have you tried the latest MacVim without plugins any to identify? To run without plugins you should run mvim --clean.

zhuxk79 commented 5 years ago

Custom Version 8.1.1722 (157) MacOS Mojave Version 10.14.6 I have tried "mvim --clean", still same problem

eirnym commented 5 years ago

Could you share details, like :version output?