Commit Graph

475 Commits

Author SHA1 Message Date
Jan Larres
56bee63e17 Only jump to previous window if there is one, closes #355 2016-10-29 17:29:40 +13:00
Jan Larres
2d67896b06 Add debug statement with exit code after system() call 2016-10-24 18:13:27 +13:00
Jan Larres
bcb042da56 Improve HTML support with Universal Ctags, closes #317 2016-10-23 20:31:35 +13:00
Jan Larres
d16ec1198b Don't consider file as valid if its window is in diff mode 2016-10-23 20:09:46 +13:00
Jan Larres
a1f416edde Define mappings with <nowait> if available, closes #299 2016-10-22 02:02:27 +13:00
Jan Larres
040e8400af Print exit code when failing to run ctags 2016-10-21 17:43:47 +13:00
Anmol Sethi
b99e103258 Silent option
If the silent option is set, tagbar doesn't echo out information about
the tag the cursor is on in the tagbar window.
2016-10-19 12:58:40 +13:00
Jan Larres
b6298c0ca0 Use window ID functionality if available, ref #351
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.
2016-10-17 23:08:18 +13:00
Jan Larres
4d513c8a68 Also restore window history when opening Tagbar, ref #319 2016-10-16 23:19:42 +13:00
Jan Larres
23557ef97a Always restore the window history, closes #319
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.
2016-10-16 23:02:18 +13:00
Jan Larres
2954e405bb Merge pull request #349 from vavaka/master
flags argument added to functions responsible for window toggling
2016-10-16 12:09:29 +13:00
Jan Larres
3566907b57 Only use QuitPre functionality if supported, closes #350
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.
2016-10-15 20:20:03 +13:00
Jan Larres
a43068e418 Fix quit/bdelete cases properly
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.
2016-10-15 20:13:28 +13:00
Jan Larres
b6a0ec00cd Only suspend Tagbar during 'grep' qf commands, closes #347 2016-10-12 14:16:37 +13:00
vavaka
11cdebab2a flags argument added to functions responsible for window toggling 2016-10-11 13:41:01 +06:00
Jan Larres
0bb6499548 Rename QuitIfOnlyWindow since it's no longer accurate 2016-10-10 21:51:14 +13:00
Jan Larres
e4cfe8add5 Properly handle closing the last file window, closes #345
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.
2016-10-09 21:03:01 +13:00
Jan Larres
497e963bc4 Separate buffer- and window-local options 2016-10-09 19:02:26 +13:00
Martin Vuille
321fdd4fd1 Don't close new tab 2016-09-28 06:20:25 -04:00
Martin Vuille
b1e1063b37 Clean-up for pull request 2016-09-24 18:40:44 -04:00
Martin Vuille
1e5b704e09 Give each tab its own tagbar instance data 2016-09-24 17:49:35 -04:00
Martin Vuille
7c56066685 Give each tab its own tagbar buffer 2016-09-24 17:48:52 -04:00
Martin Vuille
7e35a40715 Separate shared and per-tagbar instance data 2016-09-24 17:45:07 -04:00
Jan Larres
2955f71856 Try to jump to the right tag column, closes #326 2016-09-25 00:24:04 +12:00
Joe Grasse
d61ca60d1c Verify that window number is valid before switching to it 2016-09-23 15:32:35 +12:00
Jan Larres
9a75c110b7 Don't choke when run from netrw, closes #291 2016-09-20 23:30:18 +12:00
Jan Larres
b7f147aabc Remove redundant SetStatusLine argument, ref #335
Thank you to @jpmv27 for spotting this.
2016-09-19 23:10:10 +12:00
Jan Larres
61ba5ba578 Merge pull request #333 from jpmv27/case_insensitive_sort_option
Add case-insensitive sort option
2016-09-19 23:04:02 +12:00
Jan Larres
71e56f5ea4 Merge pull request #334 from jpmv27/restore_cursor_tag_toggle_hide
Keep cursor on same tag when toggle hide non-public
2016-09-17 20:40:43 +12:00
Jan Larres
03592c0112 Update the statusline at the end of AutoUpdate(), closes #330 2016-09-13 22:45:52 +12:00
Jan Larres
2438a92cb9 Merge pull request #338 from alejandrogallo/master
Add asymptote support as a c clone
2016-09-12 12:52:18 +12:00
Jan Larres
d841db9f49 Fix file-scope tags in uctags, closes #314 2016-09-12 12:39:12 +12:00
Alejandro Gallo
61de1fe0d6 Add asymptote support as a c clone 2016-09-10 17:22:30 +02:00
Jan Larres
35ee5a91f9 Fix Python member functions with Universal Ctags, closes #306 2016-09-10 21:02:09 +12:00
Martin Vuille
f8587f106c Keep cursor on same tag when toggle hide non-public 2016-08-27 18:21:06 -04:00
Martin Vuille
7fbd1ad375 Add case-insensitive sort option 2016-08-27 18:14:10 -04:00
Jan Larres
7b36c46d17 Change mentions of GNU ctags to BSD ctags 2015-06-19 11:42:35 +12:00
Dmytro Konstantinov
d01d7e7546 Fixed compatibility with Universal Ctags
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.
2015-06-11 11:31:08 +01:00
Dan Church
40be9a2e5f Suppress status-line output when executing shell
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.
2015-04-24 17:44:58 -05:00
Jan Larres
c6b473f559 Handle wrong rtp more gracefully
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.
2015-04-05 20:14:56 +12:00
Jan Larres
8a8e85436d Merge pull request #258 from michaeltanner/master
Adds CUDA support (identical to C++)
2015-04-05 19:30:24 +12:00
Jan Larres
3634e7ab4f Support 'kind' field with name, ref #254 2015-03-17 19:35:42 +13:00
Jan Larres
eb392a4502 Check for fish instead of resetting shell unconditionally 2015-02-23 15:14:35 +13:00
Jan Larres
a284cd0091 Always log ctags output when execution fails 2015-02-16 18:49:07 +13:00
Michael Tanner
c21176d8da Adds CUDA support (identical to C++) 2015-02-08 21:27:38 +00:00
Jan Larres
00dfa82b00 Fix prefix for tags with both access and file fields 2015-02-02 16:30:10 +13:00
Yecheng Fu
e62d3444e9 add '-' flag before static functions in c 2015-02-02 16:21:10 +13:00
Jan Larres
04bb728039 Replace help mapping in short help, closes #245 2015-01-26 12:37:53 +13:00
Jan Larres
fcac7f2936 Don't try to jump to winnr 0, ref #244 2015-01-13 22:32:30 +13:00
Jan Larres
4fa15349c5 Small cleanups 2014-12-10 15:34:14 +13:00
Jan Larres
f9c5f24576 Don't skip over closed folds with zk 2014-11-26 14:52:54 +13:00
Jan Larres
df09799372 Add mappings for moving through folds, closes #224 2014-11-09 17:33:42 +13:00
Jan Larres
f933907afa Add option to arrange Tagbar window vertically 2014-11-08 21:30:17 +13:00
Jan Larres
5283bc834a Reprocess files if filetype changes, closes #228 2014-11-02 17:44:38 +13:00
Jan Larres
5d1ae684a1 Better JavaScript ctags config, courtesy of David Fishburn 2014-10-28 16:49:16 +13:00
Jan Larres
5c33e09d68 Add simple inspect() debug function 2014-10-27 22:38:59 +13:00
Jan Larres
251c774431 Don't assume all types define 'ctagstype' 2014-10-27 22:37:17 +13:00
Jan Larres
37400d9950 Make errors less fatal, closes #215
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.
2014-10-27 22:35:19 +13:00
Jan Larres
64e935fe58 Small preview window improvements, ref #161 2014-10-14 15:59:29 +13:00
Jan Larres
b54d8d64f1 Handle unloaded buffers when getting prototype, closes #222 2014-10-14 11:19:08 +13:00
Jan Larres
76f16f891b Return pattern for prototype if linenr is not available, closes #219 2014-10-11 18:37:21 +13:00
Jan Larres
032fd1fbb3 Reset 'shell' to improve compatibility 2014-10-09 11:31:19 +13:00
Jan Larres
59c9b7ce1c Don't skip over unmodifiable buffers, closes #213
Skipping over unmodifiable buffers when checking for Tagbar being the
last window got introduced in #117, but I don't think it is actually
necessary.
2014-06-25 18:43:09 +12:00
Jan Larres
5e392c1b8d Add inline help for toggleautoclose mapping 2014-06-25 17:58:36 +12:00
Jan Larres
ca1c9ee2e2 Add mapping to toggle autoclose option
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.
2014-06-25 17:52:43 +12:00
dogura
a9ec78aa5b specify a option is disable append mode
Because append mode is not allow that to output result on stdout.
2014-05-01 14:33:31 +09:00
Jan Larres
ae46cc025b Better mapping init, closes #203
If someone already has a function that includes "JumpToTag" in its name
then the current method of detecting whether mappings should be
initialized would fail. Use a buffer-local variable instead.
2014-04-05 19:09:09 +13:00
Jan Larres
0181f1d0cd Log typeinfo of newly processed file 2014-04-04 18:37:47 +13:00
Jan Larres
a5220adc9a Better fileinfo removal logging 2014-04-04 01:08:12 +13:00
Jan Larres
fabae6a11d Log fileinfo removal 2014-04-04 01:01:53 +13:00
Jan Larres
2bc6e96ae4 Rename debug log function 2014-04-04 00:39:26 +13:00
Jan Larres
8a139e0576 Better timestamps 2014-04-04 00:31:27 +13:00
Jan Larres
be46ee5988 Don't remove fileinfo on BufUnload
If 'hidden' is not set then BufUnload is called every time a buffer
would get hidden, removing the fileinfo. This causes unnecessary ctags
processing of files.
2014-04-01 00:53:18 +13:00
Jan Larres
b2c5f0b928 Keep cursor on current tag when sorting, closes #200 2014-03-22 01:09:30 +13:00
Jan Larres
fdceb4ea71 Add ? as help key, closes #194 2014-02-28 13:51:48 +13:00
Jan Larres
3fdefbaa47 Add documentation for hide_nonpublic
Also indicate in the statusline if non-public tags are currently hidden.
2014-02-10 17:10:43 +13:00
Jan Larres
368d37ed45 Allow hiding non-public tags, closes #186 2014-02-05 18:08:04 +13:00
Jan Larres
13d4cfcc2c Remove some duplication 2014-02-05 15:30:19 +13:00
Jan Larres
42ce2919a3 Allow configuring zoom, closes #189 2014-02-04 18:00:27 +13:00
Jan Larres
836a39af8f Jump to correct window even after opening preview window 2014-02-01 21:17:00 +13:00
Jan Larres
0ead3332a9 Extract GetFileWinnr() function 2014-02-01 20:49:11 +13:00
Jan Larres
e872e67641 Version 2.6.1 2014-01-23 23:17:00 +13:00
Jan Larres
b610fb2f5d Restore previous window, closes #190 2014-01-21 15:59:51 +13:00
Jan Larres
ace45adc51 Don't let ctags sort tags, closes #187
Ctags seems to call an external 'sort' which can apparently fail in some
cases with Cygwin. Since we sort the tags ourselves anyway just disable
it.
2013-12-25 19:07:31 +13:00
Jan Larres
88d7464079 Close prevwin when jumping to tag, closes #184 2013-12-19 11:54:59 +13:00
Jan Larres
dbc05b24a3 Fix getCurrent() call for kind headers, closes #185 2013-12-09 16:30:38 +13:00
Jan Larres
6d8770f949 Version 2.6 2013-12-06 00:27:08 +13:00
Jan Larres
87bbb46e95 Open previewwin relative to Tagbar win 2013-11-30 19:28:18 +13:00
Jan Larres
b4a5800f72 Always centre preview window 2013-11-30 03:31:31 +13:00
Jan Larres
ba3693f977 Properly open fold when jumping to tag 2013-11-30 03:18:39 +13:00
Jan Larres
528bdc6b8d Improve preview window handling
Use psearch instead of pedit since pedit essentially reloads the file
and creates an empty undo entry. This also makes it faster.
2013-11-29 18:43:00 +13:00
Jan Larres
2dcd5260b6 Equalize windows after shrinking if necessary, closes #182 2013-11-24 01:21:44 +13:00
Jan Larres
915b11bd1c Close preview window when closing Tagbar 2013-11-22 16:43:06 +13:00
Jan Larres
e090fe73d1 Automatically open folds in preview window 2013-11-22 16:36:54 +13:00
Jan Larres
574376d165 Add Cython/Pyrex support, closes #181 2013-11-22 14:55:50 +13:00
Jan Larres
66c56b11a7 Clean up window switching 2013-11-15 16:21:12 +13:00
Jan Larres
c57dd9f7a4 Make sure QuitIfOnlyWindow also works with prevwin open 2013-11-13 16:53:52 +13:00
Jan Larres
f3250b2dd1 Make preview window position configurable 2013-11-13 16:29:42 +13:00
Jan Larres
0377f19d74 Add auto-previewing mode, closes #161 2013-11-11 18:23:22 +13:00
Jan Larres
2d650b96cf Ignore preview window when quitting 2013-11-11 17:39:48 +13:00
Jan Larres
290b71e2b7 Skip preview window when jumping to tag 2013-11-11 17:12:40 +13:00
Jan Larres
78a7eeecf3 Add key to show tag in preview window 2013-11-11 00:53:45 +13:00
Jan Larres
207b8520c2 Allow ignoring specific files, closes #169 2013-11-08 17:27:34 +13:00
Jan Larres
1a2c4ec958 Rework pause functionality, closes #177
The current pause functionality simply removes all the autocommands to
stop updating Tagbar. This has the problem that at the moment the
statusline functions immediately restore the commands so pausing doesn't
work, but even if that didn't happen it would stop the statusline
functionality from working which is not desirable. The solution is to
have a reference to the paused file which will get used by the Tagbar
window, but not the statusline functions.
2013-11-06 22:33:27 +13:00
Jan Larres
0fd09344c7 Don't update during window opening, closes #179
Plugins like MiniBufExplorer can trigger an update before window
initialization has finished, leading to errors. Skip processing until
that is done.
2013-11-06 17:06:39 +13:00
Jan Larres
abffaba655 Fix stupid 'if' syntax mistake 2013-11-06 14:11:16 +13:00
Jan Larres
15f9ad6e88 Check for existence of qf var before deleting
Otherwise explicit calling of QuickFixCmdPost autocmds without a
preceding QuickFixCmdPre will generate an error.
2013-11-06 13:27:16 +13:00
Jan Larres
b60d08c468 Add comment why BufReadPost is needed 2013-11-05 09:16:58 +13:00
Jan Larres
e5408f740f Don't process quickfix-loaded files, closes #176
Certain quickfix-commands like vimgrep have to load all searched files
into Vim and will execute the BufReadPost autocmd for all of them. Since
Tagbar doesn't need to generate tags for those files pause processing
while the command is running.

