dotfiles

My collection of dotfiles
git clone git://git.noxz.tech/dotfiles
Log | Files | Refs

commit eaa3fb0eaa6e7869734961cc8c4e35014daa01c3
parent 80886bfb9888334c9c7b8a06c9a3231157af9067
Author: Chris Noxz <chris@noxz.tech>
Date:   Tue,  1 Oct 2019 20:37:34 +0200

[bin,vim] Add auto compiler for ms (groff)

Diffstat:
Abin/.bin/compile | 17+++++++++++++++++
Mvim/.vimrc | 4++++
2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/bin/.bin/compile b/bin/.bin/compile @@ -0,0 +1,17 @@ +#!/bin/sh + +_FILE=$(readlink -f "$1") +_DIR=$(dirname "$_FILE") +_BASE="${_FILE%.*}" + +cd "$_DIR" || return + +case "$_FILE" in +*\.ms) preconv "$_FILE" \ + | refer \ + | eqn -Tpdf \ + | tbl -Tpdf \ + | pic -Tpdf \ + | groff -ms -Tpdf > "$_BASE.pdf" + ;; +esac diff --git a/vim/.vimrc b/vim/.vimrc @@ -109,6 +109,10 @@ nnoremap E $ nnoremap <silent> <leader>f :LiteDFMToggle<CR> " }}} +" auto compile {{{ +map <leader>c :w! \| !compile <c-r>%<CR> +"}}} + " tab settings {{{ set tabstop=4 " tab equals 4 spaces set softtabstop=4 " soft tab equals 4 spaces