[Cmake-commits] CMake branch, next, updated. v2.8.3-834-g1306474

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Dec 13 13:27:23 EST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  1306474331ecf15bc048a4d0aff53f4f6ac4632d (commit)
       via  ce013215d27caebff882240968c9b0e9a6d230e2 (commit)
      from  a3f94a43b4b3db9a294801a3f810fcb6a4b59307 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1306474331ecf15bc048a4d0aff53f4f6ac4632d
commit 1306474331ecf15bc048a4d0aff53f4f6ac4632d
Merge: a3f94a4 ce01321
Author:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
AuthorDate: Mon Dec 13 13:27:21 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Dec 13 13:27:21 2010 -0500

    Merge topic 'vim-help' into next
    
    ce01321 Inline help in vim with vertical split.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce013215d27caebff882240968c9b0e9a6d230e2
commit ce013215d27caebff882240968c9b0e9a6d230e2
Author:     Matthias Kretz <kretz at kde.org>
AuthorDate: Mon Dec 13 13:15:43 2010 -0500
Commit:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
CommitDate: Mon Dec 13 13:25:27 2010 -0500

    Inline help in vim with vertical split.
    
    Added a small script to open a vertical split window with the output of
    cmake --help-command for the word under the cursor.

diff --git a/Docs/cmake-help.vim b/Docs/cmake-help.vim
new file mode 100644
index 0000000..17cfa83
--- /dev/null
+++ b/Docs/cmake-help.vim
@@ -0,0 +1,21 @@
+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>

-----------------------------------------------------------------------

Summary of changes:
 Docs/cmake-help.vim |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 Docs/cmake-help.vim


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list