python-rope / ropevim不能正常工作

时间:2016-10-10 06:22:51

标签: python vim rope

我已经安装了这些,点子列表:

rope (0.10.3)
ropemode (0.3)
ropevim (0.7.0)

我拥有的所有vim插件:

Plugin 'gmarik/vundle'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'altercation/vim-colors-solarized'
Plugin 'kien/ctrlp.vim'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'jiangmiao/auto-pairs'
Plugin 'scrooloose/nerdcommenter'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'Valloric/YouCompleteMe'
Plugin 'majutsushi/tagbar
Plugin 'Yggdroot/indentLine'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-session'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-fugitive'
Plugin 'vim-scripts/VisIncr'
Plugin 'easymotion/vim-easymotion'
Plugin 'godlygeek/tabular'
Plugin 'ternjs/tern_for_vim'
Plugin 'scrooloose/syntastic'
Plugin 'Shutnik/jshint2.vim'

Plugin 'python-rope/ropevim'

:地图

n  [m          *@:call <SNR>108_Python_jump('?^\s*\(class\|def\)')<CR>
n  [[          *@:call <SNR>108_Python_jump('?^\(class\|def\)')<CR>
n  ]m          *@:call <SNR>108_Python_jump('/^\s*\(class\|def\)')<CR>
n  ]]          *@:call <SNR>108_Python_jump('/^\(class\|def\)')<CR>
   î           *@:call AutoPairsJump()<CR>
   ð           *@:call AutoPairsToggle()<CR>
n  <C-A>       * ggVG
s  <C-H>       * <C-G>c
x  <Tab>       * :call UltiSnips#SaveLastVisualSelection()<CR>gvs
s  <Tab>       * <Esc>:call UltiSnips#ExpandSnippetOrJump()<CR>
n  <CR>          o<Esc>
n  <C-N>       * :bnext<CR>
n  <C-P>       * :bprevious<CR>
s  <C-R>       * <C-G>"_c<C-R>
   <Space>       <Plug>(easymotion-f)
   ,,            <Plug>(easymotion-prefix)
n  ,ca           <Plug>NERDCommenterAltDelims
x  ,cu           <Plug>NERDCommenterUncomment
n  ,cu           <Plug>NERDCommenterUncomment
x  ,cb           <Plug>NERDCommenterAlignBoth
n  ,cb           <Plug>NERDCommenterAlignBoth
x  ,cl           <Plug>NERDCommenterAlignLeft
n  ,cl           <Plug>NERDCommenterAlignLeft
n  ,cA           <Plug>NERDCommenterAppend
x  ,cy           <Plug>NERDCommenterYank
n  ,cy           <Plug>NERDCommenterYank
x  ,cs           <Plug>NERDCommenterSexy
n  ,cs           <Plug>NERDCommenterSexy
x  ,ci           <Plug>NERDCommenterInvert
n  ,ci           <Plug>NERDCommenterInvert
n  ,c$           <Plug>NERDCommenterToEOL
x  ,cn           <Plug>NERDCommenterNested
n  ,cn           <Plug>NERDCommenterNested
x  ,cm           <Plug>NERDCommenterMinimal
n  ,cm           <Plug>NERDCommenterMinimal
x  ,c<Space>     <Plug>NERDCommenterToggle
n  ,c<Space>     <Plug>NERDCommenterToggle
x  ,cc           <Plug>NERDCommenterComment
n  ,cc           <Plug>NERDCommenterComment
n  ,o          * :<C-U>CtrlP<CR>
n  ,c          * :SyntasticCheck<CR>
n  ,9          * :9wincmd w<CR>
n  ,8          * :8wincmd w<CR>
n  ,7          * :7wincmd w<CR>
n  ,6          * :6wincmd w<CR>
n  ,5          * :5wincmd w<CR>
n  ,4          * :4wincmd w<CR>
n  ,3          * :3wincmd w<CR>
n  ,2          * :2wincmd w<CR>
n  ,1          * :1wincmd w<CR>
n  ,n          * :NERDTreeToggle<CR>
n  ,r          * :Java %<CR>
n  ,s          * :JavaSearchContext<CR>
n  ,d          * :JavaDocSearch -x declarations<CR>
n  ,i          * :JavaImportOrganize<CR>
n  ,os         * :OpenSession<CR>
n  ,sv         * :source $MYVIMRC<CR>
n  ,v            :e $MYVIMRC<CR>
n  ,w          * :wall<CR>
n  ,q          * :bp<CR>:bd #<CR>
n  ,p            "+p
v  ,p            "+p
n  ,y            "+y
v  ,y            "+y
x  S             <Plug>VSurround
n  cS            <Plug>CSurround
n  cs            <Plug>Csurround
n  ds            <Plug>Dsurround
v  gx            <Plug>NetrwBrowseXVis
n  gx            <Plug>NetrwBrowseX
x  gS            <Plug>VgSurround
n  ySS           <Plug>YSsurround
n  ySs           <Plug>YSsurround
n  yss           <Plug>Yssurround
n  yS            <Plug>YSurround
n  ys            <Plug>Ysurround
v  <Plug>NetrwBrowseXVis * :<C-U>call netrw#BrowseXVis()<CR>
n  <Plug>NetrwBrowseX * :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<CR>
   <Plug>(easymotion-prefix)N   <Plug>(easymotion-N)
   <Plug>(easymotion-prefix)n   <Plug>(easymotion-n)
   # ----- other easymotion-perfix ------- #

x  <Plug>(easymotion-activate) * :<C-U>call EasyMotion#activate(1)<CR>
nos<Plug>(easymotion-activate) * :<C-U>call EasyMotion#activate(0)<CR>
   <Plug>(easymotion-dotrepeat) * :<C-U>call EasyMotion#DotRepeat()<CR>
   # ----- Other easymotion options ------ #

n  <SNR>74_:   * :<C-U><C-R>=v:count ? v:count : ''<CR>
v  <Plug>VgSurround * :<C-U>call <SNR>73_opfunc(visualmode(),visualmode() ==# 'V' ? 0 : 1)<CR>
v  <Plug>VSurround * :<C-U>call <SNR>73_opfunc(visualmode(),visualmode() ==# 'V' ? 1 : 0)<CR>
n  <Plug>YSurround * :<C-U>set opfunc=<SNR>73_opfunc2<CR>g@
n  <Plug>Ysurround * :<C-U>set opfunc=<SNR>73_opfunc<CR>g@
n  <Plug>YSsurround * :<C-U>call <SNR>73_opfunc2(v:count1)<CR>
n  <Plug>Yssurround * :<C-U>call <SNR>73_opfunc(v:count1)<CR>
n  <Plug>CSurround * :<C-U>call <SNR>73_changesurround(1)<CR>
n  <Plug>Csurround * :<C-U>call <SNR>73_changesurround()<CR>
n  <Plug>Dsurround * :<C-U>call <SNR>73_dosurround(<SNR>73_inputtarget())<CR>
n  <Plug>SurroundRepeat * .
n  <Plug>NERDCommenterAltDelims * :call <SNR>60_SwitchToAlternativeDelimiters(1)<CR>
x  <Plug>NERDCommenterUncomment * :call NERDComment("x", "Uncomment")<CR>
n  <Plug>NERDCommenterUncomment * :call NERDComment("n", "Uncomment")<CR>
x  <Plug>NERDCommenterAlignBoth * :call NERDComment("x", "AlignBoth")<CR>
n  <Plug>NERDCommenterAlignBoth * :call NERDComment("n", "AlignBoth")<CR>
x  <Plug>NERDCommenterAlignLeft * :call NERDComment("x", "AlignLeft")<CR>
n  <Plug>NERDCommenterAlignLeft * :call NERDComment("n", "AlignLeft")<CR>
n  <Plug>NERDCommenterAppend * :call NERDComment("n", "Append")<CR>
x  <Plug>NERDCommenterYank * :call NERDComment("x", "Yank")<CR>
n  <Plug>NERDCommenterYank * :call NERDComment("n", "Yank")<CR>
x  <Plug>NERDCommenterSexy * :call NERDComment("x", "Sexy")<CR>
n  <Plug>NERDCommenterSexy * :call NERDComment("n", "Sexy")<CR>
x  <Plug>NERDCommenterInvert * :call NERDComment("x", "Invert")<CR>
n  <Plug>NERDCommenterInvert * :call NERDComment("n", "Invert")<CR>
n  <Plug>NERDCommenterToEOL * :call NERDComment("n", "ToEOL")<CR>
x  <Plug>NERDCommenterNested * :call NERDComment("x", "Nested")<CR>
n  <Plug>NERDCommenterNested * :call NERDComment("n", "Nested")<CR>
x  <Plug>NERDCommenterMinimal * :call NERDComment("x", "Minimal")<CR>
n  <Plug>NERDCommenterMinimal * :call NERDComment("n", "Minimal")<CR>
x  <Plug>NERDCommenterToggle * :call NERDComment("x", "Toggle")<CR>
n  <Plug>NERDCommenterToggle * :call NERDComment("n", "Toggle")<CR>
x  <Plug>NERDCommenterComment * :call NERDComment("x", "Comment")<CR>
n  <Plug>NERDCommenterComment * :call NERDComment("n", "Comment")<CR>
s  <Del>       * <C-G>c
s  <BS>        * <C-G>c
s  <C-Tab>     * <Esc>:call UltiSnips#ListSnippets()<CR>
   <Plug>NERDTreeFocusToggle & :call <SNR>53_NERDTreeFocusToggle()
   <Plug>NERDTreeSteppedClose & :call <SNR>53_NERDTreeSteppedClose()
   <Plug>NERDTreeSteppedOpen & :call <SNR>53_NERDTreeSteppedOpen()
   <Plug>NERDTreeMirrorToggle & :call <SNR>53_NERDTreeMirrorToggle()
   <Plug>NERDTreeMirrorOpen & :call <SNR>53_NERDTreeMirrorOrCreate()
   <Plug>NERDTreeTabsFind & :call <SNR>53_NERDTreeFindFile()
   <Plug>NERDTreeTabsToggle & :call <SNR>53_NERDTreeToggleAllTabs()
   <Plug>NERDTreeTabsClose & :call <SNR>53_NERDTreeCloseAllTabs()
   <Plug>NERDTreeTabsOpen & :call <SNR>53_NERDTreeOpenAllTabs()
n  <M-Right>     <C-W><
n  <M-Left>      <C-W>>
n  <M-Up>        <C-W>+
n  <M-Down>      <C-W>-
n  <F2>        * :call NumberToggle()<CR>

:IMAP

i  <BS>        *@<C-R>=AutoPairsDelete()<CR>
i  î           *@<Esc>:call AutoPairsJump()<CR>a
i  ð           *@AutoPairsToggle()
i  â           *@<C-R>=AutoPairsBackInsert()<CR>
i  å           *@<C-R>=AutoPairsFastWrap()<CR>
i  <C-H>       *@<C-R>=AutoPairsDelete()<CR>
i  <CR>        &@<CR><SNR>59_AutoPairsReturn
i  <Space>     *@<C-]><C-R>=AutoPairsSpace()<CR>
i  "           *@<C-R>=AutoPairsInsert('"')<CR>
i  '           *@<C-R>=AutoPairsInsert('''')<CR>
i  (           *@<C-R>=AutoPairsInsert('(')<CR>
i  )           *@<C-R>=AutoPairsInsert(')')<CR>
i  [           *@<C-R>=AutoPairsInsert('[')<CR>
i  ]           *@<C-R>=AutoPairsInsert(']')<CR>
i  `           *@<C-R>=AutoPairsInsert('`')<CR>
i  {           *@<C-R>=AutoPairsInsert('{')<CR>
i  }           *@<C-R>=AutoPairsInsert('}')<CR>
i  <Up>        * pumvisible() ? "\<C-P>" : "\<Up>"
i  <Down>      * pumvisible() ? "\<C-N>" : "\<Down>"
i  <Plug>ISurround * <C-R>=<SNR>73_insert(1)<CR>
i  <Plug>Isurround * <C-R>=<SNR>73_insert()<CR>
i  <Plug>NERDCommenterInsert * <Space><BS><Esc>:call NERDComment('i', "insert")<CR>
i  <Plug>AutoPairsReturn & <SNR>59_AutoPairsReturn
i  <SNR>59_AutoPairsReturn * <C-R>=AutoPairsReturn()<CR>
i  <C-Tab>     * <C-R>=UltiSnips#ListSnippets()<CR>
i  <C-G>S        <Plug>ISurround
i  <C-G>s        <Plug>Isurround
i  <Tab>       * <C-R>=UltiSnips#ExpandSnippetOrJump()<CR>
i  <NL>        * <C-X><C-O><C-P>
i  <C-N>       * pumvisible() ? "\<C-N>" : "\<C-N>"
i  <C-P>       * pumvisible() ? "\<C-P>" : "\<C-P>"
i  <C-S>         <Plug>Isurround
i  kj            <Esc>

:version显示-python +python3

我没有在.vimrc中添加任何ropevim配置。 现在,整个键绑定都不起作用。如果我输入:Rope和标签,则不显示任何内容。但是:h rope会显示文档

安装时是否有任何遗漏?或者任何配置都应放入.vimrc?

1 个答案:

答案 0 :(得分:1)

:map显示了什么? :imapCtrl-]显示的内容是什么?我在~/.vimrc

中有这个
let ropevim_vim_completion=1
let ropevim_extended_complete=1
let ropevim_codeassist_maxfixes=1
let ropevim_goto_def_newwin="tabnew"
let ropevim_autoimport_modules = ["os.*","traceback", "xml.etree"]
"imap <c-space> <C-R>=RopeCodeAssistInsertMode()<CR>

au FileType python
    \ noremap <silent> <buffer> <C-]> :RopeGotoDefinition<CR>

好的,问题是vim不支持Python 2插件。绳子还没有py3k兼容。