Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Terminal Emulators <F2> Toggle Inserts Text #9

Open
ViViDboarder opened this issue Nov 15, 2012 · 3 comments
Open

In Terminal Emulators <F2> Toggle Inserts Text #9

ViViDboarder opened this issue Nov 15, 2012 · 3 comments

Comments

@ViViDboarder
Copy link

In my .vimrc I have the following

nnoremap <silent> <F2> :Bufferlist<CR>

When I hit F2 to toggle the buffer list, it shows the list just fine, but when I toggle out it ends up inserting some text.

It ends up adding a new line with Q

Before

i am foo bar

Press F2 twice

Q
i am foo bar

When I bind to other keys I get different results.

Bound to F5 it changes toggles case of words.

Before:

abcdefghijklmnop

After:

ABCDEfghijklmnop

One more time:

abcdefghijklmnop

Now the weird part is that in MacVim with the GUI (I haven't checked gvim on Linux) it works perfectly... and if I run the same binary /Applications/MacPorts/MacVim.app/Contents/MacOS/Vim I get the weird behavior again.

Oddly enough I use the same toggles for other plugins with no issues either.

Example:

nnoremap <silent> <F3> :TMToggle<CR>

works just fine.

@sandeepcr529
Copy link
Owner

Hi,

Can you tell me which version of vim you are running when the problem occurs and the contents of your .vimrc.

In the meantime, You can also try removing lines 258 to 261 from the buffet.vim file, (if you are using the latest version from github.).

At that position you will find a function. I have marked the lines to remove using ' > '

function! s:close()
if(exists("t:tlistbuf"))
unlet t:tlistbuf
let s:lineonclose = line('.')
:bdelete buflisttempbuffer412393
> echo ''
> if(s:sourcewindow != -1)
> exe s:sourcewindow. ' wincmd w'
> endif
endif
endfunction

You can try removing the lines so that the above block becomes

function! s:close()
if(exists("t:tlistbuf"))
unlet t:tlistbuf
let s:lineonclose = line('.')
:bdelete buflisttempbuffer412393
endif
endfunction

And thank you for notifying me of this error..

@ViViDboarder
Copy link
Author

7.3.661 and 7.3.646 (MacVim) both show the error when launched from the command line.

My .vimrc is here

Removed the lines and saw no difference.

Thanks for looking into this.

@ViViDboarder
Copy link
Author

Found some resources finally on this. I'd been using MacVim to avoid the issue, but recently started using vim in tmux.

http://superuser.com/questions/258986/vim-strange-behaviour-f1-10

If I get it figured out I'll post back for anyone else that stumbles on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants