Skip to content

Instantly share code, notes, and snippets.

@alex-shamshurin
Created May 10, 2017 11:56
Show Gist options
  • Save alex-shamshurin/915110bc3d2bfda211ae33330399713b to your computer and use it in GitHub Desktop.
Save alex-shamshurin/915110bc3d2bfda211ae33330399713b to your computer and use it in GitHub Desktop.
vim-easy-tag patch fro jsctags
diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim
old mode 100644
new mode 100755
index d0dec21..43f985d
--- a/autoload/xolox/easytags.vim
+++ b/autoload/xolox/easytags.vim
@@ -6,7 +6,6 @@
let g:xolox#easytags#version = '3.11'
let g:xolox#easytags#default_pattern_prefix = '\C\<'
let g:xolox#easytags#default_pattern_suffix = '\>'
-
if !exists('s:timers_initialized')
let g:xolox#easytags#update_timer = xolox#misc#timer#resumable()
let g:xolox#easytags#highlight_timer = xolox#misc#timer#resumable()
@@ -240,6 +239,7 @@ function! s:prep_cmdline(cfile, arguments) " {{{3
let vim_file_type = xolox#easytags#filetypes#canonicalize(&filetype)
let custom_languages = xolox#misc#option#get('easytags_languages', {})
let language = get(custom_languages, vim_file_type, {})
+ call xolox#misc#msg#debug("easytags.vim %s: Executing language '%s'.", g:xolox#easytags#version, language)
if empty(language)
let cmdline = [xolox#easytags#ctags_command()]
call add(cmdline, '--fields=+l')
@@ -256,8 +256,9 @@ function! s:prep_cmdline(cfile, arguments) " {{{3
call xolox#misc#msg#warn("easytags.vim %s: No 'cmd' defined for language '%s', and also no global default!", g:xolox#easytags#version, vim_file_type)
return ''
endif
- let cmdline = [program] + get(language, 'args', [])
- call add(cmdline, xolox#misc#escape#shell(get(language, 'stdout_opt', '-f-')))
+ let cmdline = [program]
+ "+ get(language, 'args', [])
+ "call add(cmdline, xolox#misc#escape#shell(get(language, 'stdout_opt', '-f-')))
endif
let have_args = 0
if a:cfile != ''
@@ -289,6 +290,8 @@ function! s:prep_cmdline(cfile, arguments) " {{{3
endif
endfor
endif
+ "call add(cmdline, '-f')
+ call add(cmdline, xolox#misc#escape#shell("-f | sed '/^$/d' | sort"))
" No need to run Exuberant Ctags without any filename arguments!
return have_args ? join(cmdline) : ''
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment