1

When I paste the following text into VI
VI adds pound to each line, Is there a way around this?

####################################
##Parameters for XEROX Printers MSSQL DB 
####################################

## The collation type of the MSSQL database.
xerox.db.collation = UTF-8

## The port of the MSSQL database. Default is 1433.
xerox.db.mssql.port = 1433

## The xerox MSSQL database name.
xerox.db.mssql.name = xerox.datacenter001.prnt0080
JavaSheriff
  • 106
  • 10
  • 1
    When you say "pound" do you mean a pound sign "£" or a hash "#"? And where in the line does it add this "pound" sign? I don't see anything wrong with the file snippet you've included – roaima Dec 17 '21 at 21:17

1 Answers1

2

:set paste should do the trick.

# denotes a commented line in your file.

:set paste will turn off auto-indenting and auto-commenting, which will allow you to copy and paste things into vi without vi automatically adding comments to the beginning of lines after a line you are pasting that has a comment.

You can run :set nopaste again to turn the setting back off.

Natolio
  • 1,137
  • 2
  • 12