nacitar / a.vim Goto Github PK
View Code? Open in Web Editor NEWThis project forked from vim-scripts/a.vim
Alternate Files quickly (.c --> .h etc)
Home Page: http://www.vim.org/scripts/script.php?script_id=31
This project forked from vim-scripts/a.vim
Alternate Files quickly (.c --> .h etc)
Home Page: http://www.vim.org/scripts/script.php?script_id=31
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.
Since this is an improved version of a.vim, could you update the readme to note that?
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:
:ls
to check that there are only two buffers open:A
with the focus on window displaying TeSt.c and notice thatThe problem disappears if file TeSt.h is already loaded:
<c-o>
to return to TeSt.c:e TeSt.h
<c-o>
to return to TeSt.c:A
and notice that now TeSt.h is displayedAny ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.