Giter Site home page Giter Site logo

lintingbin / erl-autocompletion Goto Github PK

View Code? Open in Web Editor NEW
21.0 2.0 6.0 12.09 MB

Erlang autocompletion

Home Page: https://packagecontrol.io/packages/Erl-AutoCompletion

Erlang 0.62% Python 99.38%
sublime-text autocompletion erlang goto-definition

erl-autocompletion's Introduction

Erl-AutoCompletion

This is an Erlang auto-completion and goto-definition plugin of the Sublime editor. It only supports Sublime Text 3. If you are using Sublime Text 2, please upgrade to Sublime Text 3.

Installation

  1. Open command pallet (default: ctrl+shift+p)
  2. Type package control install and select command Package Control: Install Package
  3. Type Erl-AutoCompletion and select Erl-AutoCompletion

Additional info about to use Sublime Package Control you can find here: http://wbond.net/sublime_packages/package_control/usage.

with Git

cd ~/.config/sublime-text/Packages/ (open by: Preferences -> Browse Packages)
git clone https://github.com/lintingbin2009/Erl-AutoCompletion
restart sublime-text

Demonstration

Goto definition

The right mouse button can bring up the goto_definition(Erlang) menu. It can find definition of function, record and macro. You can set mousemap by Preferences -> Package Settings -> Erl-AutoCompletion -> Mousemap - default.

Requirement

Need to install Erlang. If Erlang is not installed, Erl-AutoCompletion will not be able to create an auto completion and goto definition index based on the version of Erlang you have installed.

Settings

Settings file open by: Preferences -> Package Settings -> Erl-AutoCompletion

escript settings

If you have set the escript environment variable, you do not need to set the escript value in the configuration file, comment it out.

Autocomplete on ":"

If you want auto-completion on ":", you can define a trigger in the Sublime User or Erlang preferences:

# User/Preferences.sublime-settings or User/Erlang.sublime-settings
{
    // ...
    "auto_complete_triggers": [{"selector": "source.erlang", "characters": ":"}],
}

Discussing

erl-autocompletion's People

Stargazers

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

Watchers

 avatar  avatar

erl-autocompletion's Issues

Add feature to go back to the previous function after using goto_definition

Hi @lintingbin2009,

It will be good if you could add a button to go back to the previous function after using goto_definition.

In default of Sublime we had a feature to do it ({ "keys": ["alt+keypad_minus"], "command": "jump_back" }), but it is not so good because when we click somewhere in our source code then it will come back to that position (not go back to the previous function).

Thanks for your plugin, it is really good for me when coding with Erlang.
/Bien

open multiple sublime text project plugin crushed

Exception in thread Thread-1601:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Erl-AutoCompletion\util\data_cache.py", line 258, in run
this.build_data()
File "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Erl-AutoCompletion\util\data_cache.py", line 195, in build_data
if self.get_folder_id(folder) != None:
File "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Erl-AutoCompletion\util\data_cache.py", line 227, in get_folder_id
for (fid, pid) in self.db_cur.fetchall():
sqlite3.ProgrammingError: Recursive use of cursors not allowed.

add "goto_definition" to a defined value (?VALUE) which come from another (.hrl) file

hi @lintingbin2009, really sorry because I took too much time from you for some issues and improvements :))
I just see one more thing which maybe makes your project better. :))

Assume that, in our module, we imported some .hrl file, for example: include_lib("file_1.hrl") or include("file_2.hrl"), so we can use the defined value that already defined in two those .hrl files in our module. So my idea here is should we add "goto_definition" to goto the defined value (?VALUE) which come from other .hrl files

IDE doesn't open new file when pressing Crtl+Shift+G

Hi again @lintingbin2009 ,

I see one issue when i press Crtl+Shift+G, that is the content of function is still displayed but it doesn't open that new file (that file is containing the function), it just display in current parent file. So I think it will be better if when we press Crtl+Shift+G, then it will open the new file in IDE (the same as the case we move mouse to a function a click into "goto_definition(erlang)") :p

Thanks.

Subl hangs when removing directory from project and Erl-AutoCompletion enabled

Hi,
with Erl-AutoCompletion enabled, if I try to remove a directory from the project using the sidebar menu SublimeText hangs: I have to kill the subl process and start it again, and the directory is still there (side note: from the top menu there is only the Project->Remove all folders from project, which works). If I disable Erl-AutoCompletion, removing a single folder from the project works.
If you need logs or anything else let me know, thank you.

cannot use the keymap for goto definition

Hi nice author,

It is a very nice project, it is very helpful for me in the work :))
ButI get one issue about how to use the keymap for goto a definition in Sublime, I see that you already defined a keymao "ctrl+shift+g", but i cannot use it anymore, so please give me the solution for this case. :p

Thank you so much,
/Bien

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.