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  
  1. I select
  2. I >
  3. / 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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -