Temporarily disable the vim plugin without restarting

I am using c-support in Vim. One of the features of this feature is the automatic extension of comments .

When I paste the code into Vim from an external editor, the comments expand (which gives me double comments and prevents the insertion - see below, for example). I would like to disable the plugin, insert and then enable it again without restarting Vim. I am not sure if this is possible.

The questions are described here , here and here they describe methods for disabling plugins, but all of them require me to close Vim, get confused with mine .vimrcor similar, and restart; if I need to close Vim, I could as well cat file1 >> myfile; vim myfile, and then move the lines inside, which will be just as fast.

Is it possible to disable the plugin while vim is running without restarting, preferably so that I can map the hotkey toggle-plugin(so that reinitialization is ~/.vimrcin order, which can be mapped to a hotkey [I imagine, you haven’t tried it yet))?


Marked Comments:


/*
 *  *  Authors:
 *   *    A Name 
 *    *
 *     *  Copyright:
 *      *    A Name, 2012
 *       */

EDIT: , :set paste, :set nopaste (, :help paste, " [ ]". (. ). , , / , .

+5
2

. ( ) ( "" , vim, -). , , , vim, , (- finish, throw, try | <code with some error> ), , VimEnter, FileType Syntax. , , , s:Execute , :

function s:Execute_I_do_not_expect_function_with_this_suffix_to_be_defined_by_the_plugin_so_I_add_it_to_avoid_name_collisions(s)
    execute a:s
endfunction

. script. "", ,

  • ()
  • (, )
  • vim, , ,
  • //Script - . : script Script -local , , , .

, , . <script> nore, .

, , script , .

SourcePre. .

, , : , , ..

+1

": ", . : set unpaste

+5

All Articles