From 93aaf3f887403c9a9085f3ee2479974a7aa4a1ce Mon Sep 17 00:00:00 2001 From: M1dgard Date: Thu, 24 May 2018 23:09:44 +0200 Subject: [PATCH] [nvim] Nice text reflowing with par --- README.md | 1 + nvim-init.vim | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bbdb4c1..245d61e 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ The Arch Linux package to install is between parentheses. * Mozilla's Fira fonts ([community/otf-fira-mono](https://www.archlinux.org/packages/community/x86_64/otf-fira-mono/) and [community/otf-fira-sans](https://www.archlinux.org/packages/community/x86_64/otf-fira-sans/)). I might change this soon if I play with some patched Fira derivates * xfce4-terminal ([extra/xfce4-terminal](https://www.archlinux.org/packages/extra/x86_64/xfce4-terminal/), but you can choose your own terminal of course if you want) * NeoVim ([community/neovim](https://www.archlinux.org/packages/community/x86_64/neovim/)) + * par ([aur/par](https://aur.archlinux.org/packages/par/) for nice text reflowing) * acpilight ([aur/acpilight](https://aur.archlinux.org/packages/acpilight/), an xbacklight replacement that directly uses the kernel's API, works without X) * xrandr and arandr ([extra/xorg-xrandr](https://www.archlinux.org/packages/extra/x86_64/xorg-xrandr/) and [community/arandr](https://www.archlinux.org/packages/community/any/arandr/)) * unclutter ([community/unclutter](https://www.archlinux.org/packages/community/x86_64/unclutter/), hide the mouse when it hasn't moved for some time) diff --git a/nvim-init.vim b/nvim-init.vim index a138854..8264dae 100644 --- a/nvim-init.vim +++ b/nvim-init.vim @@ -21,6 +21,11 @@ set laststatus=2 " always show the status line set conceallevel=0 " don't use conceals, seriously let g:tex_conceal='' " I said no conceals +" use the nice `par` program wrap lines at 99 characters +set formatprg=par\ -w99 +set formatoptions=tcrqnlmj +set textwidth=99 + " toggle hybrid relative numbers when entering/leaving insert mode ":augroup numbertoggle ": autocmd! @@ -33,11 +38,6 @@ let g:tex_conceal='' " I said no conceals set shell=/bin/zsh " use zsh instead of bash -" wrap lines at 72 characters -"set formatprg=par\ -w72 -"set formatoptions=tcrqnlmj -"set textwidth=72 - set ignorecase smartcase " don't match case if typing in all-lowercase " ignore motion for < >