GithubHelp home page GithubHelp logo

jwir3 / atom-over-and-back Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 29.73 MB

A plugin for the Atom editor that enables IntelliJ-like back and forth navigation.

License: Mozilla Public License 2.0

JavaScript 99.36% CSS 0.64%

atom-over-and-back's People

Stargazers

 avatar

atom-over-and-back's Issues

Over and back doesn't work quite well with untitled files

Steps to Reproduce:

  1. Command+n to create a new file.
  2. Type something into the new file (or cut-and-paste so you have multiple lines)
  3. Navigate to another file.
  4. Command+[ to navigate back to the untitled file.

Expected Results:

  • ✅ Atom over and back navigates back to the untitled file you were previously working on.

Actual Results:

  • ❌ Atom over and back navigates to a new untitled file.

Add tests

We should add tests for the existing functionality in the package.

Make waypoints coalesce, rather than having to move > 5 lines

Right now, the following code:

    // We want to create a waypoint if this item represents a new file, or if
    // the distance between lines is > 5, but only if this wasn't triggered by
    // a navigation event.
    if (!self.currentWaypoint
        || self.currentWaypoint.fileName !== path
        || Math.abs(self.currentWaypoint.lineNumber - lineNo) > 5) {
      return true;
    }

ensures that waypoints aren't created unless they are > 5 lines away from the last waypoint. Instead of doing this, we should always create waypoints, but then coalesce based on the following algorithm:

   peek at the last waypoint
   if this newly created waypoint is adjacent to the last waypoint {
    pop the last waypoint
   }
   push the new waypoint

Move to coffeescript

If we migrate to Coffeescript, it might make things a little easier for us to understand how to use the Atom APIs when looking at their code (since it's in CS).

Refactor package specs

The package specs are a bit of a mess, with waitsForPromise() calls all over the place. It would be nice if we could refactor this so that some of these are not in this callback hell, and instead had a RxJava-like chain of things that could be completed before the test was done.

Add within-file history

We need to be able to navigate within a file. So, when a user moves more than, say X lines, it should create a new waypoint.

Add contributing information

We don't have any contributing information for new developers to get started. We should add this so that others can contribute to our source code.

over-and-back causes search to not run

Steps to Reproduce:

  1. Use CMD+H to search for something globally. Notice that it performs the search.
  2. Use over-and-back to navigate backwards.
  3. Use CMD+H to search for something else globally.

Expected Results:

  • The query is performed.

Actual Results:

  • The search page for the first query is restored, even if it's been closed.

over and back interrupts search

Steps to Reproduce:

  1. Open Atom with a project that has some search term, x, you know is in the project.
  2. Activate over-and-back.
  3. Open up a project-wide search, using CMD+SHIFT+F
  4. Search for your known search term, x.

Expected Results:

  • Search results are displayed.

Actual Results:

  • Search is always empty.

over-and-back does not respect column

Steps to Reproduce:

  1. Navigate to a file.
  2. Edit a word on some line not at column 0 of that line.
  3. Navigate to another file.
  4. Navigate backwards using atom-over-and-back.

Expected Results:

  • ✅ The original file (the edited one) should be reopened with the cursor position in the exact column and row it was left prior to navigating to another file location.

Actual Results:

  • ❌ The original file is reopened with the cursor position in the correct row, but not the correct column.

Note this is filed as an enhancement, because over and back has never done this.

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.