瀏覽代碼

Added default running binding

wreed4 8 年之前
父節點
當前提交
3cde49cf6f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      vimrc

+ 3 - 1
vimrc

@@ -665,10 +665,12 @@ vnoremap <C-c> :call CopyMode()<CR><CR>
 vnoremap <silent> * :call VisualSelection('f')<CR>
 vnoremap <silent> # :call VisualSelection('b')<CR>
 
-" Default building options
+" Default building/running options
+let g:run_command = 'echo No run command defined'
 autocmd FileType lilypond setlocal makeprg=lilypond
 autocmd FileType python setlocal makeprg=mypy
 nnoremap <F3> :Make %<CR>
+nnoremap <leader>` :execute "Start " . g:run_command<CR>
 
 " Quickly edit a macro
 nnoremap <leader>@  :<c-u><c-r><c-r>='let @'. v:register .' = '. string(getreg(v:register))<cr><c-f><left>