Skip to content

khaser/sway-vim-kbswitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sway-vim-kbswitch   Version Badge License Badge

A Rust shared library that provides the interface for Vim keyboard layout switch plugin.

Usage

  • Install vim-xkbswitch plugin in your vim
  • Compile this library using cargo or install as a package.
git clone https://github.com/khaser/sway-vim-kbswitch && \
cd sway-vim-kbswitch && cargo build -r

Packaging status

  • Write the path to the library to the variable g:XkbSwitchLib in your .vimrc settings.
let g:XkbSwitchEnabled = 1
let g:XkbSwitchLib = '<PathToBuildDir>/target/release/libswaykbswitch.so'

Optional (f and r action)

For using f and r action with last layout for insert mode you can put following lines into your vimrc:

let g:XkbSwitchAssistNKeymap = 1
set keymap=russian-jcukenwin
let g:XkbSwitchKeymapNames = {'Russian' : 'ru'}

Troubleshooting

When you run vim with sudo command you should preserve environment variable SWAYSOCK. Example of run with sudo:

sudo --preserve-env=SWAYSOCK vim

You can put following line into you sudoers file to fix this problem:

Defaults  env_keep += "SWAYSOCK"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •