Sunday, June 10, 2012

Re: Editing non-latin texts

On 11.06.12 00:21, Anton Shepelev wrote:
> I have a problem when using vim to edit Russian
> texts, because I always have to switch to the En-
> glish keyboard layout to enter normal-mode commands.
> For example, to replace a letter I have to:
>
> 1. Press ESC
> 2. Switch to English layout
> 3. Press 'r'
> 4. Switch to Russian layout
> 5. Type the substitute Russian letter

AIUI, the need is for English keyboard in normal mode, and Russian in
insert mode. Perhaps that could be handled by switching at Start_Insert
(:h t_SI) and End_Insert (:h t_EI), as is done here, fiddling the cursor
appearance on those events:

" Cursor Appearance: (Insert_Mode == Green, Normal_Mode == Red)
if &term =~ "xterm"
let &t_SI = "\<Esc>]12;green\x7"
let &t_EI = "\<Esc>]12;red\x7"
endif

But is the "Switch to Russian layout" action a terminal function, as I'm
guessing, allowing such a method to be used?

Erik

--
Duct tape is like the force. It has a light side, and a dark side, and
it holds the universe together.
- Carl Zwanzig

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: