1

I am using SimpleFold for folding vim. I mapped it to a key setting:

map <unique> <silent> <Leader>f <Plug>SimpleFold_Foldsearch

However, I would like to set it up as an auto command. I tried adding this line to my .vimrc file:

autocmd FileType ruby <Plug>SimpleFold_Foldsearch

But, I just get an error now when I open a ruby file. Can anybody help me setup the autocmd so that it works?

1
  • What does the error say? Commented Nov 5, 2011 at 9:34

1 Answer 1

5

:autocmd is executing Ex mode commands, so your code is wrong. You should be using :normal or feedkeys():

autocmd FileType ruby :execute "normal \<Plug>SimpleFold_Foldsearch" 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.