Skip to content

(Neo)vim plugin that connects the buffer and the Python interpreter

License

Notifications You must be signed in to change notification settings

amacfie/vim-run-python3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

Defines two mappings:

  • <Plug>run_python3_echo: Evaluate selection (visual mode) or line (normal mode) with :python3 and echo the result (if any)
  • <Plug>run_python3_append: Evaluate selection (visual mode) or line (normal mode) with :python3 and put the result (if any) on the next line in the buffer

To use, define custom mappings e.g.

xmap <leader>m <Plug>run_python3_echo
nmap <leader>m <Plug>run_python3_echo
xmap <leader><cr> <Plug>run_python3_append
nmap <leader><cr> <Plug>run_python3_append

Multiline visual selections are supported.

State is preserved as in :python3 commands.

If you want certain modules to always be available, just put python3 import module_name etc. in your $MYVIMRC file.

Requirements

About

(Neo)vim plugin that connects the buffer and the Python interpreter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published