Commit 97168547 authored by Murukesh Mohanan's avatar Murukesh Mohanan

non-copyable line numbers

parent 2aaa69c7
......@@ -83,7 +83,7 @@ a manpage no matter how I opened it. Hence, they should really be in Vim's
filetype settings for `man`. So, I created a `~/.vim/ftplugin/man.vim`,
containing:
{% highlight vim linenos %}
{% highlight vim lineanchors %}
function! PrepManPager()
if !empty ($MAN_PN)
silent %! col -b
......@@ -118,7 +118,7 @@ A bit of experimentation later, I found that:
Knowing that I'm reading from `stdin` and that `MAN_PN` is set (to the manpage
name!), I came up with this version:
{% highlight vim linenos %}
{% highlight vim lineanchors %}
" vimrc
if !empty($MAN_PN)
autocmd StdinReadPost * set ft=man | file $MAN_PN
......
......@@ -26,12 +26,28 @@ img {
max-width: 100%;
}
.linenos, .lineno {
/*
* From http://drewsilcock.co.uk/proper-linenumbers/
*/
pre {
counter-reset: line-numbering;
}
pre a::before {
content: counter(line-numbering);
counter-increment: line-numbering;
padding-right: 1em; /* space after numbers */
text-align: right;
opacity: 0.4;
display: inline-block;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: -moz-none;
-o-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
min-width: 1em;
}
@media screen and (orientation:landscape) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment