-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Rename buffers #4393
Comments
I don't have sufficient permissions in order to add labels, but this seems like a good first issue to me :) |
There is also a slightly more complicated way what run shell commands in Helix:
I also agree with adding a build-in command or shortcut for Helix to change the file name. |
Does this also rename references to the given file in code? I think https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_willRenameFiles is relevant. That is also why @geometryolife suggestion does technically achieve renaming the file, but wouldn't accomplish what I would be expecting it to do. |
@cor @Elias-Graf there seems to be some discussion in the above linked issues as to what operations involving file management should be included in the editor as opposed to externally. What if instead of creating a new file/buffer and deleting the old file, there was a command that started a new buffer and saved the old buffers content to the new buffer but didn't delete the source file for the old buffer. This is similar to the way It seems like |
@austinletson in my opinion this really should be included in the editor. People primarily use Helix for creating code, and this process almost always involves renaming, deleting, and moving files. Also, like @Elias-Graf mentioned, this does not rename references to the file, which it should do. One of the best features of Helix is the amazing out of the box LSP support, and properly renaming files really aligns with the current LSP feature set. It's also yet another advantage over vim and it also makes it easier for people coming from editors like Visual Studio Code to use Helix. |
Well I implemented the command, now to wait for it to hopefully get merged |
It would be very nice if you could rename buffers from Helix.
For example, I'm editting
a.txt
within a project, and i need to rename it tob.txt
.Currently, you would:
<space>f
->a.txt
:w b.txt
rm a.txt
<space>f
->b.txt
It would be much nicer if we had a rename command from within helix, so that you could simply:
<space>f
->a.txt
:buffer-rename b.txt
the buffer is now renamed to b.txt, while it is still open in your editor
The text was updated successfully, but these errors were encountered: