xkbswitch-macosx


Ⅰ. 插件描述

Console keyboard layout switcher for MacOS

Ⅱ. 基本信息

创建日期:  2015-01-02
使用用户:  4
Github星:  112
插件作者:  Alexander Myshov

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'myshov/xkbswitch-macosx'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'myshov/xkbswitch-macosx'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'myshov/xkbswitch-macosx'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/myshov/xkbswitch-macosx

Ⅳ. 文档说明

# Xkbswitch-macosx

Console keyboard layout switcher for Mac OS X.

The utility for switching current layout in terminal. You can use it whenever you need
that functionality (for example, for tmux statusline when one is running in fullscreen
terminal). Also you can use it as auxilary utility for vim-xkbswitch plugin for
changing the keyboard layout in Mac OS X. The utility should work on all versions
of Mac OS X since 10.6.

Vim integration

For integration with vim-xkbswitch you need to install this library and follow instructions from there.

Installation

For installation put executable file from bin directory in any directory in your $PATH

  1. For example you can put it into /usr/local/bin with this command (if source
  2. of utility in your Download directory):
$ cp ~/Download/xkbswitch-macosx/bin/xkbswitch /usr/local/bin

Usage:

xkbswitch -g|s [-n|e] [value]
where:
-g - get number of layout
-s - set layout by number of list of layouts
-n - code mode (default mode)
-e - string mode (combine it with -g|s to get current layout name or set layouts by its name)
-l - list all available keyboard layouts (their names)

Examples:

set layout:

$ ./xkbswitch -se RussianWin
$ ./xkbswitch -se US
$ ./xkbswitch -s 2
$ ./xkbswitch -s 1

get current layout:

$ ./xkbswitch -ge
$ ./xkbswitch -g

License

The MIT License (MIT)

Copyright (c) 2015 Alexander Myshov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

添加新评论