added python compile command #806

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@cpaulik
Contributor
cpaulik commented Mar 11, 2015

This makes using compile mode in python easier by doing the following:

  • automatically changes compile command to
    python (buffer-file-name
    for python buffers
  • automatically starts comint mode in python mode to allow interaction
    with debugger

Fixes #805

@cpaulik cpaulik added python compile command
- automatically changes compile command to
  ```python (buffer-file-name```
  for python buffers
- automatically starts comint mode in python mode to allow interaction
  with debugger
a8becc3
@syl20bnr
Owner

Excellent ! 👍

I reworked it like this:

  • since I removed the advice the key binding is major specific SPC m c c
  • without a universal argument it does not ask for a command, with an universal argument it asks for a command (SPC u SPC m c c)
  • I added SPC m c C to compile and then switch to the comint buffer in insert state.

Commit: 3098a1a

Thank you!
Cherry-picked in develop, you can safely delete your branch.

@syl20bnr syl20bnr closed this Mar 14, 2015
@syl20bnr
Owner

oh you got the 400th PR congratulation ! :-)

@cpaulik cpaulik deleted the cpaulik:python-layer-compile branch Mar 14, 2015
@cpaulik
Contributor
cpaulik commented Mar 14, 2015

Thanks for making functions out of it, way cleaner.

I tested it and found a problem when the compile-command is already set to e..g a first python file and you want to execute a second python file. I also moved point to the end of Buffer if we are switching to the comint buffer, so we can directly interact with the debugger. see PR #824

Yay 400th 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment