View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011310 | CMake | CMake | public | 2010-10-13 09:21 | 2011-04-04 12:00 | ||||
Reporter | Matthias Kretz | ||||||||
Assigned To | Marcus D. Hanwell | ||||||||
Priority | normal | Severity | feature | Reproducibility | N/A | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | CMake 2.8.4 | Fixed in Version | CMake 2.8.4 | ||||||
Summary | 0011310: vim script to open --help-command output in a split window | ||||||||
Description | This is a little script to open a vertical split window with the output of cmake --help-command for the word under the cursor. Alex suggested to post it here so that you may bundle it with the other vim scripts for cmake. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | cmakehelp.vim [^] (479 bytes) 2010-10-13 09:21 | ||||||||
Relationships | |
Relationships |
Notes | |
(0022525) Marcus D. Hanwell (developer) 2010-10-18 15:44 |
Where should the file be installed, and how should I invoke it? I would like to properly test it before adding it to CMake, it sounds like a useful addition to CMake's support files. |
(0022546) Matthias Kretz (reporter) 2010-10-20 04:39 |
you can put the file in ~/.vim/plugins or copy the contents to your .vimrc. Both work. To use it press ,hc with the cursor over a cmake command. |
(0023863) David Cole (manager) 2010-12-09 19:11 |
Marcus, if you want to fix this issue, the best place to put this file in the CMake source tree is probably "CMake/Docs" alongside the existing cmake-syntax.vim file. If you want to get this into the upcoming 2.8.4 release, just get it tested by the end of the month and let me know. |
(0023864) Marcus D. Hanwell (developer) 2010-12-09 19:12 |
Will do, I want to get this into the next release. |
(0023866) Matthias Kretz (reporter) 2010-12-10 01:43 |
I fixed an issue with the script and added a line that remaps the F1 key to the cmake help if a cmake file is open. The F1 mapping is probably a bit invasive an can be disabled by commenting the last line. |
(0023867) Matthias Kretz (reporter) 2010-12-10 01:45 |
File upload doesn't work (because the Mantis says the file already exists and I should delete it which I'm unable to do) so here's the updated version: nmap ,hc :call OpenCmakeHelp()<CR> function! OpenCmakeHelp() let s = getline( '.' ) let i = col( '.' ) - 1 while i > 0 && strpart( s, i, 1 ) =~ '[A-Za-z0-9_]' let i = i - 1 endwhile while i < col('$') && strpart( s, i, 1 ) !~ '[A-Za-z0-9_]' let i = i + 1 endwhile let start = match( s, '[A-Za-z0-9_]\+', i ) let end = matchend( s, '[A-Za-z0-9_]\+', i ) let ident = strpart( s, start, end - start ) execute "vertical new" execute "%!cmake --help-command ".ident set nomodified set readonly endfunction autocmd BufRead,BufNewFile *.cmake,CMakeLists.txt,*.cmake.in nmap <F1> :call OpenCmakeHelp()<CR> |
(0023897) Marcus D. Hanwell (developer) 2010-12-11 12:24 |
Looks great, tested and I think many people will find it very helpful. Matthias - what email address would you like me to use in the author line of the commit? I can't see what your registered address is, I have this locally and will stage and merge into next once you get an appropriate email address to me. Thanks. |
(0023928) Marcus D. Hanwell (developer) 2010-12-13 13:27 |
I got the details, and am merging this to next so it should be good to go into the next release. |
(0023986) Marcus D. Hanwell (developer) 2010-12-14 17:35 |
This was merged into CMake master today, and should be in the 2.8.4 release. Thank you for your contribution Matthias, it is a very useful addition for the vim users among us. |
(0026041) David Cole (manager) 2011-04-04 12:00 |
Closing resolved issues that have not been updated in more than 3 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-10-13 09:21 | Matthias Kretz | New Issue | |
2010-10-13 09:21 | Matthias Kretz | File Added: cmakehelp.vim | |
2010-10-13 13:09 | Bill Hoffman | Status | new => assigned |
2010-10-13 13:09 | Bill Hoffman | Assigned To | => Marcus D. Hanwell |
2010-10-18 15:44 | Marcus D. Hanwell | Note Added: 0022525 | |
2010-10-20 04:39 | Matthias Kretz | Note Added: 0022546 | |
2010-12-09 19:11 | David Cole | Note Added: 0023863 | |
2010-12-09 19:12 | Marcus D. Hanwell | Note Added: 0023864 | |
2010-12-09 19:35 | David Cole | Target Version | => CMake 2.8.4 |
2010-12-10 01:43 | Matthias Kretz | Note Added: 0023866 | |
2010-12-10 01:45 | Matthias Kretz | Note Added: 0023867 | |
2010-12-11 12:24 | Marcus D. Hanwell | Note Added: 0023897 | |
2010-12-11 12:24 | Marcus D. Hanwell | Status | assigned => feedback |
2010-12-13 13:27 | Marcus D. Hanwell | Note Added: 0023928 | |
2010-12-13 18:48 | Marcus D. Hanwell | Status | feedback => assigned |
2010-12-14 17:35 | Marcus D. Hanwell | Note Added: 0023986 | |
2010-12-14 17:35 | Marcus D. Hanwell | Status | assigned => resolved |
2010-12-14 17:35 | Marcus D. Hanwell | Fixed in Version | => CMake 2.8.4 |
2010-12-14 17:35 | Marcus D. Hanwell | Resolution | open => fixed |
2011-04-04 12:00 | David Cole | Note Added: 0026041 | |
2011-04-04 12:00 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |