Linked Questions

228
votes
10answers
112k views

What is the difference between the vim plugin managers?

I have been looking at the different package managers for vim and the one I decided to use vim-plug but I have seen others like pathogen and vundle and I honestly don't know what the difference is. ...
5
votes
5answers
4k views

How to generate closing tags for HTML?

I want to do the following: When I insert an HTML tag (which is a sequence of text that starts with <tagname tag_attributes and ends with >), as soon as I press > to insert the > character, ...
3
votes
5answers
697 views

How to conveniently add ornate headers to source code?

Currently I’m adding source sections manually, e.g.: /******************************************************************************* * entry point *******************...
8
votes
2answers
2k views

Insert code snippets?

I'm creating a folder with common code snippets I use. I want to create a quick command in vim to insert them, for example something like: :snippet codeblock1 Ideally it would be a single command ...
11
votes
2answers
2k views

How can I insert a character repeatedly until even with next line?

Say I have a comment like this: //This is a comment And I want to make it like this: //***************** //This is a comment //***************** Is there an easy way to insert a character ...
3
votes
2answers
862 views

Shortcut / abbreviation to insert text block

I'm trying to do something fairly simple. I'm writing latex and I have all these blocks of code, that I'm trying to comment out (and disregard the words in the word count). So I have to write these ...
0
votes
2answers
179 views

How to insert tabs in key remapping?

I wrote the following in my .vimrc file in order to automate getting an HTML file set up. :imap html<tab> \<html><enter> \<tab><head><enter> .... and so on. ...
-1
votes
1answer
186 views

Insert C/C++ loops and statements templates automatically [closed]

How do I insert C/C++-type loops and statements templates automatically in Vim?
0
votes
1answer
148 views

Shortcuts for math and quotes with vim-latex & insert space after fullstop

I have recently managed to install and configure vim-latex and started using it. I used to use TexStudio for writing my file and in it I used to have several setting that were tailored for my workflow:...
3
votes
2answers
59 views

Automatic completion in Latex environments

I am trying to implement a way to get automatic completion when typing Latex environments. Consider the following situation: \begin{|} \end{} where | stands for the position of the cursor. Then I ...
0
votes
1answer
87 views

inoremap inserts unwanted tabs

I recently made myself custom insert mode keybindings to type faster in LaTeX. However, When I use them, Vim adds tabs that weren't part of the original keybinding. Example: Here is my inoremap: ...
1
vote
0answers
80 views

Macros behaving unexpectedly (not executing commands)

I have the following macro let @f='ivoid function (void param^[o {^M^M^[3kwi' where ^[ represents ESC and ^M new line. for some reason it does not execute anything after the 3k, I tried replacing ...
3
votes
1answer
28 views

How can I make $ in LaTeX insert \( and \) automatically? [duplicate]

I'm writing a lot of LaTeX recently, and am used to hitting the $ key for inline math, but have heard that \( and \) is better (apparently it confuses vim less, especially with $$, which I'm also not ...