Friday, April 1, 2022

sumup some noremap exe command

Hi All,

Is there a way to reduce, simplify and sumpup those kind of noremap command?

Avoiding :exe (due to concatenate luafile + path)
nnoremap lua  :exe 'luafile ' .. expand('%:p')<CR>

Avoiding double :exe ... <CR> command ?
nnoremap lua  :exe 'cd ' .. expand('%:p:h')<CR>  :exe 'luafile ' .. expand('%:p')<CR>

Thank you
NV

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/b30a861d-2b2f-4173-a4c7-a0c61f3f5058n%40googlegroups.com.

No comments: