Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ragtag apparently not working?

Tags:

vim

I am currently trying to use ragtag to close some of my html tags in ERB files. However, pressing something like (C-X)/ (which I interpret to be , "CONTROL" + "uppercase X" + "/") it just prints the / to the buffer. Any ideas?

like image 955
Alxjrvs Avatar asked Mar 13 '12 07:03

Alxjrvs


3 Answers

Make sure you're in the correct mode. The (Ctrl-X) key mappings of ragtag.vim only work in "insert" mode, which is a bit non-intuitive since most text manipulation in Vim is done in "normal" mode.

like image 104
billyw Avatar answered Nov 02 '22 09:11

billyw


First, make sure in your .vimrc file, you have the line

let g:ragtag_global_maps = 1

This gives you access to the ragtag key mappings as in <C-X>/ or <C-X><space>

Next, be sure to note that the available ragtag functions available to you depends on the type of file you're in. For instance, when you're in a standard .rb file, you only get a few features, whereas if you open an erb file, you get all the goodies.

Hope that helps.

like image 25
Tonys Avatar answered Nov 02 '22 10:11

Tonys


Try modifying timeoutlen and ttimeoutlen to something bigger, or delete any lines you have set in your .vimrc. The default value should be sufficient for ragtag to work.

like image 1
Forethinker Avatar answered Nov 02 '22 10:11

Forethinker