Skip to content

Commit 363192c

Browse files
author
skywind3000
committed
Add support for generating ctags for ini configuration files in quickui
- Added support for generating ctags for dosini, taskini, and ini configuration file types in quickui - Updated the mode handling in the ctags generation function to remove unnecessary characters - Improved the cleanup of line endings and whitespace in the ctags generation script
1 parent cc254b5 commit 363192c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

autoload/quickui/tags.vim

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" tags.vim -
44
"
55
" Created by skywind on 2020/01/07
6-
" Last Modified: 2020/01/07 03:17:49
6+
" Last Modified: 2024/03/23 21:14
77
"
88
"======================================================================
99

@@ -302,6 +302,9 @@ function! quickui#tags#ctags_function(bid, ft)
302302
\ "go": "--go-kinds=f --language-force=Go",
303303
\ "rust": "--rust-kinds=fPM",
304304
\ "ocaml": "--ocaml-kinds=mf",
305+
\ "dosini": "--iniconf-kinds=s --language-force=iniconf",
306+
\ "taskini": "--iniconf-kinds=s --language-force=iniconf",
307+
\ "ini": "--iniconf-kinds=s --language-force=iniconf",
305308
\ }
306309
let ft = (a:ft != '')? a:ft : getbufvar(a:bid, '&ft')
307310
let modified = getbufvar(a:bid, '&modified')
@@ -330,12 +333,13 @@ function! quickui#tags#ctags_function(bid, ft)
330333
endif
331334
let items = []
332335
for line in split(output, "\n")
336+
let line = substitute(line, '[\t\r\n ]*$', '', '')
333337
let item = split(line, "\t")
334338
if len(item) >= 4
335339
let ni = {}
336340
let ni.tag = item[0] " tagname
337341
let ni.line = str2nr(substitute(item[2], '[;"\s]', '', 'g'))
338-
let ni.mode = substitute(item[3], '[\r\n\s]*$', '', 'g')
342+
let ni.mode = substitute(item[3], '[\r\n\t ]*$', '', 'g')
339343
let ni.text = ''
340344
let code = getbufline(a:bid, ni.line)
341345
if len(code) == 1

0 commit comments

Comments
 (0)