howto: vimrc change part of file path and execute script
- by posop
I would like to set up a command to execute launch the php script i am editing.
:echo expand('%:p:h') yields: C:\xampp\htdocs\my
my localhost path is C:\xampp\htdocs
i would like to cut the contents of local host off my current directory and append a file separator so i would have:
g:var = \my\
so the end goal would be to have something like this in my .vimrc (need help with the concatenate)
map <F5> :w<CR>:silent execute '!"c:\Program Files (x86)\Mozilla Firefox\firefox.exe"' "localhost . $var . %"<CR>
is this possible? or is there another way to do this?