Thursday, November 19, 2015

Question about language specific mappings

More precisely question is about unmapping. I am using keymap to edit
texts in Russian. In my vimrc I have

set keymap=russian-jcukenwin
set iminsert=0
set imsearch=-1

When langmap mappings are enabled it translates `#' to `№' as expected.
It is not very useful in markdown files. So I put

lunmap <buffer> #

in ~/.vim/after/ftplugin/markdown.vim. Then strange things begin to
happen. When I open markdown document from running vim it shouts

E31: No such mapping

and points on that line. But after that mapping exists. When I start
to edit markdown from command line everything is fine.

Using autocommand instead of script in "after" directory leads to the
same.

The exact question is how to properly unmap this kind of mapping?
Thanks for any help.

--
Dmitri Vereshchagin

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

Go to Japanese character

I have created a Japanese-English vocabulary list for my personal use.

Oftentimes I want to go to the first non-ASCII character in a line.

Can anyone suggest a way to accomplish this? Maybe a remapping?

Thanks

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

Wednesday, November 18, 2015

Re: vim: register * and + missing in ubuntu1404 server

I said:
> ... gpm mouse support ... you still don't get a separate "* and "+

Random832 wrote:>
> Why not? gpm has a selection and can be used to paste between virtual
> consoles or in non-gpm apps. Does it not expose it to applications?

I imagine it does, but no-one has taken the trouble. gpm isn't very active.

Regards, John Little

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

Re: vim: register * and + missing in ubuntu1404 server

John Little <John.B.Little@gmail.com> writes:
> Maybe you're thinking of gpm mouse support. Install the package gpm,
> and with set mouse=a in your .vimrc, a middle click does a paste, but
> from the unnamed register; you still don't get a separate "* and "+
> AFAICS.

Why not? gpm has a selection and can be used to paste between virtual
consoles or in non-gpm apps. Does it not expose it to applications?

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

Re: vim: register * and + missing in ubuntu1404 server

On Wednesday, November 18, 2015 at 5:15:31 PM UTC+13, ping wrote:
...
> I recently switch from ubuntu desktop to ubuntu server , both are 14.04.
> and I couldn't find the register * and +.
...
> although I'm a console vim user...

vim on unices uses X for the clipboard and selection. If no X server is found, I think the * and + become synonyms for the unnamed register, and not shown in the :registers display.

Maybe you're thinking of gpm mouse support. Install the package gpm, and with
set mouse=a in your .vimrc, a middle click does a paste, but from the unnamed register; you still don't get a separate "* and "+ AFAICS. If you want to copy outside of vim then paste in it,
set mouse=
or
set mouse=nvc
then in insert mode vim won't see the middle click, and you'll get gpm's selection pasted.

For completeness, if there is an X server running on the machine where you're using the console, you can

export DISPLAY=:0

to get vim to use it, but the default setting for the 'clipboard' option includes "exclude:cons\|linux" which explicitly turns that off.

HTH, John

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

Re: Disable all autointending a part of the simplest one

Yes, the problem was I had to activate filetype indent for some
plugin and I never disabled it, so the value of indentexpr was
changed.

Thanks a lot!

On Tue, Nov 17, 2015 at 5:55 PM, Gary Johnson <garyjohn@spocom.com> wrote:
> On 2015-11-17, Paolo Bolzoni wrote:
>> Dear list,
>>
>> I would like to disable all the "smart" auto indenting. I just want
>> the cursor to align to the previous line non space character. I will
>> press tab or << to fix in the case it is wrong.
>>
>> I set this lines from the wiki in the ~/.vimrc, but it is not enough.
>>
>> set autoindent
>> set nocindent
>> set nosmartindent
>> set indentexpr=
>>
>> What should I check? Am I missing some other settings?
>
> If you have filetype detection enabled (e.g., by "filetype on"),
> filetype indent plugins may set some of those automatically. Try
> putting this in your ~/.vimrc as well:
>
> filetype indent off
>
> See
>
> :help :filetype-indent-off
>
> HTH,
> Gary
>
> --
> --
> 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.

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

Tuesday, November 17, 2015

vim: register * and + missing in ubuntu1404 server

experts:

