Linked Questions

254
votes
10answers
131k views

What are the differences 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
5k 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
797 views

How to conveniently add ornate headers to source code?

Currently I’m adding source sections manually, e.g.: /******************************************************************************* * entry point *******************...
11
votes
2answers
3k 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 ...
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 ...
4
votes
3answers
810 views

create own snippets

I'm rather new to vim. And I don't like much to install many packages. I use html, javascript and react.js, and i would like to create some simple way to type and then have the correct snippet on the ...
4
votes
2answers
1k 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 ...
3
votes
3answers
108 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
2answers
212 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. ...
0
votes
1answer
312 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:...
-1
votes
1answer
223 views

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

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

Code snippet completion for vim in C++

I have YouCompleteMe installed; however that only complete certain words or phrases. I am looking for something similar in VSCode or Emacs' Yasnippet. For example, if I type if, then press Tab, then ...
0
votes
1answer
108 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: ...
2
votes
1answer
39 views

iabbrev with <CR> and <Space>

I use vim to develop with Python and it works fine. However I want to improve the behavior for documenting my code. For instance I wrote this in vimrc : :iabbrev """ """ &...
1
vote
0answers
85 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 ...

15 30 50 per page