英文:
K9s edits are not applied when using neovim
问题
编辑资源的YAML定义时,更改不会在k9s中生效。
我注意到neovim会将我对文件所做的更改保存在/tmp
中,但在使用:wq
退出后,更改不会在k9s中生效。
当我使用nano等编辑器进行相同操作时,更改会立即生效。
我看到这个答案 对类似问题的回答说,需要应用/tmp/中的文件(使用kubectl apply),这确实有效,但我希望能够像nano的情况一样,保存并立即应用更改。
英文:
When editing the yaml definition of a resource the changes are not applied in k9s.
I see that neovim is saving the changes I made to a file in /tmp
but after exiting with :wq
the changes are not being applied in k9s.
When I do the same thing with e.g. nano as editor, the changes are being applied immediately.
I saw this answer to a similar question that says the file in /tmp/ would need to be applied (using kubectl apply) which does work but I would like to have a similar experience to the nano case, where the changes are saved and applied immediately.
答案1
得分: 1
这可能是Vim在将缓冲区写入磁盘的过程中重命名文件的情况。
如果是这样,您需要调整:help 'backupcopy'
:
" 在您的vimrc文件中
set backupcopy=yes
英文:
This is probably a case of Vim renaming the file during the process of writing the buffer to disk.
If so, you need to adjust :help 'backupcopy'
:
" in your vimrc
set backupcopy=yes
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论