There doesn't seem to be a better way to find out whether vimgrep is
running than to set a temporary variable with the QuickFixCmdPre/Post
autocmds, see also
https://groups.google.com/forum/#!topic/vim_use/sUj5MFGmwD8
2013-11-04 22:51:38 +13:00
Jan Larres
85c198ba57 Always properly shrink window, closes #172
Closing Tagbar with :q instead of the provided commands and mappings
would bypass the Vim application window shrinking logic. Install an
autocommand that checks for this situation.
2013-11-04 22:30:17 +13:00
Jan Larres
2e2ba2eab2 Use standard highlight group if syntax is disabled
This prevents an error message about a non-existent highlighting group
when trying to match the tag pattern.
2013-11-02 21:51:15 +13:00
Jan Larres
3c37ddcc14 Handle invalid ctags line numbers, closes #119 2013-09-19 12:36:41 +12:00
Jan Larres
5566cb34d5 Don't force processing on BufReadPost, closes #170
This prevents files being processed twice unnecessarily, once for
FileType and once for BufReadPost. All cases where BufReadPost is called
without FileType should be covered by the checks in AutoUpdate().
2013-09-18 17:44:52 +12:00
Jan Larres
4801c897f8 Try expanding a terminal if configured 2013-08-30 16:57:27 +12:00
Jan Larres
24efd12f50 Add option to show line numbers, closes #146 2013-08-24 21:45:10 +12:00
Jan Larres
56cd34830d Remove deprecated GenerateStatusline() function 2013-08-24 20:50:27 +12:00
Jan Larres
0b14e28719 Merge branch 'stltest' 2013-08-24 19:17:13 +12:00
Jan Larres
225fcaa3ce Log ctags version 2013-08-24 18:38:04 +12:00
Jan Larres
dab8d99fb8 Print message if no tags have been found in file 2013-08-24 17:57:33 +12:00
Jan Larres
a566f7141f Echo message if ctags output is empty 2013-08-24 17:40:12 +12:00
Jan Larres
7ef2dd0ef1 Log error messages with ctags output 2013-08-23 18:02:24 +12:00
Jan Larres
84d65042fa Remove commented out statusline calls 2013-08-22 19:06:28 +12:00
Jan Larres
c37d783d4f Make keybindings configurable, closes #159 2013-08-22 17:38:31 +12:00
Jan Larres
57acb383b6 Statusline tweaks 2013-08-21 18:28:40 +12:00
Jan Larres
495e5fcb08 Allow customizing the statusline 2013-08-21 17:50:03 +12:00
Jan Larres
746771801c Log exact shell command for debug 2013-08-21 02:44:31 +12:00
Jan Larres
a217435f50 Remove autocmds when not needed, closes #153
When the Tagbar window gets closed and the statusline functionality is
not in use, remove the autocommands to prevent unnecessary ctags calls.
2013-07-30 11:38:46 +12:00
Jan Larres
5732ce9bd6 Simplify sort method 2013-07-17 16:50:02 +12:00
Jan Larres
f36e0d3d39 Always correctly show sort order 2013-07-17 16:49:22 +12:00
Jan Larres
82a932406f Make autoshowtag more flexible, closes #152 2013-06-25 16:33:36 +12:00
Jan Larres
2ebd2a1392 Escape quotes in path filters, closes #150 2013-06-03 17:38:02 +12:00
Jan Larres
ca02374f40 Merge pull request #147 from zhaocai/master
Export tagbar#currentfile() function
2013-06-02 21:56:10 -07:00
Jan Larres
a93fb868d8 Restore windows properly after zooming 2013-05-20 15:18:57 +12:00
Zhao Cai
070a75cb04 Export tagbar#currentfile() function 2013-05-15 08:00:08 -04:00
Jan Larres
24915dbe24 Handle non-existent project autocmds properly, closes #145 2013-05-06 18:49:19 +12:00
Jan Larres
f5435678fb Expand deffile path 2013-04-30 10:12:02 +12:00
Jan Larres
3ecdb5028d Try to distinguish between equal alternative tags, closes #139 2013-04-29 16:49:17 +12:00
Jan Larres
d0d307c9bd Convert remaining call to CreateTypeKinddict(), closes #142 2013-04-26 19:33:00 +12:00
Jan Larres
e6e084e8b0 Re-enable BufReadPost event 2013-04-24 12:10:33 +12:00
Jan Larres
7c0d8675b5 Make createKinddict() an instance method 2013-04-24 10:45:46 +12:00
Jan Larres
acca348959 Allow project-specific type config 2013-04-24 10:45:46 +12:00
Jan Larres
1c605bd958 Merge pull request #135 from darcyparker/issue133_ctagsbin
Improved `s:EscapeCtagsCmd()` for windows `cmd.exe` to eliminate issues when `a:ctags_bin` calls a batch file that uses `%~dp0`.
2013-04-23 04:19:09 -07:00
Jan Larres
b6f47e4020 Simplify getusertypes() function 2013-04-05 11:57:57 +13:00
Jan Larres
ec0eb883dc Recognize racket as scheme, closes #134 2013-04-04 19:06:42 +13:00
Darcy Parker
d0df97040b Improved s:EscapeCtagsCmd() for windows cmd.exe to eliminate issues when
a:ctags_bin calls a batch file that uses %~dp0. Changes include:
- Enable ctags_args to be a list
- Changed default ctags_args to be a list to improve robustness of
  s:EscapeCtagsCmd()
- Do not escape 0th argument of ctags_cmd for cmd.exe when it is not
  necessary because otherwise batch files may not return expected value
  for %~dp0
- Updated tagbar documentation about string and list value types for
  ctags_args
See https://github.com/majutsushi/tagbar/issues/133
2013-04-02 17:57:30 -04:00
Jan Larres
dec1f840fb Version 2.5 2013-03-25 22:27:12 +13:00
Jan Larres
11f8479593 Return to the correct window after closing Tagbar, closes #132
Since the window numbers can change when opening and closing windows
Tagbar so far has used bufwinnr() to find the right window to jump back
to. However, this fails if the same file is being displayed in more than
one window. Save a window-local variable instead to detect the correct
window to jump back to.
2013-03-24 14:16:56 +13:00
Jan Larres
77a318b10e Don't disrupt the statusline if ctags fails 2013-03-23 19:46:38 +13:00
Jan Larres
80dfccf09d Don't restore window position if moved manually 2013-03-18 19:09:12 +13:00
Jan Larres
be00efa703 Save and restore window position when expanding, closes #129 2013-03-18 18:51:54 +13:00
Jan Larres
cc222f5d8c Run ctags even if previous run produced erros, closes #125
If a ctags-compatible program returns an error status code on a parsing
failure then it would never be run again on the same file, even if later
invocations would have returned normally (for example after fixing an
error in the current file). Therefore we need to execute the program on
updates as usual, but do not repeat error messages if the previous run
already did.
2013-02-26 21:56:12 +13:00
Jan Larres
852c6dac69 Better handling of switching to unsupported buffer 2013-02-19 00:02:32 +13:00
Jan Larres
59bb2a4355 Merge pull request #123 from jszakmeister/fix-currenttag-on-unsupported-file
When switching to a buffer that is unsupported, clear current.
2013-02-18 00:51:36 -08:00
Jan Larres
4ca7a0c636 Prevent update error when current file is empty 2013-02-18 21:51:16 +13:00
Jan Larres
f801147c2e Fix header indentation 2013-02-13 23:34:17 +13:00
Jan Larres
9ec7d1db4c Merge pull request #118 from techlivezheng/feature/autoupdate-on-bufreadpost
Run auto-updating on BufReadPost event
2013-02-06 00:35:57 -08:00
Jan Larres
9bbd0098c5 Don't update when in previewwindow, closes #112 2013-02-06 21:21:18 +13:00
Jan Larres
5816ce0c5a Add abort() to NextNormalWindow function 2013-02-06 19:00:34 +13:00
Jan Larres
3f03aa3013 Small patch cleanup 2013-02-06 18:43:51 +13:00
Techlive Zheng
0224d32eb9 Only reset '0 mark when it is the last window
We only need to reset '0 mark when our tagbar window is the last one,
otherwise, just quit the window and let the other window handle the
error that might happen on quiting Vim.
2013-02-06 18:21:36 +13:00
Techlive Zheng
987569e7dd Only colse the tagbar window itself
If there are other plugin windows open, close tagbar window and handle
over the control to the other window.

If the last file in the Vim's file arguments list has not been edited
yet, normal Vim's behavior would be quit on ':q!' or twice ':q'. As our
plugin window is the last window now, previously quiting on the file
window will not trigger the "more files" check, but our window does.
We'd better to behave the same. Currently, twice ':q' quiting would work,
but ':q!' not. There is no easy way to determine whether the command
being executed with a "!" or not, so this is a flaw now and we need
to come up a better solution someday, but it is a progress than before.
2013-02-06 18:21:35 +13:00
Techlive Zheng
a444c62066 Quit if no more normal window exists
There might be other plugin windows but no normal file window open, we
need to make sure tagbar window is closed at this situation.
2013-02-06 18:21:35 +13:00
Jan Larres
1181325968 Reinstate noautocmd when going to pprev window 2013-02-06 17:30:33 +13:00
Jan Larres
1f0c0a3a8e Small cleanup of last patch 2013-02-06 17:07:27 +13:00
Techlive Zheng
ad8783961d Do not interfere window switching history
Many plugins rely on 'wincmd p' to work properly, we need to preserve
at least one-level backwards window switching history.
2013-02-06 17:00:09 +13:00
Jan Larres
bccdc7a48d Improve out-of-sync error reporting 2013-02-04 15:10:06 +13:00
John Szakmeister
2b1f655063 When switching to a buffer that is unsupported, clear current. 2013-01-20 10:54:16 -05:00
Techlive Zheng
17d199f584 Run auto-updating on BufReadPost event
If 'autoread' is set and a buffer gets updated, tagbar need to be
triggerd to update itself too.
2012-11-30 08:17:58 +08:00
Jan Larres
7d836e0c53 Make visibility symbols optional 2012-11-22 18:42:14 +13:00
Jan Larres
0ab07ac566 Use 'visibility' instead of 'access' everywhere exclusively 2012-11-22 18:05:59 +13:00
kianryan
15eddce14f Updates to TagbarTogglePause
Changes requested by majutsushi.

