Commit 8c9ffad2 authored by Murukesh Mohanan's avatar Murukesh Mohanan

css fixes for new highlighter

parent aaf576b1
name: Murukesh Mohanan, IIT Bombay name: Murukesh Mohanan, IIT Bombay
markdown: kramdown
base-url: "" base-url: ""
timezone: Asia/Kolkatta timezone: Asia/Kolkatta
myurl: http://murukesh.me/ myurl: http://murukesh.me/
......
...@@ -52,7 +52,9 @@ differences per distro are a fact of life and have to be handled, but I'd rather ...@@ -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 not take pains over what I add to it. One obvious solution is to wrap the
command in `sh -c`: 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. **Ugly.** I also hate having to deal with quoting.
...@@ -61,8 +63,9 @@ command in `sh -c`: ...@@ -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, 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: 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! Nice!
Now, other considerations started popping up. You can easily quite `less` (and 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 ...@@ -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. options set ([`nomod`][nomod]) tells Vim that the buffer hasn't been modified.
Therefore, we can just use `:q`: Therefore, we can just use `:q`:
nnoremap q :q<CR> ```vim
nnoremap q :q<CR>
```
Other considerations arise: Other considerations arise:
...@@ -159,9 +164,9 @@ map <expr> <CR> winnr('$') == 1 ? ':vs<CR><C-]>' : '<C-]>' ...@@ -159,9 +164,9 @@ map <expr> <CR> winnr('$') == 1 ? ':vs<CR><C-]>' : '<C-]>'
{% endhighlight %} {% endhighlight %}
with: with:
```sh
MANPAGER="vim -" MANPAGER="vim -"
```
Beautiful! Beautiful!
What does this do? What does this do?
...@@ -206,7 +211,7 @@ I have no idea how to suppress the `stdin` message from Vim itself. ...@@ -206,7 +211,7 @@ I have no idea how to suppress the `stdin` message from Vim itself.
--- ---
All told: 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. ...@@ -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 [1]: http://unix.stackexchange.com/a/1853/70524
[nomod]: http://vimhelp.appspot.com/options.txt.html#%27nomod%27 [nomod]: http://vimhelp.appspot.com/options.txt.html#%27nomod%27
[vimenter]: http://vimhelp.appspot.com/autocmd.txt.html#VimEnter [vimenter]: http://vimhelp.appspot.com/autocmd.txt.html#VimEnter
[man-in-vim]: {{ site.base-url }}/images/vim-man.png
@import 'code.css'; @import 'code.css';
#post ul li {
padding: 0.2em;
}
.post-title a { .post-title a {
text-decoration: none; text-decoration: none;
font-size: medium; font-size: x-large;
} }
kbd { kbd {
border: solid black 0.05em ; border: solid black 0.05em ;
box-shadow: 0 0.1em 0.1em 0.2em rgba(100,100,100,0.75); box-shadow: 0 0.1em 0.1em 0.2em rgba(100,100,100,0.75);
padding: 0.1em 0.5em; padding: 0.1em 0.5em;
border-radius: 0.15em; border-radius: 0.25em;
background: #FEFEFE; background: #FEFEFE;
margin: 0 0.2em; margin: 0 0.2em;
} }
...@@ -32,13 +28,13 @@ img { ...@@ -32,13 +28,13 @@ img {
text-align: right; text-align: right;
} }
.tag { a.tag {
background-color: gainsboro; background-color: gainsboro;
padding: 0.1em 0.5em; padding: 0.1em 0.5em;
border-radius: 0.3em; border-radius: 0.3em;
font-variant: small-caps; font-variant: small-caps;
text-decoration: none; text-decoration: none;
font-size: initial; font-size: large;
} }
ol.tags-list { ol.tags-list {
...@@ -57,13 +53,25 @@ ol.tags-list li { ...@@ -57,13 +53,25 @@ ol.tags-list li {
* From http://drewsilcock.co.uk/proper-linenumbers/ * From http://drewsilcock.co.uk/proper-linenumbers/
*/ */
pre { .highlight {
counter-reset: line-numbering; margin: 0;
font-size: 1.2em;
}
.highlight pre {
margin: 0;
}
.highlight pre code {
margin: 0;
padding: 0;
}
.highlight .code, .highlight .gutter {
padding: 0.5em;
} }
pre span.lineno::after { .highlight .gutter {
content: counter(line-numbering, decimal-leading-zero);
counter-increment: line-numbering;
opacity: 0.4; opacity: 0.4;
-webkit-touch-callout: none; -webkit-touch-callout: none;
-webkit-user-select: none; -webkit-user-select: none;
...@@ -71,15 +79,6 @@ pre span.lineno::after { ...@@ -71,15 +79,6 @@ pre span.lineno::after {
-moz-user-select: none; -moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
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 { .comments {
......
...@@ -145,7 +145,7 @@ section, .section { ...@@ -145,7 +145,7 @@ section, .section {
pre code { pre code {
overflow: auto; overflow: auto;
display: block; display: block;
padding: 1em 0.5em; padding: 0.5em;
color: whitesmoke; color: whitesmoke;
background-color: black; background-color: black;
} }
......
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