Tuesday, September 11, 2012

Re: bufexplorer has conflicts with python.vim

On 10/09/12 04:14, Tim Johnson wrote:
[...]
>
> Well, I as the OP quit following this thread until now and am
> playing catchup.
>
> I have the following code at lines 21 to 24 in
>
> /Applications/MacVim-snapshot-62/MacVim.app/Contents/Resources/vim/runtime/ftplugin/python.vim
>
> [code]
> nnoremap <silent> <buffer> ]] :call
> <SID>Python_jump('/^\(class\\|def\)')<cr>
> nnoremap <silent> <buffer> [[ :call
> <SID>Python_jump('?^\(class\\|def\)')<cr>
> nnoremap <silent> <buffer> ]m :call
> <SID>Python_jump('/^\s*\(class\\|def\)')<cr>
> nnoremap <silent> <buffer> [m :call
> <SID>Python_jump('?^\s*\(class\\|def\)')<cr>
> [/code]
> NOTE that my email editor (vim) as wrapped each line following
> ":call"
>
> This file __does not__ have the following lines :
> let s:keepcpo= &cpo
> set cpo&vim
>
> cpoptions for my python buffers is
> cpoptions=aABceFs
>
> The macVim install does not yet provide version 7.4.462
> (I miss ubuntu)
>
> Anything I can do? Note also, that my problems went away when I
> rebuilt the session file.
>
> I remain interested in Tony's approach to "hand-rolling" a session
> file.
>
> thanks
>
Well, AFAICT the following alternatives are available:

a) Make sure that there is no b flag in 'cpoptions'

b) Wait until Vim 7.3.511 or later becomes available to you. Check on
the vim_mac list if Björn has published a "MacVim snapshot" with a Vim
version equal or higher than 7.3.511. If worst comes to worst, find out
how to compile your own MacVim, and do it yourself, using Bram's latest
Vim sources (currently 7.3.659) and whatever additional Mac sources from
Björn are needed.

c) Add the following two two-lines files (untested):

-----8<--- $HOME/.vim/ftplugin/python.vim ---8<-----
let b:user_python_save_cpo = &cpo
set cpo&vim
----->8----------->8------------>8----------->8-----

-----8<--- $HOME/.vim/after/ftplugin/python.vim ---8<-----
let &cpo = b:user_python_save_cpo
unlet b:user_python_save_cpo " optional
----->8-------------->8-------------->8------------>8-----

If you choose alternative (c), edit a Python file (after restarting
Vim), then look at the output of the :scriptnames command and check
where your two new files are listed and what comes between them. What to
do next will depend on what you see there. In particular,
$VIMRUNTIME/ftplugin/python.vim should be present, and there should be
(if all went well) nothing that the change in 'cpoptions' setting would
disturb; but be sure to check.


Best regards,
Tony.
--
Windows
M!uqoms

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