I want to bind something like this:
-
For CSS, HTML files:
<c-space> <c-x><c-n> -
For Ruby files:
<c-space> <c-x><c-u>
How to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The documentation is more complete, precise and correct, but briefly:
Make a file in your ftplugin folder (create this folder if necessary) starting with the filetype you’d like to use.
and in one of of these files, the python.vim one for example, a line like
will be a bind only defined for this filetype, just in this buffer. Make sure
filetype plugin onor similar appears in your vimrc.Edit: excellent suggestions by Peter Rincker incorporated: noremap version of map command and
<buffer>flag. He also reminds us to usesetlocalinstead ofsetin our filetype plugin files.