This plugin adds a lightline-component that displays the conversion mode of skkeleton.
Warning
The name of this plugin will be changed to statusline_skk.vim
in November.
Due to the name change, it is no longer a plugin that requires lightline.vim.
Since there are breaking changes such as function names, it is recommended to fix it to the lightline
tag.
Also, in the latest state, an announcement message will be displayed to guide you to the repository.
If you want to turn off announcement messages, add the following code to .vimrc
etc.
let g:lightline_skk_announce = v:true
Please see the video below for the operation and functions.
If you are using Neovim, we also recommend the following projects:
https://github.com/delphinus/skkeleton_indicator.nvim
Obviously you need skkeleton to use this plugin. Use your favorite plugin manager for installation. I'm using dein.vim.
[[plugins]]
repo = 'yasunori0418/statusline_skk.vim'
on_source = 'skkeleton'
Next, I wrote a sample code.
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste', 'skk_mode' ],
\ [ 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'skk_mode': 'statusline_skk#mode',
\ },
\ }
Register statusline_skk#mode
in component_function
when using this plugin with lightline.vim.
Place the registered component anywhere you like and use it.
Here, it is placed in the component set on the left.
See the lightline.vim README for detailed lightline.vim settings.
To change the appearance of the conversion mode, do the following.
call statusline_skk#option('display', {
\ 'hiragana': 'あぁ',
\ 'katakana': 'アァ',
\ 'hankaku-katakana': 'アァ',
\ 'zenkaku-alphabet': 'Aa',
\ 'alphabet': 'Aa',
\ })
Anything that looks like this cursor can be used with fonts that contain NerdFont.
The Vim mode in which the conversion mode is displayed is…
- Insert
- Command
Currently, using skkeleton in these modes will show the conversion mode. You may not want to see the conversion mode of skkeleton in some modes. The following settings are effective in such cases.
call statusline_skk#option('enable_mode', {
\ 'INSERT': v:true,
\ 'COMMAND': v:false,
\ })
With the above settings, the conversion mode will not be displayed when in command mode.
MIT
Thanks to the authors of skkeleton.