-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
Can't pass command line arguments with spaces to editor #491
Comments
Pretty sure it's happening because the command just get's split by any whitespace, including the stuff in single quotes. https://github.com/maebert/jrnl/blob/master/jrnl/util.py#L133 Not sure of an elegant way to fix this by changing your editor value. Might try making a branch using shlex split, because it keeps the stuff in single quotes intact. For anyone wondering, the reason this would be cool is so that you can journal with vim and have vim-pencil and goyo start automatically. |
I solved this by adding a simple function to my
In my case it turns on vim-pandoc for Markdown editing and Goyo for distraction-free writing. Then in your
|
@cecep2 We should totally get this in to the docs! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm trying to solve a similar issue. I renamed the journals from .txt to .md and updated the .jrnl_config to point to the new path. I can edit them directly with |
I think the problem that the OP was seeing is vim interpreting the single quote as a jump-to-mark. The error is correctly indicating that there is no mark for s. But I'm baffled as to why it would happen when called from jrnl but not when called on the command line. @BenKettlewell You should be able to automatically call |
@gregorybodnar , you sir have my sincerest thanks 💯 That worked a dream. |
Happy to help. I'm tempted to work out some syntax highlighting for time and tags as well. |
@gregorybodnar Syntax highlighting would be fantastic! I think we need to rework how the editor command is executed, so that arguments are passed properly to all editors. PRs welcome! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is duplicated by #581 but there's more conversation and a potential fix there so I'm closing this one. |
The following command starts macvim, opens the journal file with a pre-vimrc that sets the syntax to Markdown
However, when I used this same command in the .jrnl_config I get an error:
.jrnl_config
Error
Any suggestions on how to fix this?
The text was updated successfully, but these errors were encountered: