If vim is launched from the Elvish shell, then fall back to using the
bourne shell (sh) or a bourne compatible shell when calling
{universal/exuberant-}ctags.
Signed-off-by: Adam Jimerson <vendion@gmail.com>
There is no spoon. My testing last night was flawed because I had a typo
in my RC file that was complicating matters. In seems the syntax fix was
all this needed to work okay, not disabling the feature
This makes it possible to actually see the function names in
stacktraces. It also means that the internal objects of some of the tag
prototypes don't need to be public any more.
Exuberant Ctags:
- ObjectiveC
Universal Ctags:
- Ada
- Autoconf
- Automake
- Ctags config
- D
- Elm (courtesy of @bitterjug)
- Go
- ObjectiveC
- Perl 6
- Protobuf (closes#437)
- R
Also various improvements to existing definitions based on changes in
Universal Ctags.
Added scopes, so tagbar will show the following hierarchy:
```
namespace
subnamespace
...
class
property (variable)
...
method
...
```
Additional kinds added (basically the same as #283):
* namespaces
* use aliases (imports)
* traits
The view files created with the 'mkview' command run the
'SessionLoadPost' autocommand at the end, which creates problems if
Tagbar has alread been initialized. Add a new variable so that we can
detect this situation.
Currently the tags will always get updated immediately when writing a
file. However, for large files that can slow down the writing process
noticeably, leading to annoying pauses. This commit instead defers the
updating process to the first CursorHold/CursorHoldI event after writing
a file, which should make the process much less noticeable.
Closes#289Closes#381
References SpaceVim/SpaceVim#129
When constructing the tag tree it is often necessary to look up tags
with a certain name and other attributes at the current depth. This was
previously done with the filter() function on the list of all the
relevant tags. However, this filtering is very slow.
This commit changes the FileInfo and TagInfo objects to save added tags
in a dictionary indexed by the name of the tag in addition to the list
(which is still maintained in parallel since it is necessary for things
like sorting). This significatly speeds up tag lookup since most tags
have unique names.
The current algorithm for contructing the tag tree works pretty well
even when pseudo-tags are encountered, but is quite complex, hard to
understand, and hard to tweak and optimize. This commit rewrites the
algorithm to a relatively straight-forward recursive algorithm that
makes use of placeholder pseudo-tags if required that will get replaced
if the actual tag is encountered later.
When switching buffers during the handling of the BufDelete event the
saved buffer number of the last alternate buffer will change, so we have
to save a local copy to be able to properly unset the 'tagbar_ignore'
buffer variable.
When opening the Tagbar window the window numbers can change so that
restoring the window history is not possible. Use the new window ID
functionality if it is available to make that possible.
When we have to go to the Tagbar window to update it the knowledge of
the previous window to the one we're coming from gets lost. Save it
before switching windows so we can restore it after returning from the
Tagbar window.
The QuitPre autocommand was introduced in Vim version 7.3.544. If Vim is
older than this then don't use the HandleOnlyWindow() functionality, so
in the case of closing the last window in a tab a user will have to
close the Tagbar window themselves.
This commit should (hopefully) finally fix the case of users calling
':bdelete/:bwipeout' or ':quit' while Tagbar is open and just do the
right thing. See commit e4cfe8a for a more thorough description of how
it's supposed to work.
When a window that is displaying a normal file gets closed with a :quit,
:bdelete or other command, Tagbar may end up as the only visible window
left, which isn't very useful. Previously Tagbar would just quit in such
a situation (unless there was more than one tab), but that is rather
non-intuitive.
The change in this commit introduces a mechanism that should hopefully
handle such a case properly based on which command was executed, and do
exactly what a user would expect:
- In the ':quit' case, it will close the current tabpage including
Tagbar unless it was the only tabpage, in which case it will quit Vim.
- In the ':bdelete/:bwipeout' case, it will delete the Tagbar buffer and
then reopen Tagbar once the buffer that Vim switched to is being
displayed.
This commit fixes tagbar compatibility issues with the
[universal-ctags](/universal-ctags/ctags), which is the most active and
consistently updated fork of the old exuberant ctags.
Failing to suppress output can cause problems in some environments,
especially if the shell command fails or does something else spooky.
Example where failing to suppress the shell command causes issues with
[vim-airline](https://github.com/bling/vim-airline) with the tagbar
extension enabled:
![](http://i.imgur.com/ciigs8C.png)
Here's another example:
![](http://i.imgur.com/cl96sI8.png)
Both were taken using uxterm in Linux.
If the runtimepath has been set incorrectly and the autoload file is
getting loaded by something, then the code won't be able to load the
"plugin" file. Print a warning message and stop loading the file instead
of throwing lots of errors.
Instead of using 'echoerr' and essentially breaking the plugin after
that problems are now reported as warnings with 'echomsg'. They will
also only be shown once for a particular problem.
The current tagbar_autoclose state will be displayed in the statusline.
Also change the "hide nonpublic" flag to "v" to match the mapping and
properly document the statusline flags.