According to 'kate --help', to open a file and jump to a certain line, you have to use the '-l' argument, instead of '+':
kate -l LINE FILE.c
Works for me (command line, not cscope).
Я попытался установить EDITOR
в kate
и начать cscope
. К сожалению, когда-нибудь Cscope запускает Кейт:
kate +LINE FILE.c
редактор игнорирует флаг строки +, рассматривая его как просто другой (несуществующий) файл вместо открытия файла file.c в запрошенной строке ...
Я не могу поверить, что редактор может быть настолько глупым - должен быть хитрость, чтобы заставить его работать должным образом. Что это?
According to 'kate --help', to open a file and jump to a certain line, you have to use the '-l' argument, instead of '+':
kate -l LINE FILE.c
Works for me (command line, not cscope).
Thanks to user14164's answer above for the pointer. Looking through cscope's own man-page, I found a way to teach it, how to invoke editors, which -- like kate -- don't recognize the +LINE notation. By launching cscope this way:
env CSCOPE_LINEFLAG=-l%s CSCOPE_EDITOR=kate cscope
Then, by replacing kate
with a wrapper, that launches real kate
in the background (with kate's chatty stderr redirected to /dev/null
)
#!/bin/sh exec kate "$@" 2> /dev/null &
I get the gvim-like functionality (where cscope remains available while the launched editor is running) without gvim's multitude of windows.