Closed dpelle closed 8 years ago
I personally don't think that the way <leader>rj mapping works is confusing. It is usually called context search and works fine in most cases.
Case | Cursor location | Mapping action |
---|---|---|
1 | declaration | jump to definition |
2 | definition | jump to declaration |
3 | usage | jump to definition |
While it is possible to have a separate mapping for jumping to a declaration and a different mapping for jumping to a definition it seems like it would be an overkill. JumpTo has 4 variants: regular, split, vertical split and tab. I'm not sure we want 4 new mappings to cover jump-to-declaration case. AFAIU, the only issue you are having is 3rd case and only when you intend to jump to a declaration. How do you workaround this right now? I'm fine with adding a single mapping for jumping to declaration which will open that in the same window.
Let me know if this works for you.
Let me know if this works for you.
Sorry for the late response, I did not see your comment earlier. I got the latest version of plugin with the new
I often want to jump to the declaration directly (rather than first definition, then declaration), as the documentation is near the declaration in the code that I'm working on.
Off-topic: I see 2 typos in the help files:
$ git diff rtags.txt
diff --git a/doc/rtags.txt b/doc/rtags.txt
index dcdf519..177f2d7 100644
--- a/doc/rtags.txt
+++ b/doc/rtags.txt
@@ -84,7 +84,7 @@ g:rtagsMaxSearchResultWindowHeight
g:rtagsLog
Default: empty
- When set to filename, rtags will put it's logs in that file.
+ When set to filename, rtags will put its logs in that file.
*rtags-mappings*
4. Mappings
@@ -181,7 +181,7 @@ g:rtagsLog
rtags/symbol find symbol (alternative to <Leader>rs).
- rtags/symbol:i same as rtags/symbol, but for case insensitibe.
+ rtags/symbol:i same as rtags/symbol, but for case insensitive.
rtags/project list/switch projects.
Thanks for finding typos. I can fix them, or you can fix them and send a pull request if you would like. Problem found, problem solved. Thank you.
Typos fixed. Thanks for filing.
The vim rtags plugin is very useful for browsing c++ code. Thanks. In the current implementationrj jumps either to the definition or to the declaration as follows:
I find this a bit confusing as there is a state. It also causes me to pressrj twice if I want to jump to a declaration when cursor is where a symbol is used. I wish there were instead 2 mappings:
Is that possible?