leader mapping that includes filename
vim
Solution
if
"the file I'm working with"
you meant is the file in your current buffer, you could just create the mapping with `<expr>`:
nnoremap <expr> <leader>c ':ConqueTermSplit ruby ' . expand("%p:%h"). "\<cr>"
related help doc:
:h <expr>
:h expand(
the more secured solution would be wrapping the `expand(..)` with `shellescap()` method, in case the path to that file has special chars.
or save the `expand(...)` use the `%` register and `shellescape()`:
nnoremap <expr> <leader>c ':ConqueTermSplit ruby ' . shellescape(@%,1). "\<cr>"
Problem
Currently I use this: ``` nnoremap <leader>c :ConqueTermSplit ruby ``` which results to: ``` :ConqueTermSplit ruby ``` What I'm trying to do is create a leader key that would result to ``` :ConqueTermSplit ruby ex1.rb<cr> ``` Given the file I'm working with is named ex1.rb I'm a bit confused on how I'd go about doing this.