diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-29 21:55:22 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-29 21:55:22 +0000 |
commit | d8fc5c0b999204f47efd7702502b41ead11948a4 (patch) | |
tree | 35c332fe05654b768a8126fc3de893eef95eac2c /runtime | |
parent | 8ea9123258804d6199c79789af295bb3ca3db296 (diff) |
updated for version 7.0f05
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/rubycomplete.vim | 260 | ||||
-rw-r--r-- | runtime/doc/editing.txt | 14 | ||||
-rw-r--r-- | runtime/keymap/kana.vim | 727 | ||||
-rw-r--r-- | runtime/syntax/sisu.vim | 99 |
4 files changed, 894 insertions, 206 deletions
diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim index 53dc869d6b..9cde21494d 100644 --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -1,10 +1,10 @@ " Vim completion script -" Language: Ruby -" Maintainer: Mark Guzman <segfault@hasno.info> -" Info: $Id$ -" URL: http://vim-ruby.rubyforge.org -" Anon CVS: See above site -" Release Coordinator: Doug Kearns <dougkearns@gmail.com> +" Language: Ruby +" Maintainer: Mark Guzman <segfault@hasno.info> +" Info: $Id$ +" URL: http://vim-ruby.rubyforge.org +" Anon CVS: See above site +" Release Coordinator: Doug Kearns <dougkearns@gmail.com> " ---------------------------------------------------------------------------- " " Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com) @@ -71,7 +71,7 @@ function! IsInClassDef() let ret = 'nil' let pos = line('.') - if snum < pos && pos < enum + if snum < pos && pos < enum let ret = snum . '..' . enum endif @@ -79,43 +79,45 @@ function! IsInClassDef() endfunction function! GetRubyVarType(v) - let stopline = 1 - let vtp = '' - let pos = getpos('.') - let [lnum,lcol] = searchpos('^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$','nb',stopline) - if lnum != 0 && lcol != 0 - call setpos('.',pos) - let str = getline(lnum) - let vtp = substitute(str,'^\s*#\s*@var\s*'.a:v.'\>\s\+\([^ \t]\+\)\s*$','\1','') - return vtp - endif - call setpos('.',pos) + let stopline = 1 + let vtp = '' + let pos = getpos('.') + let [lnum,lcol] = searchpos('^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$','nb',stopline) + if lnum != 0 && lcol != 0 + call setpos('.',pos) + let str = getline(lnum) + let vtp = substitute(str,'^\s*#\s*@var\s*'.a:v.'\>\s\+\([^ \t]\+\)\s*$','\1','') + return vtp + endif + call setpos('.',pos) if g:rubycomplete_rails == 1 && g:rubycomplete_rails_loaded == 1 let ctors = '\(now\|new\|open\|get_instance\|find\|create\)' else let ctors = '\(now\|new\|open\|get_instance\)' endif - let [lnum,lcol] = searchpos(''.a:v.'\>\s*[+\-*/]*=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%r{\)','nb',stopline) - if lnum != 0 && lcol != 0 - let str = matchstr(getline(lnum),'=\s*\([^ \t]\+.' . ctors . '\>\|[\[{"''/]\|%r{\)',lcol) - let str = substitute(str,'^=\s*','','') - call setpos('.',pos) - if str == '"' || str == '''' - return 'String' - elseif str == '[' - return 'Array' - elseif str == '{' - return 'Hash' + let [lnum,lcol] = searchpos(''.a:v.'\>\s*[+\-*/]*=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%r{\|[A-Za-z0-9@:\-()]\+...\?\)','nb',stopline) + if lnum != 0 && lcol != 0 + let str = matchstr(getline(lnum),'=\s*\([^ \t]\+.' . ctors . '\>\|[\[{"''/]\|%r{\|[A-Za-z0-9@:\-()]\+...\?\)',lcol) + let str = substitute(str,'^=\s*','','') + call setpos('.',pos) + if str == '"' || str == '''' + return 'String' + elseif str == '[' + return 'Array' + elseif str == '{' + return 'Hash' elseif str == '/' || str == '%r{' return 'Regexp' - elseif strlen(str) > 4 + elseif strlen(str) >= 4 && stridx(str,'..') != -1 + return 'Range' + elseif strlen(str) > 4 let l = stridx(str,'.') - return str[0:l-1] - end - return '' - endif - call setpos('.',pos) + return str[0:l-1] + end + return '' + endif + call setpos('.',pos) return '' endfunction @@ -142,7 +144,7 @@ function! rubycomplete#Complete(findstart, base) return idx "findstart = 0 when we need to return the list of completions else - let g:rubycomplete_completions = [] + let g:rubycomplete_completions = [] execute "ruby get_completions('" . a:base . "')" return g:rubycomplete_completions endif @@ -206,34 +208,43 @@ def load_buffer_class(name) mixre = /.*\n\s*include\s*(.*)\s*\n/.match( classdef ) load_buffer_module( $2 ) if mixre != nil - eval classdef + eval classdef end def load_buffer_module(name) classdef = get_buffer_entity(name, 'GetBufferRubyModule("%s")') return if classdef == nil - eval classdef + eval classdef end def get_buffer_entity(name, vimfun) + return nil if /(\"|\')+/.match( name ) buf = VIM::Buffer.current nums = eval( VIM::evaluate( vimfun % name ) ) - return nil if nums == nil + return nil if nums == nil return nil if nums.min == nums.max && nums.min == 0 - + cur_line = VIM::Buffer.current.line_number classdef = "" nums.each do |x| if x != cur_line - ln = buf[x] + ln = buf[x] classdef += "%s\n" % ln end end - + return classdef end +def get_var_type( receiver ) + if /(\"|\')+/.match( receiver ) + "String" + else + VIM::evaluate("GetRubyVarType('%s')" % receiver) + end +end + def get_buffer_classes() # this will be a little expensive. allow_aggressive_load = VIM::evaluate('g:rubycomplete_classes_in_global') @@ -246,7 +257,7 @@ def get_buffer_classes() rg.each do |x| if /^\s*class\s*([A-Za-z0-9_-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*/.match( buf[x] ) - ret.push $1 + ret.push $1 end end @@ -256,10 +267,10 @@ end def load_rails() allow_rails = VIM::evaluate('g:rubycomplete_rails') return if allow_rails != '1' - + buf_path = VIM::evaluate('expand("%:p")') file_name = VIM::evaluate('expand("%:t")') - path = buf_path.gsub( file_name, '' ) + path = buf_path.gsub( file_name, '' ) path.gsub!( /\\/, "/" ) pup = [ "./", "../", "../../", "../../../", "../../../../" ] pok = nil @@ -267,25 +278,25 @@ def load_rails() pup.each do |sup| tpok = "%s%sconfig" % [ path, sup ] if File.exists?( tpok ) - pok = tpok - break + pok = tpok + break end end - + return if pok == nil bootfile = pok + "/boot.rb" envfile = pok + "/environment.rb" if File.exists?( bootfile ) && File.exists?( envfile ) begin - require bootfile + require bootfile require envfile require 'console_app' require 'console_with_helpers' - VIM::command('let g:rubycomplete_rails_loaded = 1') + VIM::command('let g:rubycomplete_rails_loaded = 1') rescue print "Error loading rails environment" - end + end end end @@ -293,71 +304,62 @@ def get_rails_helpers allow_rails = VIM::evaluate('g:rubycomplete_rails') rails_loaded = VIM::evaluate('g:rubycomplete_rails_loaded') return [] if allow_rails != '1' || rails_loaded != '1' - return RailsWords + return RailsWords end def get_completions(base) load_requires load_rails - input = VIM::evaluate('expand("<cWORD>")') + input = VIM::Buffer.current.line + cpos = VIM::Window.current.cursor[1] - 1 + input = input[0..cpos] if cpos != 0 input += base - input.lstrip! - if input.length == 0 - input = VIM::Buffer.current.line - input.strip! + + rip = input.rindex(/\s/,cpos) + if rip + input = input[rip..input.length] end - message = nil + asn = /^.*(\+|\-|\*|=|\(|\[)=?(\s*[A-Za-z0-9_:@.-]*)(\s*(\{|\+|\-|\*|\%|\/)?\s*).*/ + if asn.match(input) + input = $2 + end + + input.strip! + message = nil + receiver = nil + candidates = [] case input - when /^(\/[^\/]*\/)\.([^.]*)$/ - # Regexp + when /^(\/[^\/]*\/)\.([^.]*)$/ # Regexp receiver = $1 message = Regexp.quote($2) - candidates = Regexp.instance_methods(true) - select_message(receiver, message, candidates) - when /^([^\]]*\])\.([^.]*)$/ - # Array + when /^([^\]]*\])\.([^.]*)$/ # Array receiver = $1 message = Regexp.quote($2) - candidates = Array.instance_methods(true) - select_message(receiver, message, candidates) - when /^([^\}]*\})\.([^.]*)$/ - # Proc or Hash + when /^([^\}]*\})\.([^.]*)$/ # Proc or Hash receiver = $1 message = Regexp.quote($2) - candidates = Proc.instance_methods(true) | Hash.instance_methods(true) - select_message(receiver, message, candidates) - when /^(:[^:.]*)$/ - # Symbol + when /^(:[^:.]*)$/ # Symbol if Symbol.respond_to?(:all_symbols) - sym = $1 - candidates = Symbol.all_symbols.collect{|s| ":" + s.id2name} - candidates.grep(/^#{sym}/) - candidates.delete_if do |c| - c.match( /'/ ) - end - candidates.uniq! - candidates.sort! - else - [] + receiver = $1 + candidates = Symbol.all_symbols.collect{|s| s.id2name} + candidates.delete_if { |c| c.match( /'/ ) } end - when /^::([A-Z][^:\.\(]*)$/ - # Absolute Constant or class methods + when /^::([A-Z][^:\.\(]*)$/ # Absolute Constant or class methods receiver = $1 candidates = Object.constants candidates.grep(/^#{receiver}/).collect{|e| "::" + e} - when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/ - # Constant or class methods + when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/ # Constant or class methods receiver = $1 message = Regexp.quote($4) begin @@ -367,39 +369,30 @@ def get_completions(base) end candidates.grep(/^#{message}/).collect{|e| receiver + "::" + e} - when /^(:[^:.]+)\.([^.]*)$/ - # Symbol + when /^(:[^:.]+)\.([^.]*)$/ # Symbol receiver = $1 message = Regexp.quote($2) - candidates = Symbol.instance_methods(true) - select_message(receiver, message, candidates) - when /^([0-9_]+(\.[0-9_]+)?(e[0-9]+)?)\.([^.]*)$/ - # Numeric + when /^([0-9_]+(\.[0-9_]+)?(e[0-9]+)?)\.([^.]*)$/ # Numeric receiver = $1 message = Regexp.quote($4) - begin candidates = eval(receiver).methods rescue Exception candidates end - select_message(receiver, message, candidates) - when /^(\$[^.]*)$/ - candidates = global_variables.grep(Regexp.new(Regexp.quote($1))) + when /^(\$[^.]*)$/ #global + candidates = global_variables.grep(Regexp.new(Regexp.quote($1))) -# when /^(\$?(\.?[^.]+)+)\.([^.]*)$/ - when /^((\.?[^.]+)+)\.([^.]*)$/ - # variable + when /^((\.?[^.]+)+)\.([^.]*)$/ # variable receiver = $1 message = Regexp.quote($3) load_buffer_class( receiver ) cv = eval("self.class.constants") - - vartype = VIM::evaluate("GetRubyVarType('%s')" % receiver) + vartype = get_var_type( receiver ) if vartype != '' load_buffer_class( vartype ) @@ -426,31 +419,25 @@ def get_completions(base) /^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name candidates.concat m.instance_methods(false) } - candidates.sort! - candidates.uniq! end - #identify_type( receiver ) - select_message(receiver, message, candidates) - #when /^((\.?[^.]+)+)\.([^.]*)\(\s*\)*$/ - #function call - #obj = $1 - #func = $3 + when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/ + message = $1 + candidates = Range.instance_methods(true) - when /^\.([^.]*)$/ - # unknown(maybe String) + when /^\[(\s*[A-Za-z0-9:^@.%\/+*\(\)\[\]\{\}.\'\"],?)*\].([^.]*)/ + message = $2 + candidates = Array.instance_methods(true) - receiver = "" + when /^\.([^.]*)$/ # unknown(maybe String) message = Regexp.quote($1) - candidates = String.instance_methods(true) - select_message(receiver, message, candidates) else inclass = eval( VIM::evaluate("IsInClassDef()") ) if inclass != nil - classdef = "%s\n" % VIM::Buffer.current[ inclass.min ] + classdef = "%s\n" % VIM::Buffer.current[ inclass.min ] found = /^\s*class\s*([A-Za-z0-9_-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*\n$/.match( classdef ) if found != nil @@ -460,36 +447,27 @@ def get_completions(base) begin candidates = eval( "#{receiver}.instance_methods" ) candidates += get_rails_helpers - select_message(receiver, message, candidates) rescue Exception found = nil end end end - + if inclass == nil || found == nil candidates = eval("self.class.constants") candidates += get_buffer_classes - candidates.uniq! - candidates.sort! - (candidates|ReservedWords).grep(/^#{Regexp.quote(input)}/) + message = receiver = input end end - #print candidates - if message != nil && message.length > 0 - rexp = '^%s' % message.downcase - candidates.delete_if do |c| - c.downcase.match( rexp ) - $~ == nil - end - end + candidates.delete_if { |x| x == nil } + candidates.uniq! + candidates.sort! + candidates = candidates.grep(/^#{Regexp.quote(message)}/) if message != nil outp = "" - - # tags = VIM::evaluate("taglist('^%s$')" % valid = (candidates-Object.instance_methods) - + rg = 0..valid.length rg.step(150) do |x| stpos = 0+x @@ -502,24 +480,6 @@ def get_completions(base) end end - -def select_message(receiver, message, candidates) - #tags = VIM::evaluate("taglist('%s')" % receiver) - #print tags - candidates.grep(/^#{message}/).collect do |e| - case e - when /^[a-zA-Z_]/ - receiver + "." + e - when /^[0-9]/ - when *Operators - #receiver + " " + e - end - end - candidates.delete_if { |x| x == nil } - candidates.uniq! - candidates.sort! -end - # }}} ruby completion RUBYEOF endfunction @@ -527,4 +487,4 @@ endfunction let g:rubycomplete_rails_loaded = 0 call s:DefRuby() -" vim:tw=78:sw=4:ts=8:ft=vim:norl: +" vim:tw=78:sw=4:ts=8:et:ft=vim:norl: diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index aa8c4f4e19..02f646c0ba 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 7.0f. Last change: 2006 Apr 17 +*editing.txt* For Vim version 7.0f. Last change: 2006 Apr 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -343,12 +343,12 @@ CTRL-^ Edit the alternate file (equivalent to ":e #"). separated by a non-filename (see 'isfname') and non-numeric character. White space between the filename, the separator and the number are ignored. - Examples: > - eval.c:10 - eval.c @ 20 - eval.c (30) - eval.c 40 -< + Examples: + eval.c:10 ~ + eval.c @ 20 ~ + eval.c (30) ~ + eval.c 40 ~ + *v_gF* {Visual}[count]gF Same as "v_gf". diff --git a/runtime/keymap/kana.vim b/runtime/keymap/kana.vim new file mode 100644 index 0000000000..644b0ab44a --- /dev/null +++ b/runtime/keymap/kana.vim @@ -0,0 +1,727 @@ +" This script was originally created by Rory McCann <ebelular at gmail dot com>. +" Dan Kenigsberg noticed some deficiencies and suggested this one instead. +" +" Maintainer: Rory McCann <ebelular at gmail dot com> +" Modified by: Edward L. Fox <edyfox at gmail dot com> +" Last Change: 2006-04-29 11:14:32 +" +" +" +" Kana.kmap (Japanese Phonograms) +" +" Converted from Gaspar Sinai's yudit 2.7.6 +" GNU (C) Gaspar Sinai <gsinai@yudit.org> +" +" WARNING +" ------- +" This version of Kana.kmap is different from the one that has been used +" with yudit-2.7.2 or earlier. The main difference is that this kmap is +" arranged in such a way that it complies with an authorized Japanese +" transliteration. As a result, backward compatibility is not guaranteed. +" +" NOTE +" ---- +" 1. In general, the transliteration is based on Japanese Government's +" Cabinet Notification 1 (Dec. 9, 1954). +" +" Summary: +" +" (1) To transliterate Japanese language, Table 1 should be used +" primarily. +" (2) Table 2 may be used only when existing conventions such as +" international relationship should be respected. +" (3) Other transliteration is acceptable only when neither Table 1 +" nor Table 2 gives any specification of the sound in question +" +" For details, refer to +" +" http://xembho.tripod.com/siryo/naikaku_kokuzi.html +" +" 2. The specification instructed by the Cabinet Notification is rather +" inadequate even for daily use. At the present time there are thus +" many unauthorized but widely accepted conventions used together with +" the authorized transliteration. This kmap contains some of them for +" user's convenience (cf. Hiragana 3 and Katakana 3). +" +" 3. For the unicode mapping relevant to this kmap, refer to 3075--30F5 of +" +" http://www.macchiato.com/unicode/charts.html +" +" HISTORY +" ------- +" 2005-01-11 <danken@cs.technion.ac.il> +" * Converted to Vim format. +" 2003-01-22 <kazunobu.kuriyama@nifty.com> +" +" * Submitted to gsinai@yudit.org +" +" ============================================================================ + +scriptencoding utf-8 + +" ---------------------------------------------------------------------------- +" Kigou (Punctuation etc.) +" ---------------------------------------------------------------------------- + +let b:keymap_name = "kana" + +loadkeymap +"0x20 0x3000 +, 、 +. 。 +,, 〃 + + +xx 〆 +@ 〇 +< 〈 +> 〉 +<< 《 +>> 》 +{ 「 +} 」 +{{ 『 +}} 』 +[.( 【 +).] 】 + + +[ 〔 +] 〕 +[( 〖 +)] 〗 + + +[[ 〚 +]] 〛 + + +.. ・ +- ー + + +" ---------------------------------------------------------------------------- +" Hiragana 1 --- Table 1, Cabinet Notification No. 1 (Dec. 9, 1954) +" ---------------------------------------------------------------------------- +a あ +i い +u う +e え +o お + +ka か +ki き +ku く +ke け +ko こ + +sa さ +si し +su す +se せ +so そ + +ta た +ti ち +tu つ +te て +to と + +na な +ni に +nu ぬ +ne ね +no の + +ha は +hi ひ +hu ふ +he へ +ho ほ + +ma ま +mi み +mu む +me め +mo も + +ya や +yu ゆ +yo よ + +ra ら +ri り +ru る +re れ +ro ろ + +wa わ + +ga が +gi ぎ +gu ぐ +ge げ +go ご + +za ざ +zi じ +zu ず +ze ぜ +zo ぞ + +da だ +de で +do ど + +ba ば +bi び +bu ぶ +be べ +bo ぼ + +pa ぱ +pi ぴ +pu ぷ +pe ぺ +po ぽ + +kya きゃ +kyu きゅ +kyo きょ + +sya しゃ +syu しゅ +syo しょ + +tya ちゃ +tyu ちゅ +tyo ちょ + +nya にゃ +nyu にゅ +nyo にょ + +hya ひゃ +hyu ひゅ +hyo ひょ + +mya みゃ +myu みゅ +myo みょ + +rya りゃ +ryu りゅ +ryo りょ + +gya ぎゃ +gyu ぎゅ +gyo ぎょ + +zya じゃ +zyu じゅ +zyo じょ + +bya びゃ +byu びゅ +byo びょ + +pya ぴゃ +pyu ぴゅ +pyo ぴょ + +n ん +n' ん + + +" ---------------------------------------------------------------------------- +" Hiragana 2 --- Table 2, Cabinet Notification No. 1 (Dec. 9, 1954) +" ---------------------------------------------------------------------------- +sha しゃ +shi し +shu しゅ +sho しょ + +tsu つ + +cha ちゃ +chi ち +chu ちゅ +cho ちょ + +fu ふ + +ja じゃ +ji じ +ju じゅ +jo じょ + +di ぢ +du づ +dya ぢゃ +dyu ぢゅ +dyo ぢょ + +kwa くゎ +gwa ぐゎ + +wo を + + +" ---------------------------------------------------------------------------- +" Hiragana 3 --- Conventional transliterations +" ---------------------------------------------------------------------------- + +" Small Hiragana: The prefix X is never pronounced. It is used as something +" like an escape character. +xa ぁ +xi ぃ +xu ぅ +xe ぇ +xo ぉ + +xtu っ + +xya ゃ +xyu ゅ +xyo ょ + +xwa ゎ + +" Historic `wi' and `we' +wi ゐ +we ゑ + +" Preceded by a small `tu' +kka っか +kki っき +kku っく +kke っけ +kko っこ + +ssa っさ +ssi っし +ssu っす +sse っせ +sso っそ + +tta った +tti っち +ttu っつ +tte って +tto っと + +hha っは +hhi っひ +hhu っふ +hhe っへ +hho っほ + +mma っま +mmi っみ +mmu っむ +mme っめ +mmo っも + +yya っや +yyu っゆ +yyo っよ + +rra っら +rri っり +rru っる +rre っれ +rro っろ + +wwa っわ + +gga っが +ggi っぎ +ggu っぐ +gge っげ +ggo っご + +zza っざ +zzi っじ +zzu っず +zze っぜ +zzo っぞ + +dda っだ +ddi っぢ +ddu っづ +dde っで +ddo っど + +bba っば +bbi っび +bbu っぶ +bbe っべ +bbo っぼ + +ppa っぱ +ppi っぴ +ppu っぷ +ppe っぺ +ppo っぽ + +" Proceded by a small `tu' and followed by a small 'ya', 'yu' or 'yo' +kkya っきゃ +kkyu っきゅ +kkyo っきょ + +ssya っしゃ +ssyu っしゅ +ssyo っしょ + +ttya っちゃ +ttyu っちゅ +ttyo っちょ + +hhya っひゃ +hhyu っひゅ +hhyo っひょ + +mmya っみゃ +mmyu っみゅ +mmyo っみょ + +rrya っりゃ +rryu っりゅ +rryo っりょ + +ggya っぎゃ +ggyu っぎゅ +ggyo っぎょ + +zzya っじゃ +zzyu っじゅ +zzyo っじょ + +bbya っびゃ +bbyu っびゅ +bbyo っびょ + +ppya っぴゃ +ppyu っぴゅ +ppyo っぴょ + + +" ---------------------------------------------------------------------------- +" Katakana 1 --- Table 1, Cabinet Notification No. 1 (Dec. 9, 1954) +" ---------------------------------------------------------------------------- +A ア +I イ +U ウ +E エ +O オ + +KA カ +KI キ +KU ク +KE ケ +KO コ + +SA サ +SI シ +SU ス +SE セ +SO ソ + +TA タ +TI チ +TU ツ +TE テ +TO ト + +NA ナ +NI ニ +NU ヌ +NE ネ +NO ノ + +HA ハ +HI ヒ +HU フ +HE ヘ +HO ホ + +MA マ +MI ミ +MU ム +ME メ +MO モ + +YA ヤ +YU ユ +YO ヨ + +RA ラ +RI リ +RU ル +RE レ +RO ロ + +WA ワ + +GA ガ +GI ギ +GU グ +GE ゲ +GO ゴ + +ZA ザ +ZI ジ +ZU ズ +ZE ゼ +ZO ゾ + +DA ダ +DE デ +DO ド + +BA バ +BI ビ +BU ブ +BE ベ +BO ボ + +PA パ +PI ピ +PU プ +PE ペ +PO ポ + +KYA キャ +KYU キュ +KYO キョ + +SYA シャ +SYU シュ +SYO ショ + +TYA チャ +TYU チュ +TYO チョ + +NYA ニャ +NYU ニュ +NYO ニョ + +HYA ヒャ +HYU ヒュ +HYO ヒョ + +MYA ミャ +MYU ミュ +MYO ミョ + +RYA リャ +RYU リュ +RYO リョ + +GYA ギャ +GYU ギュ +GYO ギョ + +ZYA ジャ +ZYU ジュ +ZYO ジョ + +BYA ビャ +BYU ビュ +BYO ビョ + +PYA ピャ +PYU ピュ +PYO ピョ + +N ン +N' ン + + +" ---------------------------------------------------------------------------- +" Katakana 2 --- Table 2, Cabinet Notification No. 1 (Dec. 9, 1954) +" ---------------------------------------------------------------------------- +SHA シャ +SHI シ +SHU シュ +SHO ショ + +TSU ツ + +CHA チャ +CHI チ +CHU チュ +CHO チョ + +FU フ + +JA ジャ +JI ジ +JU ジュ +JO ジョ + +DI ヂ +DU ヅ +DYA ヂャ +DYU ヂュ +DYO ヂョ + +KWA クヮ +GWA グヮ + +WO ヲ + + +" ---------------------------------------------------------------------------- +" Katakana 3 --- Conventional transliterations +" ---------------------------------------------------------------------------- + +" Small Katakana: The prefix X is never pronounced. It is used as something +" like an escape character. +XA ァ +XI ィ +XU ゥ +XE ェ +XO ォ + +XTU ッ + +XYA ャ +XYU ュ +XYO ョ + +XWA ヮ + +" Used only for counting someone or something +XKA ヵ +XKE ヶ + +" Historic `wi' and `we' +WI ヰ +WE ヱ + +" Used for the sound `v' of European languages +VA ヴァ +VI ヴィ +VU ヴ +VE ヴェ +VO ヴォ + +VYU ヴュ + +" Preceded by a small `tu' +KKA ッカ +KKI ッキ +KKU ック +KKE ッケ +KKO ッコ + +SSA ッサ +SSI ッシ +SSU ッス +SSE ッセ +SSO ッソ + +TTA ッタ +TTI ッチ +TTU ッツ +TTE ッテ +TTO ット + +HHA ッハ +HHI ッヒ +HHU ッフ +HHE ッヘ +HHO ッホ + +MMA ッマ +MMI ッミ +MMU ッム +MME ッメ +MMO ッモ + +YYA ッヤ +YYU ッユ +YYO ッヨ + +RRA ッラ +RRI ッリ +RRU ッル +RRE ッレ +RRO ッロ + +WWA ッワ + +GGA ッガ +GGI ッギ +GGU ッグ +GGE ッゲ +GGO ッゴ + +ZZA ッザ +ZZI ッジ +ZZU ッズ +ZZE ッゼ +ZZO ッゾ + +DDA ッダ +DDI ッヂ +DDU ッヅ +DDE ッデ +DDO ッド + +BBA ッバ +BBI ッビ +BBU ッブ +BBE ッベ +BBO ッボ + +PPA ッパ +PPI ッピ +PPU ップ +PPE ッペ +PPO ッポ + +" Proceded by a small `tu' and followed by a small 'ya', 'yu' or 'yo' +KKYA ッキャ +KKYU ッキュ +KKYO ッキョ + +SSYA ッシャ +SSYU ッシュ +SSYO ッショ + +TTYA ッチャ +TTYU ッチュ +TTYO ッチョ + +HHYA ッヒャ +HHYU ッヒュ +HHYO ッヒョ + +MMYA ッミャ +MMYU ッミュ +MMYO ッミョ + +RRYA ッリャ +RRYU ッリュ +RRYO ッリョ + +GGYA ッギャ +GGYU ッギュ +GGYO ッギョ + +ZZYA ッジャ +ZZYU ッジュ +ZZYO ッジョ + +BBYA ッビャ +BBYU ッビュ +BBYO ッビョ + +PPYA ッピャ +PPYU ッピュ +PPYO ッピョ + + diff --git a/runtime/syntax/sisu.vim b/runtime/syntax/sisu.vim index 399b7a4ee4..bfc11bb0a1 100644 --- a/runtime/syntax/sisu.vim +++ b/runtime/syntax/sisu.vim @@ -12,34 +12,34 @@ endif syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" "% 10 Markers: Endnote Identifiers, Pagebreaks etc.: if !exists("sisu_no_identifiers") - syn match sisu_mark_endnote "\~^" - syn match sisu_contain "</\?sub>" - syn match sisu_break "<br>\|<br />" - syn match sisu_control "<p>\|</p>\|<p />\|<:p[bn]>" - syn match sisu_html "<center>\|</center>" - syn match sisu_marktail "[~-]#" - syn match sisu_html "<td>\|<td \|<tr>\|</td>\|</tr>\|<table>\|<table \|</table>" - syn match sisu_control "\"" - syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" - syn match sisu_number "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_mark_endnote "\~^" + syn match sisu_contain contains=@NoSpell "</\?sub>" + syn match sisu_break contains=@NoSpell "<br>\|<br />" + syn match sisu_control contains=@NoSpell "<p>\|</p>\|<p />\|<:p[bn]>" + syn match sisu_html "<center>\|</center>" + syn match sisu_marktail "[~-]#" + syn match sisu_html contains=@NoSpell "<td>\|<td \|<tr>\|</td>\|</tr>\|<table>\|<table \|</table>" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(http://\|\.\.\/\)\S\+" "metaverse specific - syn match sisu_ocn "<\~\d\+;\w\d\+;\w\d\+>" - syn match sisu_marktail "<\~#>" - syn match sisu_markpara "<:i[12]>" - syn match sisu_link " \*\~\S\+" - syn match sisu_action "^<:insert\d\+>" - syn match sisu_contain "<:e>" + syn match sisu_ocn contains=@NoSpell "<\~\d\+;\w\d\+;\w\d\+>" + syn match sisu_marktail "<\~#>" + syn match sisu_markpara contains=@NoSpell "<:i[12]>" + syn match sisu_link " \*\~\S\+" + syn match sisu_action "^<:insert\d\+>" + syn match sisu_contain "<:e>" endif "% 9 URLs Numbers: and ASCII Codes -syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" -syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" "% 8 Tuned Error - is error if not already matched -syn match sisu_error "[\~/\*!_]{\|}[\~/\*!_]" contains=sisu_error -syn match sisu_error "<a href\|</a>]" contains=sisu_error +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "<a href\|</a>]" "% 7 Simple Enclosed Markup: " Simple Markup: "% url/link -syn region sisu_link contains=sisu_error,@NoSpell matchgroup=sisu_link start="\(http://\|\.\.\/\)" end="\(\s\|$\)" syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" "% header |