Christian Brabandt
33310c5b24
whitespace: Allow to disable individual whitespace checks per filetype
...
closes #1716
2018-04-27 08:25:49 +02:00
Stanislav Gobunov
c4a4a20b8d
xkblayout: Make Short codes configurable
...
airline#extensions#xkblayout#short_codes changed to global for easily redefine long named keyboard layout
closes #1713
2018-04-18 10:46:55 +02:00
Christian Brabandt
a76f523be5
bufferline: always add a space for the very first item
...
closes #1631
2018-04-15 10:16:28 +02:00
mg979
f7c818a0ff
add xtabline extension
2018-04-14 14:03:21 +02:00
Christian Brabandt
0df2c9b12e
Merge pull request #1700 from mox-mox/master
...
Add extension for vim-localsearch
2018-04-09 13:27:44 +02:00
mox
00f718691a
Adding localsearch extension (code and documentation). See https://github.com/mox-mox/vim-localsearch
2018-04-09 00:47:23 +02:00
Christian Brabandt
d66b507b02
Merge pull request #1683 from idbrii/add-custom-scm
...
Make branch detection customizable
2018-04-08 21:56:32 +02:00
David Briscoe
8209ca7da1
Make branch detection customizable
...
Instead of requiring each version control plugin to modify airline to
show the current branch, provide a customization function we can check
instead.
Following the example of airline_theme_patch_func, you define the
variable like so:
let g:airline#extensions#branch#custom_head = 'david#svn#get_branch'
Custom functions should cache their value. They may need an autocmd to
invalidate their cache:
" Use a buffer-unique group name to prevent clearing autocmds for other
" buffers.
exec 'augroup svndavid-'. bufnr("%")
au!
autocmd BufWinLeave <buffer> unlet! b:svndavid_branch
augroup END
This change lets me integrate with vc.vim (I couldn't get VCSCommand
working for svn) or write my own thing for perforce.
Additionally, always load whole file and check for existence.
Instead of determining up front whether various scm plugins are
installed, check for them on use so they can be added after this script
is sourced.
This also mitigates the problem of checking for existence of autoload
functions (which are not loaded by exist()). Since we're checking
root-level functions, they're likely to be loaded once we're using any
part of the plugin.
2018-04-06 09:40:17 -07:00
Christian Brabandt
ae394294c3
gutentags: output correct statusline message
...
fixes #1703
2018-04-06 02:14:10 +02:00
Christian Brabandt
47bdae9067
Merge pull request #1702 from mrmr1993/fix-buffer-counts
...
Fix buffer numbering to start from 1 with buffer_idx_mode
2018-04-03 03:16:38 +02:00
Gianni Chiappetta
023fe122c5
Support typescript in jsformatter
2018-04-02 11:29:18 -04:00
mrmr1993
fbf96559c9
Fix buffer numbering to start from 1 with buffer_idx_mode
...
275ec4fe63
broke this so that numbering
started from 0 instead of 1 with
g:airline#extensions#tabline#buffer_idx_mode = 1
Specifically, I overlooked that |index| actually tracked the index of
the current buffer in the buffer list *starting from 1*, whereas I
assumed it tracked the true index (starting from 0).
2018-04-02 01:04:43 +01:00
Christian Brabandt
2ba64a88fd
Merge pull request #1691 from silenc3r/master
...
ALE: add option to disable line numbers
2018-04-01 14:13:29 +02:00
Christian Brabandt
f0b969549a
Merge pull request #1693 from mrmr1993/current-tabs-visible-experiments
...
Rework tabline for tabs and buffers
2018-04-01 14:01:17 +02:00
mrmr1993
47c36d2819
Don't let the current buffer be -1 when calculating the tabline
2018-04-01 01:17:18 +01:00
mrmr1993
aee733aa87
Don't show titles in the tabline if there aren't any
...
airline#extensions#tabline#buflist#list doesn't pick up some buffers
(most notably Netrw buffers), so there are sometimes no buffers to show
and the tabline code fails with an error. This avoids that situation.
It would be better to detect these and show titles for them, but for now
this restores the old behaviour.
2018-04-01 01:05:51 +01:00
mrmr1993
c75106f12d
Don't change remaining_space in tabline builder until necessary
2018-03-22 16:42:06 +00:00
mrmr1993
4b1913ad13
Use insert_section for overflow markers in tabline builder
2018-03-22 16:42:06 +00:00
mrmr1993
df2f380c9e
Add get_separator_change_with_end to tabline builder
2018-03-22 16:14:18 +00:00
mrmr1993
2528de7d81
Add comments to tabline/builder
2018-03-19 16:21:43 +00:00
mrmr1993
7396dc7a10
Create helper function tabline_evaluated_length
2018-03-19 15:05:50 +00:00
mrmr1993
51bb8dd7e0
Move strchars into util.vim
2018-03-19 15:03:51 +00:00
mrmr1993
5b7b9cf656
Rename remaining tab -> title in tabline/builder
2018-03-19 15:03:51 +00:00
mrmr1993
0b47adf087
Rename tab -> title in tabline/builder method names
2018-03-19 14:36:02 +00:00
mrmr1993
3914d5b475
Rename skipped_tabs_marker to overflow_marker
2018-03-19 14:36:02 +00:00
Christian Brabandt
ecff00a559
tabline: do not show buffer label if show_buffers is zero
...
fixes #1689
2018-03-19 15:06:55 +01:00
Dawid Zych
18f93ac96b
ALE: add option to disable line numbers
2018-03-19 11:28:45 +01:00
mrmr1993
75f53ef6e5
Rename last_{left,right}_group to {left,right}_group
2018-03-18 01:15:11 +00:00
mrmr1993
a2e0ed982f
Rename left{,_alt}_sep_size to {,alt_}sep_size
2018-03-18 01:13:30 +00:00
mrmr1993
84bf60c405
Statusline: Use separator widths to calculate whether a title will fit
2018-03-18 00:52:34 +00:00
mrmr1993
896c14bded
Reset _remaining_space if a title can't be inserted
...
This gives us a chance to add the title on the other side if it will
fit, so that we fill more space in the tabline.
2018-03-17 20:05:38 +00:00
Ingo Heimbach
724beb0c73
Added a vim-gutentags
extension
...
Added a segment that displays whether gutentags is running a ctags
instance.
2018-03-15 22:05:16 +01:00
Christian Brabandt
fb85c0a91a
Merge pull request #1678 from mg979/buflist
...
Changed buflist.vim algorithm
2018-03-15 21:52:35 +01:00
mrmr1993
d13305fc5d
Redraw buffer tabline when the terminal width changes
2018-03-15 20:44:51 +00:00
mrmr1993
7844d8bf72
Remove get_visible_buffers
2018-03-15 20:44:51 +00:00
mrmr1993
4a342afb90
Add an option to centre the active tab in the tabline
2018-03-15 20:44:51 +00:00
mrmr1993
275ec4fe63
Use tabline builder for buffers tabline
2018-03-15 20:44:51 +00:00
mrmr1993
d9e68039b8
Take the first tab number in tabline/builder.insert_tabs
2018-03-15 20:44:51 +00:00
mrmr1993
3cd8daa162
Add support for get_pretitle and get_posttitle to tabline builder
2018-03-15 20:44:51 +00:00
mrmr1993
e6b6f36d90
Remove %@...@ patterns in evaluate_tabline if has('tablineat')
2018-03-15 19:21:15 +00:00
mrmr1993
a7bff3b30b
Pass number of tabs as an argument to insert_tabs
2018-03-15 18:21:29 +00:00
mrmr1993
5ecc25d6d6
Move tab_nr_type into tabs get_title
2018-03-15 18:14:50 +00:00
mrmr1993
6db0af6f8d
Factor out tab insertion into its own function
2018-03-15 18:14:24 +00:00
mrmr1993
9b41fe5de9
Replace tabs tabline remaining_space with a member variable
2018-03-15 18:01:39 +00:00
mrmr1993
1328610188
Initialise tabs tabline builder variables in insert_tabs
2018-03-15 17:46:33 +00:00
mrmr1993
ada8cd7641
Use variables in the tabs tabline builder to track position
2018-03-15 17:41:08 +00:00
mrmr1993
349d01ba39
Generate tabs directly in tabline/builder.build
2018-03-15 17:38:19 +00:00
mrmr1993
3f87d28abb
Move insert_tabs into tabs tabline builder prototype
...
Also move evaluate_tabline and strchars methods that it uses
2018-03-15 17:05:58 +00:00
mrmr1993
71814fb19f
Add get_title and get_group to tabs tabline builder
2018-03-15 17:04:19 +00:00
mrmr1993
b99da65412
Create insert_tabs function on builder for tabs tabline
2018-03-15 16:58:04 +00:00
mrmr1993
6286b6d8d8
Move get_group into its own function for tabs
2018-03-15 16:58:04 +00:00
mrmr1993
5907d3909e
Add dedicated tabline builder
2018-03-15 16:38:36 +00:00
mrmr1993
57f2619c67
Remove unused variable b_tabline
2018-03-15 15:42:51 +00:00
mrmr1993
1837b2ee39
Use the size of the seperators to get the tabline's remaining space
2018-03-15 15:42:51 +00:00
mrmr1993
d3ec54d42e
Remove magic contant for skipped_tabs_marker in tabline calculation
2018-03-15 15:18:57 +00:00
mrmr1993
2b0fe51f99
Replace %= with empty string in evaluate_tabline
2018-03-15 14:36:39 +00:00
mrmr1993
a8f92cc68a
Rename skipped_tabs_marker to overflow_marker
...
This is set to g:airline_symbols.ellipsis, which this commit also adds.
2018-03-15 14:21:16 +00:00
Christian Brabandt
4237bfb052
branch: allow multibyte chars in shortening algorithm
...
previously, the branch extension used name[0:6], however that would
break with multibyte characters, since this is a byte index and not a
character index.
fixes #1686
2018-03-14 21:33:25 +01:00
mrmr1993
88dedb586a
Update tabs tabline when the width of the terminal changes
2018-03-14 15:25:03 +00:00
mrmr1993
5d2d764368
Use strchars to calculate string lengths
...
This also adds a compatability wrapper, so that versions older than
Vim 7.3 are supported.
This is inspired by, and includes s:strchars from, @ruipgpinheiro's
commit e2d1295a3d3708e8d2a5eb30cac840fc9520bb8b
2018-03-14 15:13:40 +00:00
mrmr1993
6819443d6a
Fix typo in evaluating %( %) rules
2018-03-14 15:07:41 +00:00
mrmr1993
980e78b4bf
Add configurable variable airline#extensions#tabline#skipped_tabs_marker
2018-03-14 15:07:32 +00:00
mrmr1993
7480245ebf
Calculate used length of tabs directly as they are added
2018-03-14 14:51:09 +00:00
mrmr1993
f93894f6ac
Move tab title generation into its own function
2018-03-14 13:55:30 +00:00
mrmr1993
e1a4cd764f
Adjust tab columns to allow for ellipsis and the left/right split
2018-03-13 00:57:48 +00:00
mrmr1993
d29c7b27fa
Evaluate tabline fragments to get the length of tab titles
2018-03-12 21:55:27 +00:00
mrmr1993
3305410982
Move tabline evaluation into its own function
2018-03-12 21:55:27 +00:00
mrmr1993
e0791cc1a0
Use the partially built tabline to calculate space left for tabs
2018-03-12 21:55:25 +00:00
mrmr1993
7a286639c5
Attach tabs to tabline last
2018-03-12 21:52:12 +00:00
mrmr1993
2711c73a47
Pass the available space for tabs as an argument to |get_visible_tabs|
2018-03-12 21:48:40 +00:00
mrmr1993
cf47d63f71
Fix formatting in clipped tab bar
2018-03-12 21:48:40 +00:00
mrmr1993
abd310bb31
Show current tab in the middle of the tabline
...
This is heavily based on 3cc1dcb697
,
mostly by copying the get_visible_buffers function and making some
tweaks
2018-03-12 21:48:35 +00:00
mrmr1993
f60cf736db
Add a get_tabs function to abstract over tabs
2018-03-12 21:47:08 +00:00
mg979
26aa528c42
Made s:variables local
...
Moved small functions out of main function
2018-03-07 02:21:52 +01:00
Christian Brabandt
167602d5b9
tabline: get correct buffer name
...
When the uniq_tail formatter is used, the buffer name is not refreshed
when running through the duplicates. Fix that by getting the correct
buffer name again.
fixes #1680
2018-03-06 11:23:38 +01:00
mg979
63111e9810
Removed fnamemodify() in path check for buflist.vim
2018-03-04 00:31:25 +01:00
mg979
2e2a66c5a0
Restored old variable name for g:airline#extensions#tabline#excludes
...
Made check case sensitive
2018-03-03 23:53:10 +01:00
mg979
3ebbc57725
Changed buflist.vim algorithm
2018-03-03 23:39:14 +01:00
Christian Brabandt
55a9721c22
Merge pull request #1651 from srini-x/master
...
Changing 'airline_tablabel' text and colors back to old style
2018-02-14 09:49:31 +01:00
srini-x
7f1cfb0c3f
removing the hard-coded '[' and ']' around the tabline labels.
2018-02-13 17:48:21 -08:00
erfanio
8c634887bf
Fix white space in tabline when showing buffers
2018-02-08 19:02:35 -08:00
Christian Brabandt
c2ffb8b3ec
Merge pull request #1643 from ThomasFaivre/quickfix
...
quickfix: fix options initialization
2018-01-21 09:55:23 +01:00
Thomas Faivre
dec9b8e65c
cursormode: allow custom mode names
...
A new variable named cursormode_mode_func is used to store the function
returning the current mode. This allows more customization in the mapping.
The default value is the built-in mode function so there is no change in
behavior.
Add some documentation.
Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
2018-01-19 13:28:02 +01:00
Thomas Faivre
e5a51f9fca
quickfix: fix options initialization
...
Options default value is hard coded making them override user values.
Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
2018-01-18 18:21:56 +01:00
Christian Brabandt
a3bdb10aea
Merge pull request #1634 from Cimbali/master
...
Fix over-caching of paths
2018-01-15 08:02:09 +01:00
Cimbali
a104e40b10
Cache only git calls, not bufname and fnamemodify
2018-01-09 20:07:54 +01:00
Christian Brabandt
9a2ed35ff9
tabline: do not confuse Vim
...
looks like this:
```
let a=(condition ? s:var:'')
```
confuses older Vims and it complains about a missing colon. So make
parsing a bit easier and add a space in front of the second colon.
fixes #1629
2018-01-08 13:46:08 +01:00
Christian Brabandt
02816a3cb6
tabline: missing spaces
...
commit ab49a1c7ae
changed that no leading whitespace was added.
While this removed a double space in front of the current active
selected buffer, it removed one space too much for the non-current
buffers in the bufferline.
So partly reverse it and only add the space, if the highlighting groups
between each item did not change.
2018-01-08 09:48:36 +01:00
Christian Brabandt
182675dc10
tabline: revert default buffer_idx_mode
...
commit 2e3cdeb
unintentionally changed the default for the
buffer_idx_mode in the tabline.
Revert it back to be disabled by default
fixes #1628
2018-01-07 09:51:08 +01:00
Christian Brabandt
ab49a1c7ae
tabline: do not add extra space before buffer name
...
there was a space too much added in the tabline. Fix that
2018-01-05 22:13:47 +01:00
Christian Brabandt
5db4c408bd
Update copyright notifications
2018-01-05 10:37:59 +01:00
Christian Brabandt
6c4f3277f1
Add missing scriptencoding
2018-01-05 10:26:38 +01:00
Christian Brabandt
3a2323feac
branch: shorten default master for smaller windows
2018-01-05 08:12:10 +01:00
Eduardo Suarez-Santana
ebda798080
Cursormode integrated as extension
2018-01-04 21:24:27 +01:00
Christian Brabandt
c17ad9a123
Merge pull request #1426 from lynnard/master
...
Fix problems with AirlineSelect{Prev,Next}Tab
2018-01-04 21:15:00 +01:00
Christian Brabandt
73d8abff2f
Merge pull request #1617 from kyleholzinger/master
...
Add formatter for js files
2018-01-04 21:14:00 +01:00
Christian Brabandt
d283a25e3f
tabline: only show buffer label, if they were drawn
...
closes #1558
2018-01-04 20:56:09 +01:00
Christian Brabandt
ce83c39bed
tabline: allow custom formatter for tabnr_type
...
closes #1418
2018-01-04 20:41:55 +01:00
Christian Brabandt
c518f79aab
tabline: allow to show buffers label at start
2018-01-04 19:38:07 +01:00
Christian Brabandt
9d28f0dcc7
tabline: allow to show current buffer/tab at first position
...
This will make highlighting more consistent. Always first item is the
one where the cursor is.
2018-01-04 19:32:29 +01:00