Copy Code with Line Numbers


Hello there!

I am a newbie at and feel wonderful that there is a greate text editor like this available for free.
By the way, after checked this for a while, I have some problem that I am not sure there is any way I can copy both code and the line numbers together like the ‘Copy With Line Numbers’ package for Sublime.

I have found a package with the name like that but could not install.

If there is another package or any way to copy lines and its code, please let me know. It would be a big move to
Thank you in advance.


What stopped you?


In other terms, how did you try to install the package? Did you had errors? Which ones? Could you install other packages? What is your platform? etc.


Thank you for your reply. Sorry that I didn’t tell you some details.
I have been using on mac. I can install other packages accept the one named ‘copy-with-line-numbers’ created by yassh (

I am facing an error told that it’s unable to download the package as below image. Please advise.


I ask for this package because I would like to copy source code with its line numbers for referencing in my work.
If there is any alternative way to do things like this, please advise.


The error is because the repository doesn’t exist anymore. It was deleted before the package was deregistered. (@leedohm, would you mind deleting it?)

I suppose a command like that would take the current selection, run selection.getBufferRange(), then selection.getText(), text.split("\n"), run a for loop to iterate through the lines and attach the number and a \t at the front, then clipboard.write() the whole thing with new newlines.


Not at all :grinning: Deleted.