aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2021-11-21 10:53:05 +0900
committernsfisis <nsfisis@gmail.com>2021-11-21 10:53:05 +0900
commit9d0e88bd30015f4def6818a7187c27220add902c (patch)
tree1d40bc9d6b34e87ce1ea15a7111ebe749b7c8c57
parentf159621ed60982e94bb9e27cd71e86ae5d75d5f8 (diff)
downloaddotfiles-9d0e88bd30015f4def6818a7187c27220add902c.tar.gz
dotfiles-9d0e88bd30015f4def6818a7187c27220add902c.tar.zst
dotfiles-9d0e88bd30015f4def6818a7187c27220add902c.zip
vim/neovim: change SKK markers
-rw-r--r--.config/nvim/init.lua61
-rw-r--r--.vimrc13
2 files changed, 48 insertions, 26 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index b8b9225..7db69d0 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -1345,24 +1345,31 @@ vim.g['eskk#backup_dictionary'] = vim.g['eskk#dictionary'].path .. ".bak"
vim.g['eskk#kakutei_when_unique_candidate'] = true
vim.g['eskk#enable_completion'] = false
+vim.g['eskk#egg_like_newline'] = true
+
+-- Change default markers because they are EAW (East Asian Width) characters.
+vim.g['eskk#marker_henkan'] = '[!]'
+vim.g['eskk#marker_okuri'] = '-'
+vim.g['eskk#marker_henkan_select'] = '[#]'
+vim.g['eskk#marker_jisyo_touroku'] = '[?]'
vim.cmd([[
function My_eskk_initialize_pre()
- let t = eskk#table#new('rom_to_hira*', 'rom_to_hira')
- call t.add_map('z ', ' ')
- call t.add_map('0.', '0.')
- call t.add_map('1.', '1.')
- call t.add_map('2.', '2.')
- call t.add_map('3.', '3.')
- call t.add_map('4.', '4.')
- call t.add_map('5.', '5.')
- call t.add_map('6.', '6.')
- call t.add_map('7.', '7.')
- call t.add_map('8.', '8.')
- call t.add_map('9.', '9.')
- call eskk#register_mode_table('hira', t)
+ let t = eskk#table#new('rom_to_hira*', 'rom_to_hira')
+ call t.add_map('z ', ' ')
+ call t.add_map('0.', '0.')
+ call t.add_map('1.', '1.')
+ call t.add_map('2.', '2.')
+ call t.add_map('3.', '3.')
+ call t.add_map('4.', '4.')
+ call t.add_map('5.', '5.')
+ call t.add_map('6.', '6.')
+ call t.add_map('7.', '7.')
+ call t.add_map('8.', '8.')
+ call t.add_map('9.', '9.')
+ call eskk#register_mode_table('hira', t)
endfunction
@@ -1370,21 +1377,25 @@ autocmd Vimrc User eskk-initialize-pre call My_eskk_initialize_pre()
function My_eskk_initialize_post()
- " I don't use hankata mode for now.
- EskkUnmap -type=mode:hira:toggle-hankata
- EskkUnmap -type=mode:kata:toggle-hankata
+ " I don't use hankata mode for now.
+ EskkUnmap -type=mode:hira:toggle-hankata
+ EskkUnmap -type=mode:kata:toggle-hankata
+
+ " I don't use abbrev mode for now.
+ EskkUnmap -type=mode:hira:to-abbrev
+ EskkUnmap -type=mode:kata:to-abbrev
- " I don't use abbrev mode for now.
- EskkUnmap -type=mode:hira:to-abbrev
- EskkUnmap -type=mode:kata:to-abbrev
+ " I don't use ascii mode for now.
+ EskkUnmap -type=mode:hira:to-ascii
+ EskkUnmap -type=mode:kata:to-ascii
- " I don't use ascii mode for now.
- EskkUnmap -type=mode:hira:to-ascii
- EskkUnmap -type=mode:kata:to-ascii
+ " Instead, l key disable SKK input.
+ EskkMap -type=disable l
+ EskkMap -type=disable l
- " Instead, l key disable SKK input.
- EskkMap -type=disable l
- EskkMap -type=disable l
+ " Custom highlight for henkan markers.
+ syntax match skkMarker '\[[!#?]\]'
+ hi link skkMarker Special
endfunction
diff --git a/.vimrc b/.vimrc
index 461ce13..29f7214 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1410,7 +1410,14 @@ let g:eskk#backup_dictionary = g:eskk#dictionary.path . ".bak"
let g:eskk#kakutei_when_unique_candidate = v:true
let g:eskk#enable_completion = v:false
-" let g:eskk#no_default_mappings = v:true
+let g:eskk#egg_like_newline = v:true
+
+" Change default markers because they are EAW (East Asian Width) characters.
+let g:eskk#marker_henkan = '[!]'
+let g:eskk#marker_okuri = '-'
+let g:eskk#marker_henkan_select = '[#]'
+let g:eskk#marker_jisyo_touroku = '[?]'
+
function! s:eskk_initialize_pre() abort
@@ -1449,6 +1456,10 @@ function! s:eskk_initialize_post() abort
" Instead, l key disable SKK input.
EskkMap -type=disable l
EskkMap -type=disable l
+
+ " Custom highlight for henkan markers.
+ syntax match skkMarker '\[[!#?]\]'
+ hi link skkMarker Special
endfunction