----------------------------------------
How I make sure my burrow phlog posts are not too wide
January 25th, 2019
----------------------------------------

Here's a nifty one, sometimes when making phlog posts, I run into GNU
nano doing a very bad job word wrapping, which results in the phlog
looking bad in say lynx on a standard 80x25 terminal.  No biggie, I
setup a function to give me a hand.

Software used:
My function is placed into ~/.bashrc, here's what it does:
Here's the condensed code I am using in ~/.bashrc:

case $TERM in
  tmux*)
    burrow() {
      local code=0
      local ancien
      ancien=$(tmux display-message -p '#W')
      tmux rename-window "burrow"
      tmux setw force-width 73
      trap "{tmux rename-window $ancien ; tmux setw force-width 0 }" INT
      env EDITOR="/usr/bin/nano -r72" burrow $@
      code=$?
      tmux rename-window $ancien
      tmux setw force-width 0
      return $code;
    }
  :;;
  *)
  :;;
esac

----------------------------------------

=> Back to phlog index | gopher.zcrayfish.soy gopher root

This phlog entry has been read 2471 times.
Future direct comment submission has been disabled for this phlog entry.
Comments are still accepted by email, please send to:
zacharygopher@gopher.zcrayfish.soy
Be sure to include the post title in the subject line! Thanks!
Comments have been left on this post:

noremap 8 :set colorcolumn=80:set tw=80:set fo+=t 
--- for vim users
Posted Fri May 15 10:04:47 UTC 2020 by 85.211.103.186
------------------------------------------------------------------------
Proxy Information
Original URL
gemini://gopher.zcrayfish.soy/1/phlog/20190125-how-i-make-sure-my-burrow-phlog-posts-are-not-too-wide
Status Code
Success (20)
Meta
text/gemini;
Capsule Response Time
687.732231 milliseconds
Gemini-to-HTML Time
0.491371 milliseconds

This content has been proxied by September (3851b).