Ticket #267 (closed defect: fixed)
Editor's enhancement: C-code navigation via tags
Reported by: | angel_il | Owned by: | angel_il |
---|---|---|---|
Priority: | major | Milestone: | 4.7.0-pre2 |
Component: | mcedit | Version: | 4.7.0-pre1 |
Keywords: | codejump | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: | committed-master |
Description (last modified by angel_il) (diff)
It would be good to have possibility in the mcedit to navigate to function definition. Using for this purpose the utility etags and parse "TAGS" file in the current directory or parent.
For make TAGS do
$find . -type f -name "*.[ch]" | etags -l c --declarations -
Alt+Enter call listbox with files declarations.
Attachments
Change History
comment:1 Changed 16 years ago by angel_il
- Summary changed from C code navigation in mcedit to C-code navigation in mcedit
comment:2 Changed 16 years ago by angel_il
- Summary changed from C-code navigation in mcedit to Editor's enhancement: C-code navigation via tags
comment:3 Changed 16 years ago by angel_il
- Owner set to angel_il
- Status changed from new to accepted
Changed 16 years ago by angel_il
- Attachment 0001-Add-stack-navigation-structure.-Add-hotkeys-A-ba.patch added
comment:7 follow-up: ↓ 9 Changed 16 years ago by slavazanko
- Keywords rework added; review removed
I think, need little rework.
As first, etags is a part of big emacs, I propose use ctags instread:
ctags --languages=c -e -R -h '[ch]'
As second, patch little bit dirty. See changeset:8abf76df7c3140e85d2a83391c4ee54bd52a0924
And as third, IMHO works not correctly:
- run "ctags --languages=c -e -R -h '[ch]'" on mc source tree
- open for edit vfs/samba/lib/username.c:189 (stay on StrnCpy at char 'C')
- press ALT+Enter (or ESC,Enter)
list box show not only StrnCpy implementation link. May be, this feature, but as for me this don't intuitive :)
comment:8 Changed 16 years ago by slavazanko
Need to describe new hotkeys:
- ALT+- (minus) - Go to previous function in navigation list
- ALT+= (equal) - Go to next function in navigation list
And, of course, Esc,-(minus) and Esc,=(equal) works in parallel to ALT+... hotkeys.
This mean, need to add descriptions in *.hlp files and man-pages.
comment:9 in reply to: ↑ 7 Changed 16 years ago by angel_il
As first, etags is a part of big emacs, I propose use ctags instread:
ctags --languages=c -e -R -h '[ch]'
correct
ctags -e -R *.[ch]
comment:10 Changed 16 years ago by angel_il
- ALT+- (minus) - Go to back in navigation list (like a browser Back)
- ALT+= (equal) - Go to forward (like a browser Forward)
comment:11 Changed 16 years ago by slavazanko
- Keywords review vote-slavazanko added; rework removed
Last changes in branch looks good. All works fine. My vote here.
comment:12 Changed 16 years ago by andrew_b
- Keywords vote-andrew_b added; review removed
It will be great if you will provide a user menu entry "Create tags for this directory".
But anyway my vote here.
comment:13 Changed 16 years ago by angel_il
- Keywords commited:master added; vote-slavazanko vote-andrew_b removed
comment:14 Changed 16 years ago by angel_il
- Status changed from accepted to testing
- Resolution set to fixed
comment:17 Changed 15 years ago by nikecitycn
- severity set to no branch
comment:18 Changed 15 years ago by slavazanko
wtf?
comment:20 Changed 15 years ago by andrew_b
- Status changed from closed to reopened
- severity changed from merged to no branch
- Resolution fixed deleted
- Priority changed from minor to major
- Version changed from 4.6.2 to 4.7.0-pre1
- Milestone changed from 4.7 to 4.7.0-pre2
- Keywords codejump added; commited-master removed
- Type changed from enhancement to defect
Digits which are in the function name are added to the line number.
comment:21 Changed 15 years ago by angel_il
- severity changed from no branch to on review
branch: 267_fix_line_num
changeset: 10b4826383cc903ffe6d6c4366834ed203847ef6
comment:22 Changed 15 years ago by angel_il
changeset: 7e2f20bc324dbd74d9a574b41050b891348f929a
comment:24 Changed 15 years ago by iNode
- Votes for changeset changed from andrew_b to andrew_b iNode
- severity changed from on review to approved
comment:25 Changed 15 years ago by angel_il
- Status changed from reopened to closed
- Votes for changeset changed from andrew_b iNode to commited-master
- Resolution set to fixed
- severity changed from approved to merged