From 5652b576b0804b5115bdb699c2e34886fd6bfe95 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 20 Apr 2016 21:10:28 +0200 Subject: [PATCH] Add bang to function definitions This makes it easier to reload the files, e.g. via vim-scriptease's `:Runtime`. --- autoload/airline/extensions/default.vim | 4 ++-- autoload/airline/extensions/tabline/buffers.vim | 4 ++-- autoload/airline/extensions/tabline/tabs.vim | 2 +- autoload/airline/extensions/wordcount/formatters/default.vim | 2 +- plugin/airline.vim | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/autoload/airline/extensions/default.vim b/autoload/airline/extensions/default.vim index 998aa43b..416c73ea 100644 --- a/autoload/airline/extensions/default.vim +++ b/autoload/airline/extensions/default.vim @@ -40,7 +40,7 @@ endfunction " deactivate it, until this is properly fixed: " https://groups.google.com/d/msg/vim_dev/sb1jmVirXPU/mPhvDnZ-CwAJ if s:section_use_groups && (v:version >= 704 || (v:version >= 703 && has('patch81'))) - function s:add_section(builder, context, key) + function! s:add_section(builder, context, key) " i have no idea why the warning section needs special treatment, but it's " needed to prevent separators from showing up if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) @@ -56,7 +56,7 @@ if s:section_use_groups && (v:version >= 704 || (v:version >= 703 && has('patch8 endfunction else " older version don't like the use of %(%) - function s:add_section(builder, context, key) + function! s:add_section(builder, context, key) if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) return endif diff --git a/autoload/airline/extensions/tabline/buffers.vim b/autoload/airline/extensions/tabline/buffers.vim index 64fec3a5..8c3f3445 100644 --- a/autoload/airline/extensions/tabline/buffers.vim +++ b/autoload/airline/extensions/tabline/buffers.vim @@ -180,7 +180,7 @@ function! s:jump_to_tab(offset) endif endfunction -function s:map_keys() +function! s:map_keys() if s:buffer_idx_mode noremap AirlineSelectTab1 :call select_tab(0) noremap AirlineSelectTab2 :call select_tab(1) @@ -196,7 +196,7 @@ function s:map_keys() endif endfunction -function airline#extensions#tabline#buffers#clickbuf(minwid, clicks, button, modifiers) abort +function! airline#extensions#tabline#buffers#clickbuf(minwid, clicks, button, modifiers) abort " Clickable buffers " works only in recent NeoVim with has('tablineat') diff --git a/autoload/airline/extensions/tabline/tabs.vim b/autoload/airline/extensions/tabline/tabs.vim index c080df72..649579e3 100644 --- a/autoload/airline/extensions/tabline/tabs.vim +++ b/autoload/airline/extensions/tabline/tabs.vim @@ -94,7 +94,7 @@ function! airline#extensions#tabline#tabs#get() return s:current_tabline endfunction -function s:map_keys() +function! s:map_keys() noremap AirlineSelectTab1 :1tabn noremap AirlineSelectTab2 :2tabn noremap AirlineSelectTab3 :3tabn diff --git a/autoload/airline/extensions/wordcount/formatters/default.vim b/autoload/airline/extensions/wordcount/formatters/default.vim index 8f1293fa..e652c9e6 100644 --- a/autoload/airline/extensions/wordcount/formatters/default.vim +++ b/autoload/airline/extensions/wordcount/formatters/default.vim @@ -48,7 +48,7 @@ function! s:wordcount() endif endfunction -function s:get_decimal_group() +function! s:get_decimal_group() if match(v:lang, '\v\cC|en') > -1 return ',' elseif match(v:lang, '\v\cde|dk|fr|pt') > -1 diff --git a/plugin/airline.vim b/plugin/airline.vim index fc8e975b..76d151d6 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -52,7 +52,7 @@ function! s:on_colorscheme_changed() call airline#load_theme() endfunction -function airline#cmdwinenter(...) +function! airline#cmdwinenter(...) call airline#extensions#apply_left_override('Command Line', '') endfunction