Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

nano cursor movement not working in Windows default console #55

Open
iamc opened this issue Jun 25, 2016 · 9 comments
Open

nano cursor movement not working in Windows default console #55

iamc opened this issue Jun 25, 2016 · 9 comments
Assignees

Comments

@iamc
Copy link

iamc commented Jun 25, 2016

Using Git for Windows 2.9.0 installed selecting "Use Windows' default console window" nano launches correctly but when trying to move the cursor using the keyboard arrow keys it complains with a [ Unknown Command ] message, and the cursor does not move.

nano

This was a known problem when using MinTTY terminal and launching nano with winpty nano
#31 (comment) in order to avoid the redirection is not supported error with MinTTY #50, but for me it happens the same in the default windows console.

You can circumvent this running nano doing

start nano

which opens up nano in a new window, where the arrow keys work properly.

Or you can use

^f
^b 
^n
^p 

but in my opinion this adds up too much cognitive load to shell newcomers.

@embray
Copy link
Contributor

embray commented Jun 26, 2016

I'm of a mind to drop nano on Windows entirely and use notepad.

@iamc
Copy link
Author

iamc commented Jun 27, 2016

I like the fact or running the editor in the same console you are working and not spanning more windows.

For my next workshop I'll consider moving to MobaXterm. I know it's not free as in freedom, but the free version is quite good, and we do use eg. GitHub for the git lessons, so...

I also noticed that it has a package manager for Cygwin packages, so the stack installation would be trivial. Somethign as "open a MobaXterm terminal an type"

apt-cyg install nano git gitk

Although perhaps we have to take care of Anaconda paths.

@embray
Copy link
Contributor

embray commented Jul 6, 2016

You do have a point there. New learners have a hard time as it is groking the relationship between command-line programs and GUI programs (something I wish the shell lesson focused more on, over contrived wildcard patterns).

FWIW apt-cyg can be added easily to any standard Cygwin install. But there's also MSYS2 with pacman.

@embray
Copy link
Contributor

embray commented Jul 6, 2016

(I would die without apt-cyg--Cygwin seems almost useless without it anymore)

@embray
Copy link
Contributor

embray commented Aug 15, 2016

I spent a little time on this today, but I can't for the life of me find a solution. nanorc doesn't allow rebinding commands to arbitrary keyboard controls, so I can't get it to bind the "move left" "move right" etc. commands to control codes that are actually being sent when I press "left" "right", etc.

@talamus
Copy link

talamus commented Oct 1, 2019

This would be very useful now that Windows has the official OpenSSH support. It would be nice to log in to a Windows Server via ssh and edit some files with nano.

@ElSrJuez
Copy link

+1
Old IT pro, relatively new to linux, love nano.
Windows Server Core would benefit handsomely if nano wokred over SSH?

@YvesR
Copy link

YvesR commented May 31, 2020

+1
Old IT pro, relatively new to linux, love nano.
Windows Server Core would benefit handsomely if nano wokred over SSH?

Same issue here. Started worked with Windows Server Core and use OpenSSH as it works nice now. But with need of an editor and already use nano on mac and linux I loved to use nano here as well. So I installed using choco install nano but sadly found out that cursor movement do not work properly here (Using Terminal from Mac in a ssh session).

Any ideas?

@artisticcheese
Copy link

artisticcheese commented Jan 4, 2022

Use Micro instead of nano (choco install micro), no issues with cursors, syntax highlighting etc.
Nano = 6 years, no solution

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants