Skip to content

plugin for (g)vim to send python code (optional starting a GRASS-GIS session before) to an associated shell.

Notifications You must be signed in to change notification settings

sluedtke/python_grass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

PYTHON-GRASS PLUGIN FOR GVIM

This file-type plugin is inspired by the work of the [vim-r-plugin]((https://github.com/vim-scripts/Vim-R-plugin.git). To be totally honest, I just adapted the part Jakson Alves de Aquino ( thank you very much ) send me and included functions that create parameters required to start a GRASS GIS session - so it is 95% copy and paste. The plugin uses the screen-plugin as well and has been tested on my machine only (Ubuntu 12.04). It requires python and vim compiled with python support.

Key mappings

The plugin uses the key mappings from the [vim-r-plugin]((https://github.com/vim-scripts/Vim-R-plugin.git) because they are burned into my brain by now. Additional features will stick to their parents as well. The mappings are:

Starting the interpreter ([i]python) in normal mode

  • <F2> for python 2.*
  • <F3> for python 3.*

By default, python or python3 ist used and started inside the external window. This might be changed to ipython using:

python-2.*

let g:gpython2_interpreter = "ipython"

or python-3.*

let g:gpython3_interpreter = "ipython3"

Send current line under the cursor in normal mode

  • <LocalLeader>l

Send selection (as well as parts of a line) in visual mode

  • <LocalLeader>l
  • <LocalLeader>ss

Future stuff

The plugin should be integrated in vimcmdline because it does actually the same things (not that robust though) but with GVIM.

About

plugin for (g)vim to send python code (optional starting a GRASS-GIS session before) to an associated shell.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published