Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim keys behaving abnormally in ConEmu #402

Closed
holmesb opened this issue Apr 11, 2019 · 12 comments
Closed

Vim keys behaving abnormally in ConEmu #402

holmesb opened this issue Apr 11, 2019 · 12 comments
Labels
Bug This is a problem. Upstream Issue This is an issue with an upstream package.

Comments

@holmesb
Copy link

holmesb commented Apr 11, 2019

Hi,

Pengwin's Bash experience is great, but I can't fix the Vim key mappings. End and Del keys don't work properly. According to the cat command, they are mapped as follows:
end: ^[[F
del: ^[[3

But with or without the following mapping in my .vimrc: nmap <esc>OF $, the end key does nothing. Vim freezes for a few seconds, then nothing. Home key works fine. The del key produces a tilde rather than deleting a character, but I've been focusing so far on fixing the end key.

My inputrc file has: "\eoF": end-of-line

Yes I know I can use $ instead of end, but I believe vim is a tool for using the keyboard to edit stuff. I'm still using the keyboard this way and the end key is more in-keeping with every other text editor.

Vim seems sensitive to the set term=<terminal string> line in vimrc. I've set this to set term=ansi. Is this correct?

@sirredbeard sirredbeard added Needs Help This needs community attention. Triage We need to figure out what is going on here. and removed Needs Help This needs community attention. labels Apr 11, 2019
@crramirez
Copy link
Collaborator

Hello

You can try: set term=xterm

Regards

@holmesb
Copy link
Author

holmesb commented Apr 11, 2019

Tried xterm. Even worse. Home key, arrow keys, and others also stop working. Can someone post a .vimrc with functioning home, end, arrow and delete keys?

@crramirez
Copy link
Collaborator

I will try to reproduce your issue today. Meanwhile press $ instead of end and x instead of del.

@crramirez
Copy link
Collaborator

Hello,

I am sorry but I can't reproduce your issue. This is the .vimrc that I use but without it, everything works:

source /etc/vim/vimrc
syntax on
set hlsearch      " highlight search terms
set incsearch     " show search matches as you type
set visualbell           " don't beep
set noerrorbells         " don't beep

Are you running Pengwin directly from the start menu?

Also, make sure that this check is disabled when you open the properties of the console:

image

For alternative console I would recommend:

https://github.com/mintty/wsltty/releases/tag/1.9.6

This has full xterm and WSL support

Regards

@holmesb
Copy link
Author

holmesb commented Apr 12, 2019

I'm using Pengwin in ConEmu terminal, but same occurred when launching directly from the start menu. Anyway I have fixed. I don't know what exactly was causing, but I emptied /etc/vim/vimrc and now all keys work as expected :-) Many thanks.

@holmesb holmesb closed this as completed Apr 12, 2019
@holmesb holmesb reopened this Apr 12, 2019
@holmesb
Copy link
Author

holmesb commented Apr 12, 2019

I spoke too soon, is only working fine when launching Pengwin directly from the start menu, Conemu still has the problems I originally described above. My conemu task uses command:

set "PATH=C:\Program Files\WindowsApps\WhitewaterFoundryLtd.Co.16571368D6CFF_1.2.3.0_x64__kd1vv0z0vy70w:%PATH%" & "C:\Program Files\WindowsApps\WhitewaterFoundryLtd.Co.16571368D6CFF_1.2.3.0_x64__kd1vv0z0vy70w\Pengwin.exe"

@crramirez is this correct? Can you simulate this problem in conemu?

@crramirez
Copy link
Collaborator

Ok, this will take time, but I will test and tell you the results.

@sirredbeard sirredbeard changed the title Vim keys messed up Vim keys behaving abnormally in ConEmu Apr 12, 2019
@sirredbeard sirredbeard added Bug This is a problem. Upstream Issue This is an issue with an upstream package. and removed Triage We need to figure out what is going on here. labels Apr 12, 2019
@holmesb
Copy link
Author

holmesb commented Apr 18, 2019

Hi @crramirez were you able to reproduce this?

@crramirez
Copy link
Collaborator

Hello,

Sorry for the delay. I configured correctly ConEmu following the instructions from here: https://conemu.github.io/en/BashOnWindows.html

Be sure you have the latest version of ConEmu. Then import the config file for pengwin:

image

In the import settings dialog, paste:

https://raw.githubusercontent.com/crramirez/WLinux/crramirez/ftr/conemu/ConEmuPengwin.xml

And click Open:

image

The click Save settings.

Close and open ConEmu. It should be running normally, with the pengwin icon in the tab.

Regards

@holmesb
Copy link
Author

holmesb commented Apr 18, 2019

Thanks but after restarting and trying to launch Pengwin in Conemu, I get error:

note: bash.exe output: Error: 0x80070002
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...

image

Still works fine when launching pengwin.exe directly from the start menu. Here are the imported settings:
image

@crramirez
Copy link
Collaborator

Ok delete this:

--distro-guid={4e8492ab-8920-49f4-a02d-4dd413253607}

Or import the xml again I fixed it there

@holmesb
Copy link
Author

holmesb commented Apr 18, 2019

You beaut! Thanks @crramirez, you've unleashed the mighty Pengwin for me :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a problem. Upstream Issue This is an issue with an upstream package.
Projects
None yet
Development

No branches or pull requests

3 participants