I just setup Octave on my Emacs, however I have no idea how to send lines to the Octave buffer...
After M-x run-octave
My cursor is on the line a = 1
I typed C-c i l it doesn't work..
1) C-c C-i then it shows:
C-c TAB is undefined ---------- Why C-i is recognized as TAB here??
2) C-c i then it shows:
C-c i is undefined
both warnings shine before I even type in l!
Anyone could help? Much appreciated for any response!
PS
My octave-mod.el file has the definition:
(define-key map "\C-c\C-il" 'octave-send-line)
The keybindings mentioned online are outdated. 'octave-send-line is now C-c TAB C-l
You can find all the keybindings by C-h m( or F1 m). I have pasted some of them below for quick reference. Happy Emacs Editing
C-c TAB C-b octave-send-block
C-c TAB C-f octave-send-defun
C-c TAB C-h octave-hide-process-buffer
C-c TAB C-k octave-kill-process
C-c TAB C-l octave-send-line
C-c TAB C-r octave-send-region
C-c TAB C-s octave-show-process-buffer
C-c TAB b octave-send-block
C-c TAB f octave-send-defun
C-c TAB h octave-hide-process-buffer
C-c TAB k octave-kill-process
C-c TAB l octave-send-line
C-c TAB r octave-send-region
C-c TAB s octave-show-process-buffer
Related
I have the following code saved as script.
% demonstration of hold
clf;
t = linspace (0, 2*pi, 100);
plot (t, sin (t));
hold on;
plot (t, cos (t));
title ({"hold on", "2 plots shown on same graph"});
hold off;
When I execute the script within Octave, Octave's viewer shows the figure.
However, when I execute the script from the command line (Ubuntu) the viewer opens and closes alone very quickly without showing any figure.
I don't know if this issue has to do with Octave or Ubuntu. I apologize if the question is very naive.
When running and Octave script from the command line, Octave is launched to execute it, and when the script ends, Octave terminates too. This is why you see the figure windows created and immediately destroyed. There no longer is a program running to show these figure windows.
If you add a pause statement at the end of your script, Octave will wait at that statement until you press a key, then continue. So after you press the key, the script ends and Octave terminates. But while it is waiting, the figure windows will be visible.
You can use waitfor to prevent Octave from termination until the figure is closed. First you should get graphic handle of the figure. Some functions including clf , plot ,... can return a graphic handle. Then use waitfor with the handle as its argument.
h = plot(1:10);
waitfor(h);
or
h = clf;
plot(1:10);
waitfor(h);
I'm using SublimeREPL in Sublime 2 (v2.0.2) under OS X. I send Python files to the SublimeREPL window for evaluation, and I'd like to clear the SublimeREPL window from time to time. The window seems to be read-only, so cmd-a, delete doesn't work.
Use ctrl+l on a linux/osx system; on windows it's shift+ctrl+c
SublimeRepl documentation is here SublimeRepl keys
Linux OS X Windows Command used Meaning
Alt+p Ctrl+p Alt+p repl_view_previous Walk back to previous input, no autocomplete
Down Down Down repl_view_next Walk back to next input, with autocomplete
Alt+n Ctrl+n Alt+n repl_view_next Walk back to next input, no autocomplete
Enter Enter Enter repl_enter Send current line to REPL
Esc Esc Esc repl_escape Clear REPL input
Ctrl+l Ctrl+l Shift+Ctrl+c repl_clear Clear REPL screen
Shift+Ctrl+c Shift+Ctrl+c Unsupported subprocess_repl_send_signal Send SIGINT to REPL
I can type the euro symbol (€) in any other application with the standard keypress but not in PhpStorm. Nothing happens when I press AltGr+E. What's the problem?
It's a known issue considered not a bug. AltGr+E is basically an alias for Ctrl+Alt+E. This last key combination is assigned by default to the Edit command provided by the Perforce Integration plug-in. You can verify it at:
File → Settings → IDE Settings → Keymap
Click on the magnifying class icon and press AltGr+E:
Possible solutions:
Disable the plugin if you don't need it:
File → Settings → IDE Settings → Plugins
Otherwise, change or disable the keybinding.
Whatever the reason, the Browse History binding does not interfere. In fact, it doesn't even work.
I could not type # symbol and it was same issue as this one.
My story of solution:
Tried to write # symbol (Ctrl + Alt + X) and that typed nothing, just info in bottom left corner (something about finding Xpaths) showed up.
Then I went to Settings > Keymap and type 'xPath' in search field.
This way I found out that on that key shortcut was plugin about XPaths bound.
Go to plugins, find the plugin and disable it.
Restart IDE and then I can write # symbol as I need.
I recently moved from Windows to OS X and transferred my PHPStorm preferences in the process. On my Windows machine, I remember I had bind ctrl + w to close the current window. This is what PHPStorm listens for on my Mac too. I'd like to be more consistent in how I close my sub-windows in my applications and want to change this binding to cmd + w. I can't seem to find where in the "Keymaps" section this binding is set at. Does anyone know the name of this action?
Have you tried searching your keymap for "Close" ? This will narrow list of possible actions a lot.
In any case: Preferences | Keymap
Action: Main Menu | Window | Editor Tabs | Close
I use R interactively from Org-mode - the keybinding C-x ' from within an R code-block launches an interactive R session using ESS.
When I press C-x ' from inside an SQL code block, it sends the code block to an SQL-mode buffer, but it is not clear how I can then send a query to MySQL.
Can I do this with MySQL?
First, include the code from the accepted answer to How can I get emacs sql-mode to use the mysql config file (.my.cnf)? in your .emacs
Second, use C-x ' from within the SQL code block to send the code block to an SQL mode buffer
Once the code block has been sent to a buffer in SQL mode, launch your MySQL session using M-x pool-a (or whatever connection you wish to use).
At this point, the standard SQL keybindings can be used:
C-c C-c send paragraph
C-c C-r send selected region
C-c C-b send entire buffer
C-c C-s send string