Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to open slide in editor #314

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

waelmahrous
Copy link

@waelmahrous waelmahrous commented Oct 30, 2024

This allows the user to edit the currently open slide with the command ctrl+o. Must be a session in tmux. Currently only opens it in vim, but I'll add more so that you can change to an editor of choice in a config file.

Fixes #264

This allows the user to edit the currently open slide with the command
ctrl+o. Must be a session in tmux. Currently only opens it in vim, but
I'll add more so that you can change to an editor of choice in a config
file.
A better structure that makes it easier to add new editing capabilities
later on.
@pomdtr
Copy link

pomdtr commented Oct 31, 2024

I'm not sure adding a requirement on termux is the right way to go.

You could use https://pkg.go.dev/github.com/charmbracelet/bubbletea#ExecProcess to spawn the editor from the bubbletea app

@waelmahrous
Copy link
Author

Ah that's much cleaner.

@pomdtr
Copy link

pomdtr commented Oct 31, 2024

You should probably also respect the EDITOR env variable by default.

@waelmahrous
Copy link
Author

You should probably also respect the EDITOR env variable by default.

Good idea! It now also jumps to the correct line in vim/nvim/vscode.

@waelmahrous waelmahrous force-pushed the waelmahrous_SwitchToEditor branch 2 times, most recently from d2d792d to b860333 Compare October 31, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Open current slide in editor
2 participants