By default it is set to "Direct input" (alphanumeric characters only) for normal mode commands.
Switch to the normal input by the following method.
- "🔤" button (function bar)
- One-line text box
-
<C-^>
- Vim script
- IME shortcuts
■ One-line text box
When you start one-line text box (double tap at the bottom of the screen), you can use the usual input equivalent to a normal Android application.
It is convenient to change "Preferences" -> "🔤 button" to "One-line text box".
■ Vim Script(control via Vim)
If you want to switch to the normal input automatically when enter the insert mode, add the following settings to your .vimrc.
let g:imctrl_normal=56
let g:imctrl_insert=50
let g:imctrl_normal=53
let g:imctrl_insert=50
You can also use
<C-^>
. (
:h iminsert
:h i_CTRL-^
)
■ Non-English language with Gboard
If you want to input non-English language characters using
Gboard, try using the following settings.
- Set Gboard's "Language" to only two, English and the language you want to use.
- Long press space key → Choose "English".
- Set DroidVim's "Preferences" → "functionbar" → "🔤" button to "<C-^>"
- Add the following settings to .vimrc and restart.
"Language Switch"
let g:imactivate_language_switch = 61
After that, use "🔤" button in insert mode to switch between alphanumeric characters and non-English language characters.
※ This method is not useful if you need more than two languages.
If a physical keyboard is connected, use
<C-^>
or
<C-6>
. You can also use "IME shortcuts".
- DroidVim's "Preferences" → "Text Input Mode" → Set "IME Shortcut Action" to "<C-^>"
※ Unless there is a problem, do not use "[Shift] + [Space]".
■ Option details
imctrl_insert | When entering the insert mode |
imctrl_normal | When exiting the insert mode |
imactivate_insert | When entering the insert mode (iminsert=2) |
imactivate_normal | When exiting the insert mode (iminsert=2) |
imactivate_language_switch | When entering/exiting the insert mode (iminsert=2) |
The operation differs depending on the IME being used. Please set appropriately by referring to “Setting value details” in the next section.
■ Setting value details
You can change the text input mode from Vim script.
:ATEMod 72
0 | Do nothing | |
50 | Normal input | |
51 | Direct input : password | |
52 | Direct input : URI | |
53 | Direct input : Default | |
54 | Direct input : Raw | |
55 | Toggle "Normal input"/"Input mode at startup" | See Preferences |
56 | One-line text box | |
61 | Language switch (Shift+Space) | If you are using IME for which "language switch" command is not enabled, the same process as pressing the space key is performed. |
62 | Language switch (Alt+Space) | If you are using IME for which "language switch" command is not enabled, the same process as pressing the space key is performed. |
63 | <C-^> | For iminsert |
70 | Hide softkeyboard | |
71 | Show softkeyboard | |
72 | Toggle Softkeyboard | |
■ Physical keyboard
The terminal emulator can also control the input mode.
If you want to control the input mode from the physical keyboard, try setting "Preferences" → "Text input mode" → "IME shortcuts" appropriately.
■ Android Shortcuts
Layout switch | [Ctrl]+[Space] | If multiple layouts are available. |
Language switch | [Shift]+[Space] | If IME can use multiple languages. |
IME switch | [Meta]+[Space] | If multiple IMEs are available.[Meta] means [Windows] key or [Command] key (Android 7 and up) |