Problems with VIM Window switching in Secure-Shell App

3,037 views
Skip to first unread message

ssnkumar

unread,
Jun 13, 2012, 1:12:10 AM6/13/12
to chromium-hterm
I use VIM for all my work and I open multiple windows.
To switch between windows, I use <CTRL>-W.
But, the same is not working in Secure-Shell app on Chrome.

Also, I have enabled mouse click in my VIM. I can click on any place
inside the Vim window and the cursor goes there.
Also, I can use my mouse to scroll inside the VIM window.
Same is not working in Secure-Shell app on Chrome.

Please let me know, if there is any way to make this work?
If not, please implement this feature.

Regards,
Narendra

Bri Hatch

unread,
Jun 13, 2012, 1:37:03 AM6/13/12
to ssnkumar, chromium-hterm
On or about Tue, Jun 12, 2012 at 10:12 PM, ssnkumar
<ssnk...@gmail.com> pleaded:

> I use VIM for all my work and I open multiple windows.
> To switch between windows, I use <CTRL>-W.
> But, the same is not working in Secure-Shell app on Chrome.

Yep - you can't use <ctrl-w> in chrome. Shellinabox and other
apps have brought this to light frequently. Here's a bug
from Jan 2010:

http://code.google.com/p/chromium/issues/detail?id=32787

Now you *can* work around window switching in vim by using :wincmd, e.g.

:wincmd j

to go down. I set up the following mappings in my .vimrc to
have alt-down and alt-up move me between windows:

nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Up> :wincmd k<CR>

Any <Ctrl-W> <Foo> command can be translated to the associated
:wincmd <Foo><CR> command. Of course the full docs for windowing
in vim are at

http://vimdoc.sourceforge.net/htmldoc/windows.html#:wincmd

I'd be interested if folks see a 'standard' set of nmapings
for when we lack ctrl-w.

--
Bri Hatch, Systems and Security Engineer. http://www.ifokr.org/bri/

Tom, it's a good thing you got here, I was just complaining.
--Jesse

Robert Ginda

unread,
Jun 13, 2012, 1:55:21 AM6/13/12
to Bri Hatch, chromium-hterm, ssnkumar

Ctrl-W works if you open secure shell as a window.  (See the FAQ.)

We don't have mouse support yet.

Rob.

Narendra Kumar S.S

unread,
Jun 13, 2012, 2:07:42 AM6/13/12
to Robert Ginda, Bri Hatch, chromium-hterm
Thank you very much for the suggestion.
I tried opening it as a separate window and "Ctrl-W" is working.
Hope you will be able to make the mouse also work in the same way.

Warm Regards,
Narendra

Visit my blogs at:
http://ssnarendrakumar.blogspot.com/
   ___    ___    __    _
  /  __/  /  __/  /     | / /
_\   \   _ \   \   /   /| |/ /
\___/ \___/   /_/ |__/

Braden Kelley

unread,
Nov 3, 2012, 3:57:04 PM11/3/12
to chromiu...@chromium.org, Robert Ginda, Bri Hatch, ssnk...@gmail.com
I've seen this work in Windows and Linux, but will it work for the Chromebook since everything opens in the browser? I realize there are plenty of workarounds, but is there a way to tell Chrome to allow for certain keybindings? I feel like I would end up closing the tab quite often on accident even if I created some keybindings for the :wincmd command.

Robert Ginda

unread,
Nov 3, 2012, 4:17:43 PM11/3/12
to Braden Kelley, chromium-hterm, Bri Hatch, Narendra Kumar S.S
It works on Chrome OS too.  Also, when open in a tab, Ctrl-W displays an "Are you sure?" dialog, rather than just closing the window right away.


Rob.

Braden Kelley

unread,
Nov 7, 2012, 2:04:02 PM11/7/12
to chromiu...@chromium.org, Braden Kelley, Bri Hatch, Narendra Kumar S.S, rgi...@google.com
The Secure Shell app doesn't work with the newest Chromebook. I'm running version 0.8.7. It works fine in Linux but in Chrome OS the error basically says there is no version for that architecture (I can post the exact error message later). I'm guessing there is no .nexe pointed to by the .nmf for the ARM processor. The screen just says "loading NaCl module..."

Also, when I'm already running crosh and I try to open the Secure Shell app it just focuses on the crosh tab. In Ubuntu I can have two Secure Shell windows open simultaneously.

Does anybody know if there's a way to open crosh in a window? Ctrl-Alt-T only opens in a new tab and I haven't found any settings yet to change that.

Robert Ginda

unread,
Nov 7, 2012, 4:55:03 PM11/7/12
to Braden Kelley, chromium-hterm, Bri Hatch, Narendra Kumar S.S
On Wed, Nov 7, 2012 at 11:04 AM, Braden Kelley <red...@gmail.com> wrote:
The Secure Shell app doesn't work with the newest Chromebook. I'm running version 0.8.7. It works fine in Linux but in Chrome OS the error basically says there is no version for that architecture (I can post the exact error message later). I'm guessing there is no .nexe pointed to by the .nmf for the ARM processor. The screen just says "loading NaCl module..."


You need the dev version on ARM.  The dev version is here: https://chrome.google.com/webstore/detail/secure-shell-dev/okddffdblfhhnmhodogpojmfkjmhinfp, and you must be logged into an account that is a member of this group for that link to work.
 
Also, when I'm already running crosh and I try to open the Secure Shell app it just focuses on the crosh tab. In Ubuntu I can have two Secure Shell windows open simultaneously.

Does anybody know if there's a way to open crosh in a window? Ctrl-Alt-T only opens in a new tab and I haven't found any settings yet to change that.



Ctrl-Shift-N opens a new window.
 
Rob.

Braden Kelley

unread,
Nov 7, 2012, 5:15:13 PM11/7/12
to Robert Ginda, chromium-hterm, Bri Hatch, Narendra Kumar S.S
Cool - thanks for the link. I thought Ctrl-Shift-N opened an Incognito window. That's not the same as "Open as window" in the applications, is it? I'm mainly just wondering about being able to use Ctrl-W without closing the application.

Robert Ginda

unread,
Nov 7, 2012, 6:21:47 PM11/7/12
to Braden Kelley, chromium-hterm, Bri Hatch, Narendra Kumar S.S
Mm, Ctrl-Shift-N only works if you're already in an Open-As-Window, otherwise Chrome will trap it and open a new incognito window.  That may cause trouble with crosh, which I think always opens in a tab.  Do you still have a crosh tab open now that you've got a working Secure Shell?

Braden Kelley

unread,
Nov 8, 2012, 12:50:02 PM11/8/12
to Robert Ginda, chromium-hterm, Bri Hatch, Narendra Kumar S.S
OK, so everything works as far as I need it. If I have Secure Shell open as a window and logged in then I can create another instance with Ctrl-Alt-Shift-N, which opens another window.

Crosh will open from a tab into a window with Ctrl-Alt-Shift-N, but the new window has a search bar and Ctrl-W will still try to close the window.

I found some interesting things and I'm not sure if they are intended behavior or minor glitches (this probably isn't the best place to post these but I'm not sure where else. Feel free to redirect me).

If I try to open the Secure Shell app it will just focus on the Secure Shell or Crosh instance I have used most recently. If I have crosh open already, but not Secure Shell, I can't open Secure Shell (it will just focus on the crosh window/tab).

The first Secure Shell window I open has no header - it's just blank. The second one will update the header to whatever I'm doing (e.g. "example.cc (/home/login/code) - VIM" or "lo...@example.com:~/code") BUT it will only refresh if I do something that forces the window to redraw, like tab over to another window and back, or switch between full screen and windowed mode. When it does have the header there is also the same logo in the top left corner that crosh has.

Robert Ginda

unread,
Nov 12, 2012, 1:13:36 PM11/12/12
to Braden Kelley, chromium-hterm, Bri Hatch, Narendra Kumar S.S
On Thu, Nov 8, 2012 at 9:50 AM, Braden Kelley <red...@gmail.com> wrote:
OK, so everything works as far as I need it. If I have Secure Shell open as a window and logged in then I can create another instance with Ctrl-Alt-Shift-N, which opens another window.

Crosh will open from a tab into a window with Ctrl-Alt-Shift-N, but the new window has a search bar and Ctrl-W will still try to close the window.

I found some interesting things and I'm not sure if they are intended behavior or minor glitches (this probably isn't the best place to post these but I'm not sure where else. Feel free to redirect me).

If I try to open the Secure Shell app it will just focus on the Secure Shell or Crosh instance I have used most recently. If I have crosh open already, but not Secure Shell, I can't open Secure Shell (it will just focus on the crosh window/tab).

The first Secure Shell window I open has no header - it's just blank. The second one will update the header to whatever I'm doing (e.g. "example.cc (/home/login/code) - VIM" or "lo...@example.com:~/code") BUT it will only refresh if I do something that forces the window to redraw, like tab over to another window and back, or switch between full screen and windowed mode. When it does have the header there is also the same logo in the top left corner that crosh has.


What do you mean by header?  Are you referring to the window title?  And which logo?

Screenshots of the issues may help.


Rob.

Braden Kelley

unread,
Nov 14, 2012, 2:16:47 AM11/14/12
to chromiu...@chromium.org, Braden Kelley, Bri Hatch, Narendra Kumar S.S, rgi...@google.com
Yeah I'm talking about the window title. The logo or favicon is the same one that crosh uses. It looks like in one server I connect to there is some setting that makes it so the window title updates with the PS1, but my laptop running crunchbang doesn't have that setting, so the screenshots just show it saying things like "Thanks for flying Vim"

The screenshot at 10.32.46 shows crosh opened in a tab, and then opened again using Ctrl-Shift-N (the one with the Chrome icon).

The screenshot at 10.39.38 shows after exiting out of Vim and Alt-Tabbing over to another window shows "Thanks for flying Vim." I couldn't get it to take a screenshot while still focused on the Secure Shell app, but it was still displaying "[No Name] - VIM" (which you can see in the third screenshot) until I switched windows. The window in the background is the first one I opened, with no icon and without the window title ever updating. The window closer to the foreground was opened by pressing Ctrl-Shift-N while in the Secure Shell app.

If I were to try to open a new instance of Secure Shell app from the app/search menu it would just focus on the one closest to the foreground.
Screenshot 2012-11-13 at 10.39.38 PM.png
Screenshot 2012-11-13 at 10.40.11 PM.png
Screenshot 2012-11-13 at 10.32.46 PM.png
Reply all
Reply to author
Forward
0 new messages