How can I save a text block in visual mode to a file in Vim? -
The title is very descriptive, just in case, I give an example:
start Block 1 Some End Blocks 1 Start Block 2 Something Sleeping ... End Block 2 - I select
- I
> > - / code> in another file?
Choose the text you want to save, either in either view or block View mode, and
: w new.txt This is what you write, but you will not actually see What is exactly above when you press : , you will go to the command line which will automatically fill the selection information. This will look something like this:
: '& lt ;;' & Gt; simply
: '& lt ;;' & Gt; Continue typing the rest ( w new.txt ) to get. W new.txt ... and press Enter.
Comments
Post a Comment