ab217
ab217

Reputation: 17160

Newbie Question: How to add common command as key mapping to .vimrc?

I'm new to vim and I find that I am using the following command a lot: !rspec %. I would like to add this to my .vimrc file using a key mapping of something like <leader>rs; however, when I add the following line to my .vimrc it doesn't work: map <leader>rs !rspec %. Can someone help me correct what I am doing wrong? Thanks!

Upvotes: 2

Views: 254

Answers (1)

sarnold
sarnold

Reputation: 104020

Does :map <leader>rs :!rspec %<cr> do the job?

I just set up :map <leader>pp :!apparmor_parser %<cr> with success.

Upvotes: 1

Related Questions