https://github.com/shortarrow/hanzen.nvim
nvim extension for `zenkaku/hankaku`
https://github.com/shortarrow/hanzen.nvim
Last synced: 8 months ago
JSON representation
nvim extension for `zenkaku/hankaku`
- Host: GitHub
- URL: https://github.com/shortarrow/hanzen.nvim
- Owner: ShortArrow
- Created: 2024-04-26T07:07:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-26T01:35:42.000Z (almost 2 years ago)
- Last Synced: 2025-06-13T09:59:39.039Z (about 1 year ago)
- Language: Lua
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Hanzen.nvim
This is Rewriter of between Full width charactor and Half width charactor.
Only UTF8 support.
👷 🚧 WIP 🚧 👷
***This Project is work in progress yet.***
## Install
### Lazy.nvim
```lua
{
"ShortArrow/hanzen.nvim",
config = function()
require("hanzen").setup()
end,
}
```
## Keymap
Default keymaps are nothing.
## Command
|ExCommand|command|description|options|
|:- |:- |:-:|:-:|
|HanzenInfo|require("hanzen").command.hello()|print("Hello, I am Hanzen!")||
|HanzenReverse|require("hanzen").command.reverse_text()| Rewrite text reversed ||
|HanzenFullToHalf|require("hanzen").command.full_to_half(option)| Selected text full to half|['katakana','alphabet', 'number', 'all']|
|HanzenHalfToFull|require("hanzen").command.half_to_full(option)| Selected text half to full|['katakana','alphabet', 'number', 'all']|
|HanzenFullToHalfBuffer|require("hanzen").command.full_to_half_buffer()| Selected buffer full to half||
|HanzenHalfToFullBuffer|require("hanzen").command.half_to_full_buffer()| Selected buffer half to full||
## Usage
How to rewrite half styled text to full styled text in buffer.
Example target text is `アイウエオ`.
1. Select target text `アイウエオ` in Visual mode.
1. Run ExCommand `HanzenHalfToFull katakana`
In Lua, follow bellow.
1. Select target text `アイウエオ` in Visual mode.
1. Run ExCommand `lua require('hanzen').half_to_full('katakana')`
## About
`Hanzen` is made from Japanese words.
In Japanese, "full width charactor" called "Zenkaku Moji", "全角文字".
And, "half width charactor" called "Hankaku Moji", "半角文字".
## Roadmap
- support Korean alphabet, Hangul characters
- support whole line selection
- support whole buffer