-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create alternate or relative file if it's not found command #503
Comments
This works with vim-projectionist already. I'm currently looking for an easy way to disabled alternation on vim-rails only. |
There's an experimental feature where it will prompt you for the file to create with |
after updating the plugin
UPDATE: this is because I created new Rails project with |
Any news about this feature? |
@Mehonoshin Even though Tim Pope says it's an experimental feature, |
Yeah it does still work, but only for things defined as projections (which can be confusing, and why I still consider it experimental). |
I could understand that using Could this be a new command, like I was thinking the following …and so on |
I'd also to see this working. It's very useful to be able to create missing spec files, especially for long file names. |
looks like #135 is related |
I don't really care about what command does this, I just want to auto-create the spec - especially because I often make typos when creating those files (e.g. forgetting I'm using a Looks like this is something supported in vim-projectionist, but the vim-rails code is just too old to add it (and that was written 6 years ago!). Maybe someone will write a fresh code base now that Neovim is re-vitalizing things? For now, seems like the only way to auto-create a spec is to add the projectionist plugin. I'm moving on to other work today, and will update with some setup steps & config if I get around to adding projectionist. Writing out my debug steps here in case it helps others: |
i know this issue is old, but ill share my setup for this:
If you create an snippet called template_test for rspec and minitest for minitest, it automatically will expand a snippet for you. To remove this behaviour, just remove this part:
The snippets (Ultisnips format):
|
@otavioschwanck this code is very useful. |
I just wanted to have something incredibly basic, to avoid typing/typos when the alternate file didn't exist, so I have defined a single command in my vimrc:
So when |
function! s:ac() abort
let pre = &confirm
try
set confirm
A
finally
let &confirm = pre
endtry
endfunction
command! AC :call <SID>ac() I defined this for myself |
Based on this [blog post] from Josh Clayton. Still trying to get `:AV` to automatically create the alternate file, so far no luck. More [detail]. [blog post]: https://joshuaclayton.me/posts/automatic-projections-for-quick-vim-navigation/ [detail]: tpope/vim-rails#503
Hello!
Is there any command I can use to create an alternate or relative file if it's not created yet? If there isn't, it would be cool if you add some
:A!
command or something which will behave similar to:Emodel user!
.The text was updated successfully, but these errors were encountered: