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
97168547
Commit
97168547
authored
Aug 28, 2015
by
Murukesh Mohanan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
non-copyable line numbers
parent
2aaa69c7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
_posts/2015-08-28-vim-for-man.md
_posts/2015-08-28-vim-for-man.md
+2
-2
styles/posts.css
styles/posts.css
+22
-6
No files found.
_posts/2015-08-28-vim-for-man.md
View file @
97168547
...
...
@@ -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 line
no
s %}
{% highlight vim line
anchor
s %}
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 line
no
s %}
{% highlight vim line
anchor
s %}
" vimrc
if !empty($MAN_PN)
autocmd StdinReadPost
*
set ft=man | file $MAN_PN
...
...
styles/posts.css
View file @
97168547
...
...
@@ -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
)
{
...
...
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