Код: Выделить всё
~/ $ cat example.hxx
bool function() {
return true;
}
~/ $ ctags example.hxx
~/ $ cat tags | grep function
!_TAG_KIND_DESCRIPTION!C++ f,function /function definitions/
function example.hxx /^bool function() {$/;" f typeref:typename:bool
~/ $ vim -t "function()"
E426: Tag not found: function()
~/ $ ctags --fields=+l --extras=+q example.hxx
~/ $ cat tags | grep function
!_TAG_KIND_DESCRIPTION!C++ f,function /function definitions/
function example.hxx /^bool function() {$/;" f language:C++ typeref:typename:bool
~/ $ vim -t "function()"
E426: Tag not found: function()
Возможное решение:
Код: Выделить всё
~/ $ sed "s/^\(\w\+\)\t/\1()\t/" -i"" tags
~/SubStack/tmp $ cat tags | grep function
!_TAG_KIND_DESCRIPTION!C++ f,function /function definitions/
function() example.hxx /^bool function() {$/;" f typeref:typename:bool
~/SubStack/tmp $ vim -t "function()"
example.hxx 4,0-1 All
"example.hxx" 4L, 35B
как и:
Код: Выделить всё
~/ $ echo "\"nnoremap :let stripped = expand(\"\"):execute \"tag \" . substitute(stripped, '()', '', 'g') \"`Tag not found: function()` fix" >> ~/.vimrc
Подробнее здесь: https://stackoverflow.com/questions/792 ... -functions
Мобильная версия