Does not support the +N syntax and cannot be used as $EDITOR
cyril-bouthors opened this issue · comments
rmate does not support the +N syntax which is supposed to place caret on line number after loading file, just like --line:
$ ./rmate +3 /etc/fstab
There is more than one file specified. Opening only +3 and ignoring other.
Others editors like vi, emacs, mg support this, even nano:
emacs +3 /etc/fstab
vi +3 /etc/fstab
nano +3 /etc/fstab
mg +3 /etc/fstab
I prevents some program like 'debchange' to work:
$ export EDITOR='rmate -w'
$ debchange -i
There is more than one file specified. Opening only +3 and ignoring other.
and SublimeText opens the file called "+3"
Would it be possible to support +N as an alias to --line=N?
Thank you
PS: sorry about my initial bug report, I apparently triggered a shortcut to open the ticket before it was done
I think this should be easy to implement. I'll have a look at it, thanks for your suggestion.
Could you have a look at my latest commit? I think it should work now what you would like to do.
The latest commit seems to be working but the caret stays on line 1.
Same issue with
rmate --line 3 /tmp/x
mmm ... i have to admit that i only tested with textmate ... i'll have a look at sublime later today.
It does not seem to be possible with sublime text. at least: the subl command of sublime text itself does not offer a --line
option, either ... ? As i am TextMate user i have no knowledge regarding the possibilities of Sublime Text from command-line, but i'll happily add support, if someone can point me to a reference of this tool. There's a --command
option for example ... can this feature be achieved using this option?
The syntax is FILE:LINE_NUMBER, example:
subl /etc/hosts:2
Apparently i misunderstood how things work with sublime text. Sublime text is using the rsub package to achieve the remote editing functionality. So in my opinion a fix for the problem would belong to this package. As i am not the author of rsub, there's not much that i can do. But i'll have a look at it and maybe i can provide a patch for it ...
Thanks
On Thu, Mar 17, 2016 at 2:07 PM Harald Lapp notifications@github.com
wrote:
Apparently i misunderstood how things work with sublime text. Sublime text
is using the rsub package to achieve the remote editing functionality. So
in my opinion a fix for the problem would belong to this package. As i am
not the author of rsub, there's not much that i can do. But i'll have a
look at it and maybe i can provide a patch for it ...—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#47 (comment)Cyril Bouthors - go-managed.com http://www.go-managed.com/
+33-1-84-16-16-17
https://www.linkedin.com/in/cyrilbouthors
@cyril-bouthors i think i have a working patch for this, as i don't know how fast the original author of rsub is, you can fetch the change from my rsub fork at https://github.com/aurora/rsub in the meantime.
Great!
On Thu, Mar 17, 2016 at 5:38 PM Harald Lapp notifications@github.com
wrote:
@cyril-bouthors https://github.com/cyril-bouthors i think i have a
working patch for this, as i don't know how fast the original author of
rsub is, you can fetch the change from my rsub fork at
https://github.com/aurora/rsub in the meantime.—
You are receiving this because you were mentioned.Reply to this email directly or view it on GitHub
#47 (comment)Cyril Bouthors - go-managed.com http://www.go-managed.com/
+33-1-84-16-16-17
https://www.linkedin.com/in/cyrilbouthors