LyXLyX for vim user: normal_mode, insert_mode

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
nilo888
Posts: 1
Joined: Sun Dec 04, 2011 7:20 pm

LyX for vim user: normal_mode, insert_mode

Post by nilo888 »

Hallo to you all,
I want to use lyx with vim's mode. I have found a way: using a strange rebind of keys.

I hope that some other vim user could help me to improve this and give me some advices.

The trick is to use the LFUN(lyx function) meta-prefix. After you have given this lfun, for example i, lyx understand Meta-i(not only i) and if Meta-i give a command and then a meta-prefix lfun, an other key (e) will be interpreted as Meta-e.
Now if we do this for a lot of (maybe all) keys we will be in a mode in which all keys are interpreted as meta-(key). Remapping all meta-(keys) we map the normal mode.
Now with C-c(for me, but if you don't like it you can use C-j or the key you prefer) we send a meta-prefix command and enter in the NORMAL_MODE, and with i (interpreted as Meta-i) we enter in the INSERT_MODE.
I have compiled a short(long!!) map key put this file name as my.bind in ~/.lyx/bind/ and in menu/tools/preferences/... I have set it as a configuration file for shot-keys.

this is my my.bind (obviously is incomplete ad to improve but is a start)

the problem now in the VISUAL_MODE I have do this mode with the shift pressed!

Code: Select all

# ~/.lyx/bind/cua.bind
#
# Happy tuning!
# Free bindings:
#\bind "C-h"
#\bind "C-j"
#\unbind "C-period" "specialchar-insert end-of-sentence"
\unbind "C-period"
\bind "M-S-A" "meta-prefix"
\bind "M-S-B" "meta-prefix"
\bind "M-S-C" "meta-prefix"
\bind "M-S-D" "meta-prefix"
\bind "M-S-E" "meta-prefix"
\bind "M-S-F" "meta-prefix"
\bind "M-S-G" "meta-prefix"
\bind "M-S-H" "meta-prefix"
\bind "M-S-I" "meta-prefix"
\bind "M-S-J" "meta-prefix"
\bind "M-S-K" "meta-prefix"
\bind "M-S-L" "meta-prefix"
\bind "M-S-M" "meta-prefix"
\bind "M-S-N" "meta-prefix"
\bind "M-S-O" "meta-prefix"
\bind "M-S-P" "meta-prefix"
\bind "M-S-Q" "meta-prefix"
\bind "M-S-R" "meta-prefix"
\bind "M-S-S" "meta-prefix"
\bind "M-S-T" "meta-prefix"
\bind "M-S-U" "meta-prefix"
\bind "M-S-V" "meta-prefix"
\bind "M-S-W" "meta-prefix"
\bind "M-S-X" "meta-prefix"
\bind "M-S-Y" "meta-prefix"
\bind "M-S-Z" "meta-prefix"
#\bind "M-a" "meta-prefix" # other lyx cua bindings
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply