What's the ultimate setup for vim?
simendsjo via Digitalmars-d-ide
digitalmars-d-ide at puremagic.com
Mon Aug 18 00:47:15 PDT 2014
On 08/18/2014 09:39 AM, Jay wrote:
> i've installed dutyl and d.vim (not dsnips though, not interested). i
> guess now i need to set 'makeprg' (to 'dub build' or 'rdmd --build-only'
> if dub.json isn't present) and 'errorformat'. this is somewhat uncharted
> territory for me so i decided to look for existing solutions. didn't get
> much out of google so here i am. please post your whatever you feel
> might be useful and i'll try to sum it up and add to the wiki page.
I don't have anything fancy. I add a Makefile for each project with some
standard Makefile rule-names, and bind these to some function keys.
Most of the rules are just `dub run`, `dub build` etc.
I like doing it this way as I can easily have as complex build rules as
I want, and I can also build from the cli.
" Shortcuts for running makefile rules
map <f1> :wa<cr>:!clear<cr>:Dispatch make doc<cr>
map <f2> :wa<cr>:!clear<cr>:Dispatch make tags<cr>
map <f3> :wa<cr>:!clear<cr>:Dispatch make test<cr>
map <f5> :wa<cr>:!clear<cr>:make run<cr>
map <f6> :wa<cr>:!clear<cr>:Dispatch make build<cr>
map <f7> :wa<cr>:!clear<cr>:make debug<cr>
imap <f1> <esc><f1>
imap <f2> <esc><f2>
imap <f3> <esc><f3>
imap <f5> <esc><f5>
imap <f6> <esc><f6>
imap <f7> <esc><f7>
More information about the Digitalmars-d-ide