https://github.com/Kitware/CMake
Revision 1c7833e7ae39f5145ab753492659bb73db5514f6 authored by Brad King on 28 March 2013, 14:42:24 UTC, committed by CMake Topic Stage on 28 March 2013, 14:42:24 UTC
5479251 Modules/readme.txt: make lines a bit shorter for easier readability
140692d Modules/readme.txt: switch from "XXX" to "Xxx"

2 parent s 9852d8f + 5479251
Raw File
Tip revision: 1c7833e7ae39f5145ab753492659bb73db5514f6 authored by Brad King on 28 March 2013, 14:42:24 UTC
Merge topic 'ExactCaseReadmeTxt'
Tip revision: 1c7833e
cmake-help.vim
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>
back to top