Coder Social home page Coder Social logo

emacsmirror / traad Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abingham/emacs-traad

0.0 2.0 0.0 112 KB

Emacs interface to the traad refactoring server

Home Page: https://github.com/abingham/traad

License: MIT License

Emacs Lisp 100.00%

traad's Introduction

emacs-traad

An Emacs client for traad, a client-server approach to using the rope Python refactoring library.

With this client and the traad server, you can do Python refactorings from Emacs. This client includes support for installing traad for you, so you probably don't even need to think about installing the server separately.

Quickstart

You can install the Emacs client for traad via package.el:

M-x package-install<RET>traad

Then you can use traad-install-server to install the Python server into a default location::

M-x traad-install-server

The server is installed into a virtual environment using virtualenvwrapper.el. You can control this installation using traad-environment-name which specifies the name of the virtual environment. By default it's "traad", and there is often no need to change it. However, if you need to support multiple installation of traad, you might need to modify this variable.

For most users the default value should be fine. You really only need to manipulate these variables if you're installing traad for more than one version of Python.

For more information on installation, see the Installation page in the wiki.

For more information on using client, see the Usage page in the wiki.

Commands

Refactoring Commands

Command Description
traad-rename Rename the object at the current location.
traad-rename-module Rename the currently opened module.
traad-move Move the current object (DWIM).
traad-move-global Move the object at the current location to file `DEST'.
traad-move-module Move the current module to file `DEST'.
traad-extract-method Extract the currently selected region to a new method.
traad-extract-variable Extract the currently selected region to a new variable.
traad-add-argument Add a new argument at `INDEX' in the signature at point.
traad-remove-argument Remove the `INDEX'th argument from the signature at point.
traad-normalize-arguments Normalize the arguments for the method at point.
traad-introduce-parameter Introduce a parameter in a function.
traad-display-doc Display docstring for an object.
traad-popup-doc Display docstring for an object in a popup.
traad-display-calltip Display calltip for an object.
traad-popup-calltip Display calltip for an object in a popup.
traad-local-to-field Turn a local variable into a field variable.
traad-encapsulate-field Introduce getters and setters for a member and use them instead of direct references.
traad-use-function Tries to find places this function can be used and inserts a call to the function instead.
traad-inline Inline this object.
traad-thing-at Get the type of the Python thing at point.
traad-auto-import Automatically add the necessary import for the current symbol.
traad-organize-imports Organize the import statements in `filename' according to pep8.
traad-froms-to-imports Convert 'from' imports to normal imports in `filename'.
traad-handle-long-imports Transform long imports into 'from' imports in `filename'.
traad-expand-star-imports Expand * import statements in `filename'.
traad-relatives-to-absolutes Convert relative imports to absolute in `filename'.
traad-imports-super-smackdown Apply all the import reformatting commands Traad provides.

Other Commands

Command Description
traad-install-server Automatically install the Traad server
traad-display-history Display undo and redo history.
traad-kill-all Kill all traad servers and associated buffers.
traad-undo Undo the IDXth change from the history.
traad-undo-info Get info on the I'th undo history.
traad-redo Redo the IDXth change from the history.
traad-redo-info Get info on the I'th redo history.

traad's People

Contributors

abingham avatar jcaw avatar pythonnut avatar sagittarian avatar sambrightman 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.