{"id":13727493,"url":"https://github.com/subnut/vim-iawriter","last_synced_at":"2025-06-15T15:35:51.955Z","repository":{"id":44380219,"uuid":"288004600","full_name":"subnut/vim-iawriter","owner":"subnut","description":"iAwriter's Focus mode for vim","archived":false,"fork":false,"pushed_at":"2022-07-10T04:52:58.000Z","size":454,"stargazers_count":32,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T22:39:06.755Z","etag":null,"topics":["focus","iawriter","neovim","neovim-plugin","plugin","vim","vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/subnut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-16T18:46:59.000Z","updated_at":"2025-04-20T05:02:30.000Z","dependencies_parsed_at":"2022-07-14T12:50:34.385Z","dependency_job_id":null,"html_url":"https://github.com/subnut/vim-iawriter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/subnut/vim-iawriter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subnut%2Fvim-iawriter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subnut%2Fvim-iawriter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subnut%2Fvim-iawriter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subnut%2Fvim-iawriter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subnut","download_url":"https://codeload.github.com/subnut/vim-iawriter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subnut%2Fvim-iawriter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259998207,"owners_count":22943776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["focus","iawriter","neovim","neovim-plugin","plugin","vim","vim-plugin"],"created_at":"2024-08-03T01:04:02.073Z","updated_at":"2025-06-15T15:35:51.930Z","avatar_url":"https://github.com/subnut.png","language":"Vim script","readme":"# vim-iawriter [![Github repo link](https://img.shields.io/badge/view%20on%20github-black?style=for-the-badge\u0026logo=github)](https://github.com/subnut/vim-iawriter \"Github repo link\") [![Screenshots](https://img.shields.io/badge/Screenshots-blue?style=for-the-badge)](#screenshots \"Screenshots\")\n\n\n\nThis is a minimal plugin that aims to provide an experience similar to [iAwriter](https://ia.net/writer)'s Focus mode. Currently it can only highlight paragraphs. Sentence highlighting is a TODO.\n\nIt acts as a wrapper around three other plugins -\n* [goyo.vim](https://github.com/junegunn/goyo.vim)\n* [limelight](https://github.com/junegunn/limelight.vim)\n* [vim-colors-pencil](https://github.com/reedes/vim-colors-pencil)\n\nFor optimal experience, it is recommended to use a GUI or a terminal that supports 24-bit color\n\n## Installation\nInstall the plugins mentioned above, and then install this plugin any way you like :smile: \u003cbr/\u003e\nIn case you have never installed plugins before, I recommend you to check out [vim-plug](https://github.com/junegunn/vim-plug)\n\nUsing [vim-plug](https://github.com/junegunn/vim-plug), the configuration should be -\n\n```vim\nPlug 'junegunn/goyo.vim'\nPlug 'junegunn/limelight.vim'\nPlug 'reedes/vim-colors-pencil'\nPlug 'subnut/vim-iawriter'\n```\n\n## Usage\n`:Iawriter`\n\n## Configuration\n`vim-iawriter` does not touch the configurations defined individually for the abovementioned three plugins. If they are defined, vim-iawriter shall respect them.\n\nIn addition, vim-iawriter provides a few configuration options -\n* [`iawriter_force_defaults`][1.1]\n* [`iawriter_change_cursorline`][1.2]\n* [`iawriter_change_underline`][1.3]\n* [`iawriter_show_signcolumn`][1.4]\n* [`iawriter_center_cursor`][1.5] (experimental)\n\n  [1.1]: #iawriter_force_defaults\n  [1.2]: #iawriter_change_cursorline\n  [1.3]: #iawriter_change_underline\n  [1.4]: #iawriter_show_signcolumn\n  [1.5]: #iawriter_center_cursor\n\n### iawriter_force_defaults\nThis option shall **override ALL other options** \u003cbr/\u003e\nIt enforces the defaults that ship with `vim-iAwriter`\n\ni.e. `let g:iawriter_force_defaults = 1` implies -\n```vim\nlet g:goyo_width = '70%'\nlet g:goyo_height = '85%'\nlet g:limelight_paragraph_span = 0\nlet g:limelight_default_coefficient = 0.7\nlet g:iawriter_change_underline = 1\nlet g:iawriter_change_cursorline = 1\nlet g:iawriter_center_cursor = 0\nlet g:iawriter_show_signcolumn = 0\n```\n\n### iawriter_change_cursorline\n`vim-iawriter` turns off cursorline (if enabled) by default. To keep it on -\n```vim\nlet g:iawriter_change_cursorline = 0\n```\n\n### iawriter_change_underline\n`vim-iawriter` turns off the underlining of the cursorline (if enabled) by default. To keep it on -\n```vim\nlet g:iawriter_change_underline = 0\n```\n\n### iawriter_show_signcolumn\n`vim-iawriter` hides the signcolumn by default. To keep it -\n```vim\nlet g:iawriter_show_signcolumn = 1\n```\n\n### iawriter_center_cursor\nThis 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 -\n```vim\nlet g:iawriter_center_cursor = 1\n```\n\n## Overrides\n`vim-iawriter` provides some overrides. Useful if you use both Iawriter and Goyo/Limelight. It overrides the defaults set in .vimrc\n\n| Configuration Option                       | Overrides                                |\n| ------------------------------------------ | ---------------------------------------- |\n| `g:iawriter_goyo_width`                    | [`g:goyo_width`][2.1]                    |\n| `g:iawriter_goyo_height`                   | [`g:goyo_height`][2.2]                   |\n| `g:iawriter_goyo_linenr`                   | [`g:goyo_linenr`][2.3]                   |\n| `g:iawriter_limelight_default_coefficient` | [`g:limelight_default_coefficient`][2.4] |\n| `g:iawriter_limelight_paragraph_span`      | [`g:limelight_paragraph_span`][2.5]      |\n\n  [2.1]: https://github.com/junegunn/goyo.vim#configuration\n  [2.2]: https://github.com/junegunn/goyo.vim#configuration\n  [2.3]: https://github.com/junegunn/goyo.vim#configuration\n  [2.4]: https://github.com/junegunn/limelight.vim#options\n  [2.5]: https://github.com/junegunn/limelight.vim#options\n\n## Extras\nScreenshots: [here](#screenshots)\n\nFor the _preview_ feature, I personally use [markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim)\n\n\u003cbr/\u003e\n\n## Advanced configuration\n`vim-iawriter` provides plenty of autocommands -\n\n\u003cbr/\u003e\n\n| Autocommand | When |\n| ----------- | ---- |\n| `IawriterToggleTriggered` | `s:toggle()` enter\n| `IawriterToggleFinished` | `s:toggle()` exit\n| `IawriterPrePreEnter` | `s:pre_enter()` enter\n| `IawriterPostPreEnter` | `s:pre_enter()` exit\n| `IawriterPrePostEnter` | `s:post_enter()` enter\n| `IawriterPostPostEnter` | `s:post_enter()` exit\n| `IawriterPreLeave` | `s:leave()` enter\n| `IawriterPostLeave` | `s:leave()` exit\n\n\u003cbr/\u003e\n\n##### `s:toggle()`\n - Checks if vim-iawriter is already running. If yes, closes it (by closing Goyo). Else starts it.\n\n##### `s:pre_enter()`\n - Closes Goyo (not vim-iawriter) if running\n - Checks if [vim-airline][3] is installed \u0026 enabled\n - Sets up autocmds to call `s:post_enter()` on entering Goyo\n - Loads configs\n - Changes colorscheme\n - Starts Goyo\n\n     [3]: https://github.com/vim-airline/vim-airline\n\n##### `s:post_enter()`\n - Runs after Goyo starts\n - Enables Limelight\n - Sets up autocmds to call `s:leave()` on closing Goyo\n - Applies configs\n\n##### `s:leave()`\n - Runs when Goyo closes\n - Restores original configs\n\nSee `plugin/vim_iawriter.vim` for more information on these functions\n\n\u003cbr/\u003e\n\n## Screenshots\n![dark](pictures/dark.png 'dark')\n![light](pictures/light.png 'light')\n","funding_links":[],"categories":["Vim script","Vim Script"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubnut%2Fvim-iawriter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubnut%2Fvim-iawriter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubnut%2Fvim-iawriter/lists"}