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.
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.
Related
I am using Windows 10 and the text editor I am used to is Vim. I just intalled a shiny new GNU Octave copy (version 7.2.0). The Octave editor is pretty limited and I know it is possible to override it to vim/gvim. I have tried different things to make it work, without success.
Using the Preference->Editor pane
It seems that Octave is never able to understand what I put in there. I have tried using gvim, gvim.exe, a full path to my copy of gvim, etc. When I go to the editor, I either get:
or, when using a full path to the editor (ex. here: C:\Program Files (x86)\Vim\vim82\gvim.exe):
I think Octave is unable to deal with spaces in paths (at least from this edit box). It have also tried using single and double quotes, but it also fails:
Using an .octaverc file
When nothing worked in the GUI, I tried configuring an .octaverc file, as described in the GNU Octave Wiki:
edit mode sync
edit home .
EDITOR('gvim')
I tried with vim as well, full paths, etc, to no avail. Now I know that this file is read and executed when lauching Octave because when I put garbage in it, I see it in the Command Window. I also found a Set Path option in the GUI and I tried adding the path to gvim there, but it had no effect:
Question
I can I make my GNU Octave editor gvim, on Windows? I would like to use my current installation (default for Octave, default for Vim as well...)
Is it possible to open a new terminal tab in VS Code from the command line? I know it's possible to have hotkeys and click the icon in the GUI. However, I need to do this from a script to have several terminals. I am running Ubuntu within a Docker devcontainer. I looked at the solution of using a terminal multiplexer, which might work, but it doesn't seem necessary.
I use SublimeText3 on macOS for writing my code. I would like to run/build a code up to the current line where cursor is situated.
Is there a shortcut key to do that?
A shortcut key to select all lines from the beginning to the current line will also help. I can use that followed by key binding for build.
Although the example given below is short, I intend to use it in a script containing many lines of code.
Example .py script:
print("a")
print("b") #keep cursor here and use key board shortcut to run all lines of code up to this line.
print("c")
Sublime Text has no built in debugger so there is no run-to-cursor feature.
There are various debugging plugins that can be installed using Package Control. Among these there are Python Debugger which may be of use to you since you refer to Python in your post and Sublime Debugger which attempts to match Visual Studio Code's Debugger fairly closely.
I am completely new to Python and wanted to try this code from the tutorial:
istrue = 1
if istrue:
print ("be carefull!")
The code itself should be fine, but I can not find any way to execute this code inside the editor [Komodo-Edit](http://www.activestate.com/komodo-edit)
I am used to Visual Studio and QtCreator (experienced C++/Qt developer). I would expect a menu for debugging and a command such as 'start debugging' which should open a console or use a console inside the editor. I would in any case refuse to use a dos console because then the whole idea of using an IDE would be useless.
If other Python IDEs would be more useful (on windows, no costs) I could switch to another one (except for vim/emacs).
I used to use Komodo edit, but not anymore as It's more of a text editor than an IDE. I reccomend using Ninja-IDE or Eclipse with PyDev. But if you insist on using Konodo Edit, here's an option:
Go here: Toolbox > Add > New Command...
in the top field enter the name 'Run Python file' or something else. Then go to the 'command' field and enter this:
%(python) "%F"
Optionally, you could also specify key binding for fast python executing.
I tried Komodo Edit version 9 and 10. Matthias' method work for the version 9. Version 10, I couldn't see the option to choose the Interpreter.
I'd like to be able to map the vim commands :tabnext and :tabprev to CTRL+TAB and CTRL+SHIFT+TAB respectively. Unfortunately, I seem to be running into the problem where PuTTY eats these character combinations.
I've tried searching for information, but to no avail. I'm pretty sure this is a PuTTY thing but there doesn't seem to be any sort of help/reference area for the application.
I am curious if anyone here has any experience or suggestions for figuring this out.
#rmeador: try mapping the key combo within vim.
I have attempted to do this, but it doesn't appear like vim is getting the combo. I'm not certain if this is related to the term settings or an issue with PuTTY.
PuTTY doesn't send anything when you press Ctrl+Tab.
You can patch PuTTY as it is described here: Using Ctrl+Tab in GNU Screen over PuTTY
I believe that at this time, using Ctrl+Tab is not possible with PuTTY, because PuTTY does not allow you to configure specific translations for keys. Here is a decent article that shows how you would set this up if PuTTY did support this feature:
http://www.staldal.nu/tech/2009/01/10/how-to-use-ctrl-tab-in-gnu-screen/
If you use (or would consider using) a hotkey/macro program like Autohotkey, you could emulate this behavior yourself. For example, this Autohotkey config script would do exactly what you want:
#IfWinActive PuTTY
^Tab::Send :tabnext
^+Tab::Send :tabprev
#IfWinActive
(Note that this example is just looking for any window title starting with PuTTY, so you'd have to adjust based on your title configuration.)