VIM: simple steps to create syntax highlight file - for logfiles

后端 未结 5 1747
别跟我提以往
别跟我提以往 2020-12-23 02:24

I have some (log4j generated) logfiles to go through; I know their format pretty well (I mean I have already got off-the-peg regexes etc I can use).

I want to automa

5条回答
  •  礼貌的吻别
    2020-12-23 03:06

    To load automatically with *.log files you should make an ftplugin for this filetype.

    For example, in my log.vim file in my .vim/ftplugin folder I have simple instructions for setting a keyboard shortcut when loading *.log files.

    Note: ftplugins may not be the best way to do this... setting the syntax file as Al describes is probably better. I'll leave this answer here though for the alternative possibility.

提交回复
热议问题