How do I append a range of lines from the current buffer to another file in Vim?
:[range]write >> filename
The >> modifier on :write appends lines to a file instead of overwriting it.
command-line #command-line #ex-commands #file-handling #editing
:[range]write >> filename
The >> modifier on :write appends lines to a file instead of overwriting it.
command-line #command-line #ex-commands #file-handling #editing
:w ++p
Neovim's :w ++p flag automatically creates any missing intermediate directories when writing a file.
:e ++enc=utf-8
When Vim opens a file with the wrong encoding — producing garbled text or incorrect characters — you can reload it with a specific encoding using :e ++enc={