Hi Ben, first of all thank you very much for your detailed answers. I think they are very useful in generally understanding more the way vim works.
On Tue, Oct 5, 2010 at 19:05, Benjamin R. Haskell <v...@benizi.com> wrote: > [combining forks of the thread] > > > On Tue, 5 Oct 2010, Alexander Dietz wrote: > > Hi, >> >> I am not sure if understood me correctly. Or I did not understood you. >> >> On Tue, Oct 5, 2010 at 17:37, Joan Miquel Torres Rigo wrote: >> >> 1. In your first post you said that you have ":set paste" in your >>> ~/.vimrc that obviously not working. Then, if you want to solve the problem >>> (only if you want, of course) you need to make some tests to diagnose the >>> cause. >>> >>> >> Why should I make tests? I have explicitly shown my complete .vimrc. >> > > .vimrc is only one source of configuration. If you have any plugins > installed or your distributions global vimrc (in my case /etc/vim/vimrc), > they might make their own changes. > > > > 3. Setting 'paste' mode by default is not a smart decision because you >>> will lose many good features, but you can do it simply putting 'set paste' >>> in your ~/.vimrc. >>> >>> >> I do not understand what you are trying to say here. >> > > 'paste' mode isn't what you seem to think it is. It prevents some of the > features you're setting from working ('autoindent' doesn't autoindent in > 'paste' mode, 'formatoptions' is ignored in 'paste' mode). > > See: :help 'paste' for full details. The gist is that paste mode is > designed to work around problems with pasting: in a terminal without proper > mouse support, Vim has no way to tell whether you're pasting with the mouse > or just typing really fast, and even so, Vim has no way to know that you > don't want some of the automatic formatting applied, just because you're > pasting. > > > 4. If you were simply did the test that I suggested you probably could see >>> that this workded and think that there must be something wrong in your >>> ~/.vimrc. >>> >>> >> As I says before, I have shown my complete .vimrc. I will show it again at >> the end of the email, so if you are a specialist of .vimrc settings you >> might see what is wrong in these set of settings. >> >> [...] >> >> >> set number >> set paste >> set mouse=a >> >> >> autocmd FileType * set tabstop=2|set shiftwidth=2|set noexpandtab >> autocmd FileType python set tabstop=4|set shiftwidth=4|set expandtab >> autocmd BufEnter * set ai sw=4 ts=4 sta et fo=croql >> set softtabstop=4 " makes the spaces feel like real tabs >> >> > Using that exact .vimrc, with shift+middle-click I get stair-stepping. With > Middle-click alone, it works how you want. > > If you leave out the 'ai' (autoindent) in the BufEnter autocmd, there's no > stair-stepping, with or without shift. Same with 'si' (smartindent), which > is arguably better. > > With leaving out the 'ai' it seems to work! When I mark text in a xterm or so with the mouse, I can paste it into vim using shift+middle-click. middle-click alone seems to paste in only what I have 'yy'ed before. > > > On Tue, 5 Oct 2010, Alexander Dietz wrote: > >> >> On Tue, 5 Oct 2010, Benjamin R. Haskell wrote: >> >> > :verbose set paste? >> >> This command results in the word 'paste' shown at the bottom of the vim >> window. >> > > The '?' is part of the command. ':set paste?' shows the current status of > 'paste'. Adding the 'verbose' should show you where 'paste' was last set. > > > > > Shift+middle-click in xterm "pastes" (as in: sends the characters to > >> Vim) regardless of Vim's settings. With :set mouse=a, you shouldn't > need >> to use 'shift-'. >> >> But I do need to use the shift key. It's a fact for me even with 'set >> mouse=a'. >> > > Checking some other features that might affect this. How about: > > :verbose set ttymouse? term? > > > > > With xterm, you might need to set the '*allowWindowOps' resource > (That >> was required for me on Gentoo using an at-the-time very new > version of >> XTerm.). See one of my responses in a previous thread > about this problem: >> > >> http://groups.google.com/group/vim_use/browse_thread/thread/bc916d611971d204 >> >> So you mean my problem need some other changes, related to xterm etc? Why >> do I need that? I just can copy from/to between: emacs, xterms (different >> computers, different operating systems, does not matter at all), browser >> edit windows etc... Maybe you could elaborate that point a bit? >> > > Due to the long history of how terminal emulators, computers, and mouses > interact, programs can access mouse information in different ways. Full > discussions is beyond the scope of the Vim list. The XTerm change log[1] > lists several changes to allowWindowOps. The other programs you list might > not use the same method that Vim uses to access mouse information. So, the > allowWindowOps option might not matter to them. For the way vim under xterm > uses the mouse, you might need it. The reason allowWindowOps affects Vim is > that (I think) it relies on XTerm's "bracketed paste mode"[2], which is only > available when window ops are allowed, and can be runtime enabled/disabled > via 'paste64' (another X11 Resource for XTerm). > > [1] http://invisible-island.net/xterm/xterm.log.html > > [2] http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt (search for > bracketed paste mode) > > Maybe you know of some *easy* introduction to vim configurations in which some of the basics are described, at an beginners level? That might be useful... Thanks Alex > > > It seems that vim is not that smart at all in the end.... >> > > It's not helpful to keep reïterating that. > > -- > 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 > -- 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