Skip to content

Commit

Permalink
executioner.vim 1.2.1
Browse files Browse the repository at this point in the history
Command dictionaries are still created even if load_defaults is disabled
in case user does not define them.
  • Loading branch information
EvanQuan committed Dec 6, 2018
1 parent 92f5201 commit 2a7cae1
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions plugin/executioner.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" ============================================================================
" File: executioner.vim
" Maintainer: https://github.com/EvanQuan/vim-executioner/
" Version: 1.2.0
" Version: 1.2.1
"
" A Vim plugin to easily execute files in the terminal or a separate buffer.
" ============================================================================
Expand Down Expand Up @@ -41,12 +41,19 @@ let s:HORIZONTAL = 3
let s:EXTENSION_COMMAND = 0
let s:NAME_COMMAND = 1

" extension : command
" Command is executed if file has specified extension
if !exists("g:executioner#extensions")
let g:executioner#extensions = {}
endif

" file name : command
" Command is executed if file has specified name
if !exists("g:executioner#names")
let g:executioner#names = {}
endif

if g:executioner#load_defaults
" extension : command
" Command is executed if file has specified extension
if !exists("g:executioner#extensions")
let g:executioner#extensions = {}
endif
if !has_key(g:executioner#extensions, 'c')
let g:executioner#extensions['c'] = 'gcc % -o @.out;./@.out'
endif
Expand Down Expand Up @@ -99,11 +106,6 @@ if g:executioner#load_defaults
let g:executioner#extensions['swift'] = 'swiftc % -o @.out;./@.out'
endif

" file name : command
" Command is executed if file has specified name
if !exists("g:executioner#names")
let g:executioner#names = {}
endif
if !has_key(g:executioner#names, 'makefile')
let g:executioner#names['makefile'] = 'make'
endif
Expand Down

0 comments on commit 2a7cae1

Please sign in to comment.