Giter VIP home page Giter VIP logo

a.vim's People

Contributors

9diov avatar atton avatar baabelfish avatar bill-kolokithas avatar bmchrist avatar chin4ski avatar davafons avatar fjolnir avatar fomichev avatar graudeejs avatar gs avatar ichernev avatar mmontu avatar nacitar avatar petersohn avatar plambir avatar romank87 avatar sep102 avatar sprohaska avatar theevocater avatar tkalus avatar verbitan avatar yoyokko avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

a.vim's Issues

:A fails when previously-opened alternate not co-located and filename is suffix of another alternate

Using a.vim from commit f3cfbbf:

Steps to Reproduce

  • Create the following directory structure (files can be empty or contain placeholder content):

      bugtest/AlphaBeta.h
      bugtest/Beta.cpp
      bugtest/include/Beta.h
    
  • Edit all files:

      mvim bugtest/AlphaBeta.h bugtest/Beta.cpp bugtest/include/Beta.h
    
  • :n to advance to Beta.cpp.

  • :A should open Beta.h but instead opens a new file (buffer) Beta.h in the same directory as Beta.cpp.

  • If AlphaBeta.h were removed, or renamed to AlphaGamma.h, then :A works fine on Beta.cpp โ†’ Beta.h.

  • It seems that :A on Beta.cpp cannot decide between include/Beta.h and AlphaBeta.h and so it chooses neither.

    • In such a case, a filename match (regardless of directory path) should be selected over a string prefix match.

Improve readme

Since this is an improved version of a.vim, could you update the readme to note that?

Alternate to wrong file

I've noticed that sometimes the plugin opens the incorrect alternate file.
This behavior can be very annoying if it is perceived after a long time
editing the wrong file.

The problem can be reproduced with the following directory hierarchy:

Base folder/
| New folder Copy/
| | TeSt.h
| | TeSt.c
| New folder/
| | test.h
| | test.c

It also happens when "New folder" and "New folder Copy" are in completely
unrelated folders. It seems that the only condition needed is that two files
with whose filenames are equal in a case insensitive comparison are open.

To reproduce the fault:

  1. Open TeSt.c and split open test.c
  2. use :ls to check that there are only two buffers open
  3. execute :A with the focus on window displaying TeSt.c and notice that
    test.h is displayed instead of TeSt.h

The problem disappears if file TeSt.h is already loaded:

  1. <c-o> to return to TeSt.c
  2. :e TeSt.h
  3. <c-o> to return to TeSt.c
  4. execute :A and notice that now TeSt.h is displayed

Any ideas?

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.