Changed function to :TagbarTogglePause
Added documentation for function, including usage and defintion.
Changed autocommands_enable to autocommands_enabled.
2012-11-01 14:36:45 +00:00
kianryan
e88b81c4f5 Merge branch 'master' of github.com:kianryan/tagbar 2012-10-01 14:24:46 +01:00
kianryan
19695b87b0 Pause autocmd functionality with :TagbarPause
tagbar#PauseAutocommands :TagbarPause

:TagbarPause pauses autocmds, effectively freezing Tagbar on the last
file.  Useful for keeping a tag reference for a file open whilst working
in a different file.
2012-10-01 14:22:35 +01:00
Jan Larres
568ef5fd25 Make the indent configurable, closes #110 2012-10-01 22:59:53 +13:00
Jan Larres
e635a23cf5 Don't disable cursorline/column locally 2012-10-01 21:57:28 +13:00
Jan Larres
2fee7677d5 Handle invalid fields gracefully 2012-09-16 03:03:11 +12:00
Jan Larres
ee700817d5 Fix some TagbarShowTag bugs, closes #108 2012-09-15 16:49:28 +12:00
Jan Larres
63e689b647 Escape all cmd.exe reserved chars 2012-09-11 17:44:14 +12:00
Jan Larres
ba6eb10e49 Don't use doautocmd 2012-09-09 22:55:57 +12:00
Jan Larres
d39a767486 Allow prototype to be shown with currenttag 2012-09-09 20:17:44 +12:00
Jan Larres
6483a0edd1 Merge pull request #104 from zmx/patch-1
Support Clojure as LISP type
2012-09-04 05:48:31 -07:00
Jan Larres
757358349e Move some var inits outside of win init function 2012-09-05 00:29:28 +12:00
Zhong, Ming-Xun
ba7d6b3e8e Support Clojure as LISP type 2012-08-31 18:42:25 +08:00
Jan Larres
4569779601 Only generate prototypes on-demand 2012-08-27 01:57:56 +12:00
Jan Larres
7d1ba97603 Typo in comment 2012-08-26 19:32:46 +12:00
Jan Larres
b1c7f5f792 Improve prototype handling 2012-08-26 19:25:02 +12:00
Jan Larres
b19c1d8524 Try to get complete prototype 2012-08-26 18:36:26 +12:00
Jan Larres
8b5ba2ad66 Tweak some debug messages 2012-08-23 01:47:59 +12:00
Jan Larres
25f43b9e88 Print debug message when executing ctags 2012-08-23 00:59:41 +12:00
Jan Larres
f6acd740d7 Better debug message 2012-08-18 00:11:07 +12:00
Jan Larres
bff765b957 Only determine extension once 2012-08-01 21:08:49 +12:00
Jan Larres
f2c072dbb9 Add extension to temporary files 2012-07-31 16:50:55 +12:00
Jan Larres
e321d85548 Don't open all folds when jumping to tag 2012-07-31 16:42:33 +12:00
Jan Larres
f3c1a93017 Make 'open' commands a bit more intuitive 2012-07-31 16:42:18 +12:00
Jan Larres
e690a5e97d Cache files locally for parsing
Files are now cached locally in a temporary file, and the parsing
happens on that file. This allows displaying tags for remote (Netrw)
files, and it will also make access to files on remote filesystems like
NFS and sshfs faster.

