An open API service indexing awesome lists of open source software.

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`

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