Re:Nim programming language
by kaushalmodi on Tuesday April 18, 2017 @10:00PM
(#14144879)
Emacs.
I have the nim-mode and smart-compile packages installed, and I have bound F9 to compile the nim code in the current buffer, and run it in the emacs-inbuilt eshell.
I have configured so that the point and buffer switching 'does the right thing'.
- If the compilation fails, show the compilation buffer in the other window, and do not execute the binary, and keep the point in the code window.
- If the compilation passes, execute the binary in the other window.
- Now if the binary execution ends with showing the eshell prompt, move the point back to the other window (code window).
- If not, that is, if the eshell prompt does not show up, keep the point in the eshell buffer, because that most likely means that some user input is expected.
---
So my nim learning process goes as: type a code snippet, F9, type more, probably cause error, F9, fix that, F9, etc.
I have the nim-mode and smart-compile packages installed, and I have bound F9 to compile the nim code in the current buffer, and run it in the emacs-inbuilt eshell.
I have configured so that the point and buffer switching 'does the right thing'.
- If the compilation fails, show the compilation buffer in the other window, and do not execute the binary, and keep the point in the code window.
- If the compilation passes, execute the binary in the other window.
- Now if the binary execution ends with showing the eshell prompt, move the point back to the other window (code window).
- If not, that is, if the eshell prompt does not show up, keep the point in the eshell buffer, because that most likely means that some user input is expected.
---
So my nim learning process goes as: type a code snippet, F9, type more, probably cause error, F9, fix that, F9, etc.
Config: [1] [2]
[1]: https://github.com/kaushalmodi/.emacs.d/blob/master/setup-fi...
[2]: https://github.com/kaushalmodi/.emacs.d/blob/master/setup-fi...