Additionally, tags are now always updated when the files are saved,
deprecating the tagbar_updateonsave_maxlines option. Otherwise checking
for changes in remote files would not have been possible.
2012-07-22 21:49:17 +12:00
Jan Larres
427d709f61 Only attempt encoding conversion if compiled with +multi_byte 2012-07-21 20:59:23 +12:00
Jan Larres
49d39cae6c Add 'abort' keyword to all functions 2012-07-20 01:24:16 +12:00
Jan Larres
6a7f155874 Version 2.4.1 2012-07-16 21:38:20 +12:00
Jan Larres
768cd6b908 Only check for ctags when a function is called
If ctags isn't installed, then until now most of the autoload script
would have been skipped, leaving functions like tagbar#currenttag()
undefined. Move the ctags check to the exuberant-ctags checking function
to prevent errors in this case.
2012-07-01 19:21:44 +12:00
Jan Larres
4981cf9896 Handle missing ctags more gracefully in currenttag
If tagbar#currenttag() was used in a statusline on a system that had
Tagbar installed, but not ctags, then an error was reported on every
statusline update. Change the ctags checking so that errors in
currenttag() fail silently while still reporting an error message if
Tagbar is opened normally.
2012-07-01 18:48:00 +12:00
Jan Larres
4dabb96014 Update types for vim, sql and actionscript
Some of the type configurations were not up to date with the latest
ctags version. Thanks to David Fishburn for providing the information.
2012-06-24 18:57:50 +12:00
Jan Larres
7f95420284 Disable spellchecking in Tagbar window, closes #83 2012-06-23 16:39:07 +12:00
Jan Larres
44ce05fb5d Fix highlighting tags in closed folds
If a tag was in a closed fold that was itself in a closed fold, and
those folds existed since the initial display (for example by using the
g:tagbar_foldlevel option), then intermediate tags could have invalid
tline values which resulted in the search pattern failing.
2012-06-23 01:30:45 +12:00
Jan Larres
9ae2b2d818 Add highlight pattern debug message 2012-06-22 22:25:03 +12:00
Jan Larres
2e0d125b79 Explicitly load plugin file if necessary 2012-06-19 16:49:55 +12:00
Jan Larres
5ee3143b5a Version 2.4 2012-06-17 21:19:42 +12:00
Jan Larres
c5f91a5b76 Add command for easy type customization 2012-06-16 21:46:54 +12:00
Jan Larres
ee1c4e137e Always highlight current tag when using TagbarOpen, closes #73 2012-05-12 20:07:04 +12:00
Jan Larres
272e2e8478 Escape some special characters for cmd.exe 2012-04-30 16:40:28 +12:00
Jan Larres
814bb41ecf Highlight correct tag when opening tagbar 2012-04-22 04:28:28 +12:00
Jan Larres
f14c81770b Fix small bug in RestoreSession 2012-04-15 23:10:58 +12:00
Jan Larres
bbe5579c89 Allow the full hierarchy to be displayed in currenttag() 2012-04-15 23:10:34 +12:00
Jan Larres
eab0e67d1b Make use of improved latex support in ctags if available 2012-04-02 18:30:18 +12:00
Jan Larres
497575a3a3 Highlight all tags instead of just stl-configured ones 2012-03-31 20:25:05 +13:00
Jan Larres
d29690005d Move default column definition into tag init function 2012-03-16 23:51:35 +13:00
Jan Larres
f7d966c596 Support column: extension field 2012-03-14 23:10:31 +13:00
Jan Larres
86b49e6949 Make SetFoldlevel respect default-closed folds without '!', closes #61 2012-03-14 22:42:59 +13:00
Jan Larres
774c964f28 Use prototypes for the type information 2012-03-14 22:42:59 +13:00
Jan Larres
dd84a57c6e Move parsing of user type defs into separate function 2012-03-08 18:06:51 +13:00
Jan Larres
a9209b4367 Remove access info from currenttag() 2012-03-05 23:31:11 +13:00
Jan Larres
134207bc41 Allow types for tagbar#currenttag() to be configured 2012-03-04 20:52:15 +13:00
Jan Larres
c0ed890b60 Disable debug mode by default, closes #67 2012-02-29 02:35:47 +13:00
Jan Larres
d9857cf204 Add function that returns the current tag, closes #59 2012-02-29 00:21:50 +13:00
Jan Larres
091f6336c8 Save some unnecessary redrawings 2012-02-28 22:46:04 +13:00
Jan Larres
3e8e8775be Create sub-kind headers as base tags to allow folding of parents 2012-02-28 22:45:11 +13:00
Jan Larres
592dc6856a Update online help 2012-02-28 22:10:41 +13:00
Jan Larres
4eb89e4a53 Don't handle sub-kind headers as tags 2012-02-28 22:10:16 +13:00
Jan Larres
efca11881d Remove unneeded function 2012-02-28 02:38:39 +13:00
Jan Larres
64b8bf7447 Reorder some functions 2012-02-28 02:34:01 +13:00
Jan Larres
2ba944b162 Correct focus on startup under certain circumstances, closes #60 2012-02-23 20:49:16 +13:00
Jan Larres
08b474b59f Add some more debugging messages 2012-02-23 20:43:13 +13:00
Jan Larres
a69cb8ce0b Delete fileinfo also on BufUnload and BufWipeout 2012-02-23 00:00:24 +13:00
Jan Larres
ee389534e1 Allow loading type definitions from ftplugins, closes #62 2012-02-19 17:26:15 +13:00
Jan Larres
7e58b3fe23 Change kind header check in JumpToTag to proper function 2012-02-18 21:47:40 +13:00
Jan Larres
4d925ca324 Automatically detect ex-ctags as 'ectags' in OpenBSD 2012-02-12 19:21:37 +13:00
Jan Larres
b56f2c0db2 Support Vala if anjuta-tags is available 2012-02-12 18:37:05 +13:00
Jan Larres
2149951be0 Check filetypes supported by ctags during init 2012-02-12 18:36:45 +13:00
Jan Larres
0f3cca5a84 Give more precise information if specified ctags not found 2012-02-12 18:35:54 +13:00
Jan Larres
ba0123cc91 Fix bug when closing window before a valid files was seen 2012-02-02 21:07:13 +13:00
Jan Larres
392de7da25 Save new empty object for file if ctags output is empty, closes #57 2012-02-01 00:21:28 +13:00
Jan Larres
cca0f7798e Add some debug messages 2012-01-31 20:59:06 +13:00
Jan Larres
8bb4a3c111 Abstract out window commands without autocommands 2012-01-31 20:58:49 +13:00
Jan Larres
52fe2b7c3a Try to jump to the correct window after closing, closes #56 2012-01-20 15:56:50 +13:00
Jan Larres
6a95bfbbc0 Only ignore BufEnter when jumping to tag 2012-01-18 18:38:34 +13:00
Jan Larres
2c2b3fb99e Use quitall in QuitIfOnlyWindow() 2012-01-14 19:35:50 +13:00
Jan Larres
d48c6f83f5 Add 'always' parameter to autoopen() 2012-01-14 19:35:01 +13:00
Jan Larres
81cfb3f903 Version 2.3 2011-12-24 18:14:54 +13:00
Jan Larres
8e5ce3a3e5 Replace usearrows with iconchars 2011-12-22 18:06:48 +13:00
Jan Larres
f9b50a1e95 Remove need to provide complete jsctags configuration if jsctags not in path 2011-12-21 20:33:31 +13:00
Jan Larres
9a2cf9756f Add convenience function for automatically opening Tagbar 2011-12-21 19:28:34 +13:00