Is it possible to combine strings and filename modifiers in a vim nmap command?
I have the following in my .vimrc
nnoremap <D-F4> :TlistAddFiles %:p:h *.*<CR>
I wish to have an analogue that is restricted to the current filetype.
For example, if the current file was /Users/me/Py/project1/myFile.py, the command would add all the .py files in the /Users/me/Py/Project1/ directory to the Taglist.
Yes, you can just stick them all together –
vimcan tell which bit to expand and which is the string. For the task in question, use the following:If the current file is an
.pyfile, only.pyfiles will be indexed.See
:help %:efor more on filename modifiers.