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

css fixes for new highlighter

parent aaf576b1
name: Murukesh Mohanan, IIT Bombay
markdown: kramdown
base-url: ""
timezone: Asia/Kolkatta
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
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
@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.15em;
border-radius: 0.25em;
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;
}
.highlight pre {
margin: 0;
}
.highlight pre code {
margin: 0;
padding: 0;
}
.highlight .code, .highlight .gutter {
padding: 0.5em;
}
pre span.lineno::after {
content: counter(line-numbering, decimal-leading-zero);
counter-increment: line-numbering;
.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 {
......
......@@ -145,7 +145,7 @@ section, .section {
pre code {
overflow: auto;
display: block;
padding: 1em 0.5em;
padding: 0.5em;
color: whitesmoke;
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