Permalink
Browse files

updated for version 7.1b

  • Loading branch information...
vimboss
vimboss committed May 10, 2007
1 parent bc17643 commit 6ce2c134ac8aa8fbac9d24e6d4a445d31af85dfc
Showing with 606 additions and 34 deletions.
  1. +4 −4 runtime/doc/eval.txt
  2. +2 −2 runtime/doc/usr_31.txt
  3. +51 −19 runtime/ftplugin/ruby.vim
  4. +537 −0 runtime/syntax/cdrtoc.vim
  5. +4 −4 runtime/syntax/django.vim
  6. +1 −1 src/arabic.h
  7. +7 −4 src/gui_gtk.c
View
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.1a. Last change: 2007 May 03
+*eval.txt* For Vim version 7.1b. Last change: 2007 May 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1684,7 +1684,7 @@ matchlist( {expr}, {pat}[, {start}[, {count}]])
matchstr( {expr}, {pat}[, {start}[, {count}]])
String {count}'th match of {pat} in {expr}
max({list}) Number maximum value of items in {list}
-min({list}) Number minumum value of items in {list}
+min({list}) Number minimum value of items in {list}
mkdir({name} [, {path} [, {prot}]])
Number create directory {name}
mode() String current editing mode
@@ -2511,7 +2511,7 @@ feedkeys({string} [, {mode}]) *feedkeys()*
{string}.
To include special keys into {string}, use double-quotes
and "\..." notation |expr-quote|. For example,
- feedkeys("\<CR>") simulates pressing of the Enter key. But
+ feedkeys("\<CR>") simulates pressing of the <Enter> key. But
feedkeys('\<CR>') pushes 5 characters.
If {mode} is absent, keys are remapped.
{mode} is a String, which can contain these character flags:
@@ -3677,7 +3677,7 @@ max({list}) Return the maximum value of all items in {list}.
An empty |List| results in zero.
*min()*
-min({list}) Return the minumum value of all items in {list}.
+min({list}) Return the minimum value of all items in {list}.
If {list} is not a list or one of the items in {list} cannot
be used as a Number this results in an error.
An empty |List| results in zero.
View
@@ -1,4 +1,4 @@
-*usr_31.txt* For Vim version 7.1a. Last change: 2006 Apr 24
+*usr_31.txt* For Vim version 7.1b. Last change: 2007 May 08
VIM USER MANUAL - by Bram Moolenaar
@@ -248,7 +248,7 @@ you can set the 'lines' option to set a different window size: >
You don't want to do this in a terminal, since it's size is fixed (except for
an xterm that supports resizing).
The gvimrc file is searched for in the same locations as the vimrc file.
-Normally it's name is "~/.gvimrc" for Unix and "$VIM/_gvimrc" for MS-Windows.
+Normally its name is "~/.gvimrc" for Unix and "$VIM/_gvimrc" for MS-Windows.
The $MYGVIMRC environment variable is set to it, thus you can use this command
to edit the file, if you have one: >
View
@@ -30,28 +30,21 @@ endif
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_ignorecase = 0
- " TODO: improve optional do loops
let b:match_words =
- \ '\%(' .
- \ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<\%(class\|module\|begin\|def\|case\|for\|do\)\>' .
- \ '\|' .
- \ '\%(\%(^\|\.\.\.\=\|[{\:\,;([<>~\*/%&^|+-]\|\%(\<[_[\:lower\:]][_[\:alnum\:]]*\)\@<![!=?]\)\s*\)\@<=\%(if\|unless\|while\|until\)\>' .
- \ '\)' .
+ \ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|def\|begin\)\>=\@!' .
\ ':' .
- \ '\%(' .
- \ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<\%(else\|elsif\|ensure\|when\)\>' .
- \ '\|' .
- \ '\%(\%(^\|;\)\s*\)\@<=\<rescue\>' .
- \ '\)' .
+ \ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' .
\ ':' .
- \ '\%(\%(\.\|\:\:\)\s*\|\:\)\@<!\<end\>' .
+ \ '\<end\>' .
\ ',{:},\[:\],(:)'
let b:match_skip =
\ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" .
- \ "\\<ruby\\%(String\\|StringDelimiter\\|ASCIICode\\|Interpolation\\|" .
- \ "NoInterpolation\\|Escape\\|Comment\\|Documentation\\)\\>'"
-
+ \ "\\<ruby\\%(String\\|StringDelimiter\\|ASCIICode\\|Escape\\|" .
+ \ "Interpolation\\|NoInterpolation\\|Comment\\|Documentation\\|" .
+ \ "ConditionalModifier\\|RepeatModifier\\|OptionalDo\\|" .
+ \ "Function\\|BlockArgument\\|KeywordAsMethod\\|ClassVariable\\|" .
+ \ "InstanceVariable\\|GlobalVariable\\|Symbol\\)\\>'"
endif
setlocal formatoptions-=t formatoptions+=croql
@@ -103,9 +96,26 @@ if has("gui_win32") && !exists("b:browsefilter")
endif
let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< kp<"
- \ "| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip"
- \ "| if exists('&ofu') && has('ruby') | setl ofu< | endif"
- \ "| if has('balloon_eval') && exists('+bexpr') | setl bexpr< | endif"
+ \."| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip"
+ \."| if exists('&ofu') && has('ruby') | setl ofu< | endif"
+ \."| if has('balloon_eval') && exists('+bexpr') | setl bexpr< | endif"
+
+if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
+
+ noremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','b')<CR>
+ noremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','')<CR>
+ noremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','b')<CR>
+ noremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','')<CR>
+
+ noremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','b')<CR>
+ noremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','')<CR>
+ noremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','b')<CR>
+ noremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','')<CR>
+
+ let b:undo_ftplugin = b:undo_ftplugin
+ \."| sil! exe 'unmap <buffer> [[' | sil! exe 'unmap <buffer> ]]' | sil! exe 'unmap <buffer> []' | sil! exe 'unmap <buffer> ]['"
+ \."| sil! exe 'unmap <buffer> [m' | sil! exe 'unmap <buffer> ]m' | sil! exe 'unmap <buffer> [M' | sil! exe 'unmap <buffer> ]M'"
+endif
let &cpo = s:cpo_save
unlet s:cpo_save
@@ -155,7 +165,7 @@ function! RubyBalloonexpr()
return ''
endif
silent! let res = substitute(system("ri -f simple -T \"".str.'"'),'\n$','','')
- if res =~ '^Nothing known about' || res =~ '^Bad argument:'
+ if res =~ '^Nothing known about' || res =~ '^Bad argument:' || res =~ '^More than one method'
return ''
endif
return res
@@ -164,6 +174,28 @@ function! RubyBalloonexpr()
endif
endfunction
+function! s:searchsyn(pattern,syn,flags)
+ norm! m'
+ let i = 0
+ let cnt = v:count ? v:count : 1
+ while i < cnt
+ let i = i + 1
+ let line = line('.')
+ let col = col('.')
+ let pos = search(a:pattern,'W'.a:flags)
+ while pos != 0 && s:synname() !~# a:syn
+ let pos = search(a:pattern,'W'.a:flags)
+ endwhile
+ if pos == 0
+ call cursor(line,col)
+ return
+ endif
+ endwhile
+endfunction
+
+function! s:synname()
+ return synIDattr(synID(line('.'),col('.'),0),'name')
+endfunction
"
" Instructions for enabling "matchit" support:
Oops, something went wrong.

0 comments on commit 6ce2c13

Please sign in to comment.