Skip to main content

Spyder Vim plugin

Project description

Spyder Okvim

Window tests codecov

Spyder Plugin for executing Vim commands inside the code editor.

Don't make an issue to spyder github after install okvim.

If you have a problem after installing this, please retry after uninstalling okvim.

Known Issues

  • Okvim is not working when the spyder editor is undocked from mainwindow.

Overview

This plugin supports movements.

  • hjkl, ^u, %, iw, i(, /, n, N, ;, ...

This plugin supports a combination of operators and motions

  • diw, di(, c%, c/foo, cn, ygg, d2w, 2d2W ...

This plugin supports spyder command.

  • run selection, formatting, toggle break, toggle comment, ...

This plugin support macro(experimental).

Movements Combination Spyder command
movement gif combination gif spyder cmd gif

Installation

You can install this plugin either directly from PyPI or locally.

Install from PyPI

pip install spyder-okvim

Install from Locally

If you want to install the package from your local source:

pip install -U .

Note

If spyder-vim is installed, you need to uninstall it first to avoid conflicts:

pip uninstall spyder-vim

Modes

The following modes are supported:

  • Normal
  • Visual
  • Visual Line

Actions

The following actions are supported:

  • x, s, r
  • C, D, S
  • dd, cc, yy
  • <<, >>
  • p, P
  • d{motion}, c{motion}
  • <{motion}, >{motion}
  • gu{motion}, gU{motion} g~{motion}, ~
  • u, ^R
  • J
  • .

Motions

The following motions are supported:

  • hjkl
  • 0, ^, $
  • w, W, b, e
  • iwW, i()[]{}bB, i'"
  • G, g
  • ^D, ^U, ^F, ^B
  • HLM
  • %
  • f, F, t, T, ;, ,
  • /, N, n
  • Enter, Space, Backspace
  • easymotion

Vim keys

  • ^A : Add [count] to number
  • ^X : Subtract [count] to number
  • K : Inspect current object
  • gd : Go to definition.
  • gt, gT : Cycle to next/previous file.
  • zz, zt, tb : Cursor line to some locations of screen.
  • ZZ : Save and close current file.
  • q, @: macro

Special keys

  • <leader>f : autoformatting
  • <leader>b : Toggle break point
  • <leader>r : run selected text or current line in console.
  • <leader>enter : run cell and advance
  • <leader>p : spyder switcher
  • <leader>s : spyder symbol switcher
  • [d : goto previous warning/error
  • ]d : goto next warning/error
  • gc{motion} : toggle comment (support visual mode)
    • gcc : toggle comment of current line

Vim Surround

  • surroundings : '"()[]{}bB

The following action are supported:

  • ys{motion}{surroundings} in normal mode: add surroundings in pairs.
  • ds{surroundings} in normal mode: delete surroundings in pairs.
  • cs{surroundings}{surroundings} in normal mode: change surroundings in pairs.
  • S{surroundings} in visual mode: add surroundings in pairs.

Fuzzy path finder

The shortcut to invoke the fuzzy path finder is Ctrl+p. You can use ^p, ^n, ^f, ^b, ^u, ^d to navigate the path list.

fuzzy path finder

Config page

config page

Easymotion

easymotion

You can use EasyMotion commands as an argument for d, c, or any other command that takes motion as an argument.

Motion Command Description
<leader><leader> w Start of word forwards
<leader><leader> b Start of word backwards
<leader><leader> j Start of line forwards
<leader><leader> k Start of line backwards
<leader><leader> f <char> Find character forwards
<leader><leader> F <char> Find character backwards

Search 2ch(like vim-sneak)

Jump to any location specified by two characters.

It works with multiple lines, operators (including repeat .) motion-repeat (; and ,), visual mode.

This search is invoked with s by exactly two characters. This search is invoked with operators via z (because s is taken by vim surround)

After searching for two characters, if there are the characters in another group, a comment is displayed around the group. sneak

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spyder_okvim-0.9.1.tar.gz (67.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spyder_okvim-0.9.1-py3-none-any.whl (81.2 kB view details)

Uploaded Python 3

File details

Details for the file spyder_okvim-0.9.1.tar.gz.

File metadata

  • Download URL: spyder_okvim-0.9.1.tar.gz
  • Upload date:
  • Size: 67.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for spyder_okvim-0.9.1.tar.gz
Algorithm Hash digest
SHA256 0aee30495d5dbd0e2ed34826b90395678b9f7d2888fa2382f64bf66665d26158
MD5 52e0784e69b11c4f16b2603f93441d9c
BLAKE2b-256 74197ba6df0af1486352999cbaf4fd73a1c764dfe3eb57934effde28e527e913

See more details on using hashes here.

File details

Details for the file spyder_okvim-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: spyder_okvim-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 81.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for spyder_okvim-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b51b4a1521216908f036f87aae4ef8615f436aa2cec015d3e4db453b830f9fb3
MD5 d582a49e1da9aaafed99341a29b92ae4
BLAKE2b-256 a9fddd3bdade550e6293bc168b963711762f48d54d066380171f8e7fb5f98d90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page