File: vimtags

package info (click to toggle)
tclreadline 2.3.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,848 kB
  • sloc: tcl: 5,697; sh: 4,217; ansic: 720; makefile: 80
file content (27 lines) | stat: -rwxr-xr-x 816 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/local/bin/tclsh
# ==================================================================
# FILE: aux/vimtags
# $Id: dd95fab21b234c24fb8ad331742f5d14f348f96b $
# ---
# tclreadline -- gnu readline for tcl
# https://github.com/flightaware/tclreadline/
# Copyright (c) 1998 - 2014, Johannes Zellner <johannes@zellner.org>
# This software is copyright under the BSD license.
# ==================================================================


if [file readable tags] {
    set tags [open tags r]
    set vim [open tags.vim w]
    while {[gets $tags line] != -1} {
        if [regexp "^\(\[^  !\]*\)\[    \]" $line all proc] {
            set proc [string trim $proc]
            if {$proc != ""} {
                puts $vim "syntax keyword Tag $proc"
            }
        }
    }
    close $tags
    close $vim
}