Unix vi save file different name


















Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science.

Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. To switch to insert mode, press the i key. Now you can type text into a file.

Press : colon to open the prompt bar in the bottom left corner of the window. Type x after the colon and hit Enter. This will save the changes and exit. Alternatively, a command that will also save a file and exit the text editor is:. Type : colon. This will open the prompt bar in the bottom left corner of the window.

RedHat Commands. OpenSolaris Commands. Linux Commands. SunOS Commands. FreeBSD Commands. Full Man Repository. Advanced Search. Contact Us. Forum Rules.

Mark Forums Read. Thread Tools. View Public Profile for ukadmin. Find all posts by ukadmin. View Public Profile for criglerj. Find all posts by criglerj. I am interested to do this in neovim — gypaetus. MigueldeVal-Borro Just use vim-eunuch. It also works for Neovim. Add a comment. Active Oldest Votes. Improve this answer. RevoGen 3 2 2 bronze badges.

OrangeTux OrangeTux 3, 1 1 gold badge 17 17 silver badges 26 26 bronze badges. One downside of :w or :saveas is that it will lose the execute permission if you were editing a script. Is :Move effetively the same as :! You could drop to Netrw and rename the file there.

If the file you're editing is in the current directory, then do: :edit. If those who use this snippet need to delete the buffer with the old file, you can add exec ':bd '. Cody Poll Cody Poll 4 4 silver badges 8 8 bronze badges.

A bit dirty since the old buffer is still in place but with NerdTree plugin it's good enough for me:! Zaar Hai Zaar Hai 1 1 bronze badge.



0コメント

  • 1000 / 1000