Closed MatthiasKauer closed 6 years ago
Sounds good! Perhaps it could be implemented with substitution in the cfg_editor
setting - eg. cfg_editor = vim {filename} +{line}
.
I can't remember needing to copy between notes, but I'd probably simply copy to the clipboard, close and open the new note, then paste. I don't think it would work too well with multiple sncli processes running - it's not using a database as such, so would probably end up with overwritten files... Perhaps we should also look into implementing a lockfile or similar to avoid that if it is a problem.
So, I have created a first proof of concept for this feature.
Getting {line}
and {fname}
interpolated was surprisingly simple.
Now, I am wondering what I broke with my changes.
Can you guide me a bit and tell me what I should check?
@swalladge How should I continue here?
@MatthiasKauer sorry I've been busy with other things over the last week. I'll check out your PR as soon as I can. :)
Hmm. I would've loved to test that PR a bit more :| Let's see how it goes. Contact me if things break. I doubt I broke something on a fundamental level.
Hi, when switching from note view to editor, I'd like the editor to start in the correct line.
I have taken a look at the code and it appears to me that
lb.focus_position
needs to be passed along toexec_cmd_on_note
. For vim, the command to execute would be something likevim <fname> +<line>
. Ideally, that could be encoded in the config so the style of other editors is also possible.Do you have any thoughts on this?
Best regards, Matthias
BTW: What's your workflow for copying things from one note to another? Do you open sncli twice? Is that safe?