From ee87aac05600843d1cfc9635bf112d94932cf818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Thu, 16 Jan 2014 13:54:02 +0100 Subject: [PATCH] Make ropevim pathogen compliant. Pushing whole repo to ~/.vim/bundle is quite inefficient, but seems to be the most elegant solution so far. Any better solutions are highly welcomed. Also, remove docs/todo.txt. All issues (although rather unintelligible) were moved to the GitHub Issue Tracker. Fixes #18 --- docs/done.txt => ChangeLog | 0 README.rst | 163 ++++++++++++++++++------------ {docs => doc}/ropevim.txt | 0 doc/tags | 30 ++++++ docs/todo.txt | 8 -- ropevim.vim => plugin/ropevim.vim | 0 setup.py | 1 - 7 files changed, 131 insertions(+), 71 deletions(-) rename docs/done.txt => ChangeLog (100%) rename {docs => doc}/ropevim.txt (100%) create mode 100644 doc/tags delete mode 100644 docs/todo.txt rename ropevim.vim => plugin/ropevim.vim (100%) diff --git a/docs/done.txt b/ChangeLog similarity index 100% rename from docs/done.txt rename to ChangeLog diff --git a/README.rst b/README.rst index cd58a1e..9a56d57 100644 --- a/README.rst +++ b/README.rst @@ -29,17 +29,21 @@ Setting Up First add ropevim folder to the ``PYTHONPATH`` (or install it using ``python setup.py install``). -Then load ``ropevim.vim`` in vim. That can be done either by adding -``source path/to/ropevim.vim`` to your ``~/.vimrc`` or copying it to -``~/.vim/plugin/`` folder. +Then load ``ropevim.vim`` in vim. -If you don't want to install rope and ropevim you can add something -like this to your ``~/.vimrc``:: +If you don't have a preferred installation method, I recommend +installing pathogen.vim, and then simply copy and paste: - let $PYTHONPATH .= ":/path/to/rope:/path/to/ropevim" - source /path/to/ropevim.vim + cd ~/.vim/bundle + git clone https://github.com/python-rope/ropevim.git + (or even add this repo as a submodule to `~/.vim/bundle` git repo if + you have setup `~/.vim/bundle` in this way and you should) -For using the repository version of rope, see ``docs/ropevim.txt``. +Once help tags have been generated, you can view the manual with `:help +fugitive.` + +For using the repository version of rope, see ``docs/ropevim.txt`` (or +vim command `:he ropevim`) Getting Started @@ -245,7 +249,7 @@ Variables * ``ropevim_enable_autoimport``: Shows whether to enable autoimport. * ``ropevim_autoimport_modules``: The name of modules whose global - names should be cached. `RopeGenerateAutoimportCache' reads this + names should be cached. `RopeGenerateAutoimportCache` reads this list and fills its cache. * ``ropevim_autoimport_underlineds``: If set, autoimport will cache names starting with underlines, too. @@ -262,59 +266,93 @@ Uses almost the same keybinding as ropemacs. Note that global commands have a ``C-x p`` prefix and local commands have a ``C-c r`` prefix. You can change that (see variables_ section). -================ ============================ -Key Command -================ ============================ -C-x p o RopeOpenProject -C-x p k RopeCloseProject -C-x p f RopeFindFile -C-x p 4 f RopeFindFileOtherWindow -C-x p u RopeUndo -C-x p r RopeRedo -C-x p c RopeProjectConfig -C-x p n [mpfd] RopeCreate(Module|Package|File|Directory) - RopeWriteProject - -C-c r r RopeRename -C-c r l RopeExtractVariable -C-c r m RopeExtractMethod -C-c r i RopeInline -C-c r v RopeMove -C-c r x RopeRestructure -C-c r u RopeUseFunction -C-c r f RopeIntroduceFactory -C-c r s RopeChangeSignature -C-c r 1 r RopeRenameCurrentModule -C-c r 1 v RopeMoveCurrentModule -C-c r 1 p RopeModuleToPackage - -C-c r o RopeOrganizeImports -C-c r n [vfcmp] RopeGenerate(Variable|Function|Class|Module|Package) - -C-c r a / RopeCodeAssist -C-c r a g RopeGotoDefinition -C-c r a d RopeShowDoc -C-c r a f RopeFindOccurrences -C-c r a ? RopeLuckyAssist -C-c r a j RopeJumpToGlobal -C-c r a c RopeShowCalltip - RopeAnalyzeModule - - RopeAutoImport - RopeGenerateAutoimportCache -=============== ============================ - - -Shortcuts ---------- - -Some commands are used very frequently; specially the commands in -code-assist group. You can define your own shortcuts like this:: - - :map g :call RopeGotoDefinition() - -Ropevim itself comes with a few shortcuts. These shortcuts will be -used only when ``ropevim_enable_shortcuts`` is set. ++-----------------+-------------------------------------------------------+ +|Key | Command | ++=================+=======================================================+ +|C-x p o | RopeOpenProject | ++-----------------+-------------------------------------------------------+ +|C-x p k | RopeCloseProject | ++-----------------+-------------------------------------------------------+ +|C-x p f | RopeFindFile | ++-----------------+-------------------------------------------------------+ +|C-x p 4 f | RopeFindFileOtherWindow | ++-----------------+-------------------------------------------------------+ +|C-x p u | RopeUndo | ++-----------------+-------------------------------------------------------+ +|C-x p r | RopeRedo | ++-----------------+-------------------------------------------------------+ +|C-x p c | RopeProjectConfig | ++-----------------+-------------------------------------------------------+ +|C-x p n [mpfd] | RopeCreate(Module|Package|File|Directory) | ++-----------------+-------------------------------------------------------+ +| | RopeWriteProject | ++-----------------+-------------------------------------------------------+ +| | | ++-----------------+-------------------------------------------------------+ +|C-c r r | RopeRename | ++-----------------+-------------------------------------------------------+ +|C-c r l | RopeExtractVariable | ++-----------------+-------------------------------------------------------+ +|C-c r m | RopeExtractMethod | ++-----------------+-------------------------------------------------------+ +|C-c r i | RopeInline | ++-----------------+-------------------------------------------------------+ +|C-c r v | RopeMove | ++-----------------+-------------------------------------------------------+ +|C-c r x | RopeRestructure | ++-----------------+-------------------------------------------------------+ +|C-c r u | RopeUseFunction | ++-----------------+-------------------------------------------------------+ +|C-c r f | RopeIntroduceFactory | ++-----------------+-------------------------------------------------------+ +|C-c r s | RopeChangeSignature | ++-----------------+-------------------------------------------------------+ +|C-c r 1 r | RopeRenameCurrentModule | ++-----------------+-------------------------------------------------------+ +|C-c r 1 v | RopeMoveCurrentModule | ++-----------------+-------------------------------------------------------+ +|C-c r 1 p | RopeModuleToPackage | ++-----------------+-------------------------------------------------------+ +| | | ++-----------------+-------------------------------------------------------+ +|C-c r o | RopeOrganizeImports | ++-----------------+-------------------------------------------------------+ +|C-c r n [vfcmp] | RopeGenerate(Variable|Function|Class|Module|Package) | ++-----------------+-------------------------------------------------------+ +| | | ++-----------------+-------------------------------------------------------+ +|C-c r a / | RopeCodeAssist | ++-----------------+-------------------------------------------------------+ +|C-c r a g | RopeGotoDefinition | ++-----------------+-------------------------------------------------------+ +|C-c r a d | RopeShowDoc | ++-----------------+-------------------------------------------------------+ +|C-c r a f | RopeFindOccurrences | ++-----------------+-------------------------------------------------------+ +|C-c r a ? | RopeLuckyAssist | ++-----------------+-------------------------------------------------------+ +|C-c r a j | RopeJumpToGlobal | ++-----------------+-------------------------------------------------------+ +|C-c r a c | RopeShowCalltip | ++-----------------+-------------------------------------------------------+ +| | RopeAnalyzeModule | ++-----------------+-------------------------------------------------------+ +| | RopeAutoImport | ++-----------------+-------------------------------------------------------+ +| | RopeGenerateAutoimportCache | ++-----------------+-------------------------------------------------------+ + + +Shortcuts +--------- + +Some commands are used very frequently; specially the commands in +code-assist group. You can define your own shortcuts like this:: + + :map g :call RopeGotoDefinition() + +Ropevim itself comes with a few shortcuts. These shortcuts will be +used only when ``ropevim_enable_shortcuts`` is set. ================ ============================ Key Command @@ -333,6 +371,7 @@ Support for Omni completion You can enable using Rope as providing for Omni completion by setting omnifunc variable to ``RopeCompleteFunc``. E.g., by putting something like this in your ``~/.vimrc``:: + autocmd FileType python setlocal omnifunc=RopeCompleteFunc diff --git a/docs/ropevim.txt b/doc/ropevim.txt similarity index 100% rename from docs/ropevim.txt rename to doc/ropevim.txt diff --git a/doc/tags b/doc/tags new file mode 100644 index 0000000..da81305 --- /dev/null +++ b/doc/tags @@ -0,0 +1,30 @@ +'pymode_rope_always_show_complete_menu' ropevim.txt /*'pymode_rope_always_show_complete_menu'* +'pymode_rope_autoimport_modules' ropevim.txt /*'pymode_rope_autoimport_modules'* +'pymode_rope_autoimport_underlineds' ropevim.txt /*'pymode_rope_autoimport_underlineds'* +'pymode_rope_codeassist_maxfixes' ropevim.txt /*'pymode_rope_codeassist_maxfixes'* +'pymode_rope_enable_autoimport' ropevim.txt /*'pymode_rope_enable_autoimport'* +'pymode_rope_enable_shortcuts' ropevim.txt /*'pymode_rope_enable_shortcuts'* +'pymode_rope_extended_complete' ropevim.txt /*'pymode_rope_extended_complete'* +'pymode_rope_global_prefix' ropevim.txt /*'pymode_rope_global_prefix'* +'pymode_rope_goto_def_newwin' ropevim.txt /*'pymode_rope_goto_def_newwin'* +'pymode_rope_guess_project' ropevim.txt /*'pymode_rope_guess_project'* +'pymode_rope_local_prefix' ropevim.txt /*'pymode_rope_local_prefix'* +'pymode_rope_vim_completion' ropevim.txt /*'pymode_rope_vim_completion'* +:RopeCodeAssist ropevim.txt /*:RopeCodeAssist* +:RopeFindFile ropevim.txt /*:RopeFindFile* +:RopeFindFileOtherWindow ropevim.txt /*:RopeFindFileOtherWindow* +:RopeGenerateAutoimportCache ropevim.txt /*:RopeGenerateAutoimportCache* +:RopeLuckyAssist ropevim.txt /*:RopeLuckyAssist* +:RopevimAutoImport ropevim.txt /*:RopevimAutoImport* +RopeCodeAssist ropevim.txt /*RopeCodeAssist* +RopeDialogBatchsetCommand ropevim.txt /*RopeDialogBatchsetCommand* +RopeEnablingAutoimport ropevim.txt /*RopeEnablingAutoimport* +RopeFilteringResources ropevim.txt /*RopeFilteringResources* +RopeFindOccurrences ropevim.txt /*RopeFindOccurrences* +RopeFindingFiles ropevim.txt /*RopeFindingFiles* +RopeKeys ropevim.txt /*RopeKeys* +RopeRefactoringDialog ropevim.txt /*RopeRefactoringDialog* +RopeShortcuts ropevim.txt /*RopeShortcuts* +RopeVariables ropevim.txt /*RopeVariables* +Ropevim ropevim.txt /*Ropevim* +ropevim.txt ropevim.txt /*ropevim.txt* diff --git a/docs/todo.txt b/docs/todo.txt deleted file mode 100644 index dd29671..0000000 --- a/docs/todo.txt +++ /dev/null @@ -1,8 +0,0 @@ -============== - Ropevim TODO -============== - -* preventing changed file warnings -* interrupting refactorings -* better progress bar -* prefixing functions diff --git a/ropevim.vim b/plugin/ropevim.vim similarity index 100% rename from ropevim.vim rename to plugin/ropevim.vim diff --git a/setup.py b/setup.py index 28dc27d..18618a4 100644 --- a/setup.py +++ b/setup.py @@ -37,6 +37,5 @@ def get_long_description(): license='GNU GPL', classifiers=classifiers, requires=['ropemode'], - data_files=[('share/vim/plugin', ['ropevim.vim'])], **extra_kwargs )