Sunday, April 3, 2011

Re: Some Vim peculiarities

On 02.04.11,19:01, Tim Chase wrote:
> On 04/02/2011 04:01 PM, Jostein Berntsen wrote:
> >I have some questions regarding some peculiar behavior in my Vim 7.3.
> >Some of these might have been there from previous versions, while some
> >seems to have been introduced in the new version. Some might also come
> >from some plugins I have installed, or setting in .vimrc.
>
> All of these are almost surely from plugins or a setting in your
> .vimrc which you can verify by starting vim with
>
> vim -u NONE file1.txt file2.txt ...
>
> This will prevent Vim from loading your .vimrc and any plugins.
> Having a list of the scripts/plugins might help track down the
> offenders which, in your regular load of vim, can be found with
>
> :redir > scriptnames.txt
> :scriptnames
> :redir END
>
> (you can then send the created "scriptnames.txt" file to the list)
> While I don't use much in the way of vim-scripts, it will help
> others on the list track down the peculiar behaviors.
>
> >1. When doing a visual selection with "V" sometimes this
> >function errors out, and all lines are underlined instead.
> >Doing commands on this underlined selection does not work,
> >and several other vim commands stops working. I have to close
> >the file and reopen to make it work again.
> >
> >2. Hitting "Return/Enter" in normal mode closes vim.
>
> I don't have much insight on these (#1 & #2) without your scripts.
>

Thanks for your detailed answer, this helped me on the way to solve some
of these.

1. It seems like this occurs even without loading any scripts. I will
check some more regarding this.

2. This I located to a mapping in my .vimrc. Removing this solved it.


> >3. Sometimes when I copy/paste in Vim it errors out with a
> >"Bad Atom" error message.
>
> How are you copy&paste'ing and is this vim or gvim? Are you using
> the X selection-buffer (selecting with the mouse and pasting with
> middle-click) or are you pasting with either the "*" or "+"
> register? Pasting into a terminal with middle-mouse acts as if
> you're typing the characters in the buffer which can produce odd
> effects.
>

3. This occurs especially when using the ":y+" command I believe. Will
check more on this. I have some problems with klipper crashing on my box
now, so I will check out this first.


> >4. "l" opens a fold instead of moving right in the line.
>
> This is actually a default behavior, though ou may want to tweak the
> 'foldopen' setting to remove "hor":
>
> :set foldopen-=hor
>

4. This setting removed the fold opening, but also removed the move to
right. Will check more tweaks here.

>
> >5. "^" must be clicked two times to be activated to go to
> >first letter in line.
>
> This sounds like a mapping that begins with "^". Check the output of
>
> :map
> :map!
>
> to see if any mappings begin with "^". What you're seeing is Vim
> waiting to discern between pure "^" and your mapping (say, "^x").
> To double-verify my hypothesis, try typing any other character after
> the "^" that isn't the mapping.
>

5. This seems related to some mapping as you say. I will try to locate
this.

>
> Hope this helps you on at least a few of the issues.
>

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

No comments:

Post a Comment