I recently switch from ubuntu desktop to ubuntu server , both are 14.04.
and I couldn't find the register * and +.
this seems happened twice (whenever I change a system) and looks quite annoying.
I couldn't find a working solution.

I have all necessary vim modules/apps installed.

ping@ubuntu47-3:~$ dpkg -l | grep vim
ii  vim                                       2:7.4.052-1ubuntu3                                  amd64        Vi IMproved - enhanced vi editor
ii  vim-common                                2:7.4.052-1ubuntu3                                  amd64        Vi IMproved - Common files
ii  vim-gnome                                 2:7.4.052-1ubuntu3                                  amd64        Vi IMproved - enhanced vi editor - with GNOME2 GUI
ii  vim-gtk                                   2:7.4.052-1ubuntu3                                  amd64        Vi IMproved - enhanced vi editor - with GTK2 GUI
ii  vim-gui-common                            2:7.4.052-1ubuntu3                                  all          Vi IMproved - Common GUI files
ii  vim-runtime                               2:7.4.052-1ubuntu3                                  all          Vi IMproved - Runtime files
ii  vim-tiny                                  2:7.4.052-1ubuntu3                                  amd64        Vi IMproved - enhanced vi editor - compact version


my current vim version:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:47)
Included patches: 1-52
Compiled by buildd@
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+acl             +cmdline_compl   +diff            +find_in_path    +keymap          +modify_fname    +mouse_xterm     +profile         -sniff           +termresponse    +vreplace        -xterm_save
+arabic          +cmdline_hist    +digraphs        +float           +langmap         +mouse           +multi_byte      +python          +startuptime     +textobjects     +wildignore      +xpm
+autocmd         +cmdline_info    +dnd             +folding         +libcall         +mouseshape      +multi_lang      -python3         +statusline      +title           +wildmenu
+balloon_eval    +comments        -ebcdic          -footer          +linebreak       +mouse_dec       -mzscheme        +quickfix        -sun_workshop    +toolbar         +windows
+browse          +conceal         +emacs_tags      +fork()          +lispindent      +mouse_gpm       +netbeans_intg   +reltime         +syntax          +user_commands   +writebackup
++builtin_terms  +cryptv          +eval            +gettext         +listcmds        -mouse_jsbterm   +path_extra      +rightleft       +tag_binary      +vertsplit       +X11
+byte_offset     +cscope          +ex_extra        -hangul_input    +localmap        +mouse_netterm   +perl            +ruby            +tag_old_static  +virtualedit     -xfontset
+cindent         +cursorbind      +extra_search    +iconv           +lua             +mouse_sgr       +persistent_undo +scrollbind      -tag_any_white   +visual          +xim
+clientserver    +cursorshape     +farsi           +insert_expand   +menu            -mouse_sysmouse  +postscript      +signs           +tcl             +visualextra     +xsmp_interact
+clipboard       +dialog_con_gui  +file_in_path    +jumplist        +mksession       +mouse_urxvt     +printer         +smartindent     +terminfo        +viminfo         +xterm_clipboard
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-  
pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/       
libpng12 -I/usr/include/harfbuzz   -pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2. 
0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/x86_64-linux-gnu/gnome-vfs-2.0/include -I/   
usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/ 
bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/   
include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -          
U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1     -I/usr/include/tcl8.6  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_LARGEFILE64_SOURCE=1
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic -Wl,-export-dynamic -Wl,-E  -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2. 
0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype     -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -     
lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lfreetype -   
lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-  
protector -L/usr/local/lib  -L/usr/lib/perl/5.18/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -
Wl,-Bsymbolic-functions  -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib


there is one thing I found tricky:

initially I am with "Huge version without GUI". even after I install vim-gnome and vim-gui-common it is still not change.

eventually I tried to uninstall the vim and vim-gnome and reinstall again, then I got current "Huge version with GUI" version.

that actually resolved one another issue "E319: Sorry, the command is not available in this version". but the register * and + simply doesn't appear!

although I'm a console vim user, I could have this feature available in my old system and it is important.

please shed some light of why this happened and how to solve this. my guess is I still miss some ubuntu modules since I'm now on a "server" instead of "desktop" version.

regards
ping


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