0

Previous Title: Groovy shell settings/config file location on windows and an example

Where can I find/create a groovysh/groovy shell settings/config file in Microsoft Windows 7?

Groovysh currently has an issue GROOVY-6453 where certain keys don't work correctly on windows for my version of groovy. I'd previously used AutoHotkey to remap the keys but I've started to use ConEMU and haven't figured out how to differentiate the tabs so far with AutoHotkey.

I'm hoping I'll be able to remap the keys in the config file so it works globally for my user and not need the AutoHotkey script anymore.

Just to clarify there is nothing wrong with ConEmu just the specific version of groovysh I'm using.

Lifeweaver
  • 986
  • 8
  • 29
  • 1
    Your question is unclear. Why do you asking about ConEmu? How it related to groovy config? – Maximus Apr 01 '15 at 12:50
  • I mentioned I was using ConEmu and my earlier method of remapping the keys didn't work anymore since I hadn't figured out a way to check which console tab is open in ConEmu with AutoHotkey. I wouldn't want to remap 'Ctrl+a' to the left arrow for every console in ConEmu. – Lifeweaver Apr 01 '15 at 14:15
  • Window title check doesn't work? – Maximus Apr 01 '15 at 17:08
  • Alas no, even when I change the title it still reads as cmd. I can tell if Groovy console window is open at all but not if it's active. – Lifeweaver Apr 02 '15 at 14:04

1 Answers1

3

If you set the title of a cmd window then start the groovysh the title will stick and AutoHotkey can check the window title.

In the ConEmu Commands input box enter -new_console:t:Groovy"cmd.exe /c title Groovy&&groovysh" The t:Groovy sets the title for the tab from ConEmu's viewpoint and the cmd.exe /c title Groovy sets the title from the cmd's viewpoint. The additional &&groovysh starts the groovy console. AutoHotkey sees the title as 'Groovy (Admin)'

I use AutoHotkey to 'fix' several of the keys mentioned in the GROOVY-6453.

i.e.:

#If (WinActive("Groovy (Admin)") || WinActive("Administrator: C:\Windows\system32\cmd.exe - groovysh"))
Up::^p
Down::^n
Left::^b
Right::^f
Home::^a
End::^e
Del::^d
#If

Update: the 'Right' arrow no longer works for me in Windows 10, it opens the find now.

Lifeweaver
  • 986
  • 8
  • 29