Comments (5)
I just added a fix for your problem. The commit automatically closed the issue. If it still remains feel free to reopen.
from other.nvim.
Something strange is happening when i spell out the folders though, instead of jumping to the repository folder it creates a new file.
It goes from lib/uplisting/entities/account.rb
to /spec/uplisting/entities/account.rb
instead of lib/uplisting/rom/repositories/account.rb
when i select the "repository" context, not sure why it gets confused here. When i remove my test context mappings it goes correctly to the repositories/account.rb
file 🤔
My config:
require("other-nvim").setup({
rememberBuffers = false,
mappings = {
{
pattern = "/lib/(.*)/(.*).ex",
target = "/test/%1/%2_test.exs",
context = "test"
},
{
pattern = "/test/(.*)/(.*)_test.exs",
target = "/lib/%1/%2.ex",
context = "test"
},
{
pattern = "/lib/(.*)/(.*).rb",
target = "/spec/%1/%2_spec.rb",
context = "test"
},
{
pattern = "/spec/(.*)/(.*)_spec.rb",
target = "/lib/%1/%2.rb",
context = "test"
},
{
pattern = "/lib/(.*)/(.*).rb",
target = "/spec/lib/%1/%2_spec.rb",
context = "test",
},
{
pattern = "/spec/lib/(.*)/(.*)_spec.rb",
target = "/lib/%1/%2.rb",
context = "test"
},
{
pattern = "/lib/uplisting/entities/(.*).rb",
target = "/lib/uplisting/rom/repositories/%1.rb",
context = "repository",
},
},
})
from other.nvim.
Okay, it should not do anything from the test context when the repository context is selected.
I try to reproduce it on my side to find the problem..
Can you tell me, which files in the "test" context are in which folders in your setup?
Regarding your first comment: You cannot use wildcards in the target, that's why it did not work. But that's different from the second issue.
from other.nvim.
Gotcha regarding the first comment, i can live with that.
Regarding the second:
All of my tests are in the spec
folder and there is a spec/uplisting/entities/account_spec.rb
file which opens correctly when i pick the test context, when i pick the repository context it opens spec/uplisting/entities/account.rb
basically without the _spec.rb
at the end
from other.nvim.
thanks a lot!!!
from other.nvim.
Related Issues (20)
- Let :Other accept file path as an argument HOT 2
- Mapping the current directory HOT 3
- Suggesting repeated other spec files HOT 1
- Suggestion: Open as tab HOT 1
- Suggestion: Support for Angular Services HOT 1
- Not working with negative lookbehind regex pattern HOT 1
- [SUGGESTION] c{,pp} header and source files HOT 1
- Pattern matching not working? HOT 1
- Command to open the file picker without clearing the internal reference HOT 1
- Question: What's the syntax used in target field? HOT 1
- Use custom highlight groups HOT 1
- If `filePickerBeforeShow` returns false or an empty table, do nothing HOT 1
- Keep default openCommand when invoking `OtherSplit` et al. and selecting in picker HOT 2
- Question: do not specify match group in 'target' HOT 1
- Expose local findOther function as API HOT 4
- [Feature request]: Allow setting the shortcut char on the mapping HOT 1
- [Feature] Add spec patterns to default rails mappings HOT 1
- Is it possible to go "back" to the "main" file? HOT 4
- Thanks for inspiring. 🙏 HOT 2
- not works fine on sveltekit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from other.nvim.