Skip to content

Commit 68f8136

Browse files
LucHermittexuhdev
authored andcommitted
Fix the vim scripts to be reloadable
... without exiting vim
1 parent 736451a commit 68f8136

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

autoload/editorconfig.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
" Copyright (c) 2011-2012 EditorConfig Team
22
" All rights reserved.
3-
"
3+
"
44
" Redistribution and use in source and binary forms, with or without
55
" modification, are permitted provided that the following conditions are met:
6-
"
6+
"
77
" 1. Redistributions of source code must retain the above copyright notice,
88
" this list of conditions and the following disclaimer.
99
" 2. Redistributions in binary form must reproduce the above copyright notice,
1010
" this list of conditions and the following disclaimer in the documentation
1111
" and/or other materials provided with the distribution.
12-
"
12+
"
1313
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1414
" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1515
" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -33,13 +33,13 @@ set cpo&vim
3333
" {{{1 variables
3434
let s:hook_list = []
3535

36-
function editorconfig#AddNewHook(func) " {{{1
36+
function! editorconfig#AddNewHook(func) " {{{1
3737
" Add a new hook
3838

3939
call add(s:hook_list, a:func)
4040
endfunction
4141

42-
function editorconfig#ApplyHooks(config) " {{{1
42+
function! editorconfig#ApplyHooks(config) abort " {{{1
4343
" apply hooks
4444

4545
for Hook in s:hook_list

plugin/editorconfig.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ function! s:GetFilenames(path, filename)
373373
return l:path_list
374374
endfunction
375375

376-
function! s:UseConfigFiles()
376+
function! s:UseConfigFiles() abort
377377

378378
let l:buffer_name = expand('%:p')
379379
" ignore buffers without a name
@@ -434,7 +434,7 @@ augroup editorconfig
434434
augroup END
435435

436436
" UseConfigFiles function for different mode {{{1
437-
function! s:UseConfigFiles_Python_Builtin() " {{{2
437+
function! s:UseConfigFiles_Python_Builtin() abort " {{{2
438438
" Use built-in python to run the python EditorConfig core
439439

440440
let l:config = {}
@@ -532,7 +532,7 @@ function! s:SpawnExternalParser(cmd) " {{{2
532532
endif
533533
endfunction
534534

535-
function! s:ApplyConfig(config) " {{{1
535+
function! s:ApplyConfig(config) abort " {{{1
536536
" Only process normal buffers (do not treat help files as '.txt' files)
537537
if !empty(&buftype)
538538
return

0 commit comments

Comments
 (0)