chak wrote:
hi there
i'm using (g)vim 4 months, and find it powerful and useful...
plugins, which i'm using:
- minibufexplorer, placed in the top of the window
- NERDTree, file system browser
Screenshot:
http://img83.imageshack.us/img83/8913/gvimle8.png ( 38 kb )
I want:
- switching from insert into a command mode would occur on a combination of
keys CtrlO or Esc.
- switching from command mode into insert occur after pressing Insert key.
- click by a mouse on inactive window will translate vim into insert mode.
example: i'm editing some file and need to quikly open another file.
i double-click on NERDTree, and new file is open.
It is good, if the cursor will be established in just open
file, and insert mode is set.
I hope, I have described all as much as possible in detail
thanks
DISCLAIMER: the following is untested, I may have goofed.
If by "command mode" you mean what Vim documentation calls "Normal mode":
1. Esc already switches from Insert to Normal. If you are dead set on
prefixing it by Ctrl-O you can use
:inoremap <C-O><Esc> <Esc>
2. <Insert> in Normal mode already switches to Insert mode "out of the box",
no mapping required. <Insert> in Insert/Replace mode, which you didn't
mention, toggles between Insert and Replace.
3. I'm not sure. Maybe
:noremap <Mouse> a
But clicking (once) in netrw window would then (I think) open the latter in
Insert mode, which is of dubious utility. I don't know about NERDTree.
If by "command mode" you mean "Command-line mode"
1. :inoremap <C-O><Esc> <C-O>:
2. :cnoremap <Insert> <Esc>a
3. :noremap <Mouse> a
Best regards,
Tony.