obsidian-vimrc-support icon indicating copy to clipboard operation
obsidian-vimrc-support copied to clipboard

Fixed keyboard layout not working (RU layout)?

Open Victornovikov opened this issue 1 year ago • 5 comments

Please make sure your question is within the scope of this plugin.

  • [x] I know this plugin is about persisting changes to the Vim support built into Obsidian, plus some bonus features, and considered asking in the Obsidian forum first.

Describe the question I am using RU and EN layouts. The fixed keyboard layout feature doesn't seem to work at all for me.

Any pointers are much appreciated.

SYSTEM INFO:
	Obsidian version: v0.15.9
	Installer version: v0.15.9
	Operating system: Darwin Kernel Version 22.0.0: Mon Aug  1 06:31:20 PDT 2022; root:xnu-8792.0.207.0.6~26/RELEASE_ARM64_T8112 22.0.0
---
Plugins installed: 5
	Plugins enabled: 1
		1: Vimrc Support v0.7.2

Victornovikov avatar Aug 21 '22 23:08 Victornovikov

Unfortunately this feature is currently broken, and waiting for myself or someone else to rewrite it for live view CM6-based editor.

esm7 avatar Aug 22 '22 06:08 esm7

Please do it, if you have time, I need it too 😄

I just found a temporary workaround: https://github.com/ALONELUR/vim-im-select-obsidian

But the only problem is that when entering "search" it doesn't switch to the target language. Except that it requires additional .exe file to switch the languages.

rRobis avatar Oct 01 '22 17:10 rRobis

Umm not sure if this will help to solve all your problems, but this workaround solved some issues with Cyrillic layout for me. Most of the vim mappings work fine, like entering insert mode with i, visual mode with v, etc. Exiting insert/visual mode with Ctrl-c works fine, navigating the page with Ctrl-u / Ctrl-d works fine.

The only issue that I couldn't solve is mapping the double keypress commands, like gg, zt, zb, zz.

Pretty sure this workaround should work for other layouts too.

Add the following to your .obsidian.vimrc to remap cyrillic keys to english ones:

"""""""""""""" Begin Mappings for Russian layout """"""""""""""

imap <C-с> <C-c>
vmap <C-с> <C-c>
nmap <C-г> <C-u>
nmap <C-в> <C-d>


nmap й q
nmap Й Q
nmap ц w
nmap Ц W
nmap у e
nmap У E
nmap к r
nmap К R
nmap е t
nmap Е T
nmap н y
nmap Н Y
nmap г u
nmap Г U
nmap ш i
nmap Ш I
nmap щ o
nmap Щ O
nmap з p
nmap З P
nmap х [
nmap Х {
nmap ъ ]
nmap Ъ }
vmap й q
vmap Й Q
vmap ц w
vmap Ц W
vmap у e
vmap У E
vmap к r
vmap К R
vmap е t
vmap Е T
vmap н y
vmap Н Y
vmap г u
vmap Г U
vmap ш i
vmap Ш I
vmap щ o
vmap Щ O
vmap з p
vmap З P
vmap х [
vmap Х {
vmap ъ ]
vmap Ъ }

nmap ф a
nmap Ф A
nmap ы s
nmap Ы S
nmap в d
nmap В D
nmap а f
nmap А F
nmap п g
nmap П G
nmap р h
nmap Р H
nmap о j
nmap О J
nmap л k
nmap Л K
nmap д l
nmap Д L
nmap ж ;
nmap Ж :
nmap э '
nmap Э "
vmap ф a
vmap Ф A
vmap ы s
vmap Ы S
vmap в d
vmap В D
vmap а f
vmap А F
vmap п g
vmap П G
vmap р h
vmap Р H
vmap о j
vmap О J
vmap л k
vmap Л K
vmap д l
vmap Д L
vmap ж ;
vmap Ж :
vmap э '
vmap Э "

nmap я z
nmap Я Z
nmap ч x
nmap Ч X
nmap с c
nmap С C
nmap м v
nmap М V
nmap и b
nmap И B
nmap т n
nmap Т N
nmap ь m
nmap Ь M
nmap б ,
nmap Б <
nmap ю .
nmap Ю >
vmap я z
vmap Я Z
vmap ч x
vmap Ч X
vmap с c
vmap С C
vmap м v
vmap М V
vmap и b
vmap И B
vmap т n
vmap Т N
vmap ь m
vmap Ь M
vmap б ,
vmap Б <
vmap ю .
vmap Ю >

nmap ё `
nmap Ё ~
nmap № #
nmap ? &
vmap ё `
vmap Ё ~
vmap № #



"""""""""""""" End of Mappings for Russian layout """"""""""""""

shitcoding avatar Oct 06 '22 19:10 shitcoding

Please do it, if you have time, I need it too 😄

I just found a temporary workaround: https://github.com/ALONELUR/vim-im-select-obsidian

But the only problem is that when entering "search" it doesn't switch to the target language. Except that it requires additional .exe file to switch the languages.

I've tried to use im-select obsidian plugin but I'm stuck. I downloaded the other im-select .exe file and put it in the Users path, I found my windows input method identifier: 1033. Then In obsidian I wrote this: image But I just can't change my input method with Esc. What did I do wrong?

RobberFox avatar Sep 28 '23 17:09 RobberFox

Unfortunately this feature is currently broken, and waiting for myself or someone else to rewrite it for live view CM6-based editor.

waiting for this very much..

arteny avatar Oct 27 '23 09:10 arteny