* easy layout of panes (windows) in fullscreen mode. I have tmux macros setup to quickly get different pane layouts -- e.g. 65% left, then two vertical split panes in the remaining right 35%. Typically I run vim in the larger pane and then have two other panes for various other CLI stuff on dev systems. I have a number of other preconfigured layouts depending on what I'm trying to get done.
* tmux session can be detached/reattached. I've on occasion had iTerm crash or I've accidentally quit it (cmd-Q). With tmux, my session is still running, so I just restart iTerm and reattach...everything back where I left off. There is even a new-ish plugin for tmux that lets you save tmux sessions so that you can restore after restart. The reattaching also makes it low-overhead if/when iterm wants to update itself (admittedly rare).
* Once you get used to tmux navigation keys/commands, they will conceptually work on linux systems as well if you run tmux (more portable muscle memory).
just my $0.02
I have stayed put with Vim, Tmux and shell, a very capable triumvirate. It allows one to build your own IDE.
Especially when your project may need some customization beyond an IDE.
Ex: I work on a python application which needs to support 4 different library versions (python wrapper over C++) and I have 4 venvs, for each version. I have a tmux session, with a pane for each venv, one vim, one tail etc. I tried for ex: PyCharm and every time I do python setup.py develop in each venv, there goes the IDE with all it's scanning stuff.
Tmux just lets me do what I want without getting in the way. And tmux-resurrect is a great addition. [1] [1]: https://news.ycombinator.com/item?id=10219003
However, it should be noted that Vim already is a distraction-free writing environment, and Markdown is quite simple enough. A vanilla Vim with Markdown highlighting is actually enough. In fact, as long as being "distraction-free" is concerned, just VI should be enough.
Althought I am all for tweaking, I always keep in mind that sometimes I am better off tweaking the writing itself, rather than the tools.
I am sharing this because sometimes we tend to get lost in configuration, and we need reminders to get out.
It's easy to spend hours tweaking the perfect setup, but it's a never ending task. Also the more you tweak it the easier it breaks at each upgrade, and the more you rely on it and miss it when you're not on your personal computer. For this reason I'm reluctant to add mappings such as inoremap jk <Esc> to my .vimrc for fear of getting used to it.
That's basically your age-old argument, which is fine. However, there's nothing wrong with other people optimizing their productivity even further. Personally, I appreciate people who try to tune their editing. It should be a more precise task with less effort. I don't use vim much these days but people are doing a great job in promoting precision:
Vim - precision editing at the speed of thought https://vimeo.com/53144573
I put every sentence (or longer clause) on its own line. This keeps the navigation paradigm the same. And more importantly, diffs are still readable. If you're doing any kind of collaboration or revision with your Markdown documents, trying to read diffs with one change in the middle of a paragraph-long line is quite frustrating.
You can use tables, fenced code blocks (there is syntax highlighting too), and images (I use viewBox'd SVGs for my diagrams). And of course there is the usual split view and a live preview on whichever side you prefer. You can also customize the CSS if you want, but the default one looks fine, really.
It does everything I need from a Markdown editor out of the box.
https://code.visualstudio.com/Docs/languages/markdown
(The right sidebar can be toggled with Ctrl+B.)
Have you considered just using hard wrapping instead? Sometimes having a problem solving mindset can make one miss the more elegant solution. Since you said you don't have a strong opinion in regards to hard vs. soft wrapping, why go through the trouble of fixing an issue when you could simply make the issue irrelevant?
At this point you've already got it solved so it's a bit of a moot point, but I'm interested in your thought process here.
This solution, meanwhile, is far from inelegant:
nnoremap g gj
nnoremap k gk
That's it, once and done. Aside from setting your wrap preferences—which you would have had to do anyway with hard wraps—there's no more to be taken care of. The text will always display fluently and in full, and you will have no need to manually reformat your paragraphs using gqap whenever you make a change to them. All that need concern you is the text, not its line-by-line arrangement.(I do agree that vim-pencil is unnecessary, at least if you're only going to use one scheme for wrapping.)
I personally enjoy vim-livedown:
https://github.com/shime/vim-livedown
It opens up a browser window with a rendered Markdown page, and live updates when a Markdown file changes. This lets you do "split screen text/preview" editing, which is wonderful.
I also enjoy the simplenote.vim plugin. Simplenote is the hosted note taking service run by the team at Automattic/Wordpress. It's not well known that it supports Markdown fully, and also has a way to one-click publish your Markdown posts. The vim plugin lets you edit all your Simplenotes inside vim itself! If you use Simplenote, this is a great plugin.
https://github.com/mrtazz/simplenote.vim
I also set up a bash alias like this:
alias simplenote=vim -c "Simplenote -l"
which lets me type "simplenote" at the command line and get a vim editor that is open on my Simplenote account. Then I markdown away and can preview/publish from the web interface!<joke>So, it's not a very efficient distraction-free setup...</joke>
Vim is the icing on the cake here: writing documentation becomes less painful with a distraction-free modal text editor compared to a bloated Word.
Hope it helps :)
That's a great setup for my blog postings that I already write in markdown.