Sunday, November 2, 2014

Re: Strange reaction of gvim to : in a normal mode

On Sun, 2 Nov 2014 16:25:19 -0600 Eric Christopherson <echristopherson@gmail.com> wrote:

> On Sun, Nov 02, 2014, Gevisz wrote:
> > On Sun, 2 Nov 2014 14:51:24 +0200 Gevisz <gevisz@gmail.com> wrote:
> >
> > > I use gvim from xfce4 and sometimes get into a strange
> > > situation when pressing : while being in a normal mode
> > > leads not to the command line mode but instead highlights
> > > the icon "Copy to clipboad".
> > >
> > > Just now I have noted that in this situation I also cannot
> > > see the version of my gvim via the Help menu (but saving via
> > > the the "Save current file" icon usually works).
> > >
> > > The output from the :version command (executed from a newly
> > > started gvim) is as follows:
> > >
> > <skipped>
> > >
> > > Any ideas how to fix it?
> > >
> > > And whom to blame? (Except for myself, of course. :)
> > > My first guess that something is wrong with xfce4 here.
> >
> > I cannot describe how to reproduce this behavior but usually
> > it appears after the following steps:
> >
> > 1. I work with gvim and firefox.
> > 2. After finishing working with gvim, I turn to firefox,
> > go to a news site and look through all its Twitter
> > news band that is somehow embedded into its webpage.
> > On this step I also open new tabs from the news band.
> > 3. I return to gvim and try to save and close it using
> > :wq command but it does not work any more as : sends
> > focus to the "Copy to clipboard" icon.
>
> It almost sounds to me like there's unusual keyboard mapping going on.
> Do you use Vimperator, by chance?

No. Just found out what it is. Sounds interesting.

I do not know how to get the list of all installed plugins
but, from what I can remember, I use Pathogen and UltiSnips.

Also installed Snippet but it does not work. Probably, I should delete it.

--
--
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: Trouble using blockwise actions on visual selections in a function/command

I've found what appears to be my solution. Backtick does not seem to behave the same as tick. line() for `< and `> report 0, but '< and '> report the line numbers of the visual selection. I thought maybe it might be due to blockwise VS linewise, but in my tests it didn't seem to make a difference.

I'm running a fairly recent 7.4

--
--
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: Trouble using blockwise actions on visual selections in a function/command

I've part of the answer. line('v') get's the start of the visual selection. From the docs:

v In Visual mode: the start of the Visual area (the
cursor is the end). When not in Visual mode
returns the cursor position. Differs from '< in
that it's updated right away

"right away" works as I'd expect, and I can grab the start of the block. But, not the end of the block :-(

--
--
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: Strange reaction of gvim to : in a normal mode

On Sun, Nov 02, 2014, Gevisz wrote:
> On Sun, 2 Nov 2014 14:51:24 +0200 Gevisz <gevisz@gmail.com> wrote:
>
> > I use gvim from xfce4 and sometimes get into a strange
> > situation when pressing : while being in a normal mode
> > leads not to the command line mode but instead highlights
> > the icon "Copy to clipboad".
> >
> > Just now I have noted that in this situation I also cannot
> > see the version of my gvim via the Help menu (but saving via
> > the the "Save current file" icon usually works).
> >
> > The output from the :version command (executed from a newly
> > started gvim) is as follows:
> >
> <skipped>
> >
> > Any ideas how to fix it?
> >
> > And whom to blame? (Except for myself, of course. :)
> > My first guess that something is wrong with xfce4 here.
>
> I cannot describe how to reproduce this behavior but usually
> it appears after the following steps:
>
> 1. I work with gvim and firefox.
> 2. After finishing working with gvim, I turn to firefox,
> go to a news site and look through all its Twitter
> news band that is somehow embedded into its webpage.
> On this step I also open new tabs from the news band.
> 3. I return to gvim and try to save and close it using
> :wq command but it does not work any more as : sends
> focus to the "Copy to clipboard" icon.

It almost sounds to me like there's unusual keyboard mapping going on.
Do you use Vimperator, by chance? (I wouldn't think that would affect
anything outside Firefox, though.)

--
Eric Christopherson

--
--
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: Strange reaction of gvim to : in a normal mode

On Sun, 2 Nov 2014 14:51:24 +0200 Gevisz <gevisz@gmail.com> wrote:

> I use gvim from xfce4 and sometimes get into a strange
> situation when pressing : while being in a normal mode
> leads not to the command line mode but instead highlights
> the icon "Copy to clipboad".
>
> Just now I have noted that in this situation I also cannot
> see the version of my gvim via the Help menu (but saving via
> the the "Save current file" icon usually works).
>
> The output from the :version command (executed from a newly
> started gvim) is as follows:
>
<skipped>
>
> Any ideas how to fix it?
>
> And whom to blame? (Except for myself, of course. :)
> My first guess that something is wrong with xfce4 here.

I cannot describe how to reproduce this behavior but usually
it appears after the following steps:

1. I work with gvim and firefox.
2. After finishing working with gvim, I turn to firefox,
go to a news site and look through all its Twitter
news band that is somehow embedded into its webpage.
On this step I also open new tabs from the news band.
3. I return to gvim and try to save and close it using
:wq command but it does not work any more as : sends
focus to the "Copy to clipboard" icon.

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

Is it possible to tell if I'm in a function?

I have an autocmd that saves the file automatically on InsertLeave, but I do not want this to occur while more complicated functions are happening. Is it possible to detect whether or not the autocmd is executing while a function/mapping is running vs normal user input?

--
--
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: Zoomwin plugin stop working after

On Sat, Nov 01, 2014, ping song wrote:
> it's very easy to reproduce. just <c-w><c-o> and then all windows
> won't came back anymore. I know this is expected. but what's the value
> to keep that if we have Zoomwin? the suggestion will be to provide an
> option to also map that to what <c-w>_o does...

Are you saying that <C-w>o works but not <C-w><C-o>? That's easy to fix:
put this in your .vimrc:

nmap <C-w><C-o> <C-w>o

--
Eric Christopherson

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