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
8c9ffad2
Commit
8c9ffad2
authored
Mar 16, 2016
by
Murukesh Mohanan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
css fixes for new highlighter
parent
aaf576b1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
32 deletions
+36
-32
_config.yml
_config.yml
+0
-1
_posts/2015-08-28-vim-for-man.md
_posts/2015-08-28-vim-for-man.md
+14
-8
styles/posts.css
styles/posts.css
+21
-22
styles/style.css
styles/style.css
+1
-1
No files found.
_config.yml
View file @
8c9ffad2
name
:
Murukesh Mohanan, IIT Bombay
markdown
:
kramdown
base-url
:
"
"
timezone
:
Asia/Kolkatta
myurl
:
http://murukesh.me/
...
...
_posts/2015-08-28-vim-for-man.md
View file @
8c9ffad2
...
...
@@ -52,7 +52,9 @@ differences per distro are a fact of life and have to be handled, but I'd rather
not take pains over what I add to it. One obvious solution is to wrap the
command in
`sh -c`
:
MANPAGER='sh -c "col -b | vim -c \'set ft=man nomod nolist ignorecase\' -"'
```
sh
MANPAGER
=
'sh -c "col -b | vim -c \'
set
ft
=
man nomod nolist ignorecase
\'
-
"'
```
**Ugly.**
I also hate having to deal with quoting.
...
...
@@ -61,8 +63,9 @@ command in `sh -c`:
At this point, it struck me: Why should I run this via a pipe? Once Vim starts,
I can perfectly well use
`%! col -b`
to do the job. So:
MANPAGER='vim -c "%! col -b" -c "set ft=man nomod nolist ignorecase" -'
```
sh
MANPAGER
=
'vim -c "%! col -b" -c "set ft=man nomod nolist ignorecase" -'
```
Nice!
Now, other considerations started popping up. You can easily quite
`less`
(and
...
...
@@ -72,7 +75,9 @@ quit a manpage, you'd have to do `:q!`, not just `:q`. Thankfully, one of the
options set (
[
`nomod`
][
nomod
]
) tells Vim that the buffer hasn't been modified.
Therefore, we can just use
`:q`
:
nnoremap q :q<CR>
```
vim
nnoremap
q
:
q
<
CR
>
```
Other considerations arise:
...
...
@@ -159,9 +164,9 @@ map <expr> <CR> winnr('$') == 1 ? ':vs<CR><C-]>' : '<C-]>'
{% endhighlight %}
with:
MANPAGER="vim -"
```
sh
MANPAGER
=
"vim -"
```
Beautiful!
What does this do?
...
...
@@ -206,7 +211,7 @@ I have no idea how to suppress the `stdin` message from Vim itself.
---
All told:
[
![man in Vim
]
(
{{
site.base-url }}/images/vim-man.png)]({{ site.base-url }}/images/vim-man.png)
[
![man in Vim
]
[
man-in-vim
]
][man-in-vim]
---
...
...
@@ -223,3 +228,4 @@ have learned quite a bit, which I will write about in another post soon.
[
1
]:
http://unix.stackexchange.com/a/1853/70524
[
nomod
]:
http://vimhelp.appspot.com/options.txt.html#%27nomod%27
[
vimenter
]:
http://vimhelp.appspot.com/autocmd.txt.html#VimEnter
[
man-in-vim
]:
{{
site.base-url }}/images/vim-man.png
styles/posts.css
View file @
8c9ffad2
@import
'code.css'
;
#post
ul
li
{
padding
:
0.2em
;
}
.post-title
a
{
text-decoration
:
none
;
font-size
:
medium
;
font-size
:
x-large
;
}
kbd
{
border
:
solid
black
0.05em
;
box-shadow
:
0
0.1em
0.1em
0.2em
rgba
(
100
,
100
,
100
,
0.75
);
padding
:
0.1em
0.5em
;
border-radius
:
0.
1
5em
;
border-radius
:
0.
2
5em
;
background
:
#FEFEFE
;
margin
:
0
0.2em
;
}
...
...
@@ -32,13 +28,13 @@ img {
text-align
:
right
;
}
.tag
{
a
.tag
{
background-color
:
gainsboro
;
padding
:
0.1em
0.5em
;
border-radius
:
0.3em
;
font-variant
:
small-caps
;
text-decoration
:
none
;
font-size
:
initial
;
font-size
:
large
;
}
ol
.tags-list
{
...
...
@@ -57,13 +53,25 @@ ol.tags-list li {
* From http://drewsilcock.co.uk/proper-linenumbers/
*/
pre
{
counter-reset
:
line-numbering
;
.highlight
{
margin
:
0
;
font-size
:
1.2em
;
}
pre
span
.lineno
::after
{
content
:
counter
(
line-numbering
,
decimal-leading-zero
);
counter-increment
:
line-numbering
;
.highlight
pre
{
margin
:
0
;
}
.highlight
pre
code
{
margin
:
0
;
padding
:
0
;
}
.highlight
.code
,
.highlight
.gutter
{
padding
:
0.5em
;
}
.highlight
.gutter
{
opacity
:
0.4
;
-webkit-touch-callout
:
none
;
-webkit-user-select
:
none
;
...
...
@@ -71,15 +79,6 @@ pre span.lineno::after {
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
visibility
:
visible
;
margin-left
:
-1em
;
}
pre
span
.lineno
{
visibility
:
collapse
;
text-align
:
right
;
display
:
inline-block
;
min-width
:
1em
;
}
.comments
{
...
...
styles/style.css
View file @
8c9ffad2
...
...
@@ -145,7 +145,7 @@ section, .section {
pre
code
{
overflow
:
auto
;
display
:
block
;
padding
:
1em
0.5em
;
padding
:
0.5em
;
color
:
whitesmoke
;
background-color
:
black
;
}
...
...
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