Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ switches back when you enter insert mode again. It consists of 2 tiny programs:
* `im-select`: a command-line utility to get/set active input method
* `smartim.vim`: a vim plugin to do automatic input method switch, using `im-select`

It is Mac-only for now.

# Installation

## Vundle
Expand All @@ -23,15 +21,26 @@ It is Mac-only for now.
## Others
1. Clone this repository to your local disk
2. Copy `im-select` and `smartim.vim` (both are under `plugin` directory) to your vim plugin directory (usually `.vim/plugins`)
3. The `im-select` executable file under `plugin` directory is only for Mac, you can download it for other platforms(like Windows) from https://github.com/daipeihust/im-select.

Then, enjoy the convenience!

# FAQ
# Configurations

## Mac

In most cases this plugin works out of the box on mac.

## Windows

## Why is it Mac-only?
Download the `im-select` executable file from https://github.com/daipeihust/im-select, put it where you like and set its path to `g:smartim_imselect_path`, for example:

Because the command-line utility `im-select` uses Mac specific APIs. It should be easy to develop
equivalents for other platforms but I just don't have the time to do so.
```
let g:smartim_default = '1033'
let g:smartim_imselect_path = 'C:\\bin\\im-select.exe'
```

# FAQ

## Can I use `im-select` as a standalone utility?

Expand Down
4 changes: 4 additions & 0 deletions plugin/smartim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ endif
let s:imselect_path = expand('<sfile>:p:h') . "/im-select"
let s:smartim_debug_output = $HOME . "/vim_smartim_debug_output"

if exists('g:smartim_imselect_path')
let s:imselect_path = g:smartim_imselect_path
endif

function! Smartim_debug_print(msg)
if g:smartim_debug == 0
return
Expand Down