Hot answers tagged

3

There's a conceptual misunderstanding here. What Vim routinely calls "a plugin" is rather "a configuration extension". Once a script file was loaded, it is cached into RAM and never forgotten until application ends. (It still could be overwritten but it's not the same thing as "removing"). Some "plugin managers" may ...


1

Not a YCM answer, but Ctrl-x Ctrl-i will complete from included files, assuming path/include/etc. are configured correctly. See :help compl-keyword for more.


1

You can save and restore the current tab around the :tabdo operation. You can use tabpagenr() to get the position of the current tab and later you can pass that number to :tabnext to change back to this tab. This is better done in a function, since you can easily run multiple commands and also use a local variable to store the current tab number. function! ...


1

To make something work in visual mode, you need a visual-mode mapping (usually :x[nore]map). In this case, we need to do these steps Save the register Restore the selection and do the cut (x or d or whatever) Restore the register if whitespace This is reminiscent of your original function, so let's modify it to take a visual arg: if truthy, do gv before ...


1

You already have all details needed to solve your issue -- zz. Add it to the exe "normal! g`\"" Where exe executes a string as ex commands (here it is needed to overcome vimscript limitations with | and autocommand). Normal commands could be executed as ex commands using normal ex command... anyway this line jumps to a mark " without ...


1

I think you need to change " Comment the line execute 'silent s/\v^(\s*)/\1' . comment_leader . ' /' to " Comment the line execute 'silent s/^/\1' . comment_leader . '/' so that it substitutes at the beginning of the line rather than after any space. The uncomment pattern needs similar modifications:...


Only top voted, non community-wiki answers of a minimum length are eligible