joshuadanpeterson / typewriter.nvim

A Neovim plugin that emulates a typewriter, keeping the cursor centered on the screen for a focused writing experience.
MIT License
23 stars 0 forks source link

Fix `$` Command Issue in Normal Mode #2

Closed joshuadanpeterson closed 2 months ago

joshuadanpeterson commented 2 months ago

Description: This pull request addresses the issue where the $ command in normal mode did not move the cursor to the end of the line, causing incorrect cursor placement. The issue is described in detail in Issue #1.

Changes Made:

Release Note:

## New Features
- Fixed issue where `$` command in normal mode did not reach the end of the line, causing incorrect cursor placement.

## Previous Changes
- Introduced `enable_notifications` option to control notifications for actions like enabling/disabling typewriter mode, and aligning code blocks.
- Added new `:TWTop` and `:TWBottom` commands to align the current code block with the top or bottom of the screen, respectively.
- Introduced `keep_cursor_position` option to maintain cursor's relative position within the text when using `:TWCenter`, `:TWTop`, and `:TWBottom`.
- Added `:TWCenter` command to center the view around the current code block or function using Tree-sitter.
- Introduced Tree-sitter as a dependency for intelligent code block detection.
- Updated installation instructions to include Tree-sitter setup.
- Moved `center_block_config.lua` to the `utils` folder for better organization.
- Enhanced README with information about the `:TWCenter` command and Tree-sitter dependency.

## Core Features
- Keeps the cursor centered on the screen while typing or navigating.
- Simple commands to enable, disable, and toggle the typewriter mode.
- Integrates with ZenMode and True Zen for a seamless distraction-free environment.

For more details, please check the README.

This pull request fixes Issue #1 and closes it.