GithubHelp home page GithubHelp logo

vim-sage's Introduction

SYNOPSIS

Vim-sage is a vim plugin for support SageMath (former Sage) mathematics software system. The vim-sage supports syntax highlighting and indentation for SageMath files in Vim editor.

Installation

Use your preferred installation method for Vim plugins.

With vim-plug that would mean to add the following to your vimrc:

Plug 'petRUShka/vim-sage'

Vim plugins to extend SageMath support (together with vim-sage)

  • vimcmdline: send lines from Vim to interpreter (SageMath and vim-sage are supported);
  • vim-python-pep8-indent: a nicer Python indentation style for Vim;
  • python-syntax: extended Python syntax highlighting for Vim (much nicer than default highlight);
  • SimpylFold (together with FastFold): no-BS Python code folding for Vim (it just works with Python code);
  • vim-pythonsense: provides text objects and motions for Python classes, methods, functions, and doc strings;
  • jedi-vim: autocompletion, goto assignment/definition/stub, show documentation, renaming, usages and etc for Python. It works only with Python libraries and doesn't see Sage libraries or understand non-python Sage code. But it works well for built-in python instructions or libraries like numpy when editing sage code-file.

vim-sage sets sage.python filetype for sage-files, so above plugins for Python itself work smoothly with sage-files.

Tags and code browsing

Whereas it is not clear at the moment how to fully use tools like Language Server or Jedi with SageMath (see discussion and links here) it is possible to use good old tags with not as good but still usable code navigation (go to definition functionality).

  1. Install indexing tool Universal-ctags. Put following lines in ~/.ctags (for other other than Linux OS look at Option file help page to check the right place):
# to have ctags skip indexing import statements uncomment following line
# --python-kinds=-i
# SageMath
--langmap=Python:+.sage
  1. (Optionally) Install vim-plugin ludovicchabant/vim-gutentags for auto(re)generating tag files.

  2. Use vim built-in tag browsing and navigating functionality (:help tagsrch.txt for details).

vim-sage's People

Contributors

dhancodes avatar petrushka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.