Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Emacs extension that allows a user to yank or copy a specific line by line number.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 yank-line.el
README.md

yank-line

Emacs extension that allows a user to yank or copy a specific line by line number.

Installation

To install simply add to your load path and include as below:

(add-to-list 'load-path "/path/to/yank-line")
(require 'yank-line)

Usage

Provides two convenience methods yl/copy-line and yl/yank-line that take a numeric argument which can be provided by C-u and copies the text from the given line skipping any initial indentation. If no numeric argument is provided then the current line is yanked or copied.

Example:

To copy the contents of line 20 and paste it at the current position you would do:

C-2-0 M-x yl/yank-line

To merely copy the contents from line 20 into the kill ring:

C-2-0 M-x yl/copy-line

You can also use these slightly more long-winded alternatives:

C-u 20 M-x yl/yank-line
C-u 20 M-x yl/copy-line

This is especially useful in a situation where you can see the line you would like to duplicate but want something faster than navigating to the line and copying.

Something went wrong with that request. Please try again.