Friday, April 27, 2018

Re: I'd emulate Ctrl-Space keypress and CLI with Esc using map

Sorry, I may confuse you.
Fedora 28 vim is 8.0.1704 which is built by distribution not mine.
vim-minimal does not send Ctrl-\ and Ctrl-G but vim-enhanced can send them.
I didn't notice vim-minimal does not support .vimrc fully.
Now I use vim-enhanced and that problem is fixed.

vim-minimal is built with:
%configure --prefix=%{_prefix} --with-features=small --with-x=no \
--enable-multibyte \
--disable-netbeans \
%if %{WITH_SELINUX}
--enable-selinux \
%else
--disable-selinux \
%endif
--disable-pythoninterp --disable-perlinterp --disable-tclinterp \
--with-tlib=ncurses --enable-gui=no --disable-gpm --exec-prefix=/ \
--with-compiledby="<bugzilla@redhat.com>" \
--with-modified-by="<bugzilla@redhat.com>"

vim-enhanced is built with:
configure --with-features=huge \
--enable-pythoninterp=dynamic \
--enable-python3interp=dynamic \
--enable-perlinterp=dynamic \
--disable-tclinterp --with-x=yes \
--enable-xim --enable-multibyte \
--with-tlib=ncurses \
--disable-gtk3-check \
--enable-gtk3-check --enable-gui=gtk3 \
--with-compiledby="<bugzilla@redhat.com>" --enable-cscope \
--with-modified-by="<bugzilla@redhat.com>" \
%if "%{withnetbeans}" == "1"
--enable-netbeans \
%else
--disable-netbeans \
%endif
%if %{WITH_SELINUX}
--enable-selinux \
%else
--disable-selinux \
%endif
%if "%{withruby}" == "1"
--enable-rubyinterp=dynamic \
%else
--disable-rubyinterp \
%endif
%if "%{withlua}" == "1"
--enable-luainterp=dynamic \
%else
--disable-luainterp \
%endif
--enable-termtruecolor

Now my another problem is that I cannot send Ctrl-Space key to xterm or gnome-terminal but not vim.
I tried:

nmap <F4> <C-Space>

and

nmap <F4> :call feedkeys("\<C-Space>")<CR>

but gnome-terminal receives F4 key only with either nmap when I debugged gnome-terminal.

I tried 8.0.1704 of Fedora 28 and 8.0.1766 of Fedora 29 but vim, vimx, gvim failed to receive the key events.
I thought I might mistake the syntax.
Or do you mean the syntax is correct and you can send Ctrl-Space key with the above nmap?

Thanks

On 04/26/18 22:48, Tony Mechelynck-san wrote:
> It surprises me that your Vim apparently doesn't know about Ctrl-\
> Ctrl-G. Which Vim version is that? (Vim 8.0 was released 12-Sep-2016,
> and the latest patchlevel is 8.0.1765 as of this writing.) To compile
> your own Vim on Unix/Linux, see
> http://users.skynet.be/antoine.mechelynck/vim/compunix.htm and some of
> the pages linked from there. If you install your own-compiled Vim
> under its default /usr/local/ directory, it will normally live happily
> together in the Vim version(s) from your distro, and it will be
> earlier in the $PATH.
>
> To change from Insert mode to Normal mode for just one command (which
> may be several keys e.g. 3j to go 3 lines down, or even a whole
> ex-command from : to <CR>) there is also CTRL-O, see :help i_CTRL-O
> (IIRC that one existed already in Vim 6 and probably before, if the
> latest Vim on RedHat/Fedora doesn't know about it it might be time to
> switch to another distro.)
>
> vim-minimal is (as its name says) a minimal Vim, usually a Tiny build;
> it may be packaged under the executable name "vi" and it hasn't got
> all the bells and whistles in even a "normal" Vim. vim-enhanced or
> even vim-gui (or all three, IIRC they can be installed together) are
> usually better choices for the "serious" Vim user.
>
> Best regards,
> Tony.
>

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: