Skip to content

This plugin adds a lightline-component that displays the mode of skkeleton.

License

Notifications You must be signed in to change notification settings

yasunori0418/statusline_skk.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

statusline_skk.vim

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

Feature

Please see the video below for the operation and functions.

INSERT Mode INSERT

COMMAND Mode COMMAND

Similar projects

If you are using Neovim, we also recommend the following projects:

https://github.com/delphinus/skkeleton_indicator.nvim

Install

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'

Usage

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.

Configuration

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.

License

MIT

Acknowledgments

Thanks to the authors of skkeleton.

About

This plugin adds a lightline-component that displays the mode of skkeleton.

Resources

License

Stars

Watchers

Forks

Packages

No packages published