0

I get what paste mode does for you, but I have never found it particularly useful. I would like to completely deactivate it. I don't see an option to do so when looking at :help paste. However, I figure this is doable with some combination of an auto-command and pastetoggle.

Could someone help me write this autocommand? I can't find clear instructions on the Internet for this use case.

  • 5
    At the risk of stating the obvious, but if you don't like paste mode then don't use it? I'm not sure if I follow why you want to "banish it to the depths of hell"? Are you triggering it accidentally somehow? – Martin Tournoij May 9 '18 at 23:52
  • 1
    I'm probably on the wrong track. But worth a try is to check set pastetoggle – Naumann May 10 '18 at 2:00
  • 5
    I'm also a little confused… What does set pastetoggle return? What does set paste? return? I've never experienced paste mode just happening 'all the time'. Are you on GUI vim? set paste related settings need to be set separately in .gvimrc, it gets reset in GUI. Not sure what, but something seems amiss here… – brhfl May 10 '18 at 3:14
  • 1
    I too am curious. Is there a specific set of steps that causes 'paste' to be switched on? Can you include this in the post? Or is the problem that something sets 'paste' quietly and you don't know what's causing it? If so, you could use :verbose set paste to track down the offender. – Rich May 10 '18 at 8:17
  • 1
    Link the vimrc. And maybe a gif of what's happening. I don't actually understand how paste mode can be automatically toggled – klaus May 10 '18 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.