Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use last arguments from vim's :make command

Tags:

vim

I have a one key mapping to build my project.

noremap <F5> :make<CR>

This works great. However I sometimes am building a only a piece of the project. In this case I use the command :make smaller_part to build just that piece. I'd also like a one key mapping for this use case as well.

noremap <S-F5> :make last_arguments()<CR>

Is this possible? A last_arguments() function isn't required. It's just how I imagine the solution would look. The important part is I hit one key and it runs :make with the arguments that I gave it last time.

like image 278
deft_code Avatar asked Dec 01 '25 01:12

deft_code


1 Answers

I use

map <f2> :wa<cr>:Make <Up>

to run make with the last arguments by the way

command -nargs=* Make write | make <args> | cwindow 6

is the Make.

like image 191
skeept Avatar answered Dec 03 '25 18:12

skeept



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!