I have a folder of third party libraries called add-libraries
and the location for this specific library is /home/yapjiahong/projects/cpp/add-libraries/plog/include
.
I want to write a function called Include
that takes in lib
as an argument. Then append that to the end of a string. Then write it out where my cursor is at this is what I currently have:
function Include(lib)
let path = "/home/yapjiahong/projects/cpp/add-libraries/" . a:lib
exe "insert!: . l:path
endfunction
This gives an error and I'm not too sure how to fix it. This alternatives works, but I wanna use a function instead. The alternative:
nnoremap <leader>ff i/home/yapjiahong/projects/cpp/add-libraries/<Esc><Esc>