All Projects → subnut → vim-iawriter

subnut / vim-iawriter

Licence: MIT license
iAwriter's Focus mode for vim

Programming Languages

Vim Script
2826 projects

Projects that are alternatives of or similar to vim-iawriter

42header.vim
Add and update the 42 comment header at the top of your files
Stars: ✭ 15 (-34.78%)
Mutual labels:  vim-plugin, neovim-plugin
vim-jukit
Jupyter-Notebook inspired Neovim/Vim Plugin
Stars: ✭ 55 (+139.13%)
Mutual labels:  vim-plugin, neovim-plugin
vim-counterpoint
Cycle between file counterparts in vim or neovim.
Stars: ✭ 12 (-47.83%)
Mutual labels:  vim-plugin, neovim-plugin
vim-lineletters
because letters are easier to touch type than numbers
Stars: ✭ 38 (+65.22%)
Mutual labels:  vim-plugin, neovim-plugin
vim-dap
Vim/Neovim debugger plugin providing a terminal interface to the Debug Adapter Protocol
Stars: ✭ 43 (+86.96%)
Mutual labels:  vim-plugin, neovim-plugin
code runner.nvim
Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
Stars: ✭ 234 (+917.39%)
Mutual labels:  vim-plugin, neovim-plugin
fzf-checkout.vim
Manage branches and tags with fzf
Stars: ✭ 187 (+713.04%)
Mutual labels:  vim-plugin, neovim-plugin
vim-readme-viewer
📖 Viewing plugin's README easily like vim help
Stars: ✭ 26 (+13.04%)
Mutual labels:  vim-plugin, neovim-plugin
onestatus
an api to customize tmux from vim
Stars: ✭ 82 (+256.52%)
Mutual labels:  vim-plugin, neovim-plugin
denops-gh.vim
Vim/Neovim plugin for GitHub
Stars: ✭ 27 (+17.39%)
Mutual labels:  vim-plugin, neovim-plugin
beacon.nvim
Whenever cursor jumps some distance or moves between windows, it will flash so you can see where it is
Stars: ✭ 217 (+843.48%)
Mutual labels:  vim-plugin, neovim-plugin
SimpleSnippets.vim
Simple snippet support for your Vim and Neovim
Stars: ✭ 86 (+273.91%)
Mutual labels:  vim-plugin, neovim-plugin
skim.vim
vim support for skim
Stars: ✭ 127 (+452.17%)
Mutual labels:  vim-plugin, neovim-plugin
auto-pairs
Vim plugin, insert or delete brackets, parentheses, and quotes in pairs
Stars: ✭ 109 (+373.91%)
Mutual labels:  vim-plugin, neovim-plugin
stable-windows
Keeps vim windows stable on layout changes
Stars: ✭ 41 (+78.26%)
Mutual labels:  vim-plugin, neovim-plugin
denops-docker.vim
Manage Docker in Vim/Neovim
Stars: ✭ 48 (+108.7%)
Mutual labels:  vim-plugin, neovim-plugin
Coc.nvim
Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Stars: ✭ 18,268 (+79326.09%)
Mutual labels:  vim-plugin, neovim-plugin
qf helper.nvim
A collection of improvements for the quickfix buffer
Stars: ✭ 70 (+204.35%)
Mutual labels:  vim-plugin, neovim-plugin
vim-tips-wiki
1500+ tips downloaded from Vim Tips Wiki, parsed and formatted to look and work like native Vim help files
Stars: ✭ 56 (+143.48%)
Mutual labels:  vim-plugin, neovim-plugin
bolt.nvim
⚡ Ultrafast multi-pane file manager for Neovim with fuzzy matching
Stars: ✭ 100 (+334.78%)
Mutual labels:  vim-plugin, neovim-plugin

vim-iawriter Github repo link Screenshots

This is a minimal plugin that aims to provide an experience similar to iAwriter's Focus mode. Currently it can only highlight paragraphs. Sentence highlighting is a TODO.

It acts as a wrapper around three other plugins -

For optimal experience, it is recommended to use a GUI or a terminal that supports 24-bit color

Installation

Install the plugins mentioned above, and then install this plugin any way you like 😄
In case you have never installed plugins before, I recommend you to check out vim-plug

Using vim-plug, the configuration should be -

Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
Plug 'reedes/vim-colors-pencil'
Plug 'subnut/vim-iawriter'

Usage

:Iawriter

Configuration

vim-iawriter does not touch the configurations defined individually for the abovementioned three plugins. If they are defined, vim-iawriter shall respect them In addition, vim-iawriter provides a few configuration options -

iawriter_force_defaults

This option shall override ALL other options
It enforces the defaults that ship with vim-iAwriter

i.e. let g:iawriter_force_defaults = 1 implies -

let g:goyo_width = '70%'
let g:goyo_height = '85%'
let g:limelight_paragraph_span = 0
let g:limelight_default_coefficient = 0.7
let g:iawriter_change_underline = 1
let g:iawriter_change_cursorline = 1
let g:iawriter_center_cursor = 0
let g:iawriter_show_signcolumn = 0

iawriter_change_cursorline

vim-iawriter turns off cursorline (if enabled) by default. To keep it on -

let g:iawriter_change_cursorline = 0

iawriter_change_underline

vim-iawriter turns off the underlining of the cursorline (if enabled) by default. To keep it on -

let g:iawriter_change_underline = 0

iawriter_show_signcolumn

vim-iawriter hides the signcolumn by default. To keep it -

let g:iawriter_show_signcolumn = 1

iawriter_center_cursor

This is an experimental feature. If enabled, vim-iawriter shall try to keep the cursor in the vertical center of the screen. To turn it on -

let g:iawriter_center_cursor = 1

Overrides

vim-iawriter provides some overrides. Useful if you use both Iawriter and Goyo/Limelight. It overrides the defaults set in .vimrc

Configuration Option Overrides
g:iawriter_goyo_width g:goyo_width
g:iawriter_goyo_height g:goyo_height
g:iawriter_goyo_linenr g:goyo_linenr
g:iawriter_limelight_default_coefficient g:limelight_default_coefficient
g:iawriter_limelight_paragraph_span g:limelight_paragraph_span

Extras

Screenshots: here

For the preview feature, I personally use markdown-preview.nvim


Advanced configuration

vim-iawriter provides plenty of autocommands -


Autocommand When
IawriterToggleTriggered s:toggle() enter
IawriterToggleFinished s:toggle() exit
IawriterPrePreEnter s:pre_enter() enter
IawriterPostPreEnter s:pre_enter() exit
IawriterPrePostEnter s:post_enter() enter
IawriterPostPostEnter s:post_enter() exit
IawriterPreLeave s:leave() enter
IawriterPostLeave s:leave() exit

s:toggle()
  • Checks if vim-iawriter is already running. If yes, closes it (by closing Goyo). Else starts it.
s:pre_enter()
  • Closes Goyo (not vim-iawriter) if running
  • Checks if vim-airline is installed & enabled
  • Sets up autocmds to call s:post_enter() on entering Goyo
  • Loads configs
  • Changes colorscheme
  • Starts Goyo
s:post_enter()
  • Runs after Goyo starts
  • Enables Limelight
  • Sets up autocmds to call s:leave() on closing Goyo
  • Applies configs
s:leave()
  • Runs when Goyo closes
  • Restores original configs

See plugin/vim_iawriter.vim for more information on these functions


Screenshots

dark light

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].