Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Murukesh Mohanan
web
Commits
80fd0471
Commit
80fd0471
authored
9 years ago
by
Murukesh Mohanan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
non-copyable line numbers, mk II
parent
97168547
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
+21
-16
_posts/2015-08-28-vim-for-man.md
_posts/2015-08-28-vim-for-man.md
+2
-2
styles/posts.css
styles/posts.css
+19
-14
No files found.
_posts/2015-08-28-vim-for-man.md
View file @
80fd0471
...
@@ -83,7 +83,7 @@ a manpage no matter how I opened it. Hence, they should really be in Vim's
...
@@ -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`
,
filetype settings for
`man`
. So, I created a
`~/.vim/ftplugin/man.vim`
,
containing:
containing:
{% highlight vim line
anchor
s %}
{% highlight vim line
no
s %}
function! PrepManPager()
function! PrepManPager()
if !empty ($MAN_PN)
if !empty ($MAN_PN)
silent %! col -b
silent %! col -b
...
@@ -118,7 +118,7 @@ A bit of experimentation later, I found that:
...
@@ -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
Knowing that I'm reading from
`stdin`
and that
`MAN_PN`
is set (to the manpage
name!), I came up with this version:
name!), I came up with this version:
{% highlight vim line
anchor
s %}
{% highlight vim line
no
s %}
" vimrc
" vimrc
if !empty($MAN_PN)
if !empty($MAN_PN)
autocmd StdinReadPost
*
set ft=man | file $MAN_PN
autocmd StdinReadPost
*
set ft=man | file $MAN_PN
...
...
This diff is collapsed.
Click to expand it.
styles/posts.css
View file @
80fd0471
...
@@ -34,20 +34,25 @@ pre {
...
@@ -34,20 +34,25 @@ pre {
counter-reset
:
line-numbering
;
counter-reset
:
line-numbering
;
}
}
pre
a
::before
{
pre
span
.lineno
::after
{
content
:
counter
(
line-numbering
);
content
:
counter
(
line-numbering
);
counter-increment
:
line-numbering
;
counter-increment
:
line-numbering
;
padding-right
:
1em
;
/* space after numbers */
text-align
:
right
;
text-align
:
right
;
opacity
:
0.4
;
opacity
:
0.4
;
display
:
inline-block
;
display
:
inline-block
;
-webkit-touch-callout
:
none
;
-webkit-touch-callout
:
none
;
-webkit-user-select
:
none
;
-webkit-user-select
:
none
;
-khtml-user-select
:
none
;
-khtml-user-select
:
none
;
-moz-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
user-select
:
none
;
min-width
:
1em
;
min-width
:
1em
;
visibility
:
visible
;
margin-left
:
-1em
;
}
pre
span
.lineno
{
visibility
:
collapse
;
}
}
@media
screen
and
(
orientation
:
landscape
)
{
@media
screen
and
(
orientation
:
landscape
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment