diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index 84607ec8..00000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,14 +0,0 @@ -[bumpversion] -commit = True -current_version = 0.14.0 -files = plugin/pymode.vim -tag = True -tag_name = {new_version} - -[bumpversion:file:doc/pymode.txt] -search = Version: {current_version} -replace = Version: {new_version} - -[bumpversion:file:CHANGELOG.md] -search = Version: {current_version} -replace = Version: {new_version} diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index dacde02d..00000000 --- a/.dockerignore +++ /dev/null @@ -1,44 +0,0 @@ -# Ignore cache directories -**/.ruff_cache/ -**/__pycache__/ -**/.pytest_cache/ -*.pyc -*.pyo - -# Ignore version control -.git/ -.gitignore - -# Ignore swap files -*.swp -*.swo -*~ - -# Ignore IDE files -.vscode/ -.idea/ -*.sublime-* - -# Ignore build artifacts -.tox/ -build/ -dist/ -*.egg-info/ - -# Ignore temporary files -*.tmp -*.temp -/tmp/ - -# Ignore logs -*.log -logs/ - -# Ignore test outputs -test-results.json -*.vader.out - -# Ignore environment files -.env -.env.* -.python-version \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 8847bdf2..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -# These are supported funding model platforms - -liberapay: diraol diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index be619481..00000000 --- a/.github/stale.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 150 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 21 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security -# Label to use when marking an issue as stale -staleLabel: inactive -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: > - Closed due to inactivity. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 085f9393..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,256 +0,0 @@ -name: Python-mode Tests - -on: - push: - branches: [ main, develop ] - pull_request: - branches: [ main, develop ] - schedule: - - cron: '0 0 * * 0' # Weekly run - -jobs: - test-linux: - name: Test on Linux (Python ${{ matrix.python-version }}) - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] - fail-fast: false - - steps: - - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - submodules: recursive - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Ruff - run: | - pip install ruff - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y vim-nox git - - - name: Run Vader test suite - run: | - pwd - ls -la scripts/cicd/ - which bash - bash --version - bash scripts/cicd/run_vader_tests_direct.sh - - - name: Upload test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: always() - with: - name: test-results-linux-${{ matrix.python-version }} - path: | - test-results.json - test-logs/ - results/ - - - name: Upload coverage reports - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 - with: - file: ./coverage.xml - flags: linux-python-${{ matrix.python-version }} - - test-macos: - name: Test on macOS (Python ${{ matrix.python-version }}) - runs-on: macos-latest - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12', '3.13'] - fail-fast: false - - steps: - - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - submodules: recursive - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Ruff - run: | - pip install ruff - - - name: Install Vim and coreutils - run: | - brew install vim coreutils - # Ensure brew's bin directory is in PATH - echo "$(brew --prefix)/bin" >> $GITHUB_PATH - # Verify vim is available - which vim - vim --version - # Verify timeout is available (from coreutils) - # On macOS, coreutils installs commands with 'g' prefix, but PATH should have both - which timeout || which gtimeout || echo "Warning: timeout command not found" - # Test timeout command - timeout --version || gtimeout --version || echo "Warning: timeout not working" - - - name: Run Vader test suite - run: | - pwd - ls -la scripts/cicd/ - which bash - bash --version - bash scripts/cicd/run_vader_tests_direct.sh - - - name: Upload test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: always() - with: - name: test-results-macos-${{ matrix.python-version }} - path: | - test-results.json - test-logs/ - results/ - - - name: Upload coverage reports - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 - with: - file: ./coverage.xml - flags: macos-python-${{ matrix.python-version }} - - test-windows: - name: Test on Windows (Python ${{ matrix.python-version }}) - runs-on: windows-latest - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12', '3.13'] - fail-fast: false - - steps: - - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - submodules: recursive - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Ruff - run: | - pip install ruff - - - name: Install Vim - shell: pwsh - run: | - # Install Vim using Chocolatey (available on GitHub Actions Windows runners) - choco install vim -y - # Refresh PATH to make vim available - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") - # Also add common Vim installation paths - $env:Path += ";C:\Program Files (x86)\Vim\vim91\bin;C:\Program Files\Vim\vim91\bin;C:\tools\vim\vim91\bin" - # Add to GITHUB_PATH for subsequent steps - $vimPaths = @( - "C:\Program Files (x86)\Vim\vim91\bin", - "C:\Program Files\Vim\vim91\bin", - "C:\tools\vim\vim91\bin" - ) - foreach ($path in $vimPaths) { - if (Test-Path $path) { - echo "$path" >> $env:GITHUB_PATH - Write-Host "Added to GITHUB_PATH: $path" - } - } - # Verify vim is available - $vimPath = (Get-Command vim -ErrorAction SilentlyContinue).Source - if ($vimPath) { - Write-Host "Vim found at: $vimPath" - & $vimPath --version - } else { - Write-Host "Vim not in PATH, trying to find it..." - $possiblePaths = @( - "C:\Program Files (x86)\Vim\vim91\vim.exe", - "C:\Program Files\Vim\vim91\vim.exe", - "C:\tools\vim\vim91\vim.exe" - ) - $found = $false - foreach ($path in $possiblePaths) { - if (Test-Path $path) { - Write-Host "Found Vim at: $path" - & $path --version - $found = $true - break - } - } - if (-not $found) { - Write-Host "ERROR: Could not find Vim installation" - exit 1 - } - } - - - name: Run Vader test suite - shell: pwsh - run: | - Get-Location - Get-ChildItem scripts\cicd\ - Get-Command pwsh | Select-Object -ExpandProperty Source - pwsh --version - pwsh scripts/cicd/run_vader_tests_windows.ps1 - - - name: Upload test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: always() - with: - name: test-results-windows-${{ matrix.python-version }} - path: | - test-results.json - test-logs/ - results/ - - - name: Upload coverage reports - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 - with: - file: ./coverage.xml - flags: windows-python-${{ matrix.python-version }} - - summary: - name: Generate Test Summary - runs-on: ubuntu-latest - needs: [test-linux, test-macos, test-windows] - if: github.event_name == 'pull_request' - - steps: - - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - submodules: recursive - - - name: Download all test results - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - path: test-results-artifacts - pattern: test-results-* - merge-multiple: false - - - name: Install jq for JSON parsing - run: | - sudo apt-get update - sudo apt-get install -y jq - - - name: Generate PR summary - id: generate_summary - run: | - bash scripts/cicd/generate_pr_summary.sh test-results-artifacts pr-summary.md - continue-on-error: true - - - name: Post PR comment - uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 - if: always() && github.event_name == 'pull_request' - with: - file-path: pr-summary.md - comment-tag: test-summary diff --git a/.gitignore b/.gitignore index 79fdac43..d0358325 100644 --- a/.gitignore +++ b/.gitignore @@ -1,33 +1,10 @@ -*.py[cod] -*.sw? -*~ -.DS_Store -.bundle -.ropeproject .vim-flavor .vimrc Gemfile.lock VimFlavor.lock _ build -tags test.py todo.txt -vendor vim.py -vim_session_*.vim -__*/ -# Coverage files -.coverage -.coverage.* -coverage.xml -htmlcov/ -*.cover -.hypothesis/ -.pytest_cache/ -# Test result artifacts (generated by test runners) -test-results.json -test-logs/ -results/ -# Temporary test runner scripts -.tmp_run_test_*.sh + diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 82cc314c..00000000 --- a/.gitmodules +++ /dev/null @@ -1,10 +0,0 @@ -[submodule "submodules/rope"] - path = submodules/rope - url = https://github.com/python-rope/rope - shallow = true -[submodule "submodules/pytoolconfig"] - path = submodules/pytoolconfig - url = https://github.com/bagel897/pytoolconfig.git -[submodule "submodules/tomli"] - path = submodules/tomli - url = https://github.com/hukkin/tomli.git diff --git a/pymode/libs/__init__.py b/.nojekyll similarity index 100% rename from pymode/libs/__init__.py rename to .nojekyll diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index a4bcbf28..00000000 --- a/AUTHORS +++ /dev/null @@ -1,78 +0,0 @@ -Author: - -* Kirill Klenov - -Maintainers: - -* Diego Rabatone Oliveira (https://github.com/diraol); - -Contributors: - -* Alvin Francis (http://github.com/alvinfrancis); -* Amir Eldor (https://github.com/amireldor); -* Andriy Kohut (https://github.com/andriykohut); -* Anler Hp (http://github.com/ikame); -* Anton Parkhomenko (http://github.com/chuwy); -* Ashley Hewson (http://github.com/ashleyh); -* Ben Davis (https://github.com/bendavis78); -* Benjamin Ruston (http://github.com/bruston); -* Boatx (https://github.com/boatx); -* Boris Filippov (http://github.com/frenzykryger); -* Brad Belyeu (https://github.com/bbelyeu); -* Brad Mease (http://github.com/bmease); -* Brendan Maguire (https://github.com/brendanmaguire); -* Bryce Guinta (https://github.com/brycepg); -* Daniel Hahler (http://github.com/blueyed); -* David Vogt (http://github.com/winged); -* Denis Kasak (http://github.com/dkasak); -* Dimitrios Semitsoglou-Tsiapos (https://github.com/dset0x); -* Dirk Wallenstein (http://github.com/dirkwallenstein); -* Felipe M. Vieira (https://github.com/fmv1992) -* Filip Poboril (https://github.com/fpob); -* Florent Xicluna (http://github.com/florentx); -* Fredrik Henrysson (http://github.com/fhenrysson); -* fwuzju (https://github.com/fwuzju); -* Grzegorz Janik (http://github.com/glujan); -* Igor Guerrero (http://github.com/igorgue); -* Jacob Niehus (https://github.com/wilywampa); -* Jason Harvey (http://github.com/alienth); -* Jay Rainey (https://github.com/jawrainey); -* Jonathan McCall (http://github.com/Jonnymcc); -* Kevin Deldycke (http://github.com/kdeldycke); -* Kurtis Rader (https://github.com/krader1961); -* Lawrence Akka (https://github.com/lawrenceakka); -* lee (https://github.com/loyalpartner); -* Lie Ryan (https://github.com/lieryan/); -* Lowe Thiderman (http://github.com/thiderman); -* Martin Brochhaus (http://github.com/mbrochh); -* Matt Dodge (https://github.com/mattdodge); -* Matthew Moses (http://github.com/mlmoses); -* Maxim (https://github.com/mpyatishev); -* Mel Boyce (http://github.com/syngin); -* Mohammed (http://github.com/mbadran); -* Naoya Inada (http://github.com/naoina); -* Nate Zhang (https://github.com/natezhang93); -* nixon (https://github.com/nixon); -* Paweł Korzeniewski (https://github.com/korzeniewskipl); -* Pedro Algarvio (http://github.com/s0undt3ch); -* Phillip Cloud (http://github.com/cpcloud); -* Pi Delport (http://github.com/pjdelport); -* Robert David Grant (http://github.com/bgrant); -* Robin Schneider (https://github.com/ypid); -* Ronald Andreu Kaiser (http://github.com/cathoderay);; -* Samir Benmendil (https://github.com/Ram-Z); -* Sorin Ionescu (sorin-ionescu); -* sphaugh (https://github.com/sphaugh); -* Steve Losh (http://github.com/sjl); -* Tommy Allen (https://github.com/tweekmonster); -* Tony Narlock (https://github.com/tony); -* tramchamploo (https://github.com/tramchamploo); -* Tyler Fenby (https://github.com/TFenby); -* Vincent Driessen (https://github.com/nvie); -* Wang Feng (https://github.com/mapler); -* Wayne Ye (https://github.com/WayneYe); -* Wes Turner (https://github.com/westurner); -* Yury A. Kartynnik (https://github.com/kartynnik); -* Xiangyu Xu (https://github.com/bkbncn); -* Zach Himsel (https://github.com/zhimsel); -* Nathan Pemberton (https://github.com/NathanTP); diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index dcf9dbcc..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,557 +0,0 @@ -# Changelog - -## [Unreleased] 0.15.0 - -### BREAKING CHANGES: Ruff Migration - -This release replaces the old linting infrastructure with Ruff, a modern, fast Python linter and formatter written in Rust. - -#### Removed Linting Tools - -The following linting tools are **no longer available** as submodules or separate checkers: -- **pylint** - Replaced by Ruff PLE/PLR/PLW rules -- **pyflakes** - Replaced by Ruff F rules -- **pycodestyle** - Replaced by Ruff E/W rules -- **mccabe** - Replaced by Ruff C90 rules -- **pydocstyle** - Replaced by Ruff D rules -- **pylama** - No longer needed (was a wrapper) -- **autopep8** - Replaced by Ruff format - -**Migration:** Your existing `g:pymode_lint_checkers` configuration is automatically mapped to Ruff rules. No immediate action required, but see migration guide below. - -#### New Requirements - -- **Ruff must be installed:** `pip install ruff` -- Ruff is now an external dependency (not bundled as a submodule) - -#### Configuration Changes - -- `g:pymode_lint_checkers` values are now mapped to Ruff rule categories (not actual tools) -- Old tool-specific options (`g:pymode_lint_options_*`) are mapped to Ruff configuration -- New Ruff-specific options available: - - `g:pymode_ruff_enabled` - Enable/disable Ruff linting - - `g:pymode_ruff_format_enabled` - Enable/disable Ruff formatting - - `g:pymode_ruff_select` - Select specific Ruff rules - - `g:pymode_ruff_ignore` - Ignore specific Ruff rules - - `g:pymode_ruff_config_file` - Specify Ruff config file path - -#### Behavior Changes - -- **Formatting:** `:PymodeLintAuto` now uses Ruff format instead of autopep8 (faster, PEP 8 compliant) -- **Linting:** Ruff may report different errors than pylint/pyflakes (usually fewer false positives) -- **Performance:** Significantly faster linting (10-100x improvement expected) - -#### Submodule Changes - -**Removed submodules:** -- `submodules/pyflakes` -- `submodules/pycodestyle` -- `submodules/mccabe` -- `submodules/pylint` -- `submodules/pydocstyle` -- `submodules/pylama` -- `submodules/autopep8` -- `submodules/snowball_py` (was only used by pydocstyle) -- `submodules/appdirs` (not used in pymode code) -- `submodules/astroid` (was only needed for pylint) -- `submodules/toml` (not used; Ruff handles its own TOML parsing) - -**Remaining submodules (3 total, down from 13):** -- `submodules/rope` - Refactoring and code intelligence (essential) -- `submodules/tomli` - TOML parsing (required by pytoolconfig) -- `submodules/pytoolconfig` - Tool configuration (required by rope) - -**Repository cleanup:** -- Removed git index entries for all removed submodules -- Cleaned up `.git/modules` references (freed ~90MB+ of repository space) -- Physical directories removed from working tree - -#### Migration Resources - -- **Migration Guide:** See `doc/MIGRATION_GUIDE.md` for step-by-step instructions -- **Configuration Mapping:** See `doc/RUFF_CONFIGURATION_MAPPING.md` for detailed rule mappings -- **Migration Script:** Use `scripts/migrate_to_ruff.py` to convert your vimrc configuration -- **Validation Script:** Use `scripts/validate_ruff_migration.sh` to verify your setup - -#### Rollback Instructions - -If you need to rollback to the old system: -1. Checkout previous version: `git checkout v0.14.0` -2. Install old dependencies: `pip install pylint pyflakes pycodestyle mccabe pydocstyle autopep8` -3. Restore old configuration in your `.vimrc` - -**Note:** The old tools are no longer maintained as submodules. You'll need to install them separately if rolling back. - -### Improvements - -- **Performance:** Significantly faster linting and formatting with Ruff -- **Maintenance:** Reduced from 13 submodules to 3, simplifying dependency management -- **Modern tooling:** Using Ruff, a actively maintained, modern Python linter -- **Unified configuration:** Single tool configuration instead of multiple tool configs -- **Better error messages:** Ruff provides clearer, more actionable error messages - -### Documentation - -- Added comprehensive migration guide (`doc/MIGRATION_GUIDE.md`) -- Added Ruff configuration mapping documentation (`doc/RUFF_CONFIGURATION_MAPPING.md`) -- Updated `doc/pymode.txt` with Ruff configuration options -- Added migration tools (`scripts/migrate_to_ruff.py`, `scripts/validate_ruff_migration.sh`) - -### Testing - -- Added comprehensive Ruff integration tests (`tests/vader/ruff_integration.vader`) -- All existing tests continue to pass -- Verified compatibility with Python 3.10-3.13 -- Verified Docker environment compatibility -- **Multi-platform CI testing:** Added support for testing on Linux, macOS, and Windows - - Windows PowerShell test script (`scripts/cicd/run_vader_tests_windows.ps1`) - - Updated GitHub Actions workflow for cross-platform testing - - Tests run on all platforms with Python 3.10, 3.11, 3.12, and 3.13 - - Platform-specific test result aggregation in PR summaries - - **Platform-specific fixes:** - - macOS: Fixed `mapfile` compatibility (bash 3.x/zsh), empty array handling, sed errors - - Windows: Fixed path resolution across drive letters, `/tmp/` path redirection to `$TEMP` - - Added robust error handling and timeout support across all platforms - - Improved Vim detection and PATH configuration for Windows - -## 2023-07-02 0.14.0 - -- Update submodules - - Fix Errors related to these updates -- Improve tests outputs -- Fix Global and Module MoveRefactoring (#1141) Thanks to @lieryan -- Text object/operator/motion mapping to select logical line (#1145). Thanks to - @lieryan -- Remove dead keywords and builtins; add match, case (#1149). Thanks to - @NeilGirdhar -- Add syntax highlight for walrus (#1147) Thanks to @fpob -- Add configurable prefix for rope commands (#1137) TThanks to @NathanTP -- Add option g:pymode_indent_hanging_width for different hanging indentation - width (#1138). Thanks to @wookayin - -## 2020-10-08 0.13.0 - -- Add toml submodule - -## 2020-10-08 0.12.0 - -- Improve breakpoint feature -- Improve debugging script -- Update submodules -- Improve tests - -## 2020-05-28 0.11.0 - -- Move changelog rst syntax to markdown -- `pymode_rope`: check disables -- BREAKING CHANGE: Remove supoort for python 2. From 0.11.0 on we will focus on - supporting python 3+ (probably 3.5+). -- Inspect why files starting with the following code do not get loaded: - - ```python - def main(): - pass - - if __name__ == '__main__': - main() - ``` - -- added github actions test suit and remove travis -- improved submodules cloning (shallow) -- Removes `six` submodule -- Fix motion mapping -- Fix breakpoint feature - -## 2019-05-11 0.10.0 - -After many changes, including moving most of our dependencies from copied -source code to submodules, and lot's of problems maintaining Python 2 and -Python 3 support, this (0.10.x) is the last version of python-mode that will -support Python 2. Some patches may be done in order to fix issues related to -Python 2 or some backward compatible changes that can be applied. - -## 2017-07-xxx 0.9.5 - -- pylama: migrated to submodule - -## 2017-07-11 0.9.4 - -- pylama: fixed erratic behavior of skip option causing unintended - skipping of lint checkers - -- PEP257 requires `snowbalstemmer`: added as submodule - -- Fixed handling of `g:pymode_lint_ignore` and `g:pymode_lint_select`: from - strings to list - -- Migrated modules from pymode/libs to - [submodules/](https://github.com/fmv1992/python-mode/tree/develop/submodules) - - - Rationale: no need to single handedly update each module; - removes burden from developers - -- Improved folding accuracy - - - Improved nested definitions folding - - Improved block delimiting - -## (changelog poorly maintained) 0.8.2 - -- Pylama updated to version 5.0.5 -- Rope libs updated -- Add wdb to debugger list in breakpoint cmd -- Add `pymode_options_max_line_length` option -- Add ability to set related checker options `:help pymode-lint-options` - Options added: `pymode_lint_options_pep8`, `pymode_lint_options_pep257`, - `pymode_lint_options_mccabe`, `pymode_lint_options_pyflakes`, - `pymode_lint_options_pylint` -- Highlight comments inside class/function arg lists -- Don't fold single line def -- Don't skip a line when the first docstring contains text -- Add Python documentation vertical display option -- Rope: correct refactoring function calls - -## 2014-06-11 0.8.1 - -- Pylama updated to version 3.3.2 - -- Get fold's expression symbol from &fillchars; - -- Fixed error when setting `g:pymode_breakpoint_cmd` (expobrain); - -- Fixed code running; - -- Ability to override rope project root and .ropeproject folder - -- Added path argument to PymodeRopeNewProject which skips prompt - -- Disable `pymode_rope_lookup_project` by default - -- Options added: - - `pymode_rope_project_root`, `pymode_rope_ropefolder` - -## 2013-12-04 0.7.8b - -- Update indentation support; - -- Python3 support; - -- Removed pymode modeline support; - -- Disabled async code checking support; - -- Options changes: - - `pymode_doc_key` -> `pymode_doc_bind` - - `pymode_run_key` -> `pymode_run_bind` - - `pymode_breakpoint_key` -> `pymode_breakpoint_bind` - - `pymode_breakpoint_template` -> `pymode_breakpoint_cmd` - - `pymode_lint_write` -> `pymode_lint_on_write` - - `pymode_lint_onfly` -> `pymode_lint_on_fly` - - `pymode_lint_checker` -> `pymode_lint_checkers` - - `pymode_lint_minheight` -> `pymode_quickfix_minheight` - - `pymode_lint_maxheight` -> `pymode_quickfix_maxheight` - - `pymode_rope_autocomplete_map` -> `pymode_rope_completion_bind` - - `pymode_rope_enable_autoimport` -> `pymode_rope_autoimport` - -- Options removed: - - - `pymode_lint_hold`, `pymode_lint_config`, `pymode_lint_jump`, - `pymode_lint_signs_always_visible`, `pymode_rope_extended_complete`, - `pymode_rope_auto_project`, `pymode_rope_autoimport_generate`, - `pymode_rope_autoimport_underlines`, `pymode_rope_codeassist_maxfixes`, - `pymode_rope_sorted_completions`, `pymode_rope_extended_complete`, - `pymode_rope_confirm_saving`, `pymode_rope_global_prefix`, - `pymode_rope_local_prefix`, `pymode_rope_vim_completion`, - `pymode_rope_guess_project`, `pymode_rope_goto_def_newwin`, - `pymode_rope_always_show_complete_menu` - -- Options added: - - - `pymode_rope_regenerate_on_write`, `pymode_rope_completion`, - `pymode_rope_complete_on_dot`, `pymode_lint_sort`, - `pymode_rope_lookup_project`, `pymode_lint_unmodified` - -- Commands added: - - - `PymodeVirtualenv` - -- Commands changed: - - - `PyDoc` -> `PymodeDoc` - - `Pyrun` -> `PymodeRun` - - `PyLintToggle` -> `PymodeLintToggle` - - `PyLint` -> `PymodeLint` - - `PyLintAuto` -> `PymodeLintAuto` - - `RopeOpenProject` -> `PymodeRopeNewProject` - - `RopeUndo` -> `PymodeRopeUndo` - - `RopeRedo` -> `PymodeRopeRedo` - - `RopeRenameCurrentModule` -> `PymodeRopeRenameModule` - - `RopeModuleToPackage` -> `PymodeRopeModuleToPackage` - - `RopeGenerateAutoimportCache` -> `PymodeRopeRegenerate` - - `RopeOrgamizeImports` -> `PymodeRopeAutoImport` - -- Commands removed: - - `PyLintCheckerToggle`, `RopeCloseProject`, `RopeProjectConfig`, - `RopeRename`, `RopeCreate<...>`, `RopeWriteProject`, `RopeRename`, - `RopeExtractVariable`, `RopeExtractMethod`, `RopeInline`, `RopeMove`, - `RopeRestructure`, `RopeUseFunction`, `RopeIntroduceFactory`, - `RopeChangeSignature`, `RopeMoveCurrentModule`, `RopeGenerate<...>`, - `RopeAnalizeModule`, `RopeAutoImport` - -## 2013-10-29 0.6.19 - -- Added `g:pymode_rope_autocomplete_map` option; -- Removed `g:pymode_rope_map_space` option; -- Added PEP257 checker; -- Support 'pudb' in breakpoints; -- Pyrun can now operate on a range of lines, and does not need to save - (c) lawrenceakka -- Update pylama to version 1.5.0 -- Add a set of `g:pymode_lint_*_symbol` options (c) kdeldycke; -- Support virtualenv for python3 (c) mlmoses; - -## 2013-05-15 0.6.18 - -- Fixed autopep8 (PyLintAuto) command; -- Fix error on non-ascii characters in docstrings; -- Update python syntax; - -## 2013-05-03 0.6.17 - -- Update Pylint to version 0.28.0; -- Update pyflakes to version 0.7.3; -- Fixed lint\_ignore options bug; -- Fixed encoding problems when code running; - -## 2013-04-26 0.6.16 - -- Improvement folding (thanks @alvinfrancis); - -## 2013-04-01 0.6.15 - -- Bugfix release - -## 2013-03-16 0.6.14 - -- Update PEP8 to version 1.4.5; -- Update Pylint to version 0.27.0; -- Update pyflakes to version 0.6.1; -- Update autopep8 to version 0.8.7; -- Fix breakpoint definition; -- Update python syntax; -- Fixed run-time error when output non-ascii in multibyte locale; -- Move initialization into ftplugin as it is python specific; -- Pyrex (Cython) files support; -- Support raw\_input in run python code; - -## 2012-09-07 0.6.10 - -- Dont raise an exception when Logger has no message handler (c) nixon -- Improve performance of white space removal (c) Dave Smith -- Improve ropemode support (c) s0undt3ch -- Add `g:pymode_updatetime` option -- Update autopep8 to version 0.8.1 - -## 2012-09-07 0.6.9 - -- Update autopep8 -- Improve `pymode#troubleshooting#Test()` - -## 2012-09-06 0.6.8 - -- Add PEP8 indentation `:help pymode_indent` - -## 2012-08-15 0.6.7 - -- Fix documentation. Thanks (c) bgrant; -- Fix pymode "async queue" support. - -## 2012-08-02 0.6.6 - -- Updated Pep8 to version 1.3.3 -- Updated Pylint to version 0.25.2 -- Fixed virtualenv support for windows users -- Added pymode modeline `:help PythonModeModeline` -- Added diagnostic tool `:call pymode#troubleshooting#Test()` -- Added PyLintAuto command `:help PyLintAuto` -- Code checking is async operation now -- More, more fast the pymode folding -- Repaired execution of python code - -## 2012-05-24 0.6.4 - -- Add `pymode_paths` option -- Rope updated to version 0.9.4 - -## 2012-04-18 0.6.3 - -- Fix pydocs integration - -## 2012-04-10 0.6.2 - -- Fix `pymode_run` for "unnamed" clipboard -- Add `pymode_lint_mccabe_complexity` option -- Update Pep8 to version 1.0.1 -- Warning! Change `pymode_rope_goto_def_newwin` option for open "goto - definition" in new window, set it to 'new' or 'vnew' for horizontally or - vertically split If you use default behaviour (in the same buffer), not - changes needed. - -## 2012-03-13 0.6.0 - -- Add `pymode_lint_hold` option -- Improve pymode loading speed -- Add pep8, mccabe lint checkers -- Now `g:pymode_lint_checker` can have many values Ex. "pep8,pyflakes,mccabe" -- Add `pymode_lint_ignore` and `pymode_lint_select` options -- Fix rope keys -- Fix python motion in visual mode -- Add folding `pymode_folding` -- Warning: `pymode_lint_checker` now set to 'pyflakes,pep8,mccabe' by default - -## 2012-02-12 0.5.8 - -- Fix pylint for Windows users -- Python documentation search running from Vim (delete `g:pydoc` option) -- Python code execution running from Vim (delete `g:python` option) - -## 2012-02-11 0.5.7 - -- Fix `g:pymode_lint_message` mode error -- Fix breakpoints -- Fix python paths and virtualenv detection - -## 2012-02-06 0.5.6 - -- Fix `g:pymode_syntax` option -- Show error message in bottom part of screen see `g:pymode_lint_message` -- Fix pylint for windows users -- Fix breakpoint command (Use pdb when idpb not installed) - -## 2012-01-17 0.5.5 - -- Add a sign for info messages from pylint. (c) Fredrik Henrysson -- Change motion keys: vic - viC, dam - daM and etc -- Add `g:pymode_lint_onfly` option - -## 2012-01-09 0.5.3 - -- Prevent the configuration from breaking python-mode (c) Dirk Wallenstein - -## 2012-01-08 0.5.2 - -- Fix ropeomnicompletion -- Add preview documentation - -## 2012-01-06 0.5.1 - -- Happy new year! -- Objects and motion fixes - -## 2011-11-30 0.5.0 - -- Add python objects and motions (beta) `:h pymode_motion` - -## 2011-11-27 0.4.8 - -- Add PyLintWindowToggle command -- Fix some bugs - -## 2011-11-23 0.4.6 - -- Enable all syntax highlighting For old settings set in your vimrc: - - ``` - let g:pymode_syntax_builtin_objs = 0 - let g:pymode_syntax_builtin_funcs = 0 - ``` - -- Change namespace of syntax variables See README - -## 2011-11-18 0.4.5 - -- Add `g:pymode_syntax` option -- Highlight 'self' keyword - -## 2011-11-16 0.4.4 - -- Minor fixes - -## 2011-11-11 0.4.3 - -- Fix pyflakes - -## 2011-11-09 0.4.2 - -- Add FAQ -- Some refactoring and fixes - -## 2011-11-08 0.4.0 - -- Add alternative code checker "pyflakes" See `:h pymode_lint_checker` -- Update install docs - -## 2011-10-30 0.3.3 - -- Fix RopeShowDoc - -## 2011-10-28 0.3.2 - -- Add `g:pymode_options_*` stuff, for ability to disable default pymode options - for python buffers - -## 2011-10-27 0.3.1 - -- Add `g:pymode_rope_always_show_complete_menu` option -- Some pylint fixes - -## 2011-10-25 0.3.0 - -- Add `g:pymode_lint_minheight` and `g:pymode_lint_maxheight` options -- Fix PyLintToggle -- Fix Rope and PyLint libs loading - -## 2011-10-21 0.2.12 - -- Auto open cwindow with results on rope find operations - -## 2011-10-20 0.2.11 - -- Add `pymode_lint_jump` option - -## 2011-10-19 0.2.10 - -- Minor fixes (virtualenv loading, buffer commands) - -## 2011-10-18 0.2.6 - -- Add `` shortcut for macvim users. -- Add VIRTUALENV support - -## 2011-10-17 0.2.4 - -- Add current work path to sys.path -- Add `g:pymode` option (disable/enable pylint and rope) -- Fix pylint copyright -- Hotfix rope autocomplete - -## 2011-10-15 0.2.1 - -- Change rope variables (`ropevim_` -> `pymode_rope_`) -- Add `pymode_rope_auto_project` option (default: 1) -- Update and fix docs -- `pymode_rope_extended_complete` set by default -- Auto generate rope project and cache -- `r a` for RopeAutoImport - -## 2011-10-12 0.1.4 - -- Add default pylint configuration - -## 2011-10-12 0.1.3 - -- Fix pylint and update docs - -## 2011-10-11 0.1.2 - -- First public release diff --git a/COPYING b/COPYING deleted file mode 100644 index 65c5ca88..00000000 --- a/COPYING +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ed9044fb..00000000 --- a/Dockerfile +++ /dev/null @@ -1,68 +0,0 @@ -ARG PYTHON_VERSION -# Use official Python slim image instead of non-existent base -# Note: For Python 3.13, use 3.13.0 if just "3.13" doesn't work -FROM python:${PYTHON_VERSION}-slim - -ENV PYTHON_VERSION=${PYTHON_VERSION} -ENV PYTHONUNBUFFERED=1 -ENV PYMODE_DIR="/workspace/python-mode" - -# Install system dependencies required for testing -RUN apt-get update && apt-get install -y \ - vim-nox \ - git \ - curl \ - bash \ - && rm -rf /var/lib/apt/lists/* - -# Install Python coverage tool for code coverage collection -RUN pip install --no-cache-dir coverage - -# Install Ruff for linting and formatting (replaces pyflakes, pycodestyle, mccabe, pylint, pydocstyle, pylama, autopep8) -RUN pip install --no-cache-dir ruff - -# Set up working directory -WORKDIR /workspace - -# Copy the python-mode plugin -COPY . /workspace/python-mode - -# Set up python-mode in the test environment -RUN mkdir -p /root/.vim/pack/foo/start/ && \ - ln -s ${PYMODE_DIR} /root/.vim/pack/foo/start/python-mode && \ - cp ${PYMODE_DIR}/tests/utils/pymoderc /root/.pymoderc && \ - cp ${PYMODE_DIR}/tests/utils/vimrc /root/.vimrc && \ - touch /root/.vimrc.before /root/.vimrc.after - -# Install Vader.vim for Vader test framework -RUN mkdir -p /root/.vim/pack/vader/start && \ - git clone --depth 1 https://github.com/junegunn/vader.vim.git /root/.vim/pack/vader/start/vader.vim || \ - (cd /root/.vim/pack/vader/start && git clone --depth 1 https://github.com/junegunn/vader.vim.git vader.vim) - -# Initialize git submodules -WORKDIR /workspace/python-mode - -# Create a simplified script to run tests (no pyenv needed with official Python image) -RUN echo '#!/bin/bash\n\ -cd /workspace/python-mode\n\ -echo "Using Python: $(python3 --version)"\n\ -echo "Using Vim: $(vim --version | head -1)"\n\ -bash ./tests/test.sh\n\ -EXIT_CODE=$?\n\ -# Cleanup files that might be created during tests\n\ -# Remove Vim swap files\n\ -find . -type f -name "*.swp" -o -name "*.swo" -o -name ".*.swp" -o -name ".*.swo" 2>/dev/null | xargs rm -f 2>/dev/null || true\n\ -# Remove temporary test scripts\n\ -rm -f .tmp_run_test_*.sh 2>/dev/null || true\n\ -# Remove Python cache files and directories\n\ -find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true\n\ -find . -type f -name "*.pyc" -o -name "*.pyo" 2>/dev/null | xargs rm -f 2>/dev/null || true\n\ -# Remove test artifacts\n\ -rm -rf test-logs results 2>/dev/null || true\n\ -rm -f test-results.json coverage.xml .coverage .coverage.* 2>/dev/null || true\n\ -exit $EXIT_CODE\n\ -' > /usr/local/bin/run-tests && \ - chmod +x /usr/local/bin/run-tests - -# Default command -CMD ["/usr/local/bin/run-tests"] diff --git a/README-Docker.md b/README-Docker.md deleted file mode 100644 index 6dc865b1..00000000 --- a/README-Docker.md +++ /dev/null @@ -1,159 +0,0 @@ -# Docker Test Environment for python-mode - -This directory contains Docker configuration to run python-mode tests locally. **Note:** Docker is only used for local development. CI tests run directly in GitHub Actions without Docker. - -## Prerequisites - -- Docker -- Docker Compose - -## Quick Start - -### Run Tests - -To run all tests in Docker (default version 3.13.0): - -```bash -# Using the convenience script -./scripts/user/run-tests-docker.sh - -# Or manually with docker-compose -docker compose run --rm python-mode-tests -``` - -### Interactive Development - -To start an interactive shell for development: - -```bash -docker compose run --rm python-mode-dev -``` - -## What's Included - -The Docker environment includes: - -- **Ubuntu 24.04** base image -- **pyenv** for Python version management -- **Multiple Python versions**: 3.10.13, 3.11.9, 3.12.4, 3.13.0 -- **Python 3.13.0** as default -- **Vim built from source** with Python support for each Python version -- All required system dependencies: - - GUI libraries (GTK, X11, etc.) - - Lua 5.2 - - Perl - - Build tools - - Python build dependencies -- **python-mode plugin** properly installed and configured -- **Git submodules** initialized -- **Test environment** matching the CI setup - -## Environment Details - -The container replicates the GitHub Actions environment: - -- Vim is built with `--enable-python3interp=yes` for each Python version -- pyenv is installed at `/opt/pyenv` -- Python versions are managed by pyenv: - - 3.10.13 - - 3.11.9 - - 3.12.4 - - 3.13.0 (default) -- Each Python version has its own Vim binary: `vim-3.10.13`, `vim-3.11.9`, etc. -- Python config directory is automatically detected using `python-config --configdir` -- python-mode is installed in `/root/.vim/pack/foo/start/python-mode` -- Test configuration files are copied to the appropriate locations -- All required environment variables are set - -## Test Execution - -### Local Testing (Docker) - -Tests are run using the Vader test framework via Docker Compose: - -```bash -# Using docker compose directly -docker compose run --rm python-mode-tests - -# Or using the convenience script -./scripts/user/run-tests-docker.sh - -# Or using the Vader test runner script -./scripts/user/run_tests.sh -``` - -### CI Testing (Direct Execution) - -In GitHub Actions CI, tests run directly without Docker using `scripts/cicd/run_vader_tests_direct.sh`. This approach: -- Runs 3-5x faster (no Docker build/pull overhead) -- Provides simpler debugging (direct vim output) -- Uses the same Vader test suite for consistency - -**Vader Test Suites:** -- **autopep8.vader** - Tests automatic code formatting (8/8 tests passing) -- **commands.vader** - Tests Vim commands and autocommands (7/7 tests passing) -- **folding.vader** - Tests code folding functionality -- **lint.vader** - Tests linting functionality -- **motion.vader** - Tests motion operators -- **rope.vader** - Tests Rope refactoring features -- **simple.vader** - Basic functionality tests -- **textobjects.vader** - Tests text object operations - -All legacy bash tests have been migrated to Vader tests. - -## Testing with Different Python Versions - -You can test python-mode with different Python versions: - -```bash -# Test with Python 3.11.9 -./scripts/user/run-tests-docker.sh 3.11 - -# Test with Python 3.12.4 -./scripts/user/run-tests-docker.sh 3.12 - -# Test with Python 3.13.0 -./scripts/user/run-tests-docker.sh 3.13 -``` - -Available Python versions: 3.10.13, 3.11.9, 3.12.4, 3.13.0 - -Note: Use the major.minor format (e.g., 3.11) when specifying versions. - -## Troubleshooting - -### Python Config Directory Issues - -The Dockerfile uses `python-config --configdir` to automatically detect the correct Python config directory. If you encounter issues: - -1. Check that pyenv is properly initialized -2. Verify that the requested Python version is available -3. Ensure all environment variables are set correctly - -### Build Failures - -If the Docker build fails: - -1. Check that all required packages are available in Ubuntu 24.04 -2. Verify that pyenv can download and install Python versions -3. Ensure the Vim source code is accessible -4. Check that pyenv is properly initialized in the shell - -### Test Failures - -If tests fail in Docker but pass locally: - -1. Check that the Vim build includes Python support for the correct version -2. Verify that all git submodules are properly initialized -3. Ensure the test environment variables are correctly set -4. Confirm that the correct Python version is active -5. Verify that pyenv is properly initialized - -## Adding More Python Versions - -To add support for additional Python versions: - -1. Add the new version to the PYTHON_VERSION arg in the Dockerfile -2. Update the test scripts to include the new version -3. Test that the new version works with the python-mode plugin -4. Update this documentation with the new version information diff --git a/after/ftplugin/pyrex.vim b/after/ftplugin/pyrex.vim deleted file mode 100644 index 61d43637..00000000 --- a/after/ftplugin/pyrex.vim +++ /dev/null @@ -1 +0,0 @@ -runtime after/ftplugin/python.vim diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim deleted file mode 100644 index 6b5a8839..00000000 --- a/after/ftplugin/python.vim +++ /dev/null @@ -1,60 +0,0 @@ -if !g:pymode - finish -endif - -if g:pymode_motion - - if !&magic - if g:pymode_warning - call pymode#error("Pymode motion requires `&magic` option. Enable them or disable g:pymode_motion") - endif - finish - endif - - nnoremap ]] :call pymode#motion#move('^(class%(asyncs+)=def)s', '') - nnoremap [[ :call pymode#motion#move('^(class%(asyncs+)=def)s', 'b') - nnoremap ]C :call pymode#motion#move('^(class%(asyncs+)=def)s', '') - nnoremap [C :call pymode#motion#move('^(class%(asyncs+)=def)s', 'b') - nnoremap ]M :call pymode#motion#move('^s*(asyncs+)=defs', '') - nnoremap [M :call pymode#motion#move('^s*(asyncs+)=defs', 'b') - - onoremap ]] :call pymode#motion#move('^(class%(asyncs+)=def)s', '') - onoremap [[ :call pymode#motion#move('^(class%(asyncs+)=def)s', 'b') - onoremap ]C :call pymode#motion#move('^(class%(asyncs+)=def)s', '') - onoremap [C :call pymode#motion#move('^(class%(asyncs+)=def)s', 'b') - onoremap ]M :call pymode#motion#move('^s*(asyncs+)=defs', '') - onoremap [M :call pymode#motion#move('^s*(asyncs+)=defs', 'b') - - vnoremap ]] :call pymode#motion#vmove('^(class%(asyncs+)=def)s', '') - vnoremap [[ :call pymode#motion#vmove('^(class%(asyncs+)=def)s', 'b') - vnoremap ]M :call pymode#motion#vmove('^s*(asyncs+)=defs', '') - vnoremap [M :call pymode#motion#vmove('^s*(asyncs+)=defs', 'b') - - onoremap C :call pymode#motion#select_c('^s*classs', 0) - onoremap aC :call pymode#motion#select_c('^s*classs', 0) - onoremap iC :call pymode#motion#select_c('^s*classs', 1) - vnoremap aC :call pymode#motion#select_c('^s*classs', 0) - vnoremap iC :call pymode#motion#select_c('^s*classs', 1) - - onoremap M :call pymode#motion#select('^s*(asyncs+)=@', '^s*(asyncs+)=defs', 0) - onoremap aM :call pymode#motion#select('^s*(asyncs+)=@', '^s*(asyncs+)=defs', 0) - onoremap iM :call pymode#motion#select('^s*(asyncs+)=@', '^