Thursday, March 18, 2010

Re: set keymap to none/default

On 19/03/10 01:24, Kenneth R. Beesley wrote:
>
>
> On Mar 18, 5:08 pm, Gary Johnson<garyj...@spocom.com> wrote:
>> On 2010-03-18, Kenneth Reid Beesley wrote:
>>
>>
>>
>>
>>
>>> I've successfully written a number of keymap files, and I
>>> successfully choose them with the set command, e.g.
>>
>>> :set keymap=myKeymapFile_utf-8
>>
>>> and I know that CTRL-^ will toggle back and forth between the
>>> current keymap and the previous keymap.
>>
>>> My Problem: I often use multiple keymaps, one after another, and
>>> sometimes I need to switch from using the currently active keymap,
>>> whatever it might be, back to the neutral keymap (or lack of a
>>> keymap). CTRL-^ toggles me back to the previous keymap, which
>>> might not be the neutral one.
>>
>>> Question: How do I explicitly "turn off" keymap usage? or 'set
>>> keymap' to some neutral value?
>>
>> According to ":help keymap", the default is "", so either
>>
>> :set keymap=
>>
>> or
>>
>> :let&keymap = ''
>>
>> should do it. I don't know anything about keymaps, so I haven't
>> verified this.
>>
>> HTH,
>> Gary
>
> I had already tried
>
> :set keymap=
> and
> :set keymap=""
> without success. But your
>
> :let&keymap=""
>
> (adding a second double quote) worked.
>
> Many thanks,
>
> Ken
>

The results of

:set keymap=
and of
:let &keymap = ""

ought to be identical. (For the record, what Gary proposed wasn't
:let &keymap = "
with one double quote, but
:let &keymap = ''
with two single ones, which should also give the same result.


Note that since 'keymap' is a buffer-local option, it is recommended to
set it using ":setlocal" if you want to set it for one file without
clobbering other present and future files' setting.


In Normal mode, Ctrl-^ has a different meaning. To toggle (from Normal
mode) whether keymaps will apply (in the current buffer) to the argument
of r f t F T etc. (as well as the next time you start Insert mode), you
can use
:let &l:imi = !&l:imi
(see :help 'iminsert')

assuming that you aren't using an Input Method (you cannot use both an
IM and a keymap in the same buffer at the same time anyway).

I have found the following mappings useful:

" F8: toggle keymaps
:map <F8> :set &l:imi = !&l:imi<CR>
:map! <F8> <C-^>

(especially on keyboards like mine, where Ctrl-^ can only be reached by
holding down both Ctrl and AltGr while hitting unshifted 6).


Best regards,
Tony.
--
ZOOT: I'm afraid our life must seem very dull and quiet compared to yours.
We are but eightscore young blondes, all between sixteen and
nineteen-and-a-half, cut off in this castle, with no one to
protect us.
Oooh. It is a lonely life ... bathing ... dressing ...
undressing ...
making exciting underwear....
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Re: Cursor column on line 1 not remembered

On Thu, 18 Mar 2010, Benjamin R. Haskell wrote:

> On Thu, 18 Mar 2010, Jean Johner wrote:
>
> > On Mar 17, 6:36 pm, "Brian L. Matthews" <blmatth...@gmail.com> wrote:
> > > It works for me, but I might be restoring the cursor position
> >
> > Hi Brian,
> >
> > Adding your 8 lines of code in my .vimrc results in good
> > memorization of cursor column even on line 1.
> >
> > [...]
> >
>
> I can't speak for Brian, but in my (g)vim at work when I tested
> yesterday, it worked fine without anything like Brian's autocmd.

Turns out there's something in Gentoo's /etc/vim/vimrc that defeats
restoring the cursor column:

" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if ! exists("g:leave_my_cursor_position_alone") |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif |
\ endif

OpenSUSE (at work) has the non-broken (abbreviated):

if has("autocmd")
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
endif

The difference in the executed commands is subtle:
g'"
versus
g`"

But, perhaps your distribution has something that uses (perhaps inadvertently)
'if line("'\"") > 1', for example. What system are you on, precisely?

Ubuntu (9.10) doesn't have any cursor restoration in its vimrc, AFAICT, for
example.

--
Best,
Ben

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Re: ?kb in redo-register

On Thu, 18 Mar 2010 16:43:27 +0800, anna wrote:

> Hi all,
>
> I am quite puzzled why the backspace in redo-register is represented
> as '?kb'. How to differentiate a backspace with string "?kb"?
> Thank you.
>
> Anna
>

I'm puzzled by your question also; what do you mean by "represensted as
'?kb'? Do you mean the ". register contains '?kb'? what do you try to do?
and What :version? (gui or terminal)?

--
Dasn

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Re: +/- clientserver

On Thu, 18 Mar 2010 21:00:03 -0400
MK <halfcountplus@intergate.com> wrote:
> What determines whether clientserver is compiled in? There is nothing
> about it under "configure --help".

apt-get build-dep resolved this (thanks again John) but I am still
curious which package would be required, if anyone knows...

Is there any file I can check, post config, for the "+" an "-"? (IMO
vim would benefit from some more informative reporting after configure.)

--
MK <halfcountplus@intergate.com>

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Re: can't find X headers

On Thu, 18 Mar 2010 17:25:26 -0700 (PDT)
John Little <john.b.little@gmail.com> wrote:
> I expect you're missing libxt-dev. Vim's configure checks for
> Intrinsic.h in that package.
>
> IIUC gnewsense is Debian based, so you should be to
>
> sudo apt-get build-dep vim-gtk

Thanks much John.

--
MK <halfcountplus@intergate.com>

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Re: paste via "shift+insert" in gnome-terminal sucks when set fo+=cro

On Fri, Mar 19, 2010 at 7:52 AM, John Little <john.b.little@gmail.com> wrote:

>
> No, vim is just getting the pasted text from gnome-terminal, as if
> you'd typed it.  It seems to be hard coded into gnome-terminal (or the
> terminal widget it uses); there's chatter about it in the bug
> trackers.  If you press shift-insert while in normal mode and your
> selected text on the other tab starts with 100dd, you'll delete 100
> lines.

Good to know that I am not the only one to hate it...

>
>> I know I can map a shortkey, such as "map <F5> :set paste!",
>> but i hate it since it need two more hits.
>
> You could use mappings like:
>
> map  <Insert> "*p`]
> imap <Insert> <c-o>"*p<c-o>`]
>
> though you might have to tweak the cursor position to suit what you
> expect; maybe
>
> imap <insert> <esc>"*P']ji
>
>

I have tested your maps, seems not working.
anyway, I decide to map F5 and strike when needed...

--
FIXME if it is wrong.

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

+/- clientserver

My gnewsense compile is getting wierder.

I use clientserver mode in vim, and up until now it has always been
available with a straight compile of 7.2:

./configure

But for some reason after compile when I check :version I have
"-clientconfig". I am using the exact same source tarball I always do.

What determines whether clientserver is compiled in? There is nothing
about it under "configure --help".

--
MK <halfcountplus@intergate.com>

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.