mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
135 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6e6fac588c | |||
| 20ded53831 | |||
| 5e544c5abe | |||
| f19b66ea39 | |||
| 38b167abc5 | |||
| ade0ce2c47 | |||
| 7bcc5932e0 | |||
| 43592906a0 | |||
| dba2afde7d | |||
| 9285b887ec | |||
| dfa2561d7d | |||
| 506b335894 | |||
| 16895bea46 | |||
| 4a85f40d23 | |||
| b8e65930d2 | |||
| f2cfab95d8 | |||
| b434a909e6 | |||
| f6dc8d2962 | |||
| 210a71b4cb | |||
| 00936cdd77 | |||
| 75ca477625 | |||
| 7ec523f4a8 | |||
| 9109c9355a | |||
| 353b836087 | |||
| 6863b04a52 | |||
| 8ca9999ea6 | |||
| fa35c64041 | |||
| 72050cce91 | |||
| fa57d270bb | |||
| 5e2f13cc52 | |||
| a14d5d9f66 | |||
| 60a00567b5 | |||
| 0e9b4e11b0 | |||
| fa41b4a850 | |||
| 3bcd07d562 | |||
| 1cb9a4ffb9 | |||
| deb3e9a368 | |||
| d593ffe24c | |||
| 1fcd6cf86c | |||
| 9faca9f9ea | |||
| 6b0175c466 | |||
| 9d282c465a | |||
| 3a2e09f42d | |||
| 57975f6dad | |||
| ecb97f5d05 | |||
| a65917abf4 | |||
| d1182d2223 | |||
| 1be91f7476 | |||
| caabb3f058 | |||
| 50b3a7f8e7 | |||
| 34d035c0ac | |||
| e88db6d282 | |||
| 7d51f1a543 | |||
| cd6656d82b | |||
| 3017c44c4b | |||
| 25ac995bea | |||
| 7b65439491 | |||
| f2c486c416 | |||
| c42b133098 | |||
| 29697da99f | |||
| aa0a6d7be4 | |||
| 5a48d473ef | |||
| d6a9ced3b1 | |||
| a1faf70262 | |||
| 115821eae9 | |||
| 664e7696dd | |||
| 4d81d0d159 | |||
| 38b368ba4d | |||
| 3e515b81da | |||
| 5ac44c0391 | |||
| a17cdd917e | |||
| 4ece06e069 | |||
| 7c84bd9153 | |||
| 8601f0b5aa | |||
| 35e32414c7 | |||
| e703226fe0 | |||
| 401556f3b1 | |||
| 2b09922e3c | |||
| 2286d370ca | |||
| 96d70531dd | |||
| 17bcd02554 | |||
| 4f6c7e6888 | |||
| 73b4a4e09e | |||
| 1e08012084 | |||
| 29dfc2cfeb | |||
| 1d286783fc | |||
| dc7ffe83f7 | |||
| 419aa8ea7e | |||
| a3b7664813 | |||
| a9b86193df | |||
| 6505c5126b | |||
| 951183ee1c | |||
| 917f0addc2 | |||
| 32e3d8896d | |||
| d2e82df267 | |||
| 8587729a7a | |||
| 7282627798 | |||
| 180512e308 | |||
| 8a2d7636c8 | |||
| 5c71a17d6c | |||
| 76712c4f9c | |||
| 65cb201df3 | |||
| cfce532319 | |||
| 35a2c2a0c3 | |||
| 41a630757e | |||
| aa49bfd374 | |||
| 745b4e08ad | |||
| 4641b5152a | |||
| 2f0e0b3e71 | |||
| 33685d8d01 | |||
| c68d7a56e1 | |||
| 2f749d43e9 | |||
| ba7586c13b | |||
| 074c397ed7 | |||
| 8e94a6f547 | |||
| 74cbc24648 | |||
| 8b9203b419 | |||
| 112534aad5 | |||
| 679e2d9461 | |||
| 79603e8b55 | |||
| 243ebf0db8 | |||
| c9972234b6 | |||
| 5055b0389e | |||
| 73626de24f | |||
| 733962c814 | |||
| 98b5cd3e62 | |||
| 291a5c40b4 | |||
| 4758cc5fb2 | |||
| a95ebf0fcd | |||
| 801135edc8 | |||
| 0a7cafb2c8 | |||
| a112c49589 | |||
| b5f9dd7b3f | |||
| eb3ed243d9 | |||
| 0a8e611590 |
@@ -42,3 +42,11 @@ gvimext.lib
|
||||
*.mo
|
||||
*.swp
|
||||
*~
|
||||
|
||||
# Generated by "make test"
|
||||
src/po/*.ck
|
||||
src/testdir/mbyte.vim
|
||||
src/testdir/mzscheme.vim
|
||||
src/testdir/small.vim
|
||||
src/testdir/tiny.vim
|
||||
src/testdir/test*.out
|
||||
|
||||
+4
-2
@@ -22,8 +22,10 @@ src/os_beos.* Files for the BeOS port.
|
||||
src/os_msdos.*
|
||||
src/os_dos.* Files for the MS-DOS port.
|
||||
|
||||
src/gui_mac.*
|
||||
src/os_mac.* Files for the Mac port.
|
||||
src/gui_mac.* Carbon GUI (not used)
|
||||
src/os_mac* Shared files for the different Mac ports.
|
||||
|
||||
src/MacVim/* Files for the MacVim port.
|
||||
|
||||
src/os_mint.8 Files for the Atari Mint port.
|
||||
|
||||
|
||||
+31
-2
@@ -1,8 +1,37 @@
|
||||
README_mac.txt for version 7.3 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on Macintosh systems.
|
||||
This file explains the installation of MacVim.
|
||||
See "README.txt" for general information about Vim.
|
||||
See "src/MacVim/README" for an overview of the MacVim specific source code.
|
||||
|
||||
MacVim uses the usual configure/make steps to build the binary but instead of
|
||||
"make install" you just drag the app bundle into the directory you wish to
|
||||
install in (usually `/Applications').
|
||||
|
||||
|
||||
Sorry, this text still needs to be written!
|
||||
How to build and install
|
||||
========================
|
||||
|
||||
Run `./configure` in the `src/` directory with the flags you want, e.g.:
|
||||
|
||||
$ cd src
|
||||
$ ./configure --with-features=huge \
|
||||
--enable-rubyinterp \
|
||||
--enable-pythoninterp \
|
||||
--enable-perlinterp \
|
||||
--enable-cscope
|
||||
|
||||
Now build the project using `make`:
|
||||
|
||||
$ make
|
||||
|
||||
The resulting app bundle will reside under `MacVim/build/Release`. To try it
|
||||
out quickly, type:
|
||||
|
||||
$ open MacVim/build/Release/MacVim.app
|
||||
|
||||
To install MacVim, type
|
||||
|
||||
$ open MacVim/build/Release
|
||||
|
||||
and drag the MacVim icon into your `Applications` folder.
|
||||
|
||||
+432
-67
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for the tohtml plugin.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2010 Aug 12
|
||||
" Last Change: 2011 Jan 05
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@@ -13,10 +13,284 @@
|
||||
let s:cpo_sav = &cpo
|
||||
set cpo-=C
|
||||
|
||||
func! tohtml#Convert2HTML(line1, line2)
|
||||
" Automatically find charsets from all encodings supported natively by Vim. With
|
||||
" the 8bit- and 2byte- prefixes, Vim can actually support more encodings than
|
||||
" this. Let the user specify these however since they won't be supported on
|
||||
" every system. TODO: how? g:html_charsets and g:html_encodings?
|
||||
"
|
||||
" Note, not all of Vim's supported encodings have a charset to use.
|
||||
"
|
||||
" Names in this list are from:
|
||||
" http://www.iana.org/assignments/character-sets
|
||||
" g:tohtml#encoding_to_charset: {{{
|
||||
let g:tohtml#encoding_to_charset = {
|
||||
\ 'latin1' : 'ISO-8859-1',
|
||||
\ 'iso-8859-2' : 'ISO-8859-2',
|
||||
\ 'iso-8859-3' : 'ISO-8859-3',
|
||||
\ 'iso-8859-4' : 'ISO-8859-4',
|
||||
\ 'iso-8859-5' : 'ISO-8859-5',
|
||||
\ 'iso-8859-6' : 'ISO-8859-6',
|
||||
\ 'iso-8859-7' : 'ISO-8859-7',
|
||||
\ 'iso-8859-8' : 'ISO-8859-8',
|
||||
\ 'iso-8859-9' : 'ISO-8859-9',
|
||||
\ 'iso-8859-10' : '',
|
||||
\ 'iso-8859-13' : 'ISO-8859-13',
|
||||
\ 'iso-8859-14' : '',
|
||||
\ 'iso-8859-15' : 'ISO-8859-15',
|
||||
\ 'koi8-r' : 'KOI8-R',
|
||||
\ 'koi8-u' : 'KOI8-U',
|
||||
\ 'macroman' : 'macintosh',
|
||||
\ 'cp437' : '',
|
||||
\ 'cp775' : '',
|
||||
\ 'cp850' : '',
|
||||
\ 'cp852' : '',
|
||||
\ 'cp855' : '',
|
||||
\ 'cp857' : '',
|
||||
\ 'cp860' : '',
|
||||
\ 'cp861' : '',
|
||||
\ 'cp862' : '',
|
||||
\ 'cp863' : '',
|
||||
\ 'cp865' : '',
|
||||
\ 'cp866' : 'IBM866',
|
||||
\ 'cp869' : '',
|
||||
\ 'cp874' : '',
|
||||
\ 'cp1250' : 'windows-1250',
|
||||
\ 'cp1251' : 'windows-1251',
|
||||
\ 'cp1253' : 'windows-1253',
|
||||
\ 'cp1254' : 'windows-1254',
|
||||
\ 'cp1255' : 'windows-1255',
|
||||
\ 'cp1256' : 'windows-1256',
|
||||
\ 'cp1257' : 'windows-1257',
|
||||
\ 'cp1258' : 'windows-1258',
|
||||
\ 'euc-jp' : 'EUC-JP',
|
||||
\ 'sjis' : 'Shift_JIS',
|
||||
\ 'cp932' : 'Shift_JIS',
|
||||
\ 'cp949' : '',
|
||||
\ 'euc-kr' : 'EUC-KR',
|
||||
\ 'cp936' : 'GBK',
|
||||
\ 'euc-cn' : 'GB2312',
|
||||
\ 'big5' : 'Big5',
|
||||
\ 'cp950' : 'Big5',
|
||||
\ 'utf-8' : 'UTF-8',
|
||||
\ 'ucs-2' : 'UTF-8',
|
||||
\ 'ucs-2le' : 'UTF-8',
|
||||
\ 'utf-16' : 'UTF-8',
|
||||
\ 'utf-16le' : 'UTF-8',
|
||||
\ 'ucs-4' : 'UTF-8',
|
||||
\ 'ucs-4le' : 'UTF-8',
|
||||
\ }
|
||||
lockvar g:tohtml#encoding_to_charset
|
||||
" Notes:
|
||||
" 1. All UCS/UTF are converted to UTF-8 because it is much better supported
|
||||
" 2. Any blank spaces are there because Vim supports it but at least one major
|
||||
" web browser does not according to http://wiki.whatwg.org/wiki/Web_Encodings.
|
||||
" }}}
|
||||
|
||||
" Only automatically find encodings supported natively by Vim, let the user
|
||||
" specify the encoding if it's not natively supported. This function is only
|
||||
" used when the user specifies the charset, they better know what they are
|
||||
" doing!
|
||||
"
|
||||
" Names in this list are from:
|
||||
" http://www.iana.org/assignments/character-sets
|
||||
" g:tohtml#charset_to_encoding: {{{
|
||||
let g:tohtml#charset_to_encoding = {
|
||||
\ 'iso_8859-1:1987' : 'latin1',
|
||||
\ 'iso-ir-100' : 'latin1',
|
||||
\ 'iso_8859-1' : 'latin1',
|
||||
\ 'iso-8859-1' : 'latin1',
|
||||
\ 'latin1' : 'latin1',
|
||||
\ 'l1' : 'latin1',
|
||||
\ 'ibm819' : 'latin1',
|
||||
\ 'cp819' : 'latin1',
|
||||
\ 'csisolatin1' : 'latin1',
|
||||
\ 'iso_8859-2:1987' : 'iso-8859-2',
|
||||
\ 'iso-ir-101' : 'iso-8859-2',
|
||||
\ 'iso_8859-2' : 'iso-8859-2',
|
||||
\ 'iso-8859-2' : 'iso-8859-2',
|
||||
\ 'latin2' : 'iso-8859-2',
|
||||
\ 'l2' : 'iso-8859-2',
|
||||
\ 'csisolatin2' : 'iso-8859-2',
|
||||
\ 'iso_8859-3:1988' : 'iso-8859-3',
|
||||
\ 'iso-ir-109' : 'iso-8859-3',
|
||||
\ 'iso_8859-3' : 'iso-8859-3',
|
||||
\ 'iso-8859-3' : 'iso-8859-3',
|
||||
\ 'latin3' : 'iso-8859-3',
|
||||
\ 'l3' : 'iso-8859-3',
|
||||
\ 'csisolatin3' : 'iso-8859-3',
|
||||
\ 'iso_8859-4:1988' : 'iso-8859-4',
|
||||
\ 'iso-ir-110' : 'iso-8859-4',
|
||||
\ 'iso_8859-4' : 'iso-8859-4',
|
||||
\ 'iso-8859-4' : 'iso-8859-4',
|
||||
\ 'latin4' : 'iso-8859-4',
|
||||
\ 'l4' : 'iso-8859-4',
|
||||
\ 'csisolatin4' : 'iso-8859-4',
|
||||
\ 'iso_8859-5:1988' : 'iso-8859-5',
|
||||
\ 'iso-ir-144' : 'iso-8859-5',
|
||||
\ 'iso_8859-5' : 'iso-8859-5',
|
||||
\ 'iso-8859-5' : 'iso-8859-5',
|
||||
\ 'cyrillic' : 'iso-8859-5',
|
||||
\ 'csisolatincyrillic' : 'iso-8859-5',
|
||||
\ 'iso_8859-6:1987' : 'iso-8859-6',
|
||||
\ 'iso-ir-127' : 'iso-8859-6',
|
||||
\ 'iso_8859-6' : 'iso-8859-6',
|
||||
\ 'iso-8859-6' : 'iso-8859-6',
|
||||
\ 'ecma-114' : 'iso-8859-6',
|
||||
\ 'asmo-708' : 'iso-8859-6',
|
||||
\ 'arabic' : 'iso-8859-6',
|
||||
\ 'csisolatinarabic' : 'iso-8859-6',
|
||||
\ 'iso_8859-7:1987' : 'iso-8859-7',
|
||||
\ 'iso-ir-126' : 'iso-8859-7',
|
||||
\ 'iso_8859-7' : 'iso-8859-7',
|
||||
\ 'iso-8859-7' : 'iso-8859-7',
|
||||
\ 'elot_928' : 'iso-8859-7',
|
||||
\ 'ecma-118' : 'iso-8859-7',
|
||||
\ 'greek' : 'iso-8859-7',
|
||||
\ 'greek8' : 'iso-8859-7',
|
||||
\ 'csisolatingreek' : 'iso-8859-7',
|
||||
\ 'iso_8859-8:1988' : 'iso-8859-8',
|
||||
\ 'iso-ir-138' : 'iso-8859-8',
|
||||
\ 'iso_8859-8' : 'iso-8859-8',
|
||||
\ 'iso-8859-8' : 'iso-8859-8',
|
||||
\ 'hebrew' : 'iso-8859-8',
|
||||
\ 'csisolatinhebrew' : 'iso-8859-8',
|
||||
\ 'iso_8859-9:1989' : 'iso-8859-9',
|
||||
\ 'iso-ir-148' : 'iso-8859-9',
|
||||
\ 'iso_8859-9' : 'iso-8859-9',
|
||||
\ 'iso-8859-9' : 'iso-8859-9',
|
||||
\ 'latin5' : 'iso-8859-9',
|
||||
\ 'l5' : 'iso-8859-9',
|
||||
\ 'csisolatin5' : 'iso-8859-9',
|
||||
\ 'iso-8859-10' : 'iso-8859-10',
|
||||
\ 'iso-ir-157' : 'iso-8859-10',
|
||||
\ 'l6' : 'iso-8859-10',
|
||||
\ 'iso_8859-10:1992' : 'iso-8859-10',
|
||||
\ 'csisolatin6' : 'iso-8859-10',
|
||||
\ 'latin6' : 'iso-8859-10',
|
||||
\ 'iso-8859-13' : 'iso-8859-13',
|
||||
\ 'iso-8859-14' : 'iso-8859-14',
|
||||
\ 'iso-ir-199' : 'iso-8859-14',
|
||||
\ 'iso_8859-14:1998' : 'iso-8859-14',
|
||||
\ 'iso_8859-14' : 'iso-8859-14',
|
||||
\ 'latin8' : 'iso-8859-14',
|
||||
\ 'iso-celtic' : 'iso-8859-14',
|
||||
\ 'l8' : 'iso-8859-14',
|
||||
\ 'iso-8859-15' : 'iso-8859-15',
|
||||
\ 'iso_8859-15' : 'iso-8859-15',
|
||||
\ 'latin-9' : 'iso-8859-15',
|
||||
\ 'koi8-r' : 'koi8-r',
|
||||
\ 'cskoi8r' : 'koi8-r',
|
||||
\ 'koi8-u' : 'koi8-u',
|
||||
\ 'macintosh' : 'macroman',
|
||||
\ 'mac' : 'macroman',
|
||||
\ 'csmacintosh' : 'macroman',
|
||||
\ 'ibm437' : 'cp437',
|
||||
\ 'cp437' : 'cp437',
|
||||
\ '437' : 'cp437',
|
||||
\ 'cspc8codepage437' : 'cp437',
|
||||
\ 'ibm775' : 'cp775',
|
||||
\ 'cp775' : 'cp775',
|
||||
\ 'cspc775baltic' : 'cp775',
|
||||
\ 'ibm850' : 'cp850',
|
||||
\ 'cp850' : 'cp850',
|
||||
\ '850' : 'cp850',
|
||||
\ 'cspc850multilingual' : 'cp850',
|
||||
\ 'ibm852' : 'cp852',
|
||||
\ 'cp852' : 'cp852',
|
||||
\ '852' : 'cp852',
|
||||
\ 'cspcp852' : 'cp852',
|
||||
\ 'ibm855' : 'cp855',
|
||||
\ 'cp855' : 'cp855',
|
||||
\ '855' : 'cp855',
|
||||
\ 'csibm855' : 'cp855',
|
||||
\ 'ibm857' : 'cp857',
|
||||
\ 'cp857' : 'cp857',
|
||||
\ '857' : 'cp857',
|
||||
\ 'csibm857' : 'cp857',
|
||||
\ 'ibm860' : 'cp860',
|
||||
\ 'cp860' : 'cp860',
|
||||
\ '860' : 'cp860',
|
||||
\ 'csibm860' : 'cp860',
|
||||
\ 'ibm861' : 'cp861',
|
||||
\ 'cp861' : 'cp861',
|
||||
\ '861' : 'cp861',
|
||||
\ 'cp-is' : 'cp861',
|
||||
\ 'csibm861' : 'cp861',
|
||||
\ 'ibm862' : 'cp862',
|
||||
\ 'cp862' : 'cp862',
|
||||
\ '862' : 'cp862',
|
||||
\ 'cspc862latinhebrew' : 'cp862',
|
||||
\ 'ibm863' : 'cp863',
|
||||
\ 'cp863' : 'cp863',
|
||||
\ '863' : 'cp863',
|
||||
\ 'csibm863' : 'cp863',
|
||||
\ 'ibm865' : 'cp865',
|
||||
\ 'cp865' : 'cp865',
|
||||
\ '865' : 'cp865',
|
||||
\ 'csibm865' : 'cp865',
|
||||
\ 'ibm866' : 'cp866',
|
||||
\ 'cp866' : 'cp866',
|
||||
\ '866' : 'cp866',
|
||||
\ 'csibm866' : 'cp866',
|
||||
\ 'ibm869' : 'cp869',
|
||||
\ 'cp869' : 'cp869',
|
||||
\ '869' : 'cp869',
|
||||
\ 'cp-gr' : 'cp869',
|
||||
\ 'csibm869' : 'cp869',
|
||||
\ 'windows-1250' : 'cp1250',
|
||||
\ 'windows-1251' : 'cp1251',
|
||||
\ 'windows-1253' : 'cp1253',
|
||||
\ 'windows-1254' : 'cp1254',
|
||||
\ 'windows-1255' : 'cp1255',
|
||||
\ 'windows-1256' : 'cp1256',
|
||||
\ 'windows-1257' : 'cp1257',
|
||||
\ 'windows-1258' : 'cp1258',
|
||||
\ 'extended_unix_code_packed_format_for_japanese' : 'euc-jp',
|
||||
\ 'cseucpkdfmtjapanese' : 'euc-jp',
|
||||
\ 'euc-jp' : 'euc-jp',
|
||||
\ 'shift_jis' : 'sjis',
|
||||
\ 'ms_kanji' : 'sjis',
|
||||
\ 'sjis' : 'sjis',
|
||||
\ 'csshiftjis' : 'sjis',
|
||||
\ 'ibm-thai' : 'cp874',
|
||||
\ 'csibmthai' : 'cp874',
|
||||
\ 'ks_c_5601-1987' : 'cp949',
|
||||
\ 'iso-ir-149' : 'cp949',
|
||||
\ 'ks_c_5601-1989' : 'cp949',
|
||||
\ 'ksc_5601' : 'cp949',
|
||||
\ 'korean' : 'cp949',
|
||||
\ 'csksc56011987' : 'cp949',
|
||||
\ 'euc-kr' : 'euc-kr',
|
||||
\ 'cseuckr' : 'euc-kr',
|
||||
\ 'gbk' : 'cp936',
|
||||
\ 'cp936' : 'cp936',
|
||||
\ 'ms936' : 'cp936',
|
||||
\ 'windows-936' : 'cp936',
|
||||
\ 'gb_2312-80' : 'euc-cn',
|
||||
\ 'iso-ir-58' : 'euc-cn',
|
||||
\ 'chinese' : 'euc-cn',
|
||||
\ 'csiso58gb231280' : 'euc-cn',
|
||||
\ 'big5' : 'big5',
|
||||
\ 'csbig5' : 'big5',
|
||||
\ 'utf-8' : 'utf-8',
|
||||
\ 'iso-10646-ucs-2' : 'ucs-2',
|
||||
\ 'csunicode' : 'ucs-2',
|
||||
\ 'utf-16' : 'utf-16',
|
||||
\ 'utf-16be' : 'utf-16',
|
||||
\ 'utf-16le' : 'utf-16le',
|
||||
\ 'utf-32' : 'ucs-4',
|
||||
\ 'utf-32be' : 'ucs-4',
|
||||
\ 'utf-32le' : 'ucs-4le',
|
||||
\ 'iso-10646-ucs-4' : 'ucs-4',
|
||||
\ 'csucs4' : 'ucs-4'
|
||||
\ }
|
||||
lockvar g:tohtml#charset_to_encoding
|
||||
"}}}
|
||||
|
||||
func! tohtml#Convert2HTML(line1, line2) "{{{
|
||||
let s:settings = tohtml#GetUserSettings()
|
||||
|
||||
if !&diff || s:settings.diff_one_file
|
||||
if !&diff || s:settings.diff_one_file "{{{
|
||||
if a:line2 >= a:line1
|
||||
let g:html_start_line = a:line1
|
||||
let g:html_end_line = a:line2
|
||||
@@ -24,31 +298,50 @@ func! tohtml#Convert2HTML(line1, line2)
|
||||
let g:html_start_line = a:line2
|
||||
let g:html_end_line = a:line1
|
||||
endif
|
||||
runtime syntax/2html.vim
|
||||
else
|
||||
runtime syntax/2html.vim "}}}
|
||||
else "{{{
|
||||
let win_list = []
|
||||
let buf_list = []
|
||||
windo | if &diff | call add(win_list, winbufnr(0)) | endif
|
||||
let s:settings.whole_filler = 1
|
||||
let g:html_diff_win_num = 0
|
||||
for window in win_list
|
||||
" switch to the next buffer to convert
|
||||
exe ":" . bufwinnr(window) . "wincmd w"
|
||||
|
||||
" figure out whether current charset and encoding will work, if not
|
||||
" default to UTF-8
|
||||
if !exists('g:html_use_encoding') &&
|
||||
\ (&l:fileencoding!='' && &l:fileencoding!=s:settings.vim_encoding ||
|
||||
\ &l:fileencoding=='' && &encoding!=s:settings.vim_encoding)
|
||||
echohl WarningMsg
|
||||
echomsg "TOhtml: mismatched file encodings in Diff buffers, using UTF-8"
|
||||
echohl None
|
||||
let s:settings.vim_encoding = 'utf-8'
|
||||
let s:settings.encoding = 'UTF-8'
|
||||
endif
|
||||
|
||||
" set up for diff-mode conversion
|
||||
let g:html_start_line = 1
|
||||
let g:html_end_line = line('$')
|
||||
let g:html_diff_win_num += 1
|
||||
|
||||
" convert this file
|
||||
runtime syntax/2html.vim
|
||||
|
||||
" remember the HTML buffer for later combination
|
||||
call add(buf_list, bufnr('%'))
|
||||
endfor
|
||||
unlet g:html_diff_win_num
|
||||
call tohtml#Diff2HTML(win_list, buf_list)
|
||||
endif
|
||||
endif "}}}
|
||||
|
||||
unlet g:html_start_line
|
||||
unlet g:html_end_line
|
||||
unlet s:settings
|
||||
endfunc
|
||||
endfunc "}}}
|
||||
|
||||
func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
let xml_line = ""
|
||||
let tag_close = '>'
|
||||
|
||||
@@ -87,7 +380,7 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
call add(html, '<head>')
|
||||
|
||||
" include encoding as close to the top as possible, but only if not already
|
||||
" contained in XML information (to avoid haggling over content type)
|
||||
" contained in XML information
|
||||
if s:settings.encoding != "" && !s:settings.use_xhtml
|
||||
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
|
||||
endif
|
||||
@@ -133,7 +426,8 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
let s:body_end_line = getline('.')
|
||||
endif
|
||||
|
||||
" Grab the style information. Some of this will be duplicated...
|
||||
" Grab the style information. Some of this will be duplicated so only insert
|
||||
" it if it's not already there. {{{
|
||||
1
|
||||
let style_start = search('^<style type="text/css">')
|
||||
1
|
||||
@@ -151,8 +445,10 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
let insert_index += 1
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
endif " }}}
|
||||
|
||||
" everything new will get added before the diff styles so diff highlight
|
||||
" properly overrides normal highlight
|
||||
if diff_style_start != 0
|
||||
let insert_index = diff_style_start
|
||||
endif
|
||||
@@ -203,6 +499,20 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
" just in case some user autocmd creates content in the new buffer, make sure
|
||||
" it is empty before proceeding
|
||||
%d
|
||||
|
||||
" set the fileencoding to match the charset we'll be using
|
||||
let &l:fileencoding=s:settings.vim_encoding
|
||||
|
||||
" According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte
|
||||
" order mark is highly recommend on the web when using multibyte encodings. But,
|
||||
" it is not a good idea to include it on UTF-8 files. Otherwise, let Vim
|
||||
" determine when it is actually inserted.
|
||||
if s:settings.vim_encoding == 'utf-8'
|
||||
setlocal nobomb
|
||||
else
|
||||
setlocal bomb
|
||||
endif
|
||||
|
||||
call append(0, html)
|
||||
|
||||
if len(style) > 0
|
||||
@@ -210,7 +520,7 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
let style_start = search('^</head>')-1
|
||||
|
||||
" Insert javascript to toggle matching folds open and closed in all windows,
|
||||
" if dynamic folding is active.
|
||||
" if dynamic folding is active. {{{
|
||||
if s:settings.dynamic_folds
|
||||
call append(style_start, [
|
||||
\ "<script type='text/javascript'>",
|
||||
@@ -234,13 +544,13 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
\ s:settings.use_xhtml ? '//]]>' : " -->",
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
endif "}}}
|
||||
|
||||
" Insert styles from all the generated html documents and additional styles
|
||||
" for the table-based layout of the side-by-side diff. The diff should take
|
||||
" up the full browser window (but not more), and be static in size,
|
||||
" horizontally scrollable when the lines are too long. Otherwise, the diff
|
||||
" is pretty useless for really long lines.
|
||||
" is pretty useless for really long lines. {{{
|
||||
if s:settings.use_css
|
||||
call append(style_start,
|
||||
\ ['<style type="text/css">']+
|
||||
@@ -252,28 +562,28 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
\ 'td div { overflow: auto; }',
|
||||
\ s:settings.use_xhtml ? '' : '-->',
|
||||
\ '</style>'
|
||||
\ ])
|
||||
endif
|
||||
\])
|
||||
endif "}}}
|
||||
endif
|
||||
|
||||
let &paste = s:old_paste
|
||||
let &magic = s:old_magic
|
||||
endfunc
|
||||
endfunc "}}}
|
||||
|
||||
" Gets a single user option and sets it in the passed-in Dict, or gives it the
|
||||
" default value if the option doesn't actually exist.
|
||||
func! tohtml#GetOption(settings, option, default)
|
||||
func! tohtml#GetOption(settings, option, default) "{{{
|
||||
if exists('g:html_'.a:option)
|
||||
let a:settings[a:option] = g:html_{a:option}
|
||||
else
|
||||
let a:settings[a:option] = a:default
|
||||
endif
|
||||
endfunc
|
||||
endfunc "}}}
|
||||
|
||||
" returns a Dict containing the values of all user options for 2html, including
|
||||
" default values for those not given an explicit value by the user. Discards the
|
||||
" html_ prefix of the option for nicer looking code.
|
||||
func! tohtml#GetUserSettings()
|
||||
func! tohtml#GetUserSettings() "{{{
|
||||
if exists('s:settings')
|
||||
" just restore the known options if we've already retrieved them
|
||||
return s:settings
|
||||
@@ -289,21 +599,22 @@ func! tohtml#GetUserSettings()
|
||||
let g:html_use_xhtml = g:use_xhtml
|
||||
endif
|
||||
|
||||
" get current option settings with appropriate defaults
|
||||
call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
|
||||
call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
|
||||
call tohtml#GetOption(user_settings, 'number_lines', &number )
|
||||
call tohtml#GetOption(user_settings, 'use_css', 1 )
|
||||
call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
|
||||
call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
|
||||
call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_foldcolumn', 0 )
|
||||
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_pre', 0 )
|
||||
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
|
||||
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
|
||||
" get current option settings with appropriate defaults {{{
|
||||
call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
|
||||
call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
|
||||
call tohtml#GetOption(user_settings, 'number_lines', &number )
|
||||
call tohtml#GetOption(user_settings, 'use_css', 1 )
|
||||
call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
|
||||
call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
|
||||
call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_foldcolumn', 0 )
|
||||
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_pre', 0 )
|
||||
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
|
||||
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
|
||||
" }}}
|
||||
|
||||
" override those settings that need it
|
||||
" override those settings that need it {{{
|
||||
|
||||
" hover opening implies dynamic folding
|
||||
if user_settings.hover_unfold
|
||||
@@ -330,49 +641,103 @@ func! tohtml#GetUserSettings()
|
||||
" aren't allowed inside a <pre> block
|
||||
if !user_settings.use_css
|
||||
let user_settings.no_pre = 1
|
||||
endif
|
||||
endif "}}}
|
||||
|
||||
" Figure out proper MIME charset from the 'encoding' option.
|
||||
if exists("g:html_use_encoding")
|
||||
let user_settings.encoding = g:html_use_encoding
|
||||
" set up expand_tabs option after all the overrides so we know the
|
||||
" appropriate defaults {{{
|
||||
if user_settings.no_pre == 0
|
||||
call tohtml#GetOption(user_settings,
|
||||
\ 'expand_tabs',
|
||||
\ &expandtab || &ts != 8 || user_settings.number_lines ||
|
||||
\ (user_settings.dynamic_folds && !user_settings.no_foldcolumn))
|
||||
else
|
||||
let vim_encoding = &encoding
|
||||
if vim_encoding =~ '^8bit\|^2byte'
|
||||
let vim_encoding = substitute(vim_encoding, '^8bit-\|^2byte-', '', '')
|
||||
endif
|
||||
if vim_encoding == 'latin1'
|
||||
let user_settings.encoding = 'iso-8859-1'
|
||||
elseif vim_encoding =~ "^cp12"
|
||||
let user_settings.encoding = substitute(vim_encoding, 'cp', 'windows-', '')
|
||||
elseif vim_encoding == 'sjis' || vim_encoding == 'cp932'
|
||||
let user_settings.encoding = 'Shift_JIS'
|
||||
elseif vim_encoding == 'big5' || vim_encoding == 'cp950'
|
||||
let user_settings.encoding = "Big5"
|
||||
elseif vim_encoding == 'euc-cn'
|
||||
let user_settings.encoding = 'GB_2312-80'
|
||||
elseif vim_encoding == 'euc-tw'
|
||||
let user_settings.encoding = ""
|
||||
elseif vim_encoding =~ '^euc\|^iso\|^koi'
|
||||
let user_settings.encoding = substitute(vim_encoding, '.*', '\U\0', '')
|
||||
elseif vim_encoding == 'cp949'
|
||||
let user_settings.encoding = 'KS_C_5601-1987'
|
||||
elseif vim_encoding == 'cp936'
|
||||
let user_settings.encoding = 'GBK'
|
||||
elseif vim_encoding =~ '^ucs\|^utf'
|
||||
let user_settings.encoding = 'UTF-8'
|
||||
else
|
||||
let user_settings.encoding = ""
|
||||
endif
|
||||
let user_settings.expand_tabs = 1
|
||||
endif
|
||||
" }}}
|
||||
|
||||
if exists("g:html_use_encoding") "{{{
|
||||
" user specified the desired MIME charset, figure out proper
|
||||
" 'fileencoding' from it or warn the user if we cannot
|
||||
let user_settings.encoding = g:html_use_encoding
|
||||
let user_settings.vim_encoding = tohtml#EncodingFromCharset(g:html_use_encoding)
|
||||
if user_settings.vim_encoding == ''
|
||||
echohl WarningMsg
|
||||
echomsg "TOhtml: file encoding for"
|
||||
\ g:html_use_encoding
|
||||
\ "unknown, please set 'fileencoding'"
|
||||
echohl None
|
||||
endif
|
||||
else
|
||||
" Figure out proper MIME charset from 'fileencoding' if possible
|
||||
if &l:fileencoding != ''
|
||||
let user_settings.vim_encoding = &l:fileencoding
|
||||
call tohtml#CharsetFromEncoding(user_settings)
|
||||
endif
|
||||
|
||||
" else from 'encoding' if possible
|
||||
if &l:fileencoding == '' || user_settings.encoding == ''
|
||||
let user_settings.vim_encoding = &encoding
|
||||
call tohtml#CharsetFromEncoding(user_settings)
|
||||
endif
|
||||
|
||||
" else default to UTF-8 and warn user
|
||||
if user_settings.encoding == ''
|
||||
let user_settings.vim_encoding = 'utf-8'
|
||||
let user_settings.encoding = 'UTF-8'
|
||||
echohl WarningMsg
|
||||
echomsg "TOhtml: couldn't determine MIME charset, using UTF-8"
|
||||
echohl None
|
||||
endif
|
||||
endif "}}}
|
||||
|
||||
" TODO: font
|
||||
|
||||
return user_settings
|
||||
endif
|
||||
endfunc
|
||||
endfunc "}}}
|
||||
|
||||
" get the proper HTML charset name from a Vim encoding option.
|
||||
function! tohtml#CharsetFromEncoding(settings) "{{{
|
||||
let l:vim_encoding = a:settings.vim_encoding
|
||||
if exists('g:html_charset_override') && has_key(g:html_charset_override, l:vim_encoding)
|
||||
let a:settings.encoding = g:html_charset_override[l:vim_encoding]
|
||||
else
|
||||
if l:vim_encoding =~ '^8bit\|^2byte'
|
||||
" 8bit- and 2byte- prefixes are to indicate encodings available on the
|
||||
" system that Vim will convert with iconv(), look up just the encoding name,
|
||||
" not Vim's prefix.
|
||||
let l:vim_encoding = substitute(l:vim_encoding, '^8bit-\|^2byte-', '', '')
|
||||
endif
|
||||
if has_key(g:tohtml#encoding_to_charset, l:vim_encoding)
|
||||
let a:settings.encoding = g:tohtml#encoding_to_charset[l:vim_encoding]
|
||||
else
|
||||
let a:settings.encoding = ""
|
||||
endif
|
||||
endif
|
||||
if a:settings.encoding != ""
|
||||
let l:vim_encoding = tohtml#EncodingFromCharset(a:settings.encoding)
|
||||
if l:vim_encoding != ""
|
||||
" if the Vim encoding to HTML encoding conversion is set up (by default or
|
||||
" by the user) to convert to a different encoding, we need to also change
|
||||
" the Vim encoding of the new buffer
|
||||
let a:settings.vim_encoding = l:vim_encoding
|
||||
endif
|
||||
endif
|
||||
endfun "}}}
|
||||
|
||||
" Get the proper Vim encoding option setting from an HTML charset name.
|
||||
function! tohtml#EncodingFromCharset(encoding) "{{{
|
||||
if exists('g:html_encoding_override') && has_key(g:html_encoding_override, a:encoding)
|
||||
return g:html_encoding_override[a:encoding]
|
||||
elseif has_key(g:tohtml#charset_to_encoding, tolower(a:encoding))
|
||||
return g:tohtml#charset_to_encoding[tolower(a:encoding)]
|
||||
else
|
||||
return ""
|
||||
endif
|
||||
endfun "}}}
|
||||
|
||||
let &cpo = s:cpo_sav
|
||||
unlet s:cpo_sav
|
||||
|
||||
" Make sure any patches will probably use consistent indent
|
||||
" vim: ts=8 sw=2 sts=2 noet
|
||||
" vim: ts=8 sw=2 sts=2 noet fdm=marker
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: GNU C Compiler
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-05-30
|
||||
" Latest Revision: 2010-10-14
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -18,10 +18,10 @@ CompilerSet errorformat=
|
||||
\\"%f\"%*\\D%l:\ %m,
|
||||
\%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
|
||||
\%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
|
||||
\%f:%l:%c:\ %terror:\ %m,
|
||||
\%f:%l:%c:\ %trror:\ %m,
|
||||
\%f:%l:%c:\ %tarning:\ %m,
|
||||
\%f:%l:%c:\ %m,
|
||||
\%f:%l:\ %terror:\ %m,
|
||||
\%f:%l:\ %trror:\ %m,
|
||||
\%f:%l:\ %tarning:\ %m,
|
||||
\%f:%l:\ %m,
|
||||
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*arabic.txt* For Vim version 7.3. Last change: 2005 Mar 29
|
||||
*arabic.txt* For Vim version 7.3. Last change: 2010 Nov 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Nadim Shaikli
|
||||
@@ -146,7 +146,7 @@ o Enable Arabic settings [short-cut]
|
||||
:set arabic
|
||||
<
|
||||
The two above noted possible invocations are the preferred manner
|
||||
in which users are instructed to proceed. Baring an enabled 'termbidi'
|
||||
in which users are instructed to proceed. Barring an enabled 'termbidi'
|
||||
setting, both command options:
|
||||
|
||||
1. set the appropriate keymap
|
||||
|
||||
+17
-13
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 7.3. Last change: 2010 Sep 18
|
||||
*cmdline.txt* For Vim version 7.3. Last change: 2010 Nov 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -372,10 +372,10 @@ word before the cursor. This is available for:
|
||||
- Mappings: Only after a ":map" or similar command.
|
||||
- Variable and function names: Only after a ":if", ":call" or similar command.
|
||||
|
||||
When Vim was compiled with the |+cmdline_compl| feature disabled, only file
|
||||
names, directories and help items can be completed. The number of help item
|
||||
matches is limited (currently to 300) to avoid a long delay when there are
|
||||
very many matches.
|
||||
When Vim was compiled without the |+cmdline_compl| feature only file names,
|
||||
directories and help items can be completed. The number of help item matches
|
||||
is limited (currently to 300) to avoid a long delay when there are very many
|
||||
matches.
|
||||
|
||||
These are the commands that can be used:
|
||||
|
||||
@@ -782,30 +782,34 @@ it, no matter how many backslashes.
|
||||
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
|
||||
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
|
||||
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
|
||||
*E495* *E496* *E497* *E498* *E499* *E500*
|
||||
*E495* *E496* *E497* *E499* *E500*
|
||||
Note: these are typed literally, they are not special keys!
|
||||
<cword> is replaced with the word under the cursor (like |star|)
|
||||
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
|
||||
<cfile> is replaced with the path name under the cursor (like what
|
||||
|gf| uses)
|
||||
<afile> when executing autocommands, is replaced with the file name
|
||||
for a file read or write
|
||||
<abuf> when executing autocommands, is replaced with the currently
|
||||
<afile> When executing autocommands, is replaced with the file name
|
||||
for a file read or write.
|
||||
<abuf> When executing autocommands, is replaced with the currently
|
||||
effective buffer number (for ":r file" and ":so file" it is
|
||||
the current buffer, the file being read/sourced is not in a
|
||||
buffer).
|
||||
<amatch> when executing autocommands, is replaced with the match for
|
||||
<amatch> When executing autocommands, is replaced with the match for
|
||||
which this autocommand was executed. It differs from
|
||||
<afile> only when the file name isn't used to match with
|
||||
(for FileType, Syntax and SpellFileMissing events).
|
||||
<sfile> when executing a ":source" command, is replaced with the
|
||||
file name of the sourced file;
|
||||
when executing a function, is replaced with
|
||||
<sfile> When executing a ":source" command, is replaced with the
|
||||
file name of the sourced file. *E498*
|
||||
When executing a function, is replaced with
|
||||
"function {function-name}"; function call nesting is
|
||||
indicated like this:
|
||||
"function {function-name1}..{function-name2}". Note that
|
||||
filename-modifiers are useless when <sfile> is used inside
|
||||
a function.
|
||||
<slnum> When executing a ":source" command, is replaced with the
|
||||
line number. *E842*
|
||||
When executing a function it's the line number relative to
|
||||
the start of the function.
|
||||
|
||||
*filename-modifiers*
|
||||
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*debug.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
*debug.txt* For Vim version 7.3. Last change: 2010 Dec 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -21,8 +21,8 @@ When Vim crashes in one of the test files, and you are using gcc for
|
||||
compilation, here is what you can do to find out exactly where Vim crashes.
|
||||
This also applies when using the MingW tools.
|
||||
|
||||
1. Compile Vim with the "-g" option (there is a line in the Makefile for this,
|
||||
which you can uncomment). Also make sure "strip" is disabled (do not
|
||||
1. Compile Vim with the "-g" option (there is a line in the src/Makefile for
|
||||
this, which you can uncomment). Also make sure "strip" is disabled (do not
|
||||
install it, or use the line "STRIP = /bin/true").
|
||||
|
||||
2. Execute these commands (replace "11" with the test that fails): >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.3. Last change: 2010 Sep 30
|
||||
*diff.txt* For Vim version 7.3. Last change: 2010 Dec 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -373,9 +373,9 @@ get an error message. Possible causes:
|
||||
If it's not clear what the problem is set the 'verbose' option to one or more
|
||||
to see more messages.
|
||||
|
||||
The self-installing Vim includes a diff program. If you don't have it you
|
||||
might want to download a diff.exe. For example from
|
||||
http://jlb.twu.net/code/unixkit.php.
|
||||
The self-installing Vim for MS-Windows includes a diff program. If you don't
|
||||
have it you might want to download a diff.exe. For example from
|
||||
http://gnuwin32.sourceforge.net/packages/diffutils.htm.
|
||||
|
||||
|
||||
USING PATCHES *diff-patchexpr*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.3. Last change: 2010 Sep 18
|
||||
*editing.txt* For Vim version 7.3. Last change: 2010 Dec 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1340,7 +1340,7 @@ Vim is able to write files encrypted, and read them back. The encrypted text
|
||||
cannot be read without the right key.
|
||||
{only available when compiled with the |+cryptv| feature} *E833*
|
||||
|
||||
The text in the swap file and the undo file is also encrypted.
|
||||
The text in the swap file and the undo file is also encrypted. *E843*
|
||||
|
||||
Note: The text in memory is not encrypted. A system administrator may be able
|
||||
to see your text while you are editing it. When filtering text with
|
||||
|
||||
+78
-38
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
*eval.txt* For Vim version 7.3. Last change: 2010 Dec 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1657,6 +1657,15 @@ v:version Version number of Vim: Major version number times 100 plus
|
||||
*v:warningmsg* *warningmsg-variable*
|
||||
v:warningmsg Last given warning message. It's allowed to set this variable.
|
||||
|
||||
*v:windowid* *windowid-variable*
|
||||
v:windowid When any X11 based GUI is running or when running in a
|
||||
terminal and Vim connects to the X server (|-X|) this will be
|
||||
set to the window ID.
|
||||
When an MS-Windows GUI is running this will be set to the
|
||||
window handle.
|
||||
Otherwise the value is zero.
|
||||
Note: for windows inside Vim use |winnr()|.
|
||||
|
||||
==============================================================================
|
||||
4. Builtin Functions *functions*
|
||||
|
||||
@@ -1822,7 +1831,7 @@ localtime() Number current time
|
||||
log( {expr}) Float natural logarithm (base e) of {expr}
|
||||
log10( {expr}) Float logarithm of Float {expr} to base 10
|
||||
map( {expr}, {string}) List/Dict change each item in {expr} to {expr}
|
||||
maparg( {name}[, {mode} [, {abbr}]])
|
||||
maparg( {name}[, {mode} [, {abbr} [, {dict}]]])
|
||||
String rhs of mapping {name} in mode {mode}
|
||||
mapcheck( {name}[, {mode} [, {abbr}]])
|
||||
String check for mappings matching {name}
|
||||
@@ -1934,6 +1943,7 @@ synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
|
||||
synIDattr( {synID}, {what} [, {mode}])
|
||||
String attribute {what} of syntax ID {synID}
|
||||
synIDtrans( {synID}) Number translated syntax ID of {synID}
|
||||
synconcealed( {lnum}, {col}) List info about concealing
|
||||
synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
|
||||
system( {expr} [, {input}]) String output of shell command/filter {expr}
|
||||
tabpagebuflist( [{arg}]) List list of buffer numbers in tab page
|
||||
@@ -2710,7 +2720,7 @@ exp({expr}) *exp()*
|
||||
|
||||
expand({expr} [, {flag}]) *expand()*
|
||||
Expand wildcards and the following special keywords in {expr}.
|
||||
The result is a String.
|
||||
The result is a String. 'wildignorecase' applies.
|
||||
|
||||
When there are several matches, they are separated by <NL>
|
||||
characters. [Note: in version 5.0 a space was used, which
|
||||
@@ -2731,6 +2741,7 @@ expand({expr} [, {flag}]) *expand()*
|
||||
<abuf> autocmd buffer number (as a String!)
|
||||
<amatch> autocmd matched name
|
||||
<sfile> sourced script file name
|
||||
<slnum> sourced script file line number
|
||||
<cword> word under the cursor
|
||||
<cWORD> WORD under the cursor
|
||||
<client> the {clientid} of the last received
|
||||
@@ -3424,6 +3435,7 @@ glob({expr} [, {flag}]) *glob()*
|
||||
the 'suffixes' and 'wildignore' options apply: Names matching
|
||||
one of the patterns in 'wildignore' will be skipped and
|
||||
'suffixes' affect the ordering of matches.
|
||||
'wildignorecase' always applies.
|
||||
If the expansion fails, the result is an empty string.
|
||||
A name for a non-existing file is not included.
|
||||
|
||||
@@ -3966,23 +3978,51 @@ map({expr}, {string}) *map()*
|
||||
further items in {expr} are processed.
|
||||
|
||||
|
||||
maparg({name}[, {mode} [, {abbr}]]) *maparg()*
|
||||
Return the rhs of mapping {name} in mode {mode}. When there
|
||||
is no mapping for {name}, an empty String is returned.
|
||||
maparg({name}[, {mode} [, {abbr} [, {dict}]]]) *maparg()*
|
||||
When {dict} is omitted or zero: Return the rhs of mapping
|
||||
{name} in mode {mode}. The returned String has special
|
||||
characters translated like in the output of the ":map" command
|
||||
listing.
|
||||
|
||||
When there is no mapping for {name}, an empty String is
|
||||
returned.
|
||||
|
||||
The {name} can have special key names, like in the ":map"
|
||||
command.
|
||||
|
||||
{mode} can be one of these strings:
|
||||
"n" Normal
|
||||
"v" Visual
|
||||
"v" Visual (including Select)
|
||||
"o" Operator-pending
|
||||
"i" Insert
|
||||
"c" Cmd-line
|
||||
"s" Select
|
||||
"x" Visual
|
||||
"l" langmap |language-mapping|
|
||||
"" Normal, Visual and Operator-pending
|
||||
When {mode} is omitted, the modes for "" are used.
|
||||
|
||||
When {abbr} is there and it is non-zero use abbreviations
|
||||
instead of mappings.
|
||||
The {name} can have special key names, like in the ":map"
|
||||
command. The returned String has special characters
|
||||
translated like in the output of the ":map" command listing.
|
||||
|
||||
When {dict} is there and it is non-zero return a dictionary
|
||||
containing all the information of the mapping with the
|
||||
following items:
|
||||
"lhs" The {lhs} of the mapping.
|
||||
"rhs" The {rhs} of the mapping as typed.
|
||||
"silent" 1 for a |:map-silent| mapping, else 0.
|
||||
"noremap" 1 if the {rhs} of the mapping is not remappable.
|
||||
"expr" 1 for an expression mapping (|:map-<expr>|).
|
||||
"buffer" 1 for a buffer local mapping (|:map-local|).
|
||||
"mode" Modes for which the mapping is defined. In
|
||||
addition to the modes mentioned above, these
|
||||
characters will be used:
|
||||
" " Normal, Visual and Operator-pending
|
||||
"!" Insert and Commandline mode
|
||||
(|mapmode-ic|)
|
||||
"sid" The script local ID, used for <sid> mappings
|
||||
(|<SID>|).
|
||||
|
||||
The mappings local to the current buffer are checked first,
|
||||
then the global mappings.
|
||||
This function can be used to map a key even when it's already
|
||||
@@ -5416,8 +5456,8 @@ stridx({haystack}, {needle} [, {start}]) *stridx()*
|
||||
{haystack} of the first occurrence of the String {needle}.
|
||||
If {start} is specified, the search starts at index {start}.
|
||||
This can be used to find a second match: >
|
||||
:let comma1 = stridx(line, ",")
|
||||
:let comma2 = stridx(line, ",", comma1 + 1)
|
||||
:let colon1 = stridx(line, ":")
|
||||
:let colon2 = stridx(line, ":", colon1 + 1)
|
||||
< The search is done case-sensitive.
|
||||
For pattern searches use |match()|.
|
||||
-1 is returned if the {needle} does not occur in {haystack}.
|
||||
@@ -5558,20 +5598,6 @@ synID({lnum}, {col}, {trans}) *synID()*
|
||||
:echo synIDattr(synID(line("."), col("."), 1), "name")
|
||||
<
|
||||
|
||||
synconcealed({lnum}, {col}) *synconcealed()*
|
||||
The result is a List. The first item in the list is 0 if the
|
||||
character at the position {lnum} and {col} is not part of a
|
||||
concealable region, 1 if it is. The second item in the list is
|
||||
a string. If the first item is 1, the second item contains the
|
||||
text which will be displayed in place of the concealed text,
|
||||
depending on the current setting of 'conceallevel'. The third
|
||||
and final item in the list is a unique number representing the
|
||||
specific syntax region matched. This allows detection of the
|
||||
beginning of a new concealable region if there are two
|
||||
consecutive regions with the same replacement character.
|
||||
For an example use see $VIMRUNTIME/syntax/2html.vim .
|
||||
|
||||
|
||||
synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
|
||||
The result is a String, which is the {what} attribute of
|
||||
syntax ID {synID}. This can be used to obtain information
|
||||
@@ -5612,6 +5638,20 @@ synIDtrans({synID}) *synIDtrans()*
|
||||
highlight the character. Highlight links given with
|
||||
":highlight link" are followed.
|
||||
|
||||
synconcealed({lnum}, {col}) *synconcealed()*
|
||||
The result is a List. The first item in the list is 0 if the
|
||||
character at the position {lnum} and {col} is not part of a
|
||||
concealable region, 1 if it is. The second item in the list is
|
||||
a string. If the first item is 1, the second item contains the
|
||||
text which will be displayed in place of the concealed text,
|
||||
depending on the current setting of 'conceallevel'. The third
|
||||
and final item in the list is a unique number representing the
|
||||
specific syntax region matched. This allows detection of the
|
||||
beginning of a new concealable region if there are two
|
||||
consecutive regions with the same replacement character.
|
||||
For an example use see $VIMRUNTIME/syntax/2html.vim .
|
||||
|
||||
|
||||
synstack({lnum}, {col}) *synstack()*
|
||||
Return a |List|, which is the stack of syntax items at the
|
||||
position {lnum} and {col} in the current window. Each item in
|
||||
@@ -6093,17 +6133,17 @@ cmdline_compl Compiled with |cmdline-completion| support.
|
||||
cmdline_hist Compiled with |cmdline-history| support.
|
||||
cmdline_info Compiled with 'showcmd' and 'ruler' support.
|
||||
comments Compiled with |'comments'| support.
|
||||
compatible Compiled to be very Vi compatible.
|
||||
cryptv Compiled with encryption support |encryption|.
|
||||
cscope Compiled with |cscope| support.
|
||||
compatible Compiled to be very Vi compatible.
|
||||
debug Compiled with "DEBUG" defined.
|
||||
dialog_con Compiled with console dialog support.
|
||||
dialog_gui Compiled with GUI dialog support.
|
||||
diff Compiled with |vimdiff| and 'diff' support.
|
||||
digraphs Compiled with support for digraphs.
|
||||
dnd Compiled with support for the "~ register |quote_~|.
|
||||
dos32 32 bits DOS (DJGPP) version of Vim.
|
||||
dos16 16 bits DOS version of Vim.
|
||||
dos32 32 bits DOS (DJGPP) version of Vim.
|
||||
ebcdic Compiled on a machine with ebcdic character set.
|
||||
emacs_tags Compiled with support for Emacs tags.
|
||||
eval Compiled with expression evaluation support. Always
|
||||
@@ -6127,16 +6167,16 @@ fullscreen Compiled with 'fullscreen' support.
|
||||
gettext Compiled with message translation |multi-lang|
|
||||
gui Compiled with GUI enabled.
|
||||
gui_athena Compiled with Athena GUI.
|
||||
gui_gnome Compiled with Gnome support (gui_gtk is also defined).
|
||||
gui_gtk Compiled with GTK+ GUI (any version).
|
||||
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
|
||||
gui_gnome Compiled with Gnome support (gui_gtk is also defined).
|
||||
gui_mac Compiled with Macintosh GUI.
|
||||
gui_macvim Compiled with MacVim GUI.
|
||||
gui_motif Compiled with Motif GUI.
|
||||
gui_photon Compiled with Photon GUI.
|
||||
gui_running Vim is running in the GUI, or it will start soon.
|
||||
gui_win32 Compiled with MS Windows Win32 GUI.
|
||||
gui_win32s idem, and Win32s system being used (Windows 3.1)
|
||||
gui_running Vim is running in the GUI, or it will start soon.
|
||||
hangul_input Compiled with Hangul input support. |hangul|
|
||||
iconv Can use iconv() for conversion.
|
||||
insert_expand Compiled with support for CTRL-X expansion commands in
|
||||
@@ -6158,20 +6198,20 @@ menu Compiled with support for |:menu|.
|
||||
mksession Compiled with support for |:mksession|.
|
||||
modify_fname Compiled with file name modifiers. |filename-modifiers|
|
||||
mouse Compiled with support mouse.
|
||||
mouseshape Compiled with support for 'mouseshape'.
|
||||
mouse_dec Compiled with support for Dec terminal mouse.
|
||||
mouse_gpm Compiled with support for gpm (Linux console mouse)
|
||||
mouse_netterm Compiled with support for netterm mouse.
|
||||
mouse_pterm Compiled with support for qnx pterm mouse.
|
||||
mouse_sysmouse Compiled with support for sysmouse (*BSD console mouse)
|
||||
mouse_xterm Compiled with support for xterm mouse.
|
||||
mouseshape Compiled with support for 'mouseshape'.
|
||||
multi_byte Compiled with support for 'encoding'
|
||||
multi_byte_encoding 'encoding' is set to a multi-byte encoding.
|
||||
multi_byte_ime Compiled with support for IME input method.
|
||||
multi_lang Compiled with support for multiple languages.
|
||||
mzscheme Compiled with MzScheme interface |mzscheme|.
|
||||
netbeans_intg Compiled with support for |netbeans|.
|
||||
netbeans_enabled Compiled with support for |netbeans| and connected.
|
||||
netbeans_intg Compiled with support for |netbeans|.
|
||||
odbeditor Compiled with |odbeditor| support.
|
||||
ole Compiled with OLE automation support for Win32.
|
||||
os2 OS/2 version of Vim.
|
||||
@@ -6193,11 +6233,11 @@ showcmd Compiled with 'showcmd' support.
|
||||
signs Compiled with |:sign| support.
|
||||
smartindent Compiled with 'smartindent' support.
|
||||
sniff Compiled with SNiFF interface support.
|
||||
spell Compiled with spell checking support |spell|.
|
||||
startuptime Compiled with |--startuptime| support.
|
||||
statusline Compiled with support for 'statusline', 'rulerformat'
|
||||
and special formats of 'titlestring' and 'iconstring'.
|
||||
sun_workshop Compiled with support for Sun |workshop|.
|
||||
spell Compiled with spell checking support |spell|.
|
||||
syntax Compiled with syntax highlighting support |syntax|.
|
||||
syntax_items There are active syntax highlighting items for the
|
||||
current buffer.
|
||||
@@ -6219,9 +6259,9 @@ toolbar Compiled with support for |gui-toolbar|.
|
||||
transparency Compiled with 'transparency' support.
|
||||
unix Unix version of Vim.
|
||||
user_commands User-defined commands.
|
||||
viminfo Compiled with viminfo support.
|
||||
vim_starting True while initial source'ing takes place. |startup|
|
||||
vertsplit Compiled with vertically split windows |:vsplit|.
|
||||
vim_starting True while initial source'ing takes place. |startup|
|
||||
viminfo Compiled with viminfo support.
|
||||
virtualedit Compiled with 'virtualedit' option.
|
||||
visual Compiled with Visual mode.
|
||||
visualextra Compiled with extra Visual mode commands.
|
||||
@@ -6230,13 +6270,13 @@ vms VMS version of Vim.
|
||||
vreplace Compiled with |gR| and |gr| commands.
|
||||
wildignore Compiled with 'wildignore' option.
|
||||
wildmenu Compiled with 'wildmenu' option.
|
||||
windows Compiled with support for more than one window.
|
||||
winaltkeys Compiled with 'winaltkeys' option.
|
||||
win16 Win16 version of Vim (MS-Windows 3.1).
|
||||
win32 Win32 version of Vim (MS-Windows 95/98/ME/NT/2000/XP).
|
||||
win64 Win64 version of Vim (MS-Windows 64 bit).
|
||||
win32unix Win32 version of Vim, using Unix files (Cygwin)
|
||||
win64 Win64 version of Vim (MS-Windows 64 bit).
|
||||
win95 Win32 version for MS-Windows 95/98/ME.
|
||||
winaltkeys Compiled with 'winaltkeys' option.
|
||||
windows Compiled with support for more than one window.
|
||||
writebackup Compiled with 'writebackup' default on.
|
||||
xfontset Compiled with X fontset support |xfontset|.
|
||||
xim Compiled with X input method support |xim|.
|
||||
|
||||
+21
-21
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 7.3. Last change: 2010 May 14
|
||||
*gui.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -156,26 +156,26 @@ configure which ones appear with the 'guioptions' option.
|
||||
|
||||
The interface looks like this (with ":set guioptions=mlrb"):
|
||||
|
||||
+------------------------------+
|
||||
| File Edit Help | <- Menu bar (m)
|
||||
+-+--------------------------+-+
|
||||
|^| |^|
|
||||
|#| Text area. |#|
|
||||
| | | |
|
||||
|v|__________________________|v|
|
||||
Normal status line -> |-+ File.c 5,2 +-|
|
||||
between Vim windows |^|""""""""""""""""""""""""""|^|
|
||||
| | | |
|
||||
| | Another file buffer. | |
|
||||
| | | |
|
||||
|#| |#|
|
||||
Left scrollbar (l) -> |#| |#| <- Right
|
||||
|#| |#| scrollbar (r)
|
||||
| | | |
|
||||
|v| |v|
|
||||
+-+--------------------------+-+
|
||||
| |< #### >| | <- Bottom
|
||||
+-+--------------------------+-+ scrollbar (b)
|
||||
+------------------------------+ `
|
||||
| File Edit Help | <- Menu bar (m) `
|
||||
+-+--------------------------+-+ `
|
||||
|^| |^| `
|
||||
|#| Text area. |#| `
|
||||
| | | | `
|
||||
|v|__________________________|v| `
|
||||
Normal status line -> |-+ File.c 5,2 +-| `
|
||||
between Vim windows |^|""""""""""""""""""""""""""|^| `
|
||||
| | | | `
|
||||
| | Another file buffer. | | `
|
||||
| | | | `
|
||||
|#| |#| `
|
||||
Left scrollbar (l) -> |#| |#| <- Right `
|
||||
|#| |#| scrollbar (r) `
|
||||
| | | | `
|
||||
|v| |v| `
|
||||
+-+--------------------------+-+ `
|
||||
| |< #### >| | <- Bottom `
|
||||
+-+--------------------------+-+ scrollbar (b) `
|
||||
|
||||
Any of the scrollbar or menu components may be turned off by not putting the
|
||||
appropriate letter in the 'guioptions' string. The bottom scrollbar is
|
||||
|
||||
+33
-19
@@ -1,4 +1,4 @@
|
||||
*gui_mac.txt* For Vim version 7.3. Last change: 2010 Sep 17
|
||||
*gui_mac.txt* For Vim version 7.3. Last change: 2010 Dec 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bjorn Winckler
|
||||
@@ -172,6 +172,8 @@ time you start MacVim, you could create an alias such as >
|
||||
alias gvim='/Applications/MacVim.app/Contents/MacOS/Vim -g'
|
||||
and add that to "~/.profile".
|
||||
|
||||
Note: Do NOT call the MacVim binary inside the app bundle to start MacVim.
|
||||
|
||||
*mvim*
|
||||
A more flexible way to start MacVim is to use the shell script "mvim" which
|
||||
comes bundled with MacVim. Put this script in a folder in your path and then
|
||||
@@ -210,7 +212,7 @@ pressed. This feature can be enabled from the Advanced preferences pane (it
|
||||
is disabled by default). Note that this setting does not affect the speed
|
||||
with which windows open when using the |mvim| command.
|
||||
|
||||
Note that any changes to runtime files that are kept in an non-standard
|
||||
Note that any changes to runtime files that are kept in a non-standard
|
||||
location (i.e. not in ~/.vim) will not be picked up for the first window that
|
||||
opens after any changes. Also, there are some issues related to reading and
|
||||
writing of the |viminfo| file which can lead to the command line history
|
||||
@@ -236,8 +238,8 @@ is sent back to the server application.
|
||||
3. Preferences *macvim-prefs* *macvim-preferences*
|
||||
|
||||
Some settings are global to the MacVim application and would not make sense as
|
||||
Vim options. These settings are stored in a user default database and can be
|
||||
accessed via the "MacVim.Preferences..." menu item.
|
||||
Vim options. These settings are stored in the user defaults database and can
|
||||
be accessed via the "MacVim.Preferences..." menu item.
|
||||
|
||||
*macvim-user-defaults*
|
||||
Not all entries in the user defaults database are exposed via the preference
|
||||
@@ -504,24 +506,20 @@ outline.
|
||||
==============================================================================
|
||||
8. System services *macvim-services*
|
||||
|
||||
MacVim supports a few system services. These can be accessed from the MacVim
|
||||
submenu in the Services menu. For services to work, MacVim.app should be
|
||||
located in the /Applications folder. (You might have to logout and then login
|
||||
again before Mac OS X detects the MacVim services.)
|
||||
MacVim supports two system services. These can be accessed from the MacVim
|
||||
submenu in the Services menu or by right-clicking a selection. For services
|
||||
to work, MacVim.app should be located in the /Applications folder. (You might
|
||||
have to logout and then login again before Mac OS X detects the MacVim
|
||||
services.)
|
||||
|
||||
These are the currently supported services:
|
||||
* New Document Containing Selection: Open a new window and paste the
|
||||
* New MacVim Buffer With Selection: Create a new buffer and paste the
|
||||
currently selected text.
|
||||
* New Document Here: Open a new window and set the current directory
|
||||
to that of the selected text. This is intended to be used from a
|
||||
Finder window to open an empty document in the currently selected
|
||||
folder.
|
||||
* Open Selected File: If the selected text represents a file name,
|
||||
then the corresponding file is opened in a new window.
|
||||
* New MacVim Buffer Here: Create a new buffer and set the current
|
||||
directory to the file or folder that is selected in the Finder.
|
||||
|
||||
If new files are set to open in the current window (in the General preference
|
||||
pane) then the above services will also reuse the topmost window, instead of
|
||||
opening a new window.
|
||||
The services respect the "Open files from applications" setting in the general
|
||||
preferences.
|
||||
|
||||
==============================================================================
|
||||
9. mvim:// URL handler *mvim://* *macvim-url-handler*
|
||||
@@ -549,7 +547,8 @@ Note that url has to be a file:// url pointing to an existing local file.
|
||||
|
||||
Most keyboard shortcuts in MacVim are bound to menu items and can be
|
||||
discovered by looking through the menus (see |macvim-menus| on how to create
|
||||
your own menu shortcuts). The remaining shortcuts are listed here:
|
||||
your own menu shortcuts, see |cmd-key| on how to map your own commands to
|
||||
Cmd-key shortcuts). The remaining shortcuts are listed here:
|
||||
|
||||
*Cmd-.* *<D-.>*
|
||||
Cmd-. Interrupt Vim. Unlike Ctrl-C which is sent as normal
|
||||
@@ -608,6 +607,21 @@ equivalents which are not set up with :map).
|
||||
See |macvim-shift-movement| if you want Shift to select text when used in
|
||||
conjunction with the above Cmd/Alt movement shortcuts.
|
||||
|
||||
*cmd-key* *cmd-shortcuts*
|
||||
Creating key mappings that involve the Cmd key (<D-..> in Vim notation) can
|
||||
sometimes be slightly involved. Here are all the things you need to consider:
|
||||
|
||||
- Make sure the shortcut is not used by a menu item by looking through the
|
||||
menus. If it is then you need to unbind it before you can map to it. This
|
||||
is described under the help for the |:macmenu| command.
|
||||
- Bindings to <D-..> are case sensitive: <D-d> is not the same as <D-D>. If
|
||||
you want to map something to Cmd+Shift+d, then you need to use <D-D>, not
|
||||
<D-S-d> or <D-S-D>.
|
||||
- Some command key shortcuts are reserved by Mac OS X and cannot be mapped to
|
||||
(e.g. <D-Tab>). However, some of these shortcuts can be freed up in the
|
||||
System Preferences under Keyboard (e.g. Cmd+Space).
|
||||
- A few command key mappings are set up by MacVim, see |cmd-movement|.
|
||||
|
||||
==============================================================================
|
||||
11. Trackpad gestures *macvim-gestures*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w32.txt* For Vim version 7.3. Last change: 2007 Aug 30
|
||||
*gui_w32.txt* For Vim version 7.3. Last change: 2010 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -293,7 +293,9 @@ Normally, Vim waits for a command to complete before continuing (this makes
|
||||
sense for most shell commands which produce output for Vim to use). If you
|
||||
want Vim to start a program and return immediately, you can use the following
|
||||
syntax on W95 & NT: >
|
||||
:!start {command}
|
||||
:!start [/min] {command}
|
||||
The optional "/min" causes the window to be minimized.
|
||||
|
||||
On Win32s, you will have to go to another window instead. Don't forget that
|
||||
you must tell Windows 3.1x to keep executing a DOS command in the background
|
||||
while you switch back to Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2010 Aug 13
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -355,7 +355,7 @@ When Python 2 and Python 3 are both supported they must be loaded dynamically.
|
||||
When doing this on Linux/Unix systems and importing global symbols, this leads
|
||||
to a crash when the second Python version is used. So either global symbols
|
||||
are loaded but only one Python version is activated, or no global symbols are
|
||||
loaded. The latter makes Python's "import" fail on libaries that expect the
|
||||
loaded. The latter makes Python's "import" fail on libraries that expect the
|
||||
symbols to be provided by Vim.
|
||||
*E836* *E837*
|
||||
Vim's configuration script makes a guess for all libraries based on one
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ruby.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*if_ruby.txt* For Vim version 7.3. Last change: 2010 Oct 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Shugo Maeda
|
||||
@@ -40,6 +40,9 @@ downloading Ruby there.
|
||||
wasn't compiled in. To avoid errors, see
|
||||
|script-here|.
|
||||
|
||||
Command to try it out: >
|
||||
:ruby print "Hello" # this is a comment
|
||||
|
||||
Example Vim script: >
|
||||
|
||||
function! RedGem()
|
||||
@@ -187,12 +190,12 @@ $curbuf The current buffer object.
|
||||
==============================================================================
|
||||
6. Dynamic loading *ruby-dynamic*
|
||||
|
||||
On MS-Windows the Ruby library can be loaded dynamically. The |:version|
|
||||
output then includes |+ruby/dyn|.
|
||||
On MS-Windows and Unix the Ruby library can be loaded dynamically. The
|
||||
|:version| output then includes |+ruby/dyn|.
|
||||
|
||||
This means that Vim will search for the Ruby DLL file only when needed. When
|
||||
you don't use the Ruby interface you don't need it, thus you can use Vim
|
||||
without this DLL file.
|
||||
This means that Vim will search for the Ruby DLL file or shared library only
|
||||
when needed. When you don't use the Ruby interface you don't need it, thus
|
||||
you can use Vim even though this library file is not on your system.
|
||||
|
||||
You need to install the right version of Ruby for this to work. You can find
|
||||
the package to download from:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 7.3. Last change: 2010 Jul 30
|
||||
*indent.txt* For Vim version 7.3. Last change: 2010 Nov 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -258,6 +258,7 @@ assume a 'shiftwidth' of 4.
|
||||
<
|
||||
bN If N != 0 Vim will align a final "break" with the case label,
|
||||
so that case..break looks like a sort of block. (default: 0).
|
||||
When using 1, consider adding "0=break" to 'cinkeys'.
|
||||
|
||||
cino= cino=b1 >
|
||||
switch (x) switch(x)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.3. Last change: 2010 Jul 21
|
||||
*index.txt* For Vim version 7.3. Last change: 2011 Jan 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -29,7 +29,7 @@ For a complete listing of all help items see |help-tags|.
|
||||
==============================================================================
|
||||
1. Insert mode *insert-index*
|
||||
|
||||
tag char action ~
|
||||
tag char action in Insert mode ~
|
||||
-----------------------------------------------------------------------
|
||||
|i_CTRL-@| CTRL-@ insert previously inserted text and stop
|
||||
insert
|
||||
@@ -459,7 +459,7 @@ tag char note action in Normal mode ~
|
||||
|
||||
These can be used after an operator or in Visual mode to select an object.
|
||||
|
||||
tag command action in Normal mode ~
|
||||
tag command action in op-pending and Visual mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|v_aquote| a" double quoted string
|
||||
|v_a'| a' single quoted string
|
||||
@@ -721,6 +721,7 @@ tag char note action in Normal mode ~
|
||||
|gJ| gJ 2 join lines without inserting space
|
||||
|gP| ["x]gP 2 put the text [from register x] before the
|
||||
cursor N times, leave the cursor after it
|
||||
|gQ| gQ switch to "Ex" mode with Vim editing
|
||||
|gR| gR 2 enter Virtual Replace mode
|
||||
|gU| gU{motion} 2 make Nmove text uppercase
|
||||
|gV| gV don't reselect the previous Visual area
|
||||
@@ -951,11 +952,13 @@ Normal characters are inserted at the current cursor position.
|
||||
"Completion" below refers to context-sensitive completion. It will complete
|
||||
file names, tags, commands etc. as appropriate.
|
||||
|
||||
tag command action in Command-line editing mode ~
|
||||
------------------------------------------------------------------------------
|
||||
CTRL-@ not used
|
||||
|c_CTRL-A| CTRL-A do completion on the pattern in front of the
|
||||
cursor and insert all matches
|
||||
|c_CTRL-B| CTRL-B cursor to begin of command-line
|
||||
|c_CTRL-C| CTRL-C same as <ESC>
|
||||
|c_CTRL-C| CTRL-C same as <Esc>
|
||||
|c_CTRL-D| CTRL-D list completions that match the pattern in
|
||||
front of the cursor
|
||||
|c_CTRL-E| CTRL-E cursor to end of command-line
|
||||
@@ -1046,6 +1049,8 @@ This is a brief but complete listing of all the ":" commands, without
|
||||
mentioning any arguments. The optional part of the command name is inside [].
|
||||
The commands are sorted on the non-optional part of their name.
|
||||
|
||||
tag command action ~
|
||||
------------------------------------------------------------------------------
|
||||
|:!| :! filter lines or execute an external command
|
||||
|:!!| :!! repeat last ":!" command
|
||||
|:#| :# same as ":number"
|
||||
|
||||
+12
-5
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
*insert.txt* For Vim version 7.3. Last change: 2010 Nov 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -382,6 +382,10 @@ mappings it's often better to use <Esc> (first put an "x" in the text, <Esc>
|
||||
will then always put the cursor on it). Or use CTRL-\ CTRL-O, but then
|
||||
beware of the cursor possibly being beyond the end of the line.
|
||||
|
||||
The CTRL-O command takes you to Normal mode. If you then use a command enter
|
||||
Insert mode again it doesn't nest. Thus when typing "a<C-O>a" and then <Esc>
|
||||
takes you back to Normal mode, you do not need to type <Esc> twice.
|
||||
|
||||
The shifted cursor keys are not available on all terminals.
|
||||
|
||||
Another side effect is that a count specified before the "i" or "a" command is
|
||||
@@ -1033,6 +1037,8 @@ items:
|
||||
items that only differ in case are added
|
||||
dup when non-zero this match will be added even when an
|
||||
item with the same word is already present.
|
||||
empty when non-zero this match will be added even when it is
|
||||
an empty string
|
||||
|
||||
All of these except 'icase' must be a string. If an item does not meet these
|
||||
requirements then an error message is given and further items in the list are
|
||||
@@ -1043,7 +1049,8 @@ be relatively short. The "info" item can be longer, it will be displayed in
|
||||
the preview window when "preview" appears in 'completeopt'. The "info" item
|
||||
will also remain displayed after the popup menu has been removed. This is
|
||||
useful for function arguments. Use a single space for "info" to remove
|
||||
existing text in the preview window.
|
||||
existing text in the preview window. The size of the preview window is three
|
||||
lines, but 'previewheight' is used when it has a value of 1 or 2.
|
||||
|
||||
The "kind" item uses a single letter to indicate the kind of completion. This
|
||||
may be used to show the completion differently (different color or icon).
|
||||
@@ -1059,9 +1066,9 @@ match to the total list. These matches should then not appear in the returned
|
||||
list! Call |complete_check()| now and then to allow the user to press a key
|
||||
while still searching for matches. Stop searching when it returns non-zero.
|
||||
|
||||
The function is allowed to move the cursor, it is restored afterwards. This
|
||||
option cannot be set from a |modeline| or in the |sandbox|, for security
|
||||
reasons.
|
||||
*E839* *E840*
|
||||
The function is allowed to move the cursor, it is restored afterwards.
|
||||
The function is not allowed to move to another window or delete text.
|
||||
|
||||
An example that completes the names of the months: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
*intro.txt* For Vim version 7.3. Last change: 2010 Dec 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -616,7 +616,6 @@ Replace <Esc> -- -- <Insert> -- --
|
||||
Command-line *3 -- -- :start -- --
|
||||
Ex :vi -- -- -- -- --
|
||||
|
||||
- NA
|
||||
-- not possible
|
||||
|
||||
*1 Go from Normal mode to Insert mode by giving the command "i", "I", "a",
|
||||
@@ -703,7 +702,7 @@ Lines longer than the window width will wrap, unless the 'wrap' option is off
|
||||
(see below). The 'linebreak' option can be set to wrap at a blank character.
|
||||
|
||||
If the window has room after the last line of the buffer, Vim will show '~' in
|
||||
the first column of the last lines in the window, like this: >
|
||||
the first column of the last lines in the window, like this:
|
||||
|
||||
+-----------------------+
|
||||
|some line |
|
||||
@@ -715,7 +714,7 @@ the first column of the last lines in the window, like this: >
|
||||
Thus the '~' lines indicate that the end of the buffer was reached.
|
||||
|
||||
If the last line in a window doesn't fit, Vim will indicate this with a '@' in
|
||||
the first column of the last lines in the window, like this: >
|
||||
the first column of the last lines in the window, like this:
|
||||
|
||||
+-----------------------+
|
||||
|first line |
|
||||
@@ -730,7 +729,7 @@ window.
|
||||
When the "lastline" flag is present in the 'display' option, you will not see
|
||||
'@' characters at the left side of window. If the last line doesn't fit
|
||||
completely, only the part that fits is shown, and the last three characters of
|
||||
the last line are replaced with "@@@", like this: >
|
||||
the last line are replaced with "@@@", like this:
|
||||
|
||||
+-----------------------+
|
||||
|first line |
|
||||
|
||||
+14
-10
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
*map.txt* For Vim version 7.3. Last change: 2010 Nov 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1093,16 +1093,20 @@ is executed, it is transformed into a normal Ex command and then executed.
|
||||
|
||||
For starters: See section |40.2| in the user manual.
|
||||
|
||||
*E183* *user-cmd-ambiguous*
|
||||
*E183* *E841* *user-cmd-ambiguous*
|
||||
All user defined commands must start with an uppercase letter, to avoid
|
||||
confusion with builtin commands. (There are a few builtin commands, notably
|
||||
:Next, :Print and :X, which do start with an uppercase letter. The builtin
|
||||
will always take precedence in these cases). The other characters of the user
|
||||
command can be uppercase letters, lowercase letters or digits. When using
|
||||
digits, note that other commands that take a numeric argument may become
|
||||
ambiguous. For example, the command ":Cc2" could be the user command ":Cc2"
|
||||
without an argument, or the command ":Cc" with argument "2". It is advised to
|
||||
put a space between the command name and the argument to avoid these problems.
|
||||
confusion with builtin commands. Exceptions are these builtin commands:
|
||||
:Next
|
||||
:X
|
||||
They cannot be used for a user defined command. ":Print" is also an existing
|
||||
command, but it is deprecated and can be overruled.
|
||||
|
||||
The other characters of the user command can be uppercase letters, lowercase
|
||||
letters or digits. When using digits, note that other commands that take a
|
||||
numeric argument may become ambiguous. For example, the command ":Cc2" could
|
||||
be the user command ":Cc2" without an argument, or the command ":Cc" with
|
||||
argument "2". It is advised to put a space between the command name and the
|
||||
argument to avoid these problems.
|
||||
|
||||
When using a user-defined command, the command can be abbreviated. However, if
|
||||
an abbreviation is not unique, an error will be issued. Furthermore, a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mlang.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*mlang.txt* For Vim version 7.3. Last change: 2010 Dec 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -68,7 +68,7 @@ use of "-" and "_".
|
||||
With the "ctype" argument the language used for
|
||||
character encoding is set. This affects the libraries
|
||||
that Vim was linked with. It's unusual to set this to
|
||||
a different value from 'encoding'. This sets
|
||||
a different value from 'encoding' or "C". This sets
|
||||
$LC_CTYPE.
|
||||
With the "time" argument the language used for time
|
||||
and date messages is set. This affects strftime().
|
||||
|
||||
@@ -1033,20 +1033,20 @@ The maximum number of entries is fixed at 100.
|
||||
|
||||
For example, after three jump commands you have this jump list:
|
||||
|
||||
jump line col file/line ~
|
||||
jump line col file/text ~
|
||||
3 1 0 some text ~
|
||||
2 70 0 another line ~
|
||||
1 1154 23 end. ~
|
||||
> ~
|
||||
|
||||
The "file/line" column shows the file name, or the text at the jump if it is
|
||||
The "file/text" column shows the file name, or the text at the jump if it is
|
||||
in the current file (an indent is removed and a long line is truncated to fit
|
||||
in the window).
|
||||
|
||||
You are currently in line 1167. If you then use the CTRL-O command, the
|
||||
cursor is put in line 1154. This results in:
|
||||
|
||||
jump line col file/line ~
|
||||
jump line col file/text ~
|
||||
2 1 0 some text ~
|
||||
1 70 0 another line ~
|
||||
> 0 1154 23 end. ~
|
||||
@@ -1076,7 +1076,7 @@ command. You can explicitly add a jump by setting the ' mark.
|
||||
After the CTRL-O command that got you into line 1154 you could give another
|
||||
jump command (e.g., "G"). The jump list would then become:
|
||||
|
||||
jump line col file/line ~
|
||||
jump line col file/text ~
|
||||
4 1 0 some text ~
|
||||
3 70 0 another line ~
|
||||
2 1167 0 foo bar ~
|
||||
|
||||
+57
-28
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.3. Last change: 2010 Sep 21
|
||||
*options.txt* For Vim version 7.3. Last change: 2010 Dec 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1439,6 +1439,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
explicitly accessed using the "* notation. Also see
|
||||
|gui-clipboard|.
|
||||
|
||||
unnamedplus A variant of "unnamed" flag which uses the clipboard
|
||||
register '+' (|quoteplus|) instead of register '*' for
|
||||
all operations except yank. Yank shall copy the text
|
||||
into register '+' and also into '*' when "unnamed" is
|
||||
included.
|
||||
Only available with the |+X11| feature.
|
||||
Availability can be checked with: >
|
||||
if has('unnamedplus')
|
||||
<
|
||||
autoselect Works like the 'a' flag in 'guioptions': If present,
|
||||
then whenever Visual mode is started, or the Visual
|
||||
area extended, Vim tries to become the owner of the
|
||||
@@ -1501,6 +1510,25 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
feature}
|
||||
Number of screen lines to use for the command-line window. |cmdwin|
|
||||
|
||||
*'colorcolumn'* *'cc'*
|
||||
'colorcolumn' 'cc' string (default "")
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
'colorcolumn' is a comma separated list of screen columns that are
|
||||
highlighted with ColorColumn |hl-ColorColumn|. Useful to align
|
||||
text. Will make screen redrawing slower.
|
||||
The screen column can be an absolute number, or a number preceded with
|
||||
'+' or '-', which is added to or subtracted from 'textwidth'. >
|
||||
|
||||
:set cc=+1 " highlight column after 'textwidth'
|
||||
:set cc=+1,+2,+3 " highlight three columns after 'textwidth'
|
||||
:hi ColorColumn ctermbg=lightgrey guibg=lightgrey
|
||||
<
|
||||
When 'textwidth' is zero then the items with '-' and '+' are not used.
|
||||
A maximum of 256 columns are highlighted.
|
||||
|
||||
*'columns'* *'co'* *E594*
|
||||
'columns' 'co' number (default 80 or terminal width)
|
||||
global
|
||||
@@ -1685,7 +1713,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U|
|
||||
See |complete-functions| for an explanation of how the function is
|
||||
invoked and what it should return.
|
||||
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'completeopt'* *'cot'*
|
||||
'completeopt' 'cot' string (default: "menu,preview")
|
||||
@@ -2829,6 +2858,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"dos" is not present or no <CR><NL> is found in the file.
|
||||
Except: if "unix" was chosen, but there is a <CR> before
|
||||
the first <NL>, and there appear to be more <CR>s than <NL>s in
|
||||
the first few lines, "mac" is used.
|
||||
4. If 'fileformat' is still not set, the first name from
|
||||
'fileformats' is used.
|
||||
When reading a file into an existing buffer, the same is done, but
|
||||
@@ -2836,6 +2866,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
file only, the option is not changed.
|
||||
When 'binary' is set, the value of 'fileformats' is not used.
|
||||
|
||||
Note that when Vim starts up with an empty buffer this option is not
|
||||
used. Set 'fileformat' in your .vimrc instead.
|
||||
|
||||
For systems with a Dos-like <EOL> (<CR><NL>), when reading files that
|
||||
are ":source"ed and for vimrc files, automatic <EOL> detection may be
|
||||
done:
|
||||
@@ -3075,6 +3108,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Specifies for which type of commands folds will be opened, if the
|
||||
command moves the cursor into a closed fold. It is a comma separated
|
||||
list of items.
|
||||
NOTE: When the command is part of a mapping this option is not used.
|
||||
Add the |zv| command to the mapping to get the same effect.
|
||||
(rationale: the mapping may want to control opening folds itself)
|
||||
|
||||
item commands ~
|
||||
all any
|
||||
block "(", "{", "[[", "[{", etc.
|
||||
@@ -3089,8 +3126,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Also for |[s| and |]s|.
|
||||
tag jumping to a tag: ":ta", CTRL-T, etc.
|
||||
undo undo or redo: "u" and CTRL-R
|
||||
When the command is part of a mapping this option is not used. Add
|
||||
the |zv| command to the mapping to get the same effect.
|
||||
When a movement command is used for an operator (e.g., "dl" or "y%")
|
||||
this option is not used. This means the operator will include the
|
||||
whole closed fold.
|
||||
@@ -3191,7 +3226,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the internal format mechanism.
|
||||
|
||||
The expression may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|sandbox-option|. That stops the option from working, since changing
|
||||
the buffer text is not allowed.
|
||||
|
||||
*'fsync'* *'fs'* *'nofsync'* *'nofs'*
|
||||
'fsync' 'fs' boolean (default on)
|
||||
@@ -4715,25 +4751,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'colorcolumn'* *'cc'*
|
||||
'colorcolumn' 'cc' string (default "")
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
'colorcolumn' is a comma separated list of screen columns that are
|
||||
highlighted with ColorColumn |hl-ColorColumn|. Useful to align
|
||||
text. Will make screen redrawing slower.
|
||||
The screen column can be an absolute number, or a number preceded with
|
||||
'+' or '-', which is added to or subtracted from 'textwidth'. >
|
||||
|
||||
:set cc=+1 " highlight column after 'textwidth'
|
||||
:set cc=+1,+2,+3 " highlight three columns after 'textwidth'
|
||||
:hi ColorColumn ctermbg=lightgrey guibg=lightgrey
|
||||
<
|
||||
When 'textwidth' is zero then the items with '-' and '+' are not used.
|
||||
A maximum of 256 columns are highlighted.
|
||||
|
||||
*'matchpairs'* *'mps'*
|
||||
'matchpairs' 'mps' string (default "(:),{:},[:]")
|
||||
local to buffer
|
||||
@@ -6342,8 +6359,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Do smart autoindenting when starting a new line. Works for C-like
|
||||
programs, but can also be used for other languages. 'cindent' does
|
||||
something like this, works better in most cases, but is more strict,
|
||||
see |C-indenting|. When 'cindent' is on, setting 'si' has no effect.
|
||||
'indentexpr' is a more advanced alternative.
|
||||
see |C-indenting|. When 'cindent' is on or 'indentexpr' is set,
|
||||
setting 'si' has no effect. 'indentexpr' is a more advanced
|
||||
alternative.
|
||||
Normally 'autoindent' should also be on when using 'smartindent'.
|
||||
An indent is automatically inserted:
|
||||
- After a line ending in '{'.
|
||||
@@ -7656,8 +7674,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
! When included, save and restore global variables that start
|
||||
with an uppercase letter, and don't contain a lowercase
|
||||
letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
|
||||
and "_K_L_M" are not. Only String and Number types are
|
||||
stored.
|
||||
and "_K_L_M" are not. Nested List and Dict items may not be
|
||||
read back correctly, you end up with an empty item.
|
||||
" Maximum number of lines saved for each register. Old name of
|
||||
the '<' item, with the disadvantage that you need to put a
|
||||
backslash before the ", otherwise it will be recognized as the
|
||||
@@ -7873,6 +7891,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
a pattern from the list. This avoids problems when a future version
|
||||
uses another default.
|
||||
|
||||
|
||||
*'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'*
|
||||
'wildignorecase' 'wic' boolean (default off)
|
||||
global
|
||||
{not in Vi}
|
||||
When set case is ignored when completing file names and directories.
|
||||
Has no effect on systems where file name case is generally ignored.
|
||||
Does not apply when the shell is used to expand wildcards, which
|
||||
happens when there are special characters.
|
||||
|
||||
|
||||
*'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
|
||||
'wildmenu' 'wmnu' boolean (default off)
|
||||
global
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_win32.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*os_win32.txt* For Vim version 7.3. Last change: 2010 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by George Reilly
|
||||
@@ -313,6 +313,7 @@ A. When using :! to run an external command, you can run it with "start": >
|
||||
with :!start do not get passed Vim's open file handles, which means they do
|
||||
not have to be closed before Vim.
|
||||
To avoid this special treatment, use ":! start".
|
||||
The optional "/min" argument causes the window to be minimized.
|
||||
|
||||
Q. I'm using Win32s, and when I try to run an external command like "make",
|
||||
Vim doesn't wait for it to finish! Help!
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_tar.txt* For Vim version 7.3. Last change: 2010 Aug 09
|
||||
*pi_tar.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||
|
||||
+====================+
|
||||
| Tar File Interface |
|
||||
@@ -60,11 +60,11 @@ Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright*
|
||||
<.vimrc> file.
|
||||
Default
|
||||
Variable Value Explanation
|
||||
*g:tar_browseoptions* "Ptf" used to get a list of contents
|
||||
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
|
||||
*g:tar_cmd* "tar" the name of the tar program
|
||||
*g:tar_nomax* 0 if true, file window will not be maximized
|
||||
*g:tar_secure* undef if exists:
|
||||
*g:tar_browseoptions* "Ptf" used to get a list of contents
|
||||
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
|
||||
*g:tar_cmd* "tar" the name of the tar program
|
||||
*g:tar_nomax* 0 if true, file window will not be maximized
|
||||
*g:tar_secure* undef if exists:
|
||||
"--"s will be used to prevent unwanted
|
||||
option expansion in tar commands.
|
||||
Please be sure that your tar command
|
||||
@@ -76,7 +76,7 @@ Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright*
|
||||
"-"
|
||||
Not all tar's support the "--" which is why
|
||||
it isn't default.
|
||||
*g:tar_writeoptions* "uf" used to update/replace a file
|
||||
*g:tar_writeoptions* "uf" used to update/replace a file
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*quickfix.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -546,6 +546,14 @@ descriptors when searching many files. However, when the |:hide| command
|
||||
modifier is used the buffers are kept loaded. This makes following searches
|
||||
in the same files a lot faster.
|
||||
|
||||
Note that |:copen| (or |:lopen| for |:lgrep|) may be used to open a buffer
|
||||
containing the search results in linked form. The |:silent| command may be
|
||||
used to suppress the default full screen grep output. The |:grep!| form of
|
||||
the |:grep| command doesn't jump to the first match automatically. These
|
||||
commands can be combined to create a NewGrep command: >
|
||||
|
||||
command! -nargs=+ NewGrep execute 'silent grep! <args>' | copen 42
|
||||
|
||||
|
||||
5.1 using Vim's internal grep
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
*quickref.txt* For Vim version 7.3. Last change: 2010 Dec 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -938,6 +938,7 @@ Short explanation of each option: *option-list*
|
||||
'wildchar' 'wc' command-line character for wildcard expansion
|
||||
'wildcharm' 'wcm' like 'wildchar' but also works when mapped
|
||||
'wildignore' 'wig' files matching these patterns are not completed
|
||||
'wildignorecase' 'wic' ignore case when completing file names
|
||||
'wildmenu' 'wmnu' use menu for command line completion
|
||||
'wildmode' 'wim' mode for 'wildchar' command-line expansion
|
||||
'wildoptions' 'wop' specifies how command line completion is done
|
||||
|
||||
+12
-11
@@ -1,4 +1,4 @@
|
||||
*quotes.txt* For Vim version 7.3. Last change: 2006 Apr 24
|
||||
*quotes.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -260,15 +260,16 @@ Eccettuato, Italy)
|
||||
|
||||
|
||||
In summary:
|
||||
__ ___ _ _ _ ___ _____
|
||||
\ \ / (_)_ __ ___ (_)___ | | | |/ _ \_ _|
|
||||
\ \ / /| | '_ ` _ \ | / __| | |_| | | | || |
|
||||
\ V / | | | | | | | | \__ \ | _ | |_| || |
|
||||
\_/ |_|_| |_| |_| |_|___/ |_| |_|\___/ |_|
|
||||
____ _____ _ _ _____ _____ _ _
|
||||
/ ___|_ _| | | | ___| ___| | |
|
||||
\___ \ | | | | | | |_ | |_ | | |
|
||||
___) || | | |_| | _| | _| |_|_|
|
||||
|____/ |_| \___/|_| |_| (_|_) (Tony Nugent, Australia)
|
||||
__ ___ _ _ _ ___ _____ `
|
||||
\ \ / (_)_ __ ___ (_)___ | | | |/ _ \_ _| `
|
||||
\ \ / /| | '_ ` _ \ | / __| | |_| | | | || | `
|
||||
\ V / | | | | | | | | \__ \ | _ | |_| || | `
|
||||
\_/ |_|_| |_| |_| |_|___/ |_| |_|\___/ |_| `
|
||||
____ _____ _ _ _____ _____ _ _ `
|
||||
/ ___|_ _| | | | ___| ___| | | `
|
||||
\___ \ | | | | | | |_ | |_ | | | `
|
||||
___) || | | |_| | _| | _| |_|_| `
|
||||
|____/ |_| \___/|_| |_| (_|_) (Tony Nugent, Australia) `
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 7.3. Last change: 2009 Nov 04
|
||||
*repeat.txt* For Vim version 7.3. Last change: 2011 Jan 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -102,7 +102,7 @@ To abort this type CTRL-C twice.
|
||||
q{0-9a-zA-Z"} Record typed characters into register {0-9a-zA-Z"}
|
||||
(uppercase to append). The 'q' command is disabled
|
||||
while executing a register, and it doesn't work inside
|
||||
a mapping. {Vi: no recording}
|
||||
a mapping and |:normal|. {Vi: no recording}
|
||||
|
||||
q Stops recording. (Implementation note: The 'q' that
|
||||
stops recording is not stored in the register, unless
|
||||
@@ -112,9 +112,13 @@ q Stops recording. (Implementation note: The 'q' that
|
||||
@{0-9a-z".=*} Execute the contents of register {0-9a-z".=*} [count]
|
||||
times. Note that register '%' (name of the current
|
||||
file) and '#' (name of the alternate file) cannot be
|
||||
used. For "@=" you are prompted to enter an
|
||||
expression. The result of the expression is then
|
||||
executed. See also |@:|. {Vi: only named registers}
|
||||
used.
|
||||
The register is executed like a mapping, that means
|
||||
that the difference between 'wildchar' and 'wildcharm'
|
||||
applies.
|
||||
For "@=" you are prompted to enter an expression. The
|
||||
result of the expression is then executed.
|
||||
See also |@:|. {Vi: only named registers}
|
||||
|
||||
*@@* *E748*
|
||||
@@ Repeat the previous @{0-9a-z":*} [count] times.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 7.3. Last change: 2010 May 07
|
||||
*sign.txt* For Vim version 7.3. Last change: 2010 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@@ -70,7 +70,8 @@ DEFINING A SIGN. *:sign-define* *E255* *E160* *E612*
|
||||
:sign define {name} {argument}...
|
||||
Define a new sign or set attributes for an existing sign.
|
||||
The {name} can either be a number (all digits) or a name
|
||||
starting with a non-digit.
|
||||
starting with a non-digit. Leading digits are ignored, thus
|
||||
"0012", "012" and "12" are considered the same name.
|
||||
About 120 different signs can be defined.
|
||||
|
||||
Accepted arguments:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*spell.txt* For Vim version 7.3. Last change: 2010 Apr 11
|
||||
*spell.txt* For Vim version 7.3. Last change: 2010 Dec 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -335,6 +335,9 @@ A spell file might not be available in the current 'encoding'. See
|
||||
|spell-mkspell| about how to create a spell file. Converting a spell file
|
||||
with "iconv" will NOT work!
|
||||
|
||||
Note: on VMS ".{enc}.spl" is changed to "_{enc}.spl" to avoid trouble with
|
||||
filenames.
|
||||
|
||||
*spell-sug-file* *E781*
|
||||
If there is a file with exactly the same name as the ".spl" file but ending in
|
||||
".sug", that file will be used for giving better suggestions. It isn't loaded
|
||||
|
||||
+79
-30
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.3. Last change: 2010 Sep 23
|
||||
*syntax.txt* For Vim version 7.3. Last change: 2010 Dec 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -390,10 +390,10 @@ Or use the ":TOhtml" user command. It is defined in a standard plugin.
|
||||
|
||||
:10,40TOhtml
|
||||
|
||||
Warning: This is slow! The script must process every character of every line.
|
||||
Because it is so slow, by default a progress bar is displayed in the
|
||||
statusline for each step that usually takes a long time. If you don't like
|
||||
seeing this progress bar, you can disable it and get a very minor speed
|
||||
Warning: This can be slow! The script must process every character of every
|
||||
line. Because it can take a long time, by default a progress bar is displayed
|
||||
in the statusline for each major step in the conversion process. If you don't
|
||||
like seeing this progress bar, you can disable it and get a very minor speed
|
||||
improvement with: >
|
||||
|
||||
let g:html_no_progress = 1
|
||||
@@ -475,40 +475,89 @@ risk of making some things look a bit different, use: >
|
||||
This will use <br> at the end of each line and use " " for repeated
|
||||
spaces.
|
||||
|
||||
The current value of 'encoding' is used to specify the charset of the HTML
|
||||
file. This only works for those values of 'encoding' that have an equivalent
|
||||
HTML charset name. To overrule this set g:html_use_encoding to the name of
|
||||
the charset to be used: >
|
||||
:let g:html_use_encoding = "foobar"
|
||||
To omit the line that specifies the charset, set g:html_use_encoding to an
|
||||
empty string: >
|
||||
:let g:html_use_encoding = ""
|
||||
To go back to the automatic mechanism, delete the g:html_use_encoding
|
||||
variable: >
|
||||
:unlet g:html_use_encoding
|
||||
<
|
||||
For diff mode a sequence of more than 3 filler lines is displayed as three
|
||||
lines with the middle line mentioning the total number of inserted lines. If
|
||||
you prefer to see all the inserted lines use: >
|
||||
If you do use the "<pre>" tags, <Tab> characters in the text are included in
|
||||
the generated output if they will have no effect on the appearance of the
|
||||
text and it looks like they are in the document intentionally. This allows for
|
||||
the HTML output to be copied and pasted from a browser without losing the
|
||||
actual whitespace used in the document.
|
||||
|
||||
Specifically, <Tab> characters will be included if the 'tabstop' option is set
|
||||
to the default of 8, 'expandtab' is not set, and if neither the foldcolumn nor
|
||||
the line numbers are included in the HTML output (see options above). When any
|
||||
of these conditions are not met, any <Tab> characters in the text are expanded
|
||||
to the appropriate number of spaces in the HTML output.
|
||||
|
||||
When "<pre>" is included, you can force |:TOhtml| to keep the tabs even if the
|
||||
other conditions are not met with: >
|
||||
:let g:html_expand_tabs = 0
|
||||
Note that this can easily break text alignment and indentation in the HTML.
|
||||
|
||||
Force tabs to be expanded even when they would be kept using: >
|
||||
:let g:html_expand_tabs = 1
|
||||
|
||||
For diff mode on a single file (with g:html_diff_one_file) a sequence of more
|
||||
than 3 filler lines is displayed as three lines with the middle line
|
||||
mentioning the total number of inserted lines. If you prefer to see all the
|
||||
inserted lines as with the side-by-side diff, use: >
|
||||
:let g:html_whole_filler = 1
|
||||
And to go back to displaying up to three lines again: >
|
||||
:unlet g:html_whole_filler
|
||||
<
|
||||
TOhtml uses the current value of 'fileencoding' if set, or 'encoding' if not,
|
||||
to determine the charset and 'fileencoding' of the HTML file. In general, this
|
||||
works for the encodings mentioned specifically by name in |encoding-names|, but
|
||||
TOhtml will only automatically use those encodings which are widely supported.
|
||||
However, you can override this to support specific encodings that may not be
|
||||
automatically detected by default.
|
||||
|
||||
To overrule all automatic charset detection, set g:html_use_encoding to the
|
||||
name of the charset to be used. TOhtml will try to determine the appropriate
|
||||
'fileencoding' setting from the charset, but you may need to set it manually
|
||||
if TOhtml cannot determine the encoding. It is recommended to set this
|
||||
variable to something widely supported, like UTF-8, for anything you will be
|
||||
hosting on a webserver: >
|
||||
:let g:html_use_encoding = "UTF-8"
|
||||
You can also use this option to omit the line that specifies the charset
|
||||
entirely, by setting g:html_use_encoding to an empty string: >
|
||||
:let g:html_use_encoding = ""
|
||||
To go back to the automatic mechanism, delete the g:html_use_encoding
|
||||
variable: >
|
||||
:unlet g:html_use_encoding
|
||||
|
||||
If you specify a charset with g:html_use_encoding for which TOhtml cannot
|
||||
automatically detect the corresponding 'fileencoding' setting, you can use
|
||||
g:html_encoding_override to allow TOhtml to detect the correct encoding.
|
||||
This is a dictionary of charset-encoding pairs that will replace existing
|
||||
pairs automatically detected by TOhtml, or supplement with new pairs. For
|
||||
example, to allow TOhtml to detect the HTML charset "windows-1252" properly as
|
||||
the encoding "8bit-cp1252", use: >
|
||||
:let g:html_encoding_override = {'windows-1252': '8bit-cp1252'}
|
||||
<
|
||||
The g:html_charset_override is similar, it allows TOhtml to detect the HTML
|
||||
charset for any 'fileencoding' or 'encoding' which is not detected
|
||||
automatically. You can also use it to override specific existing
|
||||
encoding-charset pairs. For example, TOhtml will by default use UTF-8 for all
|
||||
Unicode/UCS encodings. To use UTF-16 and UTF-32 instead, use: >
|
||||
:let g:html_charset_override = {'ucs-4': 'UTF-32', 'utf-16': 'UTF-16'}
|
||||
|
||||
Note that documents encoded in either UTF-32 or UTF-16 have known
|
||||
compatibility problems with at least one major browser.
|
||||
|
||||
*convert-to-XML* *convert-to-XHTML*
|
||||
An alternative is to have the script generate XHTML (XML compliant HTML). To
|
||||
do this set the "html_use_xhtml" variable: >
|
||||
If you do not like plain HTML, an alternative is to have the script generate
|
||||
XHTML (XML compliant HTML). To do this set the "html_use_xhtml" variable: >
|
||||
:let g:html_use_xhtml = 1
|
||||
|
||||
Any of these options can be enabled or disabled by setting them explicitly to
|
||||
the desired value, or restored to their default by removing the variable using
|
||||
|:unlet|.
|
||||
Any of the on/off options listed above can be enabled or disabled by setting
|
||||
them explicitly to the desired value, or restored to their default by removing
|
||||
the variable using |:unlet|.
|
||||
|
||||
Remarks:
|
||||
- This only works in a version with GUI support. If the GUI is not actually
|
||||
running (possible for X11) it still works, but not very well (the colors
|
||||
may be wrong).
|
||||
- Some truly ancient browsers may not show the background colors.
|
||||
- From most browsers you can also print the file (in color)!
|
||||
- This version of TOhtml may work with older versions of Vim, but some
|
||||
features such as conceal support will not function, and the colors may be
|
||||
incorrect for an old Vim without GUI support compiled in.
|
||||
|
||||
Here is an example how to run the script over all .c and .h files from a
|
||||
Unix shell: >
|
||||
@@ -872,8 +921,8 @@ line to your startup file: >
|
||||
|
||||
|
||||
DOCBOOK *docbk.vim* *ft-docbk-syntax* *docbook*
|
||||
DOCBOOK XML *docbkxml.vim* *ft-docbkxml-syntax*
|
||||
DOCBOOK SGML *docbksgml.vim* *ft-docbksgml-syntax*
|
||||
DOCBOOK XML *docbkxml.vim* *ft-docbkxml-syntax*
|
||||
DOCBOOK SGML *docbksgml.vim* *ft-docbksgml-syntax*
|
||||
|
||||
There are two types of DocBook files: SGML and XML. To specify what type you
|
||||
are using the "b:docbk_type" variable should be set. Vim does this for you
|
||||
|
||||
@@ -671,6 +671,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'noweirdinvert' options.txt /*'noweirdinvert'*
|
||||
'nowfh' options.txt /*'nowfh'*
|
||||
'nowfw' options.txt /*'nowfw'*
|
||||
'nowic' options.txt /*'nowic'*
|
||||
'nowildignorecase' options.txt /*'nowildignorecase'*
|
||||
'nowildmenu' options.txt /*'nowildmenu'*
|
||||
'nowinfixheight' options.txt /*'nowinfixheight'*
|
||||
'nowinfixwidth' options.txt /*'nowinfixwidth'*
|
||||
@@ -1078,10 +1080,12 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'wh' options.txt /*'wh'*
|
||||
'whichwrap' options.txt /*'whichwrap'*
|
||||
'wi' options.txt /*'wi'*
|
||||
'wic' options.txt /*'wic'*
|
||||
'wig' options.txt /*'wig'*
|
||||
'wildchar' options.txt /*'wildchar'*
|
||||
'wildcharm' options.txt /*'wildcharm'*
|
||||
'wildignore' options.txt /*'wildignore'*
|
||||
'wildignorecase' options.txt /*'wildignorecase'*
|
||||
'wildmenu' options.txt /*'wildmenu'*
|
||||
'wildmode' options.txt /*'wildmode'*
|
||||
'wildoptions' options.txt /*'wildoptions'*
|
||||
@@ -4263,7 +4267,12 @@ E835 options.txt /*E835*
|
||||
E836 if_pyth.txt /*E836*
|
||||
E837 if_pyth.txt /*E837*
|
||||
E838 netbeans.txt /*E838*
|
||||
E839 insert.txt /*E839*
|
||||
E84 windows.txt /*E84*
|
||||
E840 insert.txt /*E840*
|
||||
E841 map.txt /*E841*
|
||||
E842 cmdline.txt /*E842*
|
||||
E843 editing.txt /*E843*
|
||||
E85 options.txt /*E85*
|
||||
E86 windows.txt /*E86*
|
||||
E87 windows.txt /*E87*
|
||||
@@ -4987,7 +4996,9 @@ clearmatches() eval.txt /*clearmatches()*
|
||||
client-server remote.txt /*client-server*
|
||||
clientserver remote.txt /*clientserver*
|
||||
clipboard gui.txt /*clipboard*
|
||||
cmd-key gui_mac.txt /*cmd-key*
|
||||
cmd-movement gui_mac.txt /*cmd-movement*
|
||||
cmd-shortcuts gui_mac.txt /*cmd-shortcuts*
|
||||
cmdarg-variable eval.txt /*cmdarg-variable*
|
||||
cmdbang-variable eval.txt /*cmdbang-variable*
|
||||
cmdline-arguments vi_diff.txt /*cmdline-arguments*
|
||||
@@ -8175,6 +8186,7 @@ v:val eval.txt /*v:val*
|
||||
v:var eval.txt /*v:var*
|
||||
v:version eval.txt /*v:version*
|
||||
v:warningmsg eval.txt /*v:warningmsg*
|
||||
v:windowid eval.txt /*v:windowid*
|
||||
v_! change.txt /*v_!*
|
||||
v_$ visual.txt /*v_$*
|
||||
v_: cmdline.txt /*v_:*
|
||||
@@ -8450,6 +8462,7 @@ window-size term.txt /*window-size*
|
||||
window-size-functions usr_41.txt /*window-size-functions*
|
||||
window-tag windows.txt /*window-tag*
|
||||
window-variable eval.txt /*window-variable*
|
||||
windowid-variable eval.txt /*windowid-variable*
|
||||
windows windows.txt /*windows*
|
||||
windows-3.1 os_win32.txt /*windows-3.1*
|
||||
windows-intro windows.txt /*windows-intro*
|
||||
|
||||
@@ -115,7 +115,7 @@ CTRL-T Jump to [count] older entry in the tag stack
|
||||
|
||||
The output of ":tags" looks like this:
|
||||
|
||||
# TO tag FROM line in file/line
|
||||
# TO tag FROM line in file/text
|
||||
1 1 main 1 harddisk2:text/vim/test
|
||||
> 2 2 FuncA 58 i = FuncA(10);
|
||||
3 1 FuncC 357 harddisk2:text/vim/src/amiga.c
|
||||
@@ -135,7 +135,7 @@ you were before the tag command. The line number will be correct, also when
|
||||
deleting/inserting lines, unless this was done by another program (e.g.
|
||||
another instance of Vim).
|
||||
|
||||
For the current file, the "file/line" column shows the text at the position.
|
||||
For the current file, the "file/text" column shows the text at the position.
|
||||
An indent is removed and a long line is truncated to fit in the window.
|
||||
|
||||
You can jump to previously used tags with several commands. Some examples:
|
||||
@@ -164,9 +164,9 @@ entry was not at the bottom, the entries below the last used one are
|
||||
deleted. This means that an old branch in the call graph is lost. After the
|
||||
commands explained above the tag stack will look like this:
|
||||
|
||||
# TO tag FROM line in file
|
||||
1 main 1 harddisk2:text/vim/test
|
||||
2 FuncB 59 harddisk2:text/vim/src/main.c
|
||||
# TO tag FROM line in file/text
|
||||
1 1 main 1 harddisk2:text/vim/test
|
||||
2 1 FuncB 59 harddisk2:text/vim/src/main.c
|
||||
|
||||
*E73*
|
||||
When you try to use the tag stack while it doesn't contain anything you will
|
||||
|
||||
+178
-76
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
*todo.txt* For Vim version 7.3. Last change: 2011 Jan 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -30,81 +30,91 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Cursor position wrong when 'formatoptions' contains "a". (Moshe Kamensky, 2010
|
||||
Sep 7, Gary Johnson, 2010 Sep 14)
|
||||
Formatoptions cause cursor to jump. (ZyX, 2010 Aug 22)
|
||||
Caused by revision 2294, "Make joining a range of lines much faster. (Milan
|
||||
Vancura)" ?
|
||||
Patch by Carlo Teubner, 2010 Sep 25. Test Sep 26.
|
||||
|
||||
'cursorline' is displayed too short when there are concealed characters and
|
||||
'list' is set, 'listchars' at default value. (Dennis Preiser, 2010 Aug 15)
|
||||
|
||||
Hang on slave PTY on Mac. Patch from Nikola Knezevic, 2010 Aug 29.
|
||||
|
||||
Patch to fix sign type negative and memory not freed. (Xavier de Gaye, 2010
|
||||
Aug 20)
|
||||
When running external command with ":make", cursor line is redrawn on top of
|
||||
external output.
|
||||
|
||||
Conceal: using Tab for cchar causes problems. Should reject it. (ZyX, 2010
|
||||
Aug 25)
|
||||
|
||||
Problems with building after 7.3.050, -as-needed does not work for gcc 4.4.1?
|
||||
(Charles Campbell, 2010 Nov 7) Or is the problem that we should use -ltinfo,
|
||||
because nothing is used from ncurses?
|
||||
|
||||
Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
|
||||
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
|
||||
21, Ben Fritz, 2010 Sep 14)
|
||||
|
||||
Patch for :mksession not escaping file name properly. (Peter Odding, 2010 Sep
|
||||
19)
|
||||
|
||||
Patch for CTRL-] in help file doing wrong escaping. (Carlo Teubner, 2010 Sep
|
||||
25)
|
||||
|
||||
Patch to support List and Dict in .viminfo. (Christian Brabandt, 2010 Sep 24)
|
||||
Sep 26 with a test.
|
||||
|
||||
Patch for :grep docs. (Britton Kerin, 2010 Aug 31)
|
||||
|
||||
Patch for dynamic loading Ruby on Unix. (Jon, 2010 Aug 23)
|
||||
Included, but also need a change to configure.
|
||||
|
||||
Replacement R syntax file. (Jakson A. Aquino, 2010 Sep 29)
|
||||
Bug in repeating Visual "u". (Lawrence Kesteloot, 2010 Dec 20)
|
||||
|
||||
Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26)
|
||||
|
||||
maparg() doesn't return the flags, such as <buffer>, <script>, <silent>.
|
||||
These are needed to save and restore a mapping.
|
||||
Also: the rhs string is not always correct. (Hari Krishna Dara, 2009 Sept 29)
|
||||
Patch by Christian Brabandt, 2010 Sep 17.
|
||||
This line hangs Vim, because of syntax HL:
|
||||
call append(line, "INFO ....12....18....24....30....36....42....48....54....60....66....72....78%$")
|
||||
|
||||
Building the MingW version without clipboard but with multi-byte doesn't
|
||||
build. (Bill Lam, 2010 Sep 18)
|
||||
work. (Bill Lam, 2010 Sep 18)
|
||||
|
||||
Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5)
|
||||
|
||||
Patch to fix warning for accessing mediumVersion. (Dominique Pelle, 2010 Aug
|
||||
18)
|
||||
Using ":break" or something else that stops executing commands inside a
|
||||
":finally" does not rethrow a previously uncaught exception. (ZyX, 2010 Oct
|
||||
15)
|
||||
|
||||
Patch for 2html to support 'fileencoding'. (Benjamin Fritz, 2010 Sep 10)
|
||||
Vim using lots of memory when joining lines. (John Little, 2010 Dec 3)
|
||||
|
||||
Patch to use 'previewheight' for popup menu. (Benjamin Haskell, 2010 Sep 29)
|
||||
On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a
|
||||
64 bits value. Change all number options to use nropt_T and define it to the
|
||||
right type.
|
||||
|
||||
CTRL-] on help tag |/[\n]| doesn't jump to the right place. (Tony Mechelynck,
|
||||
2010 Aug 8)
|
||||
|
||||
Three patches for undo persistence. (Christian Brabandt, 2010 Sep 4)
|
||||
Patch to improve mf_hash, dynamic sizing. (Ivan Krasilnikov, 2010 Dec 17)
|
||||
Needs tests.
|
||||
|
||||
string() can't parse back "inf" and "nan". Fix documentation or fix code?
|
||||
(ZyX, 2010 Aug 23)
|
||||
|
||||
":command Print echo 'print'" works, but ":Print" doesn't. Builtin Print
|
||||
should be overruled. (Aaron Thoma)
|
||||
Patch by Christian Brabandt, 2010 Sep 5.
|
||||
maparg() does not show the <script> flag. When temporarily changing a
|
||||
mapping, how to restore the script ID?
|
||||
|
||||
Comparing recursive structure loops forever. (ZyX, 2010 Aug 22, info from John
|
||||
Beckett Aug 23)
|
||||
Patch to fix \%V item in regexp. (Christian Brabandt, 2010 Nov 8)
|
||||
Update Nov 19. James Vega: still not right. Christian: it's difficult.
|
||||
|
||||
Patch to add up to 99 match groups. (Christian Brabandt, 2010 Dec 22)
|
||||
Also add named groups: \%{name}(re) and \%{name}g
|
||||
|
||||
Highlighting stops working after changing it many times. Script to reproduce
|
||||
it: Pablo Contreras, 2010 Oct 12 Windows XP and 7. Font is never freed?
|
||||
|
||||
Loading autoload script even when usage is inside "if 0". (Christian Brabandt,
|
||||
2010 Dec 18)
|
||||
|
||||
When 'cursorcolumn' is set locally to a window, ":new" opens a window with the
|
||||
same highlighting but 'cursorcolumn' is empty. (Tyru, 2010 Nov 15)
|
||||
|
||||
In the sandbox it's not allowed to do many things, but it's possible to change
|
||||
or set variables. Add a way to prevent variables from being changed in the
|
||||
sandbox? E.g.: ":protect g:restore_settings".
|
||||
|
||||
GTK: drawing a double-width combining character over single-width characters
|
||||
doesn't look right. (Dominique Pelle, 2010 Aug 8)
|
||||
|
||||
GTK: tear-off menu does not work. (Kurt Sonnenmoser, 2010 Oct 25)
|
||||
|
||||
Version of netbeans.c for use with MacVim. (Kazuki Sakamoto, 2010 Nov 18)
|
||||
|
||||
7.3.014 changed how backslash at end of line works, but still get a NUL when
|
||||
there is one backslash. (Ray Frush, 2010 Nov 18) What does the original ex
|
||||
do?
|
||||
|
||||
":find" completion does not escape space in directory name. (Isz, 2010 Nov 2)
|
||||
|
||||
Searching mixed with Visual mode doesn't redraw properly. (James Vega, 2010 Nov
|
||||
22)
|
||||
|
||||
Patch to support ":!start /b cmd". (Xaizek, 2010 Dec 22)
|
||||
|
||||
Copy/paste between Vim and Google chrome doesn't work well for multi-byte
|
||||
characters. (Ben Haskell, 2010 Sep 17)
|
||||
When putting text in the cut buffer (when exiting) and conversion doesn't work
|
||||
@@ -115,32 +125,71 @@ clear why it doesn't work.
|
||||
Editing a file with a ^M with 'ff' set to "mac", opening a help file, then the
|
||||
^M is displayed as ^J sometimes. Getting 'ff' value from wrong window/buffer?
|
||||
|
||||
Since patch 7.2.46 Yankring plugin has become very slow, eventually make Vim
|
||||
crash? (Raiwil, 2010 Nov 17)
|
||||
|
||||
Patch to disallow fork() when __APPLE__ is defined. (Hisashi T Fujinaka, 2010
|
||||
Nov 25)
|
||||
|
||||
GTK: Patch to fix menu popping down. (Hong Xu, 2010 Dec 4, Dec 5)
|
||||
|
||||
Python: Adding line to buffer other than the current one doesn't work
|
||||
correctly. (Rozbujnik, 2010 Dec 19)
|
||||
|
||||
Patch to add 'systemencoding', convert between 'encoding' and this for file
|
||||
names, shell commands and the like. (Kikuchan, 2010 Oct 14)
|
||||
Assume the system converts between the actual encoding of the filesystem to
|
||||
the system encoding (usually utf-8).
|
||||
|
||||
Problem producing tags file when hebrew.frx is present. It has a BOM.
|
||||
Results in E670. (Tony Mechelynck, 2010 May 2)
|
||||
|
||||
Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct
|
||||
30)
|
||||
|
||||
Ruby: ":ruby print $buffer.number" returns zero.
|
||||
|
||||
setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11)
|
||||
|
||||
7 The 'directory' option supports changing path separators to "%" to make
|
||||
file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
|
||||
Patch by Christian Brabandt, 2010 Oct 21.
|
||||
|
||||
getpos()/setpos() don't include curswant. getpos() could return a fifth
|
||||
element. setpos() could accept an optional fifth element.
|
||||
Patch by Christian Brabandt, 2010 Sep 6. Check that new argument is optional
|
||||
and that it's documented.
|
||||
|
||||
With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
|
||||
2010 Oct 24)
|
||||
|
||||
Patch to add random number generator. (Hong Xu, 2010 Nov 8, update Nov 10)
|
||||
Alternative from Christian Brabandt. (2010 Sep 19)
|
||||
|
||||
Messages in message.txt are highlighted as examples.
|
||||
|
||||
Win32: Patch to fix slow access over network (David Anderson). Cleaned up by
|
||||
John Beckett, 2010 Aug 25.
|
||||
When using cp850 the NBSP (0xff) is not drawn correctly. (Brett Stahlman, 2010
|
||||
Oct 22) 'isprint' is set to "@,161-255".
|
||||
|
||||
Test 73 fails on MS-Windows when compiled with DJGPP and run twice. How to
|
||||
delete the Xfind directory? Add an rmdir() function, just like we have
|
||||
mkdir().
|
||||
|
||||
":echo "\x85" =~# '[\u0085]'" returns 1 instead of 0. (ZyX, 2010 Oct 3)
|
||||
|
||||
'cindent' not correct when 'list' is set. (Zdravi Korusef, 2010 Apr 15)
|
||||
|
||||
When 'paste' is changed with 'pastetoggle', the ruler doesn't reflect this
|
||||
right away. (Samuel Ferencik, 2010 Dec 7)
|
||||
|
||||
Windows installer: licence text should not use indent, causes bad word wrap.
|
||||
(Benjamin Fritz, 2010 Aug 16)
|
||||
|
||||
Mac with X11: clipboard doesn't work properly. (Raf, 2010 Aug 16)
|
||||
|
||||
Using CompilerSet doesn't record where an option was set from. E.g., in the
|
||||
gcc compiler plugin. (Gary Johnson, 2010 Dec 13)
|
||||
|
||||
":helpgrep" does not put the cursor in the correct column when preceded by
|
||||
accented character. (Tony Mechelynck, 2010 Apr 15)
|
||||
|
||||
@@ -151,19 +200,45 @@ Echo starts in the wrong column:
|
||||
while 1 | let s = input('A') | echo 'R' | endw
|
||||
(Boyko Bantchev, 2010 Aug 9)
|
||||
|
||||
Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
|
||||
|
||||
When writing a file > 2Gbyte, the reported number of bytes is negative.
|
||||
(Antonio Colombo, 2010 Dec 18)
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30)
|
||||
|
||||
Patch to make more characters work in dialogs. (Yankwei Jia, 2010 Aug 4)
|
||||
|
||||
":drop" does not respect 'autochdir'. (Peter Odding, 2010 Jul 24)
|
||||
Patch for VisVim, pass file name to VimOpenFile. (Jiri Sedlak, 2010 Nov 12)
|
||||
|
||||
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
|
||||
instead of one. (Constantin Pan, 2010 Sep 10)
|
||||
|
||||
Crash in setqflist(). (Benoit Mortgat, 2010 Nov 18)
|
||||
|
||||
Patch to handle resizing when tab is opened, when at full size. (Yukihiro
|
||||
Nakadaira, 2010 Jan 6)
|
||||
|
||||
Writing nested List and Dict in viminfo gives error message and can't be read
|
||||
back. (Yukihiro Nakadaira, 2010 Nov 13)
|
||||
|
||||
Can 'undolevels' be a buffer-local option? Helps for making big changes in
|
||||
one file only, set 'ul' to -1 only for that buffer.
|
||||
Patch by Christian Brabandt, 2010 Dec 17. Needs test.
|
||||
|
||||
Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone
|
||||
makes his own wrapper). Add a magic string with the version number to the
|
||||
.bat file and check for it in the uninstaller. E.g.
|
||||
# uninstall key: vim7.3*
|
||||
|
||||
Problem with cursor in the wrong column. (SungHyun Nam, 2010 Mar 11)
|
||||
Additional info by Dominique Pelle. (also on 2010 Apr 10)
|
||||
|
||||
CreateFile and CreateFileW are used without sharing, filewritable() fails when
|
||||
the file was already open (e.g. script is being sourced). Add FILE_SHARE_READ|
|
||||
FILE_SHARE_WRITE in mch_access()? (Phillippe Vaucher, 2010 Nov 2)
|
||||
|
||||
Is ~/bin (literally) in $PATH supposed to work? (Paul, 2010 March 29)
|
||||
Looks like only bash can do it. (Yakov Lerner)
|
||||
|
||||
@@ -196,12 +271,20 @@ Shell not recognized properly if it ends in "csh -f". (James Vega, 2009 Nov 3)
|
||||
Find tail? Might have a / in argument. Find space? Might have space in
|
||||
path.
|
||||
|
||||
":sort n" treats empty line as higher than zero. (Beeyawned, 2010 Oct 13)
|
||||
|
||||
":function f(x) keepjumps" creates a function where every command is executed
|
||||
like it has ":keepjumps" before it.
|
||||
|
||||
Coverity: ask someone to create new user: Dominique.
|
||||
Check if there are new reported defects: http://scan.coverity.com/rung2.html
|
||||
|
||||
Patch to support :undo absolute jump to file save number. (Christian Brabandt,
|
||||
2010 Nov 5)
|
||||
|
||||
Patch to use 'foldnextmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011
|
||||
Jan 7)
|
||||
|
||||
When setting 'undofile' while the file is already loaded, but unchanged, try
|
||||
to read the undo file. Requires computing a checksum of the text. (Andy
|
||||
Wokula)
|
||||
@@ -220,6 +303,8 @@ Undo problem: line not removed as expected when using setline() from Insert
|
||||
mode. (Israel Chauca, 2010 May 13, more in second msg)
|
||||
Break undo when CTRL-R = changes the text? Or save more lines?
|
||||
|
||||
Patch for static code analysis errors in riscOS. (Dominique Pelle, 2010 Dec 3)
|
||||
|
||||
Change to C syntax folding to make it work much faster, but a bit less
|
||||
reliable. (Lech Lorens, 2009 Nov 9) Enable with an option?
|
||||
Most time is spent in in_id_list().
|
||||
@@ -227,6 +312,8 @@ Most time is spent in in_id_list().
|
||||
Slow combination of folding and PHP syntax highlighting. Script to reproduce
|
||||
it. Caused by "syntax sync fromstart" in combination with patch 7.2.274.
|
||||
(Christian Brabandt, 2010 May 27)
|
||||
Generally, folding with 'foldmethod' set to "syntax" is slow. Do profiling to
|
||||
find out why.
|
||||
|
||||
When completion inserts the first match, it may trigger the line to be folded.
|
||||
Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9)
|
||||
@@ -237,6 +324,10 @@ Jun 1)
|
||||
Cannot use getchar() inside :normal and using an expression mapping. Is this
|
||||
supposed to work? (XyX, 2010 Sep 22)
|
||||
|
||||
When using an expression mapping with a multi-byte character each byte is
|
||||
converted to a utf-8 character. (ZyX, 2011 Jan 4)
|
||||
Patch for possible solution. (Yukihiro Nakadaira, 2011 Jan 5)
|
||||
|
||||
When a:base in 'completefunc' starts with a number it's passed as a number,
|
||||
not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a
|
||||
string value.
|
||||
@@ -251,6 +342,9 @@ Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
|
||||
For running gvim on an USB stick: avoid the OLE registration. Use a command
|
||||
line argument -noregister.
|
||||
|
||||
When using an expression in 'statusline' leading white space sometimes goes
|
||||
missing (but not always). (ZyX, 2010 Nov 1)
|
||||
|
||||
When a mapping exists both for insert mode and lang-insert mode, the last one
|
||||
doesn't work. (Tyru, 2010 May 6) Or is this intended?
|
||||
|
||||
@@ -364,6 +458,10 @@ perhaps. And undo CTRL-W. CTRL-G l would redo.
|
||||
|
||||
Diff mode out of sync. (Gary Johnson, 2010 Aug 4)
|
||||
|
||||
Support a 'systemencoding' option (for Unix). It specifies the encoding of
|
||||
file names. (Kikuchan, 2010 Oct 5). Useful on a latin1 or double-byte Asian
|
||||
system when 'encoding' is "utf-8".
|
||||
|
||||
Win32: A --remote command that has a directory name starting with a ( doesn't
|
||||
work, the backslash is removed, assuming that it escapes the (. (Valery
|
||||
Kondakoff, 2009 May 13)
|
||||
@@ -385,21 +483,23 @@ very high. (Yegappan Lakshmanan, 2010 Jul 22, Michael Peeters, 2010 Jul 22)
|
||||
Directory wrong in session file, caused by ":lcd" in BufEnter autocommand.
|
||||
(Felix Kater, 2009 Mar 3)
|
||||
|
||||
Session file generates error upon loading, cause bu --remote-silent-tab.
|
||||
(7tommm (ytommm) 2010 Nov 24)
|
||||
|
||||
Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing
|
||||
char 0x0301. (Tony Mechelynck, 2009 Mar 4)
|
||||
|
||||
A function on a dictionary is not profiled. (Zyx, 2010 Dec 25)
|
||||
|
||||
Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish
|
||||
messages, even though locale is not supported. But ":lang messages
|
||||
es_ES.utf-8" gives an error and doesn't switch messages. (Dominique Pelle,
|
||||
2009 Jan 26)
|
||||
|
||||
When $HOME contains special characters, sich as a comma, escape them when used
|
||||
When $HOME contains special characters, such as a comma, escape them when used
|
||||
in an option. (Michael Hordijk, 2009 May 5)
|
||||
Turn "esc" argument of expand_env_esc() into string of chars to be escaped.
|
||||
|
||||
Can 'undolevels' be a buffer-local option? Helps for making big changes in
|
||||
one file only, set 'ul' to -1 only for that buffer.
|
||||
|
||||
Should make 'ignorecase' global-local, so that it makes sense setting it from
|
||||
a modeline.
|
||||
|
||||
@@ -418,6 +518,11 @@ correct. Don't use it in the swap file.
|
||||
Completion for ":buf" doesn't work properly on Win32 when 'shellslash' is off.
|
||||
(Henrik Ohman, 2009, Jan 29)
|
||||
|
||||
shellescape() depends on 'shellshash' for quoting. That doesn't work when
|
||||
'shellslash' is set but using cmd.exe. (Ben Fritz)
|
||||
Use a different option or let it depend on whether 'shell' looks like a
|
||||
unix-like shell?
|
||||
|
||||
Allow patches to add something to version.c, like with an official patch, so
|
||||
that :version output shows which patches have been applied.
|
||||
|
||||
@@ -467,11 +572,6 @@ Having "Syntax" in 'eventignore' for :bufdo may cause problems, e.g. for
|
||||
option only for when jumping to another buffer, not when the command argument
|
||||
is executed.
|
||||
|
||||
Crash with dragn-n-drop of file combined with netrw (Marius Gedminas, 2008 Jun
|
||||
11) I can't reproduce it. It's probably caused by a handle_drop() call
|
||||
in combination with autocommands that invoke a ":redraw" command.
|
||||
Another valgrind output Jun 30.
|
||||
|
||||
":pedit %" with a BufReadPre autocommand causes the cursor to move to the
|
||||
first line. (Ingo Karkat, 2008 Jul 1) Ian Kelling is working on this.
|
||||
|
||||
@@ -501,9 +601,6 @@ Patch for c.vim and cpp.vim syntax files. (Chung-chieh Shan, 2008 Nov 26)
|
||||
c.vim: XXX in a comment is colored yellow, but not when it's after "#if 0".
|
||||
(Ilya Dogolazky, 2009 Aug 7)
|
||||
|
||||
Win32: ":dis +" shows nothing, but "+p does insert text. Problem with "* and
|
||||
"+ being the same thing?
|
||||
|
||||
You can type ":w ++bad=x fname", but the ++bad argument is ignored. Give an
|
||||
error message? Or is this easy to implement? (Nathan Stratton Treadway, 2008
|
||||
Aug 20) This is in ucs2bytes(), search for 0xBF. Using the ++bad argument is
|
||||
@@ -540,9 +637,6 @@ When mapping : to ; and ; to :, @; doesn't work like @: and @: doesn't work
|
||||
either. Matt Wozniski: nv_at() calls do_execreg() which uses
|
||||
put_in_typebuf(). Char mapped twice?
|
||||
|
||||
8 Some file systems are case-sensitive, some are not. Turn
|
||||
CASE_INSENSITIVE_FILENAME into an option, at least for completion.
|
||||
|
||||
Despite adding save_subexpr() this still doesn't work properly:
|
||||
Regexp: matchlist('12a4aaa', '^\(.\{-}\)\(\%5c\@<=a\+\)\(.\+\)\?')
|
||||
Returns ['12a4', 'aaa', '4aaa'], should be ['12a4', 'aaa', '']
|
||||
@@ -598,6 +692,9 @@ try the Cocoa version.
|
||||
Mac: After a ":vsplit" the left scrollbar doesn't appear until 'columns' is
|
||||
changed or the window is resized.
|
||||
|
||||
GTK: when setting 'columns' in a startup script and doing ":vertical diffsplit"
|
||||
the window isn't redrawn properly, see two vertical bars.
|
||||
|
||||
Mac: Patch for configure: remove arch from ruby link args. (Knezevic, 2008
|
||||
Mar 5) Alternative: Kazuki Sakamoto, Mar 7.
|
||||
|
||||
@@ -774,6 +871,9 @@ go to Insert mode and add a few lines. Then backspacing every other time
|
||||
moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25)
|
||||
|
||||
Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
|
||||
8 Windows install with NSIS: make it possible to do a silent install, see
|
||||
http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
|
||||
Version from Guopeng Wen that does this (2010 Dec 27)
|
||||
|
||||
Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov,
|
||||
2007 Feb 8)
|
||||
@@ -884,6 +984,8 @@ if_ruby.c.
|
||||
Patch to dynamically load Python on Solaris. (Danek Duvall, 2009 Feb 16)
|
||||
Needs more work.
|
||||
|
||||
Python3 interface doesn't handle utf-8 correctly? (Nov 2010, lilydjwg)
|
||||
|
||||
The need_fileinfo flag is messy. Instead make the message right away and put
|
||||
it in keep_msg?
|
||||
|
||||
@@ -1105,8 +1207,8 @@ doesn't work from Geoffrey Antos, 2008 May 5.
|
||||
Also: the window may no longer fit on the screen, thus the command line is not
|
||||
visible.
|
||||
|
||||
GTK: when setting 'columns' in a startup script and doing ":vertical diffsplit"
|
||||
the window isn't redrawn properly, see two vertical bars.
|
||||
When right after "vim file", "M" then CTRL-W v the windows are scrolled
|
||||
differently and unexpectedly. Caused by patch 7.2.398?
|
||||
|
||||
The magic clipboard format "VimClipboard2" appears in several places. Should
|
||||
be only one.
|
||||
@@ -1497,8 +1599,6 @@ Win32 GUI known bugs:
|
||||
scroll?
|
||||
7 Scrollbar width doesn't change when selecting other windows appearance.
|
||||
Also background color of Toolbar and rectangle below vert. scrollbar.
|
||||
7 "!start /min cmd" should run in a minimized window, instead of using
|
||||
"/min" as the command name. (Rogall)
|
||||
6 Drawing text transparently doesn't seem to work (when drawing part cursor).
|
||||
8 CTRL key doesn't always work in combination with ALT key. It does work
|
||||
for function keys, not for alphabetic characters. Perhaps this is because
|
||||
@@ -1545,6 +1645,8 @@ Athena and Motif:
|
||||
|
||||
|
||||
Athena GUI:
|
||||
9 The first event for any button in the menu or toolbar appears to get lost.
|
||||
The second click on a menu does work.
|
||||
9 When dragging the scrollbar thumb very fast, focus is only obtained in
|
||||
the scrollbar itself. And the thumb is no longer updated when moving
|
||||
through files.
|
||||
@@ -1868,11 +1970,6 @@ Macintosh:
|
||||
works.
|
||||
8 A very long message in confirm() can't be quit. Make this possible with
|
||||
CTRL-C.
|
||||
7 clip_x11_own_selection() uses CurrentTime, that is not allowed. VNC X
|
||||
server has a problem with this. (Mark Waggoner) Remembering the timestamp
|
||||
of events isn't always possible. We don't get them in an xterm. GTK
|
||||
doesn't obtain the selection again when the timestamp differs, thus it
|
||||
won't work for GTK anyway.
|
||||
8 When the clipboard isn't supported: ":yank*" gives a confusing error
|
||||
message. Specifically mention that the register name is invalid.
|
||||
8 "gf" always excludes trailing punctuation characters. file_name_in_line()
|
||||
@@ -2264,8 +2361,6 @@ Help:
|
||||
|
||||
|
||||
User Friendlier:
|
||||
8 Windows install with NSIS: make it possible to do a silent install, see
|
||||
http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
|
||||
8 Windows install with install.exe: Use .exe instead of .bat files for
|
||||
links, so that command line arguments are passed on unmodified? (Walter
|
||||
Briscoe)
|
||||
@@ -4064,6 +4159,9 @@ Buffer list:
|
||||
should then mean the number of the last buffer. E.g.: "4,$bdel".
|
||||
7 Add an option to mostly use slashes in file names. Separately for
|
||||
internal use and for when executing an external program?
|
||||
8 Some file systems are case-sensitive, some are not. Besides
|
||||
'wildignorecase' there might be more parts inside
|
||||
CASE_INSENSITIVE_FILENAME that are useful on Unix.
|
||||
|
||||
|
||||
Swap (.swp) files:
|
||||
@@ -4267,8 +4365,6 @@ Writing files:
|
||||
8 'backupskip' doesn't write a backup file at all, a bit dangerous for some
|
||||
applications. Add 'backupelsewhere' to write a backup file in another
|
||||
directory? Or add a flag to 'backupdir'?
|
||||
7 The 'directory' option supports changing path separators to "%" to make
|
||||
file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
|
||||
6 Add an option to write a new, numbered, backup file each time. Like
|
||||
'patchmode', e.g., 'backupmode'.
|
||||
6 Make it possible to write 'patchmode' files to a different directory.
|
||||
@@ -4367,6 +4463,8 @@ Debug mode:
|
||||
|
||||
|
||||
Various improvements:
|
||||
9 Python: be able to define a Python function that can be called directly
|
||||
from Vim script. Requires converting the arguments and return value.
|
||||
8 ":sign unplace * file={filename}" should work. Also: ":sign unplace *
|
||||
buffer={bufnr}". So one can remove all signs for one file/buffer.
|
||||
7 Add plugins for formatting? Should be able to make a choice depending on
|
||||
@@ -4386,6 +4484,8 @@ Various improvements:
|
||||
7 Instead of filtering errors with a shell script it should be possible to
|
||||
do this with Vim script. A function that filters the raw text that comes
|
||||
from the 'makeprg'?
|
||||
9 Add %F to 'errorformat': file name without spaces. Useful on Unix to
|
||||
avoid matching something up to a time 11:22:33.
|
||||
- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
|
||||
Govindachar)
|
||||
7 Add a command that goes back to the position from before jumping to the
|
||||
@@ -4462,6 +4562,8 @@ Various improvements:
|
||||
3 Make "2d%" work like "d%d%" instead of "d2%"?
|
||||
7 "g CTRL-O" jumps back to last used buffer. Skip CTRL-O jumps in the same
|
||||
buffer. Make jumplist remember the last ten accessed buffers?
|
||||
7 Make it possible to set the size of the jumplist (also to a smaller number
|
||||
than the default). (Nikolai Weibull)
|
||||
- Add code to disable the CAPS key when going from Insert to Normal mode.
|
||||
- Set date/protection/etc. of the patchfile the same as the original file.
|
||||
- Use growarray for termcodes[] in term.c
|
||||
|
||||
+15
-6
@@ -1,4 +1,4 @@
|
||||
*undo.txt* For Vim version 7.3. Last change: 2010 Sep 30
|
||||
*undo.txt* For Vim version 7.3. Last change: 2010 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -125,16 +125,23 @@ This is explained in the user manual: |usr_32.txt|.
|
||||
|
||||
*:undol* *:undolist*
|
||||
:undol[ist] List the leafs in the tree of changes. Example:
|
||||
number changes time saved ~
|
||||
4 10 10:34:11
|
||||
18 4 11:01:46 7
|
||||
number changes when saved ~
|
||||
88 88 2010/01/04 14:25:53
|
||||
108 107 08/07 12:47:51
|
||||
136 46 13:33:01 7
|
||||
166 164 3 seconds ago
|
||||
|
||||
The "number" column is the change number. This number
|
||||
continuously increases and can be used to identify a
|
||||
specific undo-able change, see |:undo|.
|
||||
The "changes" column is the number of changes to this
|
||||
leaf from the root of the tree.
|
||||
The "time" column is the time this change was made.
|
||||
The "when" column is the date and time when this
|
||||
change was made. The four possible formats are:
|
||||
N seconds ago
|
||||
HH:MM:SS hour, minute, seconds
|
||||
MM/DD HH:MM:SS idem, with month and day
|
||||
YYYY/MM/DD HH:MM:SS idem, with year
|
||||
The "saved" column specifies, if this change was
|
||||
written to disk and which file write it was. This can
|
||||
be used with the |:later| and |:earlier| commands.
|
||||
@@ -239,7 +246,9 @@ Vim saves undo trees in a separate undo file, one for each edited file, using
|
||||
a simple scheme that maps filesystem paths directly to undo files. Vim will
|
||||
detect if an undo file is no longer synchronized with the file it was written
|
||||
for (with a hash of the file contents) and ignore it when the file was changed
|
||||
after the undo file was written, to prevent corruption.
|
||||
after the undo file was written, to prevent corruption. An undo file is also
|
||||
ignored if its owner differs from the owner of the edited file. Set 'verbose'
|
||||
to get a message about that.
|
||||
|
||||
Undo files are normally saved in the same directory as the file. This can be
|
||||
changed with the 'undodir' option.
|
||||
|
||||
+12
-5
@@ -1,4 +1,4 @@
|
||||
*usr_01.txt* For Vim version 7.3. Last change: 2008 May 07
|
||||
*usr_01.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -40,13 +40,20 @@ the commands and options used for it. Use these two commands:
|
||||
Press CTRL-] to jump to a subject under the cursor.
|
||||
Press CTRL-O to jump back (repeat to go further back).
|
||||
|
||||
Many links are in vertical bars, like this: |bars|. An option name, like
|
||||
'number', a command in double quotes like ":write" and any other word can also
|
||||
be used as a link. Try it out: Move the cursor to CTRL-] and press CTRL-]
|
||||
on it.
|
||||
Many links are in vertical bars, like this: |bars|. The bars themselves may
|
||||
be hidden or invisible, see below. An option name, like 'number', a command
|
||||
in double quotes like ":write" and any other word can also be used as a link.
|
||||
Try it out: Move the cursor to CTRL-] and press CTRL-] on it.
|
||||
|
||||
Other subjects can be found with the ":help" command, see |help.txt|.
|
||||
|
||||
The bars and stars are usually hidden with the |conceal| feature. They also
|
||||
use |hl-Ignore|, using the same color for the text as the background. You can
|
||||
make them visible with: >
|
||||
:set conceallevel=0
|
||||
:hi link HelpBar Normal
|
||||
:hi link HelpStar Normal
|
||||
|
||||
==============================================================================
|
||||
*01.2* Vim installed
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*usr_41.txt* For Vim version 7.3. Last change: 2010 Nov 17
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -793,6 +793,8 @@ Syntax and highlighting: *syntax-functions* *highlighting-functions*
|
||||
synID() get syntax ID at a specific position
|
||||
synIDattr() get a specific attribute of a syntax ID
|
||||
synIDtrans() get translated syntax ID
|
||||
synstack() get list of syntax IDs at a specific position
|
||||
synconcealed() get info about concealing
|
||||
diff_hlID() get highlight ID for diff mode at a position
|
||||
matchadd() define a pattern to highlight (a "match")
|
||||
matcharg() get info about |:match| arguments
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 7.3. Last change: 2010 Sep 23
|
||||
*various.txt* For Vim version 7.3. Last change: 2010 Nov 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -101,6 +101,7 @@ g8 Print the hex values of the bytes used in the
|
||||
:[range]P[rint] [count] [flags]
|
||||
Just as ":print". Was apparently added to Vi for
|
||||
people that keep the shift key pressed too long...
|
||||
Note: A user command can overrule this command.
|
||||
See |ex-flags| for [flags].
|
||||
|
||||
*:l* *:list*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.3. Last change: 2010 Aug 15
|
||||
*version7.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1675,7 +1675,7 @@ The GTK font dialog uses a font size zero when the font name doesn't include a
|
||||
size. Use a default size of 10.
|
||||
|
||||
This example in the documentation didn't work:
|
||||
:e `=foo . ".c" `
|
||||
:e `=foo . ".c"`
|
||||
Skip over the expression in `=expr` when looking for comments, |, % and #.
|
||||
|
||||
When ":helpgrep" doesn't find anything there is no error message.
|
||||
@@ -8182,7 +8182,7 @@ Solution: Use get_cmdline_type(). (James Vega)
|
||||
Files: src/ex_getln.c
|
||||
|
||||
Patch 7.2.130
|
||||
Problem: Vim may haing until CTRL-C is typed when using CTRL-Z.
|
||||
Problem: Vim may hang until CTRL-C is typed when using CTRL-Z.
|
||||
Solution: Avoid using pause(). Also use "volatile" for variables used in
|
||||
signal functions. (Dominique Pelle)
|
||||
Files: src/auto/configure, src/configure.in, src/config.h.in,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vi_diff.txt* For Vim version 7.3. Last change: 2010 Sep 25
|
||||
*vi_diff.txt* For Vim version 7.3. Last change: 2010 Oct 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -989,6 +989,8 @@ These are remarks about running the POSIX test suite:
|
||||
- vi test 33 sometimes fails for unknown reasons
|
||||
- vi test 250 fails; behavior will be changed in a new revision
|
||||
http://www.opengroup.org/austin/mailarchives/ag-review/msg01710.html
|
||||
(link no longer works, perhaps it's now:
|
||||
https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-review-l&id=1711)
|
||||
- vi test 310 fails; exit code non-zero when any error occurred?
|
||||
- ex test 24 fails because test is wrong. Changed between SUSv2 and SUSv3.
|
||||
- ex tests 47, 48, 49, 72, 73 fail because .exrc file isn't read in silent
|
||||
|
||||
@@ -214,7 +214,7 @@ EOF
|
||||
}
|
||||
|
||||
# main
|
||||
usage() if $#ARGV < 2;
|
||||
usage() if $#ARGV < 1;
|
||||
|
||||
print "Processing tags...\n";
|
||||
readTagFile( $ARGV[ 0 ] );
|
||||
|
||||
+11
-2
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2010 Sep 29
|
||||
" Last Change: 2010 Dec 17
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -1614,7 +1614,16 @@ au BufNewFile,BufRead *.rtf setf rtf
|
||||
au BufNewFile,BufRead .irbrc,irbrc setf ruby
|
||||
|
||||
" Ruby
|
||||
au BufNewFile,BufRead *.rb,*.rbw,*.gem,*.gemspec setf ruby
|
||||
au BufNewFile,BufRead *.rb,*.rbw setf ruby
|
||||
|
||||
" RubyGems
|
||||
au BufNewFile,BufRead *.gemspec setf ruby
|
||||
|
||||
" Rackup
|
||||
au BufNewFile,BufRead *.ru setf ruby
|
||||
|
||||
" Bundler
|
||||
au BufNewFile,BufRead Gemfile setf ruby
|
||||
|
||||
" Ruby on Rails
|
||||
au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: generic Changelog file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2009-05-25
|
||||
" Latest Revision: 2010-08-17
|
||||
" Variables:
|
||||
" g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) -
|
||||
" description: the timeformat used in ChangeLog entries.
|
||||
@@ -170,7 +170,7 @@ if &filetype == 'changelog'
|
||||
endfunction
|
||||
|
||||
" Internal function to create a new entry in the ChangeLog.
|
||||
function! s:new_changelog_entry()
|
||||
function! s:new_changelog_entry(...)
|
||||
" Deal with 'paste' option.
|
||||
let save_paste = &paste
|
||||
let &paste = 1
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: DocBook
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-10-14
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('b:docbk_type')
|
||||
if expand('%:e') == 'sgml'
|
||||
let b:docbk_type = 'sgml'
|
||||
else
|
||||
let b:docbk_type = 'xml'
|
||||
endif
|
||||
endif
|
||||
|
||||
if b:docbk_type == 'sgml'
|
||||
runtime! ftplugin/sgml.vim ftplugin/sgml_*.vim ftplugin/sgml/*.vim
|
||||
else
|
||||
runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
|
||||
endif
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: man
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2008 Sep 17
|
||||
" Last Change: 2010 Nov 29
|
||||
|
||||
" To make the ":Man" command available before editing a manual page, source
|
||||
" this script from your startup vimrc file.
|
||||
@@ -15,6 +15,10 @@ if &filetype == "man"
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Ensure Vim is not recursively invoked (man-db does this)
|
||||
" when doing ctrl-[ on a man page reference.
|
||||
let $MANPAGER = ""
|
||||
|
||||
" allow dot and dash in manual page name.
|
||||
setlocal iskeyword+=\.,-
|
||||
|
||||
|
||||
+3
-1
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2010 Jul 24
|
||||
" Last Change: 2010 Dec 02
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
if bufwinnr("option-window") > 0
|
||||
@@ -1053,6 +1053,8 @@ if has("wildignore")
|
||||
call append("$", "wildignore\tlist of patterns to ignore files for file name completion")
|
||||
call <SID>OptionG("wig", &wig)
|
||||
endif
|
||||
call append("$", "wildignorecase\tignore case when completing file names")
|
||||
call <SID>BinOptionG("wic", &wic)
|
||||
if has("wildmenu")
|
||||
call append("$", "wildmenu\tcommand-line completion shows a list of matches")
|
||||
call <SID>BinOptionG("wmnu", &wmnu)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2008 Sep 03
|
||||
" Last Change: 2010 Nov 16
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded (or disabled)
|
||||
@@ -82,8 +82,9 @@ function! s:Highlight_Matching_Pair()
|
||||
endif
|
||||
|
||||
" When not in a string or comment ignore matches inside them.
|
||||
" We match "escape" for special items, such as listpEscapeSpecial.
|
||||
let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
|
||||
\ '=~? "string\\|character\\|singlequote\\|comment"'
|
||||
\ '=~? "string\\|character\\|singlequote\\|escape\\|comment"'
|
||||
execute 'if' s_skip '| let s_skip = 0 | endif'
|
||||
|
||||
" Limit the search to lines visible in the window.
|
||||
|
||||
@@ -1,23 +1,67 @@
|
||||
" Vim plugin for converting a syntax highlighted file to HTML.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2010 Aug 12
|
||||
" Last Change: 2011 Jan 06
|
||||
"
|
||||
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
|
||||
" $VIMRUNTIME/syntax/2html.vim
|
||||
"
|
||||
" TODO:
|
||||
" * Explicitly trigger IE8+ Standards Mode?
|
||||
" * Make it so deleted lines in a diff don't create side-scrolling
|
||||
" * Restore open/closed folds and cursor position after processing each file
|
||||
" with option not to restore for speed increase
|
||||
" * Add extra meta info (generation time, etc.)
|
||||
" * Tidy up so we can use strict doctype more?
|
||||
" * Undercurl support via dotted bottom border?
|
||||
" * Add extra meta info (generation time, etc.)?
|
||||
" * Tidy up so we can use strict doctype in even more situations
|
||||
" * Implementation detail: add threshold for writing the lines to the html
|
||||
" buffer before we're done (5000 or so lines should do it)
|
||||
" * TODO comments for code cleanup scattered throughout
|
||||
"
|
||||
"
|
||||
" Changelog:
|
||||
" 7.3_v8 (this version): Add html_expand_tabs option to allow leaving tab
|
||||
" characters in generated output (Andy Spencer). Escape
|
||||
" text that looks like a modeline so Vim doesn't use
|
||||
" anything in the converted HTML as a modeline.
|
||||
" Bugfixes: Fix folding when a fold starts before the
|
||||
" conversion range. Remove fold column when there are
|
||||
" no folds.
|
||||
" 7.3_v7 (840c3cadb842): see betas released on vim_dev below:
|
||||
" 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
|
||||
" 7.3_v7b2: Remove automatic detection of encodings that are not
|
||||
" supported by all major browsers according to
|
||||
" http://wiki.whatwg.org/wiki/Web_Encodings and convert
|
||||
" to UTF-8 for all Unicode encodings. Make HTML
|
||||
" encoding to Vim encoding detection be
|
||||
" case-insensitive for built-in pairs.
|
||||
" 7.3_v7b1: Remove use of setwinvar() function which cannot be
|
||||
" called in restricted mode (Andy Spencer). Use
|
||||
" 'fencoding' instead of 'encoding' to determine by
|
||||
" charset, and make sure the 'fenc' of the generated
|
||||
" file matches its indicated charset. Add charsets for
|
||||
" all of Vim's natively supported encodings.
|
||||
" 7.3_v6 (0d3f0e3d289b): Really fix bug with 'nowrapscan', 'magic' and other
|
||||
" user settings interfering with diff mode generation,
|
||||
" trailing whitespace (e.g. line number column) when
|
||||
" using html_no_pre, and bugs when using
|
||||
" html_hover_unfold.
|
||||
" 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync
|
||||
" folds in diff mode when first line was folded.
|
||||
" 7.3_v4 (7e008c174cc3): Bugfixes, especially for xhtml markup, and diff mode.
|
||||
" 7.3_v3 (a29075150aee): Refactor option handling and make html_use_css
|
||||
" default to true when not set to anything. Use strict
|
||||
" doctypes where possible. Rename use_xhtml option to
|
||||
" html_use_xhtml for consistency. Use .xhtml extension
|
||||
" when using this option. Add meta tag for settings.
|
||||
" 7.3_v2 (80229a724a11): Fix syntax highlighting in diff mode to use both the
|
||||
" diff colors and the normal syntax colors
|
||||
" 7.3_v1 (e7751177126b): Add conceal support and meta tags in output
|
||||
" Pre-v1 baseline: Mercurial changeset 3c9324c0800e
|
||||
|
||||
if exists('g:loaded_2html_plugin')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_2html_plugin = 'vim7.3_v6'
|
||||
let g:loaded_2html_plugin = 'vim7.3_v8'
|
||||
|
||||
" Define the :TOhtml command when:
|
||||
" - 'compatible' is not set
|
||||
|
||||
+113
-34
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2010 Aug 12
|
||||
" Last Change: 2011 Jan 06
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@@ -124,7 +124,18 @@ function! s:HtmlFormat(text, style_name, diff_style_name)
|
||||
let l:style_name = a:style_name . (a:diff_style_name == '' ? '' : ' ') . a:diff_style_name
|
||||
|
||||
" Replace the reserved html characters
|
||||
let formatted = substitute(substitute(substitute(substitute(substitute(formatted, '&', '\&', 'g'), '<', '\<', 'g'), '>', '\>', 'g'), '"', '\"', 'g'), "\x0c", '<hr class="PAGE-BREAK">', 'g')
|
||||
let formatted = substitute(formatted, '&', '\&', 'g')
|
||||
let formatted = substitute(formatted, '<', '\<', 'g')
|
||||
let formatted = substitute(formatted, '>', '\>', 'g')
|
||||
let formatted = substitute(formatted, '"', '\"', 'g')
|
||||
" TODO: Use ' for "'"?
|
||||
|
||||
" Replace a "form feed" character with HTML to do a page break
|
||||
let formatted = substitute(formatted, "\x0c", '<hr class="PAGE-BREAK">', 'g')
|
||||
|
||||
" Mangle modelines so Vim doesn't try to use HTML text as a modeline if
|
||||
" editing this file in the future
|
||||
let formatted = substitute(formatted, '\v(\s+%(vim?|ex)):', '\1\:', 'g')
|
||||
|
||||
" Replace double spaces, leading spaces, and trailing spaces if needed
|
||||
if ' ' != s:HtmlSpace
|
||||
@@ -265,6 +276,19 @@ set paste
|
||||
let s:old_magic = &magic
|
||||
set magic
|
||||
|
||||
" set the fileencoding to match the charset we'll be using
|
||||
let &l:fileencoding=s:settings.vim_encoding
|
||||
|
||||
" According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte
|
||||
" order mark is highly recommend on the web when using multibyte encodings. But,
|
||||
" it is not a good idea to include it on UTF-8 files. Otherwise, let Vim
|
||||
" determine when it is actually inserted.
|
||||
if s:settings.vim_encoding == 'utf-8'
|
||||
setlocal nobomb
|
||||
else
|
||||
setlocal bomb
|
||||
endif
|
||||
|
||||
let s:lines = []
|
||||
|
||||
if s:settings.use_xhtml
|
||||
@@ -545,9 +569,6 @@ if s:settings.dynamic_folds
|
||||
" level, so subtract 2 from index of first non-dash after the dashes
|
||||
" in order to get the fold level of the current fold
|
||||
let s:level = match(foldtextresult(s:lnum), '+-*\zs[^-]') - 2
|
||||
if s:level+1 > s:foldcolumn
|
||||
let s:foldcolumn = s:level+1
|
||||
endif
|
||||
" store fold info for later use
|
||||
let s:newfold = {'firstline': s:lnum, 'lastline': foldclosedend(s:lnum), 'level': s:level,'type': "closed-fold"}
|
||||
call add(s:allfolds, s:newfold)
|
||||
@@ -577,9 +598,6 @@ if s:settings.dynamic_folds
|
||||
" level, so subtract 2 from index of first non-dash after the dashes
|
||||
" in order to get the fold level of the current fold
|
||||
let s:level = match(foldtextresult(s:lnum), '+-*\zs[^-]') - 2
|
||||
if s:level+1 > s:foldcolumn
|
||||
let s:foldcolumn = s:level+1
|
||||
endif
|
||||
let s:newfold = {'firstline': s:lnum, 'lastline': foldclosedend(s:lnum), 'level': s:level,'type': "closed-fold"}
|
||||
" only add the fold if we don't already have it
|
||||
if empty(s:allfolds) || index(s:allfolds, s:newfold) == -1
|
||||
@@ -609,6 +627,48 @@ if s:settings.dynamic_folds
|
||||
|
||||
" close all folds again so we can get the fold text as we go
|
||||
silent! %foldclose!
|
||||
|
||||
for afold in s:allfolds
|
||||
let removed = 0
|
||||
if exists("g:html_start_line") && exists("g:html_end_line")
|
||||
if afold.firstline < g:html_start_line
|
||||
if afold.lastline < g:html_end_line && afold.lastline > g:html_start_line
|
||||
" if a fold starts before the range to convert but stops within the
|
||||
" range, we need to include it. Make it start on the first converted
|
||||
" line.
|
||||
let afold.firstline = g:html_start_line
|
||||
else
|
||||
" if the fold lies outside the range or the start and stop enclose
|
||||
" the entire range, don't bother parsing it
|
||||
call remove(s:allfolds, index(s:allfolds, afold))
|
||||
let removed = 1
|
||||
endif
|
||||
elseif afold.firstline > g:html_end_line
|
||||
" If the entire fold lies outside the range we need to remove it.
|
||||
call remove(s:allfolds, index(s:allfolds, afold))
|
||||
let removed = 1
|
||||
endif
|
||||
elseif exists("g:html_start_line")
|
||||
if afold.firstline < g:html_start_line
|
||||
" if there is no last line, but there is a first line, the end of the
|
||||
" fold will always lie within the region of interest, so keep it
|
||||
let afold.firstline = g:html_start_line
|
||||
endif
|
||||
elseif exists("g:html_end_line")
|
||||
" if there is no first line we default to the first line in the buffer so
|
||||
" the fold start will always be included if the fold itself is included.
|
||||
" If however the entire fold lies outside the range we need to remove it.
|
||||
if afold.firstline > g:html_end_line
|
||||
call remove(s:allfolds, index(s:allfolds, afold))
|
||||
let removed = 1
|
||||
endif
|
||||
endif
|
||||
if !removed
|
||||
if afold.level+1 > s:foldcolumn
|
||||
let s:foldcolumn = afold.level+1
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Now loop over all lines in the original text to convert to html.
|
||||
@@ -656,6 +716,13 @@ endif
|
||||
|
||||
let s:foldId = 0
|
||||
|
||||
if !s:settings.expand_tabs
|
||||
" If keeping tabs, add them to printable characters so we keep them when
|
||||
" formatting text (strtrans() doesn't replace printable chars)
|
||||
let s:old_isprint = &isprint
|
||||
setlocal isprint+=9
|
||||
endif
|
||||
|
||||
while s:lnum <= s:end
|
||||
|
||||
" If there are filler lines for diff mode, show these above the line.
|
||||
@@ -734,7 +801,7 @@ while s:lnum <= s:end
|
||||
call remove(s:foldstack, 0)
|
||||
endwhile
|
||||
|
||||
" Now insert an opening any new folds that start on this line
|
||||
" Now insert an opening for any new folds that start on this line
|
||||
let s:firstfold = 1
|
||||
while !empty(s:allfolds) && get(s:allfolds,0).firstline == s:lnum
|
||||
let s:foldId = s:foldId + 1
|
||||
@@ -871,30 +938,32 @@ while s:lnum <= s:end
|
||||
endif
|
||||
|
||||
if s:settings.ignore_conceal || !s:concealinfo[0]
|
||||
" Expand tabs
|
||||
" Expand tabs if needed
|
||||
let s:expandedtab = strpart(s:line, s:startcol - 1, s:col - s:startcol)
|
||||
let s:offset = 0
|
||||
let s:idx = stridx(s:expandedtab, "\t")
|
||||
while s:idx >= 0
|
||||
if has("multi_byte_encoding")
|
||||
if s:startcol + s:idx == 1
|
||||
let s:i = &ts
|
||||
else
|
||||
if s:idx == 0
|
||||
let s:prevc = matchstr(s:line, '.\%' . (s:startcol + s:idx + s:offset) . 'c')
|
||||
else
|
||||
let s:prevc = matchstr(s:expandedtab, '.\%' . (s:idx + 1) . 'c')
|
||||
endif
|
||||
let s:vcol = virtcol([s:lnum, s:startcol + s:idx + s:offset - len(s:prevc)])
|
||||
let s:i = &ts - (s:vcol % &ts)
|
||||
endif
|
||||
let s:offset -= s:i - 1
|
||||
else
|
||||
let s:i = &ts - ((s:idx + s:startcol - 1) % &ts)
|
||||
endif
|
||||
let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', s:i), '')
|
||||
if s:settings.expand_tabs
|
||||
let s:offset = 0
|
||||
let s:idx = stridx(s:expandedtab, "\t")
|
||||
endwhile
|
||||
while s:idx >= 0
|
||||
if has("multi_byte_encoding")
|
||||
if s:startcol + s:idx == 1
|
||||
let s:i = &ts
|
||||
else
|
||||
if s:idx == 0
|
||||
let s:prevc = matchstr(s:line, '.\%' . (s:startcol + s:idx + s:offset) . 'c')
|
||||
else
|
||||
let s:prevc = matchstr(s:expandedtab, '.\%' . (s:idx + 1) . 'c')
|
||||
endif
|
||||
let s:vcol = virtcol([s:lnum, s:startcol + s:idx + s:offset - len(s:prevc)])
|
||||
let s:i = &ts - (s:vcol % &ts)
|
||||
endif
|
||||
let s:offset -= s:i - 1
|
||||
else
|
||||
let s:i = &ts - ((s:idx + s:startcol - 1) % &ts)
|
||||
endif
|
||||
let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', s:i), '')
|
||||
let s:idx = stridx(s:expandedtab, "\t")
|
||||
endwhile
|
||||
end
|
||||
|
||||
" get the highlight group name to use
|
||||
let s:id = synIDtrans(s:id)
|
||||
@@ -1060,7 +1129,7 @@ endif
|
||||
" Cleanup
|
||||
%s:\s\+$::e
|
||||
|
||||
" Restore old settings
|
||||
" Restore old settings (new window first)
|
||||
let &l:foldenable = s:old_fen
|
||||
let &l:foldmethod = s:old_fdm
|
||||
let &report = s:old_report
|
||||
@@ -1070,21 +1139,31 @@ let &paste = s:old_paste
|
||||
let &magic = s:old_magic
|
||||
let @/ = s:old_search
|
||||
let &more = s:old_more
|
||||
|
||||
" switch to original window to restore those settings
|
||||
exe s:orgwin . "wincmd w"
|
||||
|
||||
if !s:settings.expand_tabs
|
||||
let &l:isprint = s:old_isprint
|
||||
endif
|
||||
let &l:stl = s:origwin_stl
|
||||
let &l:et = s:old_et
|
||||
let &l:scrollbind = s:old_bind
|
||||
|
||||
" and back to the new window again to end there
|
||||
exe s:newwin . "wincmd w"
|
||||
|
||||
let &l:stl = s:newwin_stl
|
||||
exec 'resize' s:old_winheight
|
||||
let &l:winfixheight = s:old_winfixheight
|
||||
|
||||
call setwinvar(s:orgwin,'&stl', s:origwin_stl)
|
||||
call setwinvar(s:newwin,'&stl', s:newwin_stl)
|
||||
let &ls=s:ls
|
||||
|
||||
" Save a little bit of memory (worth doing?)
|
||||
unlet s:htmlfont
|
||||
unlet s:old_et s:old_paste s:old_icon s:old_report s:old_title s:old_search
|
||||
unlet s:old_magic s:old_more s:old_fdm s:old_fen s:old_winheight
|
||||
unlet! s:old_isprint
|
||||
unlet s:whatterm s:idlist s:lnum s:end s:margin s:fgc s:bgc s:old_winfixheight
|
||||
unlet! s:col s:id s:attr s:len s:line s:new s:expandedtab s:concealinfo
|
||||
unlet! s:orgwin s:newwin s:orgbufnr s:idx s:i s:offset s:ls s:origwin_stl
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2010 May 06
|
||||
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/syntax/debchangelog.vim
|
||||
" Last Change: 2010 Oct 21
|
||||
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
if version < 600
|
||||
@@ -19,7 +19,7 @@ syn case ignore
|
||||
" Define some common expressions we can use later on
|
||||
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
|
||||
syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\="
|
||||
syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|%(etch|lenny)-%(backports|volatile)|%(dapper|hardy|jaunty|karmic|lucid|maverick)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||
syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|%(lenny|squeeze)-%(backports%(-sloppy)=|volatile)|%(dapper|hardy|jaunty|karmic|lucid|maverick|natty)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||
syn match debchangelogVersion contained "(.\{-})"
|
||||
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
|
||||
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2009 Aug 17
|
||||
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/syntax/debcontrol.vim
|
||||
" Last Change: 2010 Oct 21
|
||||
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
if version < 600
|
||||
@@ -27,7 +27,7 @@ syn match debControlSpace " "
|
||||
syn match debcontrolArchitecture contained "\%(all\|any\|alpha\|amd64\|arm\%(e[bl]\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\|hurd-i386\|kfreebsd-\%(i386\|amd64\|gnu\)\|knetbsd-i386\|kopensolaris-i386\|netbsd-\%(alpha\|i386\)\)"
|
||||
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
|
||||
syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
|
||||
syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
|
||||
syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
|
||||
syn match debcontrolPackageType contained "u\?deb"
|
||||
syn match debcontrolVariable contained "\${.\{-}}"
|
||||
syn match debcontrolDmUpload contained "\cyes"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2010 May 06
|
||||
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/syntax/debsources.vim
|
||||
" Last Change: 2010 Oct 21
|
||||
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
if version < 600
|
||||
@@ -23,7 +23,7 @@ syn match debsourcesComment /#.*/ contains=@Spell
|
||||
|
||||
" Match uri's
|
||||
syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
|
||||
syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(etch\|lenny\|squeeze\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|dapper\|hardy\|jaunty\|karmic\|lucid\|maverick\)\([-[:alnum:]_./]*\)+
|
||||
syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(lenny\|squeeze\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|dapper\|hardy\|jaunty\|karmic\|lucid\|maverick\|natty\)\([-[:alnum:]_./]*\)+
|
||||
|
||||
" Associate our matches and regions with pretty colours
|
||||
hi def link debsourcesLine Error
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: gpg(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2007-06-17
|
||||
" Latest Revision: 2010-10-14
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -54,7 +54,7 @@ syn keyword gpgOption contained skipwhite nextgroup=gpgArg
|
||||
\ personal-digest-preferences photo-viewer
|
||||
\ recipient s2k-cipher-algo s2k-digest-algo s2k-mode
|
||||
\ secret-keyring set-filename set-policy-url status-fd
|
||||
\ trusted-key verify-options
|
||||
\ trusted-key verify-options keyid-format list-options
|
||||
syn keyword gpgOption contained skipwhite nextgroup=gpgArgError
|
||||
\ allow-freeform-uid allow-non-selfsigned-uid
|
||||
\ allow-secret-key-import always-trust
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
" Vim syntax file
|
||||
" Language: Groovy
|
||||
" Maintainer: Alessio Pace <billy.corgan@tiscali.it>
|
||||
" Version: 0.1.9b
|
||||
" Original Author: Alessio Pace <billy.corgan@tiscali.it>
|
||||
" Maintainer: Tobias Rapp <yahuxo@gmx.de>
|
||||
" Version: 0.1.10
|
||||
" URL: http://www.vim.org/scripts/script.php?script_id=945
|
||||
" Last Change: 6/4/2004
|
||||
" Last Change: 2010 Nov 29
|
||||
|
||||
" THE ORIGINAL AUTHOR'S NOTES:
|
||||
"
|
||||
" This is my very first vim script, I hope to have
|
||||
" done it the right way.
|
||||
"
|
||||
@@ -16,8 +19,7 @@
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
"
|
||||
" HOWTO USE IT (INSTALL):
|
||||
" [groovy is still not recognized by vim! :-( ]
|
||||
" HOWTO USE IT (INSTALL) when not part of the distribution:
|
||||
"
|
||||
" 1) copy the file in the (global or user's $HOME/.vim/syntax/) syntax folder
|
||||
"
|
||||
@@ -247,7 +249,9 @@ syn match groovySpecialError contained "\\."
|
||||
syn match groovySpecialCharError contained "[^']"
|
||||
syn match groovySpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)"
|
||||
syn region groovyString start=+"+ end=+"+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr
|
||||
syn region groovyString start=+'+ end=+'+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr
|
||||
syn region groovyString start=+'+ end=+'+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell
|
||||
syn region groovyString start=+"""+ end=+"""+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr
|
||||
syn region groovyString start=+'''+ end=+'''+ contains=groovySpecialChar,groovySpecialError,@Spell
|
||||
" syn region groovyELExpr start=+${+ end=+}+ keepend contained
|
||||
syn match groovyELExpr /\${.\{-}}/ contained
|
||||
GroovyHiLink groovyELExpr Identifier
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
||||
" Last Change: 2009 May 18
|
||||
" Last Change: 2010 Nov 03
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -30,6 +30,7 @@ syn match helpVim "VIM REFERENCE.*"
|
||||
syn match helpOption "'[a-z]\{2,\}'"
|
||||
syn match helpOption "'t_..'"
|
||||
syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore
|
||||
syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore
|
||||
syn match helpIgnore "." contained conceal
|
||||
syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes:
|
||||
syn match helpSpecial "\<N\>"
|
||||
|
||||
+10
-4
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Lex
|
||||
" Maintainer: Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Sep 11, 2009
|
||||
" Version: 10
|
||||
" Last Change: Nov 01, 2010
|
||||
" Version: 12
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Option:
|
||||
@@ -36,6 +36,9 @@ endif
|
||||
" --- Lex stuff ---
|
||||
" --- ========= ---
|
||||
|
||||
" Options Section
|
||||
syn match lexOptions '^%\s*option\>.*$' contains=lexPatString
|
||||
|
||||
"I'd prefer to use lex.* , but vim doesn't handle forward definitions yet
|
||||
syn cluster lexListGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatString,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,lexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError
|
||||
syn cluster lexListPatCodeGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatTag,lexPatTag,lexPatTagZoneStart,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError
|
||||
@@ -61,13 +64,15 @@ endif
|
||||
|
||||
"%% : Patterns {Actions}
|
||||
if has("folding")
|
||||
syn region lexPatBlock fold matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat
|
||||
syn region lexPatBlock fold matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude
|
||||
syn region lexPat fold start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace
|
||||
syn region lexPatInclude fold matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode
|
||||
syn region lexBrace fold start="\[" skip=+\\\\\|\\+ end="]" contained
|
||||
syn region lexPatString fold matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained
|
||||
else
|
||||
syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat
|
||||
syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude
|
||||
syn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace
|
||||
syn region lexPatInclude matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode
|
||||
syn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" contained
|
||||
syn region lexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained
|
||||
endif
|
||||
@@ -117,6 +122,7 @@ hi def link lexAbbrvRegExp Macro
|
||||
hi def link lexAbbrv SpecialChar
|
||||
hi def link lexCFunctions Function
|
||||
hi def link lexMorePat SpecialChar
|
||||
hi def link lexOptions PreProc
|
||||
hi def link lexPatComment Comment
|
||||
hi def link lexPat Function
|
||||
hi def link lexPatString Function
|
||||
|
||||
+15
-15
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Lisp
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Mar 05, 2009
|
||||
" Version: 21
|
||||
" Last Change: Nov 16, 2010
|
||||
" Version: 22
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols
|
||||
@@ -32,7 +32,7 @@ endif
|
||||
" ---------------------------------------------------------------------
|
||||
" Clusters: {{{1
|
||||
syn cluster lispAtomCluster contains=lispAtomBarSymbol,lispAtomList,lispAtomNmbr0,lispComment,lispDecl,lispFunc,lispLeadWhite
|
||||
syn cluster lispBaseListCluster contains=lispAtom,lispAtomBarSymbol,lispAtomMark,lispBQList,lispBarSymbol,lispComment,lispConcat,lispDecl,lispFunc,lispKey,lispList,lispNumber,lispSpecial,lispSymbol,lispVar,lispLeadWhite
|
||||
syn cluster lispBaseListCluster contains=lispAtom,lispAtomBarSymbol,lispAtomMark,lispBQList,lispBarSymbol,lispComment,lispConcat,lispDecl,lispFunc,lispKey,lispList,lispNumber,lispEscapeSpecial,lispSymbol,lispVar,lispLeadWhite
|
||||
if exists("g:lisp_instring")
|
||||
syn cluster lispListCluster contains=@lispBaseListCluster,lispString,lispInString,lispInStringString
|
||||
else
|
||||
@@ -68,7 +68,7 @@ syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList
|
||||
syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark
|
||||
syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark
|
||||
syn region lispAtom start=+'"+ skip=+\\"+ end=+"+
|
||||
syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispSpecial
|
||||
syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispEscapeSpecial
|
||||
syn match lispAtomNmbr contained "\<\d\+"
|
||||
syn match lispLeadWhite contained "^\s\+"
|
||||
|
||||
@@ -537,16 +537,16 @@ endif
|
||||
syn match lispNumber "-\=\(\.\d\+\|\d\+\(\.\d*\)\=\)\([dDeEfFlL][-+]\=\d\+\)\="
|
||||
syn match lispNumber "-\=\(\d\+/\d\+\)"
|
||||
|
||||
syn match lispSpecial "\*\w[a-z_0-9-]*\*"
|
||||
syn match lispSpecial !#|[^()'`,"; \t]\+|#!
|
||||
syn match lispSpecial !#x\x\+!
|
||||
syn match lispSpecial !#o\o\+!
|
||||
syn match lispSpecial !#b[01]\+!
|
||||
syn match lispSpecial !#\\[ -}\~]!
|
||||
syn match lispSpecial !#[':][^()'`,"; \t]\+!
|
||||
syn match lispSpecial !#([^()'`,"; \t]\+)!
|
||||
syn match lispSpecial !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\)!
|
||||
syn match lispSpecial "\<+[a-zA-Z_][a-zA-Z_0-9-]*+\>"
|
||||
syn match lispEscapeSpecial "\*\w[a-z_0-9-]*\*"
|
||||
syn match lispEscapeSpecial !#|[^()'`,"; \t]\+|#!
|
||||
syn match lispEscapeSpecial !#x\x\+!
|
||||
syn match lispEscapeSpecial !#o\o\+!
|
||||
syn match lispEscapeSpecial !#b[01]\+!
|
||||
syn match lispEscapeSpecial !#\\[ -}\~]!
|
||||
syn match lispEscapeSpecial !#[':][^()'`,"; \t]\+!
|
||||
syn match lispEscapeSpecial !#([^()'`,"; \t]\+)!
|
||||
syn match lispEscapeSpecial !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\)!
|
||||
syn match lispEscapeSpecial "\<+[a-zA-Z_][a-zA-Z_0-9-]*+\>"
|
||||
|
||||
syn match lispConcat "\s\.\s"
|
||||
syn match lispParenError ")"
|
||||
@@ -585,7 +585,7 @@ if version >= 508
|
||||
HiLink lispMark Delimiter
|
||||
HiLink lispNumber Number
|
||||
HiLink lispParenError Error
|
||||
HiLink lispSpecial Type
|
||||
HiLink lispEscapeSpecial Type
|
||||
HiLink lispString String
|
||||
HiLink lispTodo Todo
|
||||
HiLink lispVar Statement
|
||||
|
||||
+141
-61
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: login.defs(5) configuration file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-04-19
|
||||
" Latest Revision: 2010-11-29
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -10,83 +10,163 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn keyword logindefsTodo contained TODO FIXME XXX NOTE
|
||||
syn match logindefsBegin display '^'
|
||||
\ nextgroup=
|
||||
\ logindefsComment,
|
||||
\ @logindefsKeyword
|
||||
\ skipwhite
|
||||
|
||||
syn region logindefsComment display oneline start='^\s*#' end='$'
|
||||
\ contains=logindefsTodo,@Spell
|
||||
syn region logindefsComment display oneline start='^\s*#' end='$'
|
||||
\ contains=logindefsTodo,@Spell
|
||||
|
||||
syn match logindefsString contained '[[:graph:]]\+'
|
||||
syn keyword logindefsTodo contained TODO FIXME XXX NOTE
|
||||
|
||||
syn match logindefsPath contained '[[:graph:]]\+'
|
||||
syn cluster logindefsKeyword contains=
|
||||
\ logindefsBooleanKeyword,
|
||||
\ logindefsEncryptKeyword,
|
||||
\ logindefsNumberKeyword,
|
||||
\ logindefsPathKeyword,
|
||||
\ logindefsPathsKeyword,
|
||||
\ logindefsStringKeyword
|
||||
|
||||
syn match logindefsPaths contained '[[:graph:]]\+'
|
||||
\ nextgroup=logindefsPathDelim
|
||||
syn keyword logindefsBooleanKeyword contained
|
||||
\ CHFN_AUTH
|
||||
\ CHSH_AUTH
|
||||
\ CREATE_HOME
|
||||
\ DEFAULT_HOME
|
||||
\ FAILLOG_ENAB
|
||||
\ LASTLOG_ENAB
|
||||
\ LOG_OK_LOGINS
|
||||
\ LOG_UNKFAIL_ENAB
|
||||
\ MAIL_CHECK_ENAB
|
||||
\ MD5_CRYPT_ENAB
|
||||
\ OBSCURE_CHECKS_ENAB
|
||||
\ PASS_ALWAYS_WARN
|
||||
\ PORTTIME_CHECKS_ENAB
|
||||
\ QUOTAS_ENAB
|
||||
\ SU_WHEEL_ONLY
|
||||
\ SYSLOG_SG_ENAB
|
||||
\ SYSLOG_SU_ENAB
|
||||
\ USERGROUPS_ENAB
|
||||
\ nextgroup=logindefsBoolean skipwhite
|
||||
|
||||
syn match logindefsPathDelim contained ':' nextgroup=logindefsPaths
|
||||
syn keyword logindefsBoolean contained yes no
|
||||
|
||||
syn keyword logindefsBoolean contained yes no
|
||||
syn keyword logindefsEncryptKeyword contained
|
||||
\ ENCRYPT_METHOD
|
||||
\ nextgroup=logindefsEncryptMethod skipwhite
|
||||
|
||||
syn match logindefsDecimal contained '\<\d\+\>'
|
||||
syn keyword logindefsEncryptMethod contained
|
||||
\ DES
|
||||
\ MD5
|
||||
\ SHA256
|
||||
\ SHA512
|
||||
|
||||
syn match logindefsOctal contained display '\<0\o\+\>'
|
||||
\ contains=logindefsOctalZero
|
||||
syn match logindefsOctalZero contained display '\<0'
|
||||
syn match logindefsOctalError contained display '\<0\o*[89]\d*\>'
|
||||
syn keyword logindefsNumberKeyword contained
|
||||
\ ERASECHAR
|
||||
\ FAIL_DELAY
|
||||
\ GID_MAX
|
||||
\ GID_MIN
|
||||
\ KILLCHAR
|
||||
\ LOGIN_RETRIES
|
||||
\ LOGIN_TIMEOUT
|
||||
\ MAX_MEMBERS_PER_GROUP
|
||||
\ PASS_CHANGE_TRIES
|
||||
\ PASS_MAX_DAYS
|
||||
\ PASS_MIN_DAYS
|
||||
\ PASS_WARN_AGE
|
||||
\ PASS_MAX_LEN
|
||||
\ PASS_MIN_LEN
|
||||
\ SHA_CRYPT_MAX_ROUNDS
|
||||
\ SHA_CRYPT_MIN_ROUNDS
|
||||
\ SYS_GID_MAX
|
||||
\ SYS_GID_MIN
|
||||
\ SYS_UID_MAX
|
||||
\ SYS_UID_MIN
|
||||
\ UID_MAX
|
||||
\ UID_MIN
|
||||
\ ULIMIT
|
||||
\ UMASK
|
||||
\ nextgroup=@logindefsNumber skipwhite
|
||||
|
||||
syn match logindefsHex contained display '\<0x\x\+\>'
|
||||
syn cluster logindefsNumber contains=
|
||||
\ logindefsDecimal,
|
||||
\ logindefsHex,
|
||||
\ logindefsOctal,
|
||||
\ logindefsOctalError
|
||||
|
||||
syn cluster logindefsNumber contains=logindefsDecimal,logindefsOctal,
|
||||
\ logindefsOctalError,logindefsHex
|
||||
syn match logindefsDecimal contained '\<\d\+\>'
|
||||
|
||||
syn match logindefsBegin display '^'
|
||||
\ nextgroup=logindefsKeyword,logindefsComment
|
||||
\ skipwhite
|
||||
syn match logindefsHex contained display '\<0x\x\+\>'
|
||||
|
||||
syn keyword logindefsKeyword contained CHFN_AUTH CLOSE_SESSIONS CREATE_HOME
|
||||
\ DEFAULT_HOME FAILLOG_ENAB LASTLOG_ENAB
|
||||
\ LOG_OK_LOGINS LOG_UNKFAIL_ENAB MAIL_CHECK_ENAB
|
||||
\ MD5_CRYPT_ENAB OBSCURE_CHECKS_ENAB
|
||||
\ PASS_ALWAYS_WARN PORTTIME_CHECKS_ENAB
|
||||
\ QUOTAS_ENAB SU_WHEEL_ONLY SYSLOG_SG_ENAB
|
||||
\ SYSLOG_SU_ENAB USERGROUPS_ENAB
|
||||
\ nextgroup=logindefsBoolean skipwhite
|
||||
syn match logindefsOctal contained display '\<0\o\+\>'
|
||||
\ contains=logindefsOctalZero
|
||||
syn match logindefsOctalZero contained display '\<0'
|
||||
|
||||
syn keyword logindefsKeyword contained CHFN_RESTRICT CONSOLE CONSOLE_GROUPS
|
||||
\ ENV_TZ ENV_HZ FAKE_SHELL SU_NAME LOGIN_STRING
|
||||
\ NOLOGIN_STR TTYGROUP USERDEL_CMD
|
||||
\ nextgroup=logindefsString skipwhite
|
||||
syn match logindefsOctalError contained display '\<0\o*[89]\d*\>'
|
||||
|
||||
syn keyword logindefsKeyword contained ENVIRON_FILE FTMP_FILE HUSHLOGIN_FILE
|
||||
\ ISSUE_FILE MAIL_DIR MAIL_FILE NOLOGINS_FILE
|
||||
\ NOLOGINS_FILE TTYTYPE_FILE QMAIL_DIR
|
||||
\ SULOG_FILE
|
||||
\ nextgroup=logindefsPath skipwhite
|
||||
syn keyword logindefsPathKeyword contained
|
||||
\ ENVIRON_FILE
|
||||
\ FAKE_SHELL
|
||||
\ FTMP_FILE
|
||||
\ HUSHLOGIN_FILE
|
||||
\ ISSUE_FILE
|
||||
\ MAIL_DIR
|
||||
\ MAIL_FILE
|
||||
\ NOLOGINS_FILE
|
||||
\ SULOG_FILE
|
||||
\ TTYTYPE_FILE
|
||||
\ nextgroup=logindefsPath skipwhite
|
||||
|
||||
syn keyword logindefsKeyword contained CRACKLIB_DICTPATH ENV_PATH
|
||||
\ ENV_ROOTPATH ENV_SUPATH MOTD_FILE
|
||||
\ nextgroup=logindefsPaths skipwhite
|
||||
syn match logindefsPath contained '[[:graph:]]\+'
|
||||
|
||||
syn keyword logindefsKeyword contained ERASECHAR FAIL_DELAY GETPASS_ASTERISKS
|
||||
\ GID_MAX GID_MIN KILLCHAR LOGIN_RETRIES
|
||||
\ LOGIN_TIMEOUT PASS_CHANGE_TRIES PASS_MAX_DAYS
|
||||
\ PASS_MAX_LEN PASS_MIN_DAYS PASS_MIN_LEN
|
||||
\ PASS_WARN_AGE TTYPERM UID_MAX UID_MIN ULIMIT
|
||||
\ UMASK
|
||||
\ nextgroup=@logindefsNumber skipwhite
|
||||
syn keyword logindefsPathsKeyword contained
|
||||
\ CONSOLE
|
||||
\ ENV_PATH
|
||||
\ ENV_SUPATH
|
||||
\ MOTD_FILE
|
||||
\ nextgroup=logindefsPaths skipwhite
|
||||
|
||||
hi def link logindefsTodo Todo
|
||||
hi def link logindefsComment Comment
|
||||
hi def link logindefsString String
|
||||
hi def link logindefsPath String
|
||||
hi def link logindefsPaths logindefsPath
|
||||
hi def link logindefsPathDelim Delimiter
|
||||
hi def link logindefsBoolean Boolean
|
||||
hi def link logindefsDecimal Number
|
||||
hi def link logindefsOctal Number
|
||||
hi def link logindefsOctalZero PreProc
|
||||
hi def link logindefsOctalError Error
|
||||
hi def link logindefsHex Number
|
||||
hi def link logindefsKeyword Keyword
|
||||
syn match logindefsPaths contained '[^:]\+'
|
||||
\ nextgroup=logindefsPathDelim
|
||||
|
||||
syn match logindefsPathDelim contained ':' nextgroup=logindefsPaths
|
||||
|
||||
syn keyword logindefsStringKeyword contained
|
||||
\ CHFN_RESTRICT
|
||||
\ CONSOLE_GROUPS
|
||||
\ ENV_HZ
|
||||
\ ENV_TZ
|
||||
\ LOGIN_STRING
|
||||
\ SU_NAME
|
||||
\ TTYGROUP
|
||||
\ TTYPERM
|
||||
\ USERDEL_CMD
|
||||
\ nextgroup=logindefsString skipwhite
|
||||
|
||||
syn match logindefsString contained '[[:graph:]]\+'
|
||||
|
||||
hi def link logindefsComment Comment
|
||||
hi def link logindefsTodo Todo
|
||||
hi def link logindefsKeyword Keyword
|
||||
hi def link logindefsBooleanKeyword logindefsKeyword
|
||||
hi def link logindefsEncryptKeyword logindefsKeyword
|
||||
hi def link logindefsNumberKeyword logindefsKeyword
|
||||
hi def link logindefsPathKeyword logindefsKeyword
|
||||
hi def link logindefsPathsKeyword logindefsKeyword
|
||||
hi def link logindefsStringKeyword logindefsKeyword
|
||||
hi def link logindefsBoolean Boolean
|
||||
hi def link logindefsEncryptMethod Type
|
||||
hi def link logindefsNumber Number
|
||||
hi def link logindefsDecimal logindefsNumber
|
||||
hi def link logindefsHex logindefsNumber
|
||||
hi def link logindefsOctal logindefsNumber
|
||||
hi def link logindefsOctalZero PreProc
|
||||
hi def link logindefsOctalError Error
|
||||
hi def link logindefsPath String
|
||||
hi def link logindefsPaths logindefsPath
|
||||
hi def link logindefsPathDelim Delimiter
|
||||
hi def link logindefsString String
|
||||
|
||||
let b:current_syntax = "logindefs"
|
||||
|
||||
|
||||
+101
-75
@@ -1,111 +1,137 @@
|
||||
" Vim syntax file
|
||||
" Language: R (GNU S)
|
||||
" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
|
||||
" Last Change: 2006 Apr 30
|
||||
" Filenames: *.R *.Rout *.r *.Rhistory *.Rt *.Rout.save *.Rout.fail
|
||||
" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/r.vim
|
||||
" Language: R (GNU S)
|
||||
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
|
||||
" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
|
||||
" Tom Payne <tom@tompayne.org>
|
||||
" Last Change: Wed Sep 29, 2010 09:31AM
|
||||
" Filenames: *.R *.r *.Rhistory *.Rt
|
||||
"
|
||||
" NOTE: The highlighting of R functions is defined in the
|
||||
" r-plugin/functions.vim, which is part of vim-r-plugin2:
|
||||
" http://www.vim.org/scripts/script.php?script_id=2628
|
||||
"
|
||||
" Some lines of code were borrowed from Zhuojun Chen.
|
||||
|
||||
" First maintainer Tom Payne <tom@tompayne.org>
|
||||
" Modified to make syntax less colourful and added the highlighting of
|
||||
" R assignment arrow
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if version >= 600
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
else
|
||||
set iskeyword=@,48-57,_,.
|
||||
endif
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
syn case match
|
||||
|
||||
" Comment
|
||||
syn match rComment /\#.*/
|
||||
syn match rComment contains=@Spell "\#.*"
|
||||
|
||||
" Constant
|
||||
" string enclosed in double quotes
|
||||
syn region rString start=/"/ skip=/\\\\\|\\"/ end=/"/
|
||||
syn region rString contains=rSpecial,rStrError,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
|
||||
" string enclosed in single quotes
|
||||
syn region rString start=/'/ skip=/\\\\\|\\'/ end=/'/
|
||||
" number with no fractional part or exponent
|
||||
syn match rNumber /\d\+/
|
||||
" floating point number with integer and fractional parts and optional exponent
|
||||
syn match rFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
|
||||
" floating point number with no integer part and optional exponent
|
||||
syn match rFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
|
||||
" floating point number with no fractional part and optional exponent
|
||||
syn match rFloat /\d\+[Ee][-+]\=\d\+/
|
||||
syn region rString contains=rSpecial,rStrError,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
|
||||
|
||||
" Identifier
|
||||
" identifier with leading letter and optional following keyword characters
|
||||
syn match rIdentifier /\a\k*/
|
||||
" identifier with leading period, one or more digits, and at least one non-digit keyword character
|
||||
syn match rIdentifier /\.\d*\K\k*/
|
||||
syn match rStrError display contained "\\."
|
||||
|
||||
" New line, carriage return, tab, backspace, bell, feed, vertical tab, backslash
|
||||
syn match rSpecial display contained "\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\"
|
||||
|
||||
" Hexadecimal and Octal digits
|
||||
syn match rSpecial display contained "\\\(x\x\{1,2}\|[0-8]\{1,3}\)"
|
||||
|
||||
" Unicode characters
|
||||
syn match rSpecial display contained "\\u\x\{1,4}"
|
||||
syn match rSpecial display contained "\\U\x\{1,8}"
|
||||
syn match rSpecial display contained "\\u{\x\{1,4}}"
|
||||
syn match rSpecial display contained "\\U{\x\{1,8}}"
|
||||
|
||||
|
||||
syn match rDollar "\$"
|
||||
|
||||
" Statement
|
||||
syn keyword rStatement break next return
|
||||
syn keyword rConditional if else
|
||||
syn keyword rRepeat for in repeat while
|
||||
|
||||
" Constant (not really)
|
||||
syn keyword rConstant T F LETTERS letters month.ab month.name pi
|
||||
syn keyword rConstant R.version.string
|
||||
|
||||
" Constant
|
||||
syn keyword rConstant LETTERS letters month.ab month.name pi
|
||||
syn keyword rConstant NULL
|
||||
syn keyword rBoolean FALSE TRUE
|
||||
syn keyword rNumber NA
|
||||
syn match rArrow /<\{1,2}-/
|
||||
syn keyword rNumber NA NA_integer_ NA_real_ NA_complex_ NA_character_
|
||||
syn keyword rNumber Inf NaN
|
||||
|
||||
" Type
|
||||
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
|
||||
" integer
|
||||
syn match rInteger "\<\d\+L"
|
||||
syn match rInteger "\<0x\([0-9]\|[a-f]\|[A-F]\)\+L"
|
||||
syn match rInteger "\<\d\+[Ee]+\=\d\+L"
|
||||
|
||||
syn match rOperator "[\*\!\&\+\-\<\>\=\^\|\~\`/:@]"
|
||||
syn match rOperator "%\{2}\|%\*%\|%\/%\|%in%\|%o%\|%x%"
|
||||
|
||||
syn match rComplex "\<\d\+i"
|
||||
syn match rComplex "\<0x\([0-9]\|[a-f]\|[A-F]\)\+i"
|
||||
syn match rComplex "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=i"
|
||||
syn match rComplex "\<\.\d\+\([Ee][-+]\=\d\+\)\=i"
|
||||
syn match rComplex "\<\d\+[Ee][-+]\=\d\+i"
|
||||
|
||||
" number with no fractional part or exponent
|
||||
syn match rNumber "\<\d\+\>"
|
||||
" hexadecimal number
|
||||
syn match rNumber "\<0x\([0-9]\|[a-f]\|[A-F]\)\+"
|
||||
|
||||
" floating point number with integer and fractional parts and optional exponent
|
||||
syn match rFloat "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\="
|
||||
" floating point number with no integer part and optional exponent
|
||||
syn match rFloat "\<\.\d\+\([Ee][-+]\=\d\+\)\="
|
||||
" floating point number with no fractional part and optional exponent
|
||||
syn match rFloat "\<\d\+[Ee][-+]\=\d\+"
|
||||
|
||||
syn match rArrow "<\{1,2}-"
|
||||
syn match rArrow "->\{1,2}"
|
||||
|
||||
" Special
|
||||
syn match rDelimiter /[,;:]/
|
||||
syn match rDelimiter "[,;:]"
|
||||
|
||||
" Error
|
||||
syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
|
||||
syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
|
||||
syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
|
||||
syn match rError /[)\]}]/
|
||||
syn match rBraceError /[)}]/ contained
|
||||
syn match rCurlyError /[)\]]/ contained
|
||||
syn match rParenError /[\]}]/ contained
|
||||
syn match rError "[)\]}]"
|
||||
syn match rBraceError "[)}]" contained
|
||||
syn match rCurlyError "[)\]]" contained
|
||||
syn match rParenError "[\]}]" contained
|
||||
|
||||
" Functions that may add new objects
|
||||
syn keyword rPreProc library require attach detach source
|
||||
|
||||
" Type
|
||||
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_r_syn_inits")
|
||||
if version < 508
|
||||
let did_r_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
HiLink rComment Comment
|
||||
HiLink rConstant Constant
|
||||
HiLink rString String
|
||||
HiLink rNumber Number
|
||||
HiLink rBoolean Boolean
|
||||
HiLink rFloat Float
|
||||
HiLink rStatement Statement
|
||||
HiLink rConditional Conditional
|
||||
HiLink rRepeat Repeat
|
||||
HiLink rIdentifier Normal
|
||||
HiLink rArrow Statement
|
||||
HiLink rType Type
|
||||
HiLink rDelimiter Delimiter
|
||||
HiLink rError Error
|
||||
HiLink rBraceError Error
|
||||
HiLink rCurlyError Error
|
||||
HiLink rParenError Error
|
||||
delcommand HiLink
|
||||
endif
|
||||
hi def link rArrow Statement
|
||||
hi def link rBoolean Boolean
|
||||
hi def link rBraceError Error
|
||||
hi def link rComment Comment
|
||||
hi def link rComplex Number
|
||||
hi def link rConditional Conditional
|
||||
hi def link rConstant Constant
|
||||
hi def link rCurlyError Error
|
||||
hi def link rDelimiter Delimiter
|
||||
hi def link rDollar SpecialChar
|
||||
hi def link rError Error
|
||||
hi def link rFloat Float
|
||||
hi def link rInteger Number
|
||||
hi def link rNumber Number
|
||||
hi def link rOperator Operator
|
||||
hi def link rParenError Error
|
||||
hi def link rPreProc PreProc
|
||||
hi def link rRepeat Repeat
|
||||
hi def link rSpecial SpecialChar
|
||||
hi def link rStatement Statement
|
||||
hi def link rString String
|
||||
hi def link rStrError Error
|
||||
hi def link rType Type
|
||||
|
||||
let b:current_syntax="r"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
|
||||
|
||||
+26
-22
@@ -1,10 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: R Help File
|
||||
" Maintainer: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Last Change: 2010 Apr 22
|
||||
" Version: 0.7.3
|
||||
" SVN: $Id: rhelp.vim 88 2010-04-22 19:37:09Z ranke $
|
||||
" Remarks: - Now includes R syntax highlighting in the appropriate
|
||||
" Last Change: 2010 Nov 22
|
||||
" Version: 0.7.4
|
||||
" SVN: $Id: rhelp.vim 90 2010-11-22 10:58:11Z ranke $
|
||||
" Remarks: - Includes R syntax highlighting in the appropriate
|
||||
" sections if an r.vim file is in the same directory or in the
|
||||
" default debian location.
|
||||
" - There is no Latex markup in equations
|
||||
@@ -28,19 +28,19 @@ syn case match
|
||||
syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}"
|
||||
syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}"
|
||||
syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}"
|
||||
syn region rhelpIdentifier matchgroup=rhelpSection start="\\item{" end="}" contained contains=rhelpDots
|
||||
syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end=/}/ contained
|
||||
syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained
|
||||
syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}"
|
||||
|
||||
" Highlighting of R code using an existing r.vim syntax file if available {{{1
|
||||
syn include @R syntax/r.vim
|
||||
syn match rhelpDots "\\dots" containedin=@R
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpSection
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpIdentifier,rhelpS4method
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end=/}/ contains=@R
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end=/}/ contains=@R contained
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpLink contained
|
||||
syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=/)/ contains=@R,rhelpDots contained
|
||||
syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end=/}/ contains=@R
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpSection
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpIdentifier,rhelpS4method
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end="}" contains=@R
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end="}" contains=@R contained
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpLink contained
|
||||
syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=")" contains=@R,rhelpDots contained
|
||||
syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end="}" contains=@R
|
||||
|
||||
" Strings {{{1
|
||||
syn region rhelpString start=/"/ end=/"/
|
||||
@@ -53,7 +53,7 @@ syn match rhelpDelimiter "\\cr"
|
||||
syn match rhelpDelimiter "\\tab "
|
||||
|
||||
" Keywords {{{1
|
||||
syn match rhelpKeyword "\\R"
|
||||
syn match rhelpKeyword "\\R" contained
|
||||
syn match rhelpKeyword "\\ldots"
|
||||
syn match rhelpKeyword "--"
|
||||
syn match rhelpKeyword "---"
|
||||
@@ -129,10 +129,13 @@ syn match rhelpType "\\deqn\>"
|
||||
syn match rhelpType "\\file\>"
|
||||
syn match rhelpType "\\email\>"
|
||||
syn match rhelpType "\\url\>"
|
||||
syn match rhelpType "\\href\>"
|
||||
syn match rhelpType "\\var\>"
|
||||
syn match rhelpType "\\env\>"
|
||||
syn match rhelpType "\\option\>"
|
||||
syn match rhelpType "\\command\>"
|
||||
syn match rhelpType "\\newcommand\>"
|
||||
syn match rhelpType "\\renewcommand\>"
|
||||
syn match rhelpType "\\dfn\>"
|
||||
syn match rhelpType "\\cite\>"
|
||||
syn match rhelpType "\\acronym\>"
|
||||
@@ -140,6 +143,7 @@ syn match rhelpType "\\acronym\>"
|
||||
" rhelp sections {{{1
|
||||
syn match rhelpSection "\\encoding\>"
|
||||
syn match rhelpSection "\\title\>"
|
||||
syn match rhelpSection "\\item\>"
|
||||
syn match rhelpSection "\\description\>"
|
||||
syn match rhelpSection "\\concept\>"
|
||||
syn match rhelpSection "\\arguments\>"
|
||||
@@ -153,11 +157,11 @@ syn match rhelpSection "\\keyword\>"
|
||||
syn match rhelpSection "\\docType\>"
|
||||
syn match rhelpSection "\\format\>"
|
||||
syn match rhelpSection "\\source\>"
|
||||
syn match rhelpSection "\\itemize\>"
|
||||
syn match rhelpSection "\\describe\>"
|
||||
syn match rhelpSection "\\enumerate\>"
|
||||
syn match rhelpSection "\\item "
|
||||
syn match rhelpSection "\\item$"
|
||||
syn match rhelpSection "\\itemize\>"
|
||||
syn match rhelpSection "\\describe\>"
|
||||
syn match rhelpSection "\\enumerate\>"
|
||||
syn match rhelpSection "\\item "
|
||||
syn match rhelpSection "\\item$"
|
||||
syn match rhelpSection "\\tabular{[lcr]*}"
|
||||
syn match rhelpSection "\\dontrun\>"
|
||||
syn match rhelpSection "\\dontshow\>"
|
||||
@@ -165,11 +169,11 @@ syn match rhelpSection "\\testonly\>"
|
||||
syn match rhelpSection "\\donttest\>"
|
||||
|
||||
" Freely named Sections {{{1
|
||||
syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end=/}/
|
||||
syn region rhelpFreesubsec matchgroup=Delimiter start="\\subsection{" matchgroup=Delimiter transparent end=/}/
|
||||
syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end="}"
|
||||
syn region rhelpFreesubsec matchgroup=Delimiter start="\\subsection{" matchgroup=Delimiter transparent end="}"
|
||||
|
||||
" R help file comments {{{1
|
||||
syn match rhelpComment /%.*$/ contained
|
||||
syn match rhelpComment /%.*$/
|
||||
|
||||
" Error {{{1
|
||||
syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rhelpError,rhelpBraceError,rhelpCurlyError
|
||||
|
||||
+27
-22
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: TeX
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM>
|
||||
" Last Change: Aug 12, 2010
|
||||
" Version: 57
|
||||
" Last Change: Sep 17, 2010
|
||||
" Version: 60
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Notes: {{{1
|
||||
@@ -67,11 +67,11 @@ endif
|
||||
" g:tex_stylish to 1 (for "*.sty" mode)
|
||||
" or to 0 else (normal "*.tex" mode)
|
||||
" or on a buffer-by-buffer basis with b:tex_stylish
|
||||
let b:extfname=expand("%:e")
|
||||
let s:extfname=expand("%:e")
|
||||
if exists("g:tex_stylish")
|
||||
let b:tex_stylish= g:tex_stylish
|
||||
elseif !exists("b:tex_stylish")
|
||||
if b:extfname == "sty" || b:extfname == "cls" || b:extfname == "clo" || b:extfname == "dtx" || b:extfname == "ltx"
|
||||
if s:extfname == "sty" || s:extfname == "cls" || s:extfname == "clo" || s:extfname == "dtx" || s:extfname == "ltx"
|
||||
let b:tex_stylish= 1
|
||||
else
|
||||
let b:tex_stylish= 0
|
||||
@@ -92,12 +92,12 @@ endif
|
||||
" (La)TeX keywords: only use the letters a-zA-Z {{{1
|
||||
" but _ is the only one that causes problems.
|
||||
if version < 600
|
||||
set isk-=_
|
||||
set isk=a-z,A-Z
|
||||
if b:tex_stylish
|
||||
set isk+=@
|
||||
endif
|
||||
else
|
||||
setlocal isk-=_
|
||||
setlocal isk=a-z,A-Z
|
||||
if b:tex_stylish
|
||||
setlocal isk+=@
|
||||
endif
|
||||
@@ -300,7 +300,7 @@ endif
|
||||
|
||||
" Bad Math (mismatched): {{{1
|
||||
if !exists("tex_no_math")
|
||||
syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}"
|
||||
syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|smallmatrix\|xxalignat\)\s*}"
|
||||
syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}"
|
||||
syn match texBadMath "\\[\])]"
|
||||
endif
|
||||
@@ -345,7 +345,6 @@ if !exists("tex_no_math")
|
||||
call TexNewMathZone("G","gather",1)
|
||||
call TexNewMathZone("H","math",1)
|
||||
call TexNewMathZone("I","multline",1)
|
||||
call TexNewMathZone("J","subequations",0)
|
||||
call TexNewMathZone("K","xalignat",1)
|
||||
call TexNewMathZone("L","xxalignat",0)
|
||||
|
||||
@@ -412,7 +411,7 @@ endif
|
||||
syn case ignore
|
||||
syn keyword texTodo contained combak fixme todo xxx
|
||||
syn case match
|
||||
if b:extfname == "dtx"
|
||||
if s:extfname == "dtx"
|
||||
syn match texComment "\^\^A.*$" contains=@texCommentGroup
|
||||
syn match texComment "^%\+" contains=@texCommentGroup
|
||||
else
|
||||
@@ -468,15 +467,16 @@ else
|
||||
endif
|
||||
|
||||
" Tex Reference Zones: {{{1
|
||||
syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn region texRefZone matchgroup=texStatement start="\\label{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
|
||||
syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite
|
||||
syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite
|
||||
syn match texRefZone '\\@samp\>' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\nocite\>' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\bibliography\>' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\label\>' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\\(page\|eq\)ref\>' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\v\=ref' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\cite\%([tp]\*\=\)\=' skipwhite nextgroup=texCiteOption,texCite
|
||||
syn region texRefLabel contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup
|
||||
syn region texCiteOption contained matchgroup=Delimiter start='\[' end=']' contains=@Spell,@texRefGroup,@texMathZones,texRefZone nextgroup=texCiteOption,texCite
|
||||
syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texCite
|
||||
|
||||
" Handle newcommand, newenvironment : {{{1
|
||||
syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl
|
||||
@@ -753,7 +753,11 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['wedge' , '∧'],
|
||||
\ ['wr' , '≀']]
|
||||
for texmath in s:texMathList
|
||||
exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1]
|
||||
if texmath[0] =~ '\w$'
|
||||
exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1]
|
||||
else
|
||||
exe "syn match texMathSymbol '\\\\".texmath[0]."' contained conceal cchar=".texmath[1]
|
||||
endif
|
||||
endfor
|
||||
|
||||
if &ambw == "double"
|
||||
@@ -1027,7 +1031,6 @@ if did_tex_syntax_inits == 1
|
||||
HiLink texError Error
|
||||
endif
|
||||
|
||||
HiLink texCite texRefZone
|
||||
HiLink texDefCmd texDef
|
||||
HiLink texDefName texDef
|
||||
HiLink texDocType texCmdName
|
||||
@@ -1052,6 +1055,7 @@ if did_tex_syntax_inits == 1
|
||||
HiLink texMathZoneV texMath
|
||||
HiLink texMathZoneZ texMath
|
||||
endif
|
||||
HiLink texRefZone Identifier
|
||||
HiLink texSectionMarker texCmdName
|
||||
HiLink texSectionName texSection
|
||||
HiLink texSpaceCode texStatement
|
||||
@@ -1060,6 +1064,7 @@ if did_tex_syntax_inits == 1
|
||||
HiLink texTypeStyle texType
|
||||
|
||||
" Basic TeX highlighting groups
|
||||
HiLink texCite Special
|
||||
HiLink texCmdArgs Number
|
||||
HiLink texCmdName Statement
|
||||
HiLink texComment Comment
|
||||
@@ -1075,7 +1080,7 @@ if did_tex_syntax_inits == 1
|
||||
HiLink texNewCmd Statement
|
||||
HiLink texNewEnv Statement
|
||||
HiLink texOption Number
|
||||
HiLink texRefZone Special
|
||||
HiLink texRefLabel Special
|
||||
HiLink texSection PreCondit
|
||||
HiLink texSpaceCodeChar Special
|
||||
HiLink texSpecialChar SpecialChar
|
||||
@@ -1089,6 +1094,6 @@ if did_tex_syntax_inits == 1
|
||||
endif
|
||||
|
||||
" Current Syntax: {{{1
|
||||
unlet b:extfname
|
||||
unlet s:extfname
|
||||
let b:current_syntax = "tex"
|
||||
" vim: ts=8 fdm=marker
|
||||
|
||||
+12
-10
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 7.3 script
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: August 04, 2010
|
||||
" Version: 7.3-04
|
||||
" Last Change: August 20, 2010
|
||||
" Version: 7.3-05
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" Quit when a syntax file was already loaded {{{2
|
||||
@@ -16,12 +16,14 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained abc[lear] argdo argu[ment] bel[owright] bN[ext] breakd[el] b[uffer] caddb[uffer] cb[uffer] cex[pr] cg[etfile] checkt[ime] cnew[er] col[der] con[tinue] cq[uit] delc[ommand] diffoff diffu[pdate] dr[op] echom[sg] em[enu] endt[ry] exi[t] fina[lly] fix[del] foldd[oopen] go[to] hid[e] ij[ump] isp[lit] k laddb[uffer] la[st] lch[dir] lex[pr] lgete[xpr] l[ist] lmak[e] lN[ext] loc[kmarks] lpf[ile] lt[ag] lv[imgrep] ma[rk] mk[exrc] mkv[imrc] mz[scheme] new noh[lsearch] on[ly] ped[it] popu prev[ious] prof[ile] pta[g] ptn[ext] pts[elect] py[thon] r[ead] redr[aw] ret[ab] rightb[elow] rundo san[dbox] sbf[irst] sbN[ext] scripte[ncoding] setg[lobal] sh[ell] sla[st] sme sni[ff] sor[t] spelli[nfo] sp[lit] startg[replace] st[op] sunme syncbind tabd[o] tabl[ast] tabN[ext] tabs tcld[o] th[row] tm[enu] tp[revious] tu undoj[oin] uns[ilent] vert[ical] vi[sual] wa[ll] winp[os] wp[revious] ws[verb] xa[ll] xmenu xnoremenu
|
||||
syn keyword vimCommand contained abo[veleft] arge[dit] as[cii] bf[irst] bo[tright] breakl[ist] buffers cad[dexpr] cc cf[ile] c[hange] cla[st] cn[ext] colo[rscheme] cope[n] cr[ewind] d[elete] diffpatch dig[raphs] ds[earch] echon emenu* endw[hile] f[ile] fin[d] fo[ld] foldo[pen] gr[ep] his[tory] il[ist] iuna[bbrev] keepalt lad[dexpr] later lcl[ose] lf[ile] lg[etfile] ll lmapc[lear] lnf[ile] lockv[ar] lp[revious] lua lvimgrepa[dd] marks mks[ession] mod[e] nbc[lose] n[ext] nu[mber] o[pen] pe[rl] popu[p] p[rint] promptf[ind] ptf[irst] ptN[ext] pu[t] qa[ll] rec[over] redraws[tatus] retu[rn] rub[y] ru[ntime] sa[rgument] sbl[ast] sbp[revious] scrip[tnames] setl[ocal] sign sl[eep] smenu sno[magic] so[urce] spellr[epall] spr[evious] star[tinsert] stopi[nsert] sunmenu t tabe[dit] tabm[ove] tabo[nly] ta[g] tclf[ile] tj[ump] tn[ext] tr[ewind] tu[nmenu] undol[ist] up[date] vie[w] vmapc[lear] wh[ile] win[size] wq wundo x[it] XMLent xunme
|
||||
syn keyword vimCommand contained al[l] argg[lobal] bad[d] bl[ast] bp[revious] br[ewind] bun[load] caddf[ile] ccl[ose] cfir[st] changes cl[ist] cN[ext] comc[lear] co[py] cuna[bbrev] delf[unction] diffpu[t] di[splay] dsp[lit] e[dit] endfo[r] ene[w] files fini[sh] foldc[lose] for grepa[dd] iabc[lear] imapc[lear] j[oin] keepj[umps] laddf[ile] lb[uffer] le[ft] lfir[st] lgr[ep] lla[st] lnew[er] lNf[ile] lol[der] lr[ewind] luado lw[indow] mat[ch] mksp[ell] m[ove] nb[key] N[ext] ol[dfiles] opt[ions] perld[o] pp[op] P[rint] promptr[epl] ptj[ump] ptp[revious] pw[d] q[uit] redi[r] reg[isters] rew[ind] rubyd[o] rv[iminfo] sav[eas] sbm[odified] sbr[ewind] se[t] sf[ind] sil[ent] sm[agic] sn[ext] snoreme spelld[ump] spellu[ndo] sre[wind] startr[eplace] sts[elect] sus[pend] tab tabf[ind] tabnew tabp[revious] tags te[aroff] tl[ast] tN[ext] try una[bbreviate] unh[ide] verb[ose] vim[grep] vne[w] winc[md] wn[ext] wqa[ll] wv[iminfo] xmapc[lear] XMLns xunmenu
|
||||
syn keyword vimCommand contained arga[dd] argl[ocal] ba[ll] bm[odified] brea[k] bro[wse] bw[ipeout] cal[l] cd cgetb[uffer] chd[ir] clo[se] cnf[ile] comp[iler] cpf[ile] cw[indow] delm[arks] diffsplit dj[ump] earlier el[se] endf[unction] ex filetype fir[st] folddoc[losed] fu[nction] ha[rdcopy] if is[earch] ju[mps] kee[pmarks] lan[guage] lc[d] lefta[bove] lgetb[uffer] lgrepa[dd] lli[st] lne[xt] lo[adview] lop[en] ls luafile mak[e] menut[ranslate] mkvie[w] mzf[ile] nbs[tart] nmapc[lear] omapc[lear] pc[lose] po[p] pre[serve] profd[el] ps[earch] ptl[ast] ptr[ewind] pyf[ile] quita[ll] red[o] res[ize] ri[ght] rubyf[ile] sal[l] sba[ll] sbn[ext] sb[uffer] setf[iletype] sfir[st] sim[alt] sm[ap] sN[ext] snoremenu spe[llgood] spellw[rong] sta[g] stj[ump] sun[hide] sv[iew] tabc[lose] tabfir[st] tabn[ext] tabr[ewind] tc[l] tf[irst] tm to[pleft] ts[elect] u[ndo] unlo[ckvar] ve[rsion] vimgrepa[dd] vs[plit] windo wN[ext] w[rite] X xme xnoreme y[ank]
|
||||
syn keyword vimCommand contained argd[elete] ar[gs] bd[elete] bn[ext] breaka[dd] bufdo cabc[lear] cat[ch] ce[nter] cgete[xpr] che[ckpath] cmapc[lear] cNf[ile] conf[irm] cp[revious] debugg[reedy] diffg[et] diffthis dl[ist] echoe[rr] elsei[f] en[dif]
|
||||
syn match vimCommand contained "\<z[-+^.=]"
|
||||
syn keyword vimCommand contained a arga[dd] argu[ment] bd[elete] bN[ext] breakd[el] buf c cal[l] ce[nter] cg[etfile] cl cn cNf comc[lear] cope[n] cr[ewind] d d[elete] diffo diffsplit di[splay] ds[earch] ec e:e:e en endt[ry] exu[sage] filetype fix[del] for go[to] h hi if intro k la lan[guage] lch[dir] let@ lg[etfile] lla[st] lnew[er] lNf[ile] loc[kmarks] lr[ewind] lv[imgrep] ma[rk] messages mkv mv n new noautocmd on[ly] p:~ perld[o] popu[p] p[rint] promptr[epl] ptl[ast] ptr[ewind] py3file q[uit] r[ead] redraws[tatus] ret[ab] r:r:r ru[ntime] sba[ll] sbp[revious] scs sf[ind] sil[ent] sm[ap] sno[magic] so[urce] spellr[epall] st startr[eplace] sunme sw[apname] t tabf[ind] tabn[ext] ta[g] tf[irst] tn tp[revious] tu undoj[oin] up[date] vi vmapc[lear] win wN[ext] wundo xmapc[lear] xnoremenu
|
||||
syn keyword vimCommand contained ab argd[elete] as[cii] bel[owright] bo[tright] breakl[ist] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cN cnf[ile] comment co[py] cs de delf diffoff difft dj[ump] dsp[lit] echoe[rr] e:e:r endf endw[hile] f fin fo[ld] fu gr[ep] ha[rdcopy] hid[e] ij[ump] is[earch] keepa lad la[st] lcl[ose] lex[pr] lgr[ep] lli[st] lne[xt] lo lockv[ar] ls lvimgrepa[dd] marks mk mkvie[w] Mycmd N n[ext] noh[lsearch] o[pen] P p:gs? pp[op] P[rint] ps[earch] ptn pts[elect] pyf[ile] quita[ll] rec[over] reg[isters] retu[rn] ru rv[iminfo] sbf[irst] sbr[ewind] scscope sfir[st] sim[alt] sme snoreme s?pat?sub? spellu[ndo] sta[g] stj[ump] sunmenu sy ta tabfir[st] tabN[ext] tags th[row] tN tr tu[nmenu] undol[ist] v vie[w] vne[w] winc[md] wp[revious] wv[iminfo] xme xterm
|
||||
syn keyword vimCommand contained abc[lear] argdo au bf[irst] bp[revious] br[ewind] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cnew[er] cNf[ile] comp[iler] count cscope debug delf[unction] DiffOrig diffthis dl[ist] dwim echom[sg] el[se] endfo[r] ene[w] f[ile] fina[lly] foldc[lose] fun grepa[dd] h[elp] his[tory] il[ist] isp[lit] keepalt laddb[uffer] lat lcs lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lol[der] lt[ag] lw[indow] mat[ch] mkdir mkv[imrc] MyCommand nbc[lose] N[ext] nu[mber] opt[ions] pc[lose] p:h pr pro p:t ptN pu[t] py[thon] quote red Ren rew[ind] rub[y] sal[l] sbl[ast] sb[uffer] se[t] sh[ell] sl smenu snoremenu spe spellw[rong] star st[op] sus[pend] syn tab tabl[ast] tabo[nly] tc[l] tj[ump] tn[ext] t:r u unh[ide] ve vim[grep] vs[plit] windo wq x xmenu xunme
|
||||
syn keyword vimCommand contained abo[veleft] arge[dit] bad[d] bl[ast] br bro[wse] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cn[ext] col[der] con cpf[ile] cstag debugg[reedy] delm[arks] diffp diffu[pdate] do e echon elsei[f] endfun Error filename fin[d] folddoc[losed] fu[nction] gs?pat?sub? helpf[ind] i imapc[lear] iuna[bbrev] keepj[umps] lad[dexpr] later lcscope lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lop[en] lua ma menut mk[exrc] mo mz nb[key] nkf o ownsyntax pe p:h:h p:r profd[el] pta[g] ptn[ext] pw[d] python3 r redi[r] Rena ri[ght] rubyd[o] san[dbox] sbm[odified] scrip setf[iletype] si sla[st] sn[ext] s@\n@\=\r" spelld[ump] sp[lit] start stopi[nsert] s?version?main? sync tabc[lose] tabm[ove] tabp[revious] tcld[o] tl[ast] tN[ext] tr[ewind] un unl verb[ose] vimgrepa[dd] w winp[os] wqa[ll] X XMLent xunmenu
|
||||
syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bm[odified] brea[k] browseset bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cN[ext] colo[rscheme] conf[irm] cp[revious] cuna[bbrev] del di diffpatch dig doau ea e[dit] em[enu] endf[unction] ex files fini[sh] foldd[oopen] g gui helpg[rep] ia in j[oin] kee[pmarks] laddf[ile] lb[uffer] le[ft] lgetb[uffer] l[ist] lN lNf lo[adview] lpf[ile] luado mak[e] menut[ranslate] mks[ession] mod[e] mzf[ile] nbs[tart] nmapc[lear] ol[dfiles] p ped[it] po[p] pre[serve] prof[ile] ptf[irst] ptN[ext] py q re red[o] Renu rightb[elow] rubyf[ile] sa[rgument] sbn[ext] scripte[ncoding] setg[lobal] sig sl[eep] sN[ext] so spe[llgood] spr[evious] startg[replace] sts[elect] s?version?main?:p syncbind tabd[o] tabN tabr[ewind] tclf[ile] tm TOhtml try una[bbreviate] unlo[ckvar] ve[rsion] vi[sual] wa[ll] win[size] w[rite] xa[ll] XMLns xwininfo
|
||||
syn keyword vimCommand contained Allargs argl[ocal] bar bn[ext] breaka[dd] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cmdname cnf com con[tinue] cq[uit] cw[indow] delc[ommand] diffg[et] diffpu[t] dig[raphs] dr[op] earlier e:e emenu* en[dif] exi[t] filet fir[st] foldo[pen] get gvim helpt[ags] iabc[lear] index ju[mps] l lan lc[d] lefta[bove] lgete[xpr] ll lne lnf[ile] locale lp[revious] luafile Man mes mksp[ell] m[ove] mz[scheme] ne noa omapc[lear] p: pe[rl] popu prev[ious] promptf[ind] ptj[ump] ptp[revious] py3 qa[ll] r:e redr[aw] res[ize] r:r rundo sav[eas] sbN[ext] scrip[tnames] setl[ocal] sign sm[agic] sni[ff] sor[t] spelli[nfo] sre[wind] star[tinsert] sun[hide] sv[iew] synlist tabe[dit] tabnew tabs te[aroff] tm[enu] to[pleft] ts[elect] u[ndo] uns[ilent] vert[ical] viu[sage] wh[ile] wn[ext] ws[verb] x[it] xnoreme y[ank]
|
||||
syn keyword vimCommand contained ar ar[gs]
|
||||
syn match vimCommand contained "\<z[-+^.=]\="
|
||||
syn keyword vimCommand contained maca[ction] macm[enu]
|
||||
|
||||
" vimOptions are caught only when contained in a vimSet {{{2
|
||||
@@ -322,7 +324,7 @@ syn case match
|
||||
" ====
|
||||
syn match vimMap "\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
|
||||
syn keyword vimMap mapc[lear]
|
||||
syn keyword vimMap mapc[lear] smapc[lear]
|
||||
syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
|
||||
syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
|
||||
syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
@@ -556,7 +558,7 @@ let s:luapath= expand("<sfile>:p:h")."/lua.vim"
|
||||
if !filereadable(s:luapath)
|
||||
let s:luapath= globpath(&rtp,"syntax/lua.vim")
|
||||
endif
|
||||
if (g:vimsyn_embed =~ 'p' && has("lua")) && filereadable(s:luapath)
|
||||
if (g:vimsyn_embed =~ 'l' && has("lua")) && filereadable(s:luapath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimLuaScript ".s:luapath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'l'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" This is a GENERATED FILE. Please always refer to source file at the URI below.
|
||||
" Language: XF86Config (XFree86 configuration file)
|
||||
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
|
||||
" Last Change: 2005 Jul 12
|
||||
" Former Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
|
||||
" Last Change: 2010 Nov 01
|
||||
" URL: http://trific.ath.cx/Ftp/vim/syntax/xf86conf.vim
|
||||
" Required Vim Version: 6.0
|
||||
"
|
||||
@@ -63,7 +63,7 @@ syn match xf86confModeLineValue "\"[^\"]\+\"\(\_s\+[0-9.]\+\)\{9}" nextgroup=xf8
|
||||
|
||||
" Sections and subsections
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,xf86confSectionError
|
||||
syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,xf86confSectionError
|
||||
syn region xf86confSectionModule matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Module\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionModes matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Modes\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment
|
||||
@@ -165,7 +165,7 @@ syn match xf86confSync "\(\s\+[+-][CHV]_*Sync\)\+" contained
|
||||
|
||||
" Synchronization
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\)\""
|
||||
syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\""
|
||||
syn sync match xf86confSyncSectionModule grouphere xf86confSectionModule "^\s*Section\s\+\"Module\""
|
||||
syn sync match xf86confSyncSectionModes groupthere xf86confSectionModes "^\s*Section\s\+\"Modes\""
|
||||
else
|
||||
|
||||
+44
-42
@@ -1,10 +1,11 @@
|
||||
" Vim syntax file
|
||||
" Language: XQuery
|
||||
" Author: Jean-Marc Vanel <http://jmvanel.free.fr/>
|
||||
" Last Change: mar jui 12 18:04:05 CEST 2005
|
||||
" Author: René Neumann <necoro@necoro.eu>
|
||||
" Author: Steve Spigarelli <http://spig.net/>
|
||||
" Original Author: Jean-Marc Vanel <http://jmvanel.free.fr/>
|
||||
" Last Change: December 11, 2010
|
||||
" Filenames: *.xq
|
||||
" URL: http://jmvanel.free.fr/vim/xquery.vim
|
||||
" $Id: xquery.vim,v 1.1 2005/07/18 21:44:56 vimboss Exp $
|
||||
|
||||
" REFERENCES:
|
||||
" [1] http://www.w3.org/TR/xquery/
|
||||
@@ -14,22 +15,26 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" - is allowed in keywords
|
||||
setlocal iskeyword+=-
|
||||
|
||||
runtime syntax/xml.vim
|
||||
|
||||
syn case match
|
||||
|
||||
" From XQuery grammar:
|
||||
syn keyword xqueryStatement ancestor ancestor-or-self and as ascending at attribute base-uri by case cast castable child collation construction declare default descendant descendant-or-self descending div document element else empty encoding eq every except external following following-sibling for function ge greatest gt idiv if import in inherit-namespaces instance intersect is le least let lt mod module namespace ne no of or order ordered ordering parent preceding preceding-sibling preserve return satisfies schema self some stable strip then to treat typeswitch union unordered validate variable version where xmlspace xquery yes
|
||||
syn keyword xqStatement ancestor ancestor-or-self and as ascending at attribute base-uri boundary-space by case cast castable child collation construction declare default descendant descendant-or-self descending div document element else empty encoding eq every except external following following-sibling for function ge greatest gt idiv if import in inherit-namespaces instance intersect is le least let lt mod module namespace ne no of or order ordered ordering parent preceding preceding-sibling preserve return satisfies schema self some stable strip then to treat typeswitch union unordered validate variable version where xmlspace xquery yes
|
||||
|
||||
" TODO contains clashes with vim keyword
|
||||
syn keyword xqueryFunction abs adjust-date-to-timezone adjust-date-to-timezone adjust-dateTime-to-timezone adjust-dateTime-to-timezone adjust-time-to-timezone adjust-time-to-timezone avg base-uri base-uri boolean ceiling codepoint-equal codepoints-to-string collection collection compare concat count current-date current-dateTime current-time data dateTime day-from-date day-from-dateTime days-from-duration deep-equal deep-equal default-collation distinct-values distinct-values doc doc-available document-uri empty ends-with ends-with error error error error escape-uri exactly-one exists false floor hours-from-dateTime hours-from-duration hours-from-time id id idref idref implicit-timezone in-scope-prefixes index-of index-of insert-before lang lang last local-name local-name local-name-from-QName lower-case matches matches max max min min minutes-from-dateTime minutes-from-duration minutes-from-time month-from-date month-from-dateTime months-from-duration name name namespace-uri namespace-uri namespace-uri-for-prefix namespace-uri-from-QName nilled node-name normalize-space normalize-space normalize-unicode normalize-unicode not number number one-or-more position prefix-from-QName QName remove replace replace resolve-QName resolve-uri resolve-uri reverse root root round round-half-to-even round-half-to-even seconds-from-dateTime seconds-from-duration seconds-from-time starts-with starts-with static-base-uri string string string-join string-length string-length string-to-codepoints subsequence subsequence substring substring substring-after substring-after substring-before substring-before sum sum timezone-from-date timezone-from-dateTime timezone-from-time tokenize tokenize trace translate true unordered upper-case year-from-date year-from-dateTime years-from-duration zero-or-one
|
||||
syn keyword xqFunction abs adjust-date-to-timezone adjust-date-to-timezone adjust-dateTime-to-timezone adjust-dateTime-to-timezone adjust-time-to-timezone adjust-time-to-timezone avg base-uri base-uri boolean ceiling codepoint-equal codepoints-to-string collection collection compare concat count current-date current-dateTime current-time data dateTime day-from-date day-from-dateTime days-from-duration deep-equal deep-equal default-collation distinct-values distinct-values doc doc-available document-uri empty ends-with ends-with error error error error escape-uri exactly-one exists false floor hours-from-dateTime hours-from-duration hours-from-time id id idref idref implicit-timezone in-scope-prefixes index-of index-of insert-before lang lang last local-name local-name local-name-from-QName lower-case matches matches max max min min minutes-from-dateTime minutes-from-duration minutes-from-time month-from-date month-from-dateTime months-from-duration name name namespace-uri namespace-uri namespace-uri-for-prefix namespace-uri-from-QName nilled node-name normalize-space normalize-space normalize-unicode normalize-unicode not number number one-or-more position prefix-from-QName QName remove replace replace resolve-QName resolve-uri resolve-uri reverse root root round round-half-to-even round-half-to-even seconds-from-dateTime seconds-from-duration seconds-from-time starts-with starts-with static-base-uri string string string-join string-length string-length string-to-codepoints subsequence subsequence substring substring substring-after substring-after substring-before substring-before sum sum timezone-from-date timezone-from-dateTime timezone-from-time tokenize tokenize trace translate true unordered upper-case year-from-date year-from-dateTime years-from-duration zero-or-one
|
||||
|
||||
syn keyword xqueryOperator add-dayTimeDuration-to-date add-dayTimeDuration-to-dateTime add-dayTimeDuration-to-time add-dayTimeDurations add-yearMonthDuration-to-date add-yearMonthDuration-to-dateTime add-yearMonthDurations base64Binary-equal boolean-equal boolean-greater-than boolean-less-than concatenate date-equal date-greater-than date-less-than dateTime-equal dateTime-greater-than dateTime-less-than dayTimeDuration-equal dayTimeDuration-greater-than dayTimeDuration-less-than divide-dayTimeDuration divide-dayTimeDuration-by-dayTimeDuration divide-yearMonthDuration divide-yearMonthDuration-by-yearMonthDuration except gDay-equal gMonth-equal gMonthDay-equal gYear-equal gYearMonth-equal hexBinary-equal intersect is-same-node multiply-dayTimeDuration multiply-yearMonthDuration node-after node-before NOTATION-equal numeric-add numeric-divide numeric-equal numeric-greater-than numeric-integer-divide numeric-less-than numeric-mod numeric-multiply numeric-subtract numeric-unary-minus numeric-unary-plus QName-equal subtract-dates-yielding-dayTimeDuration subtract-dateTimes-yielding-dayTimeDuration subtract-dayTimeDuration-from-date subtract-dayTimeDuration-from-dateTime subtract-dayTimeDuration-from-time subtract-dayTimeDurations subtract-times subtract-yearMonthDuration-from-date subtract-yearMonthDuration-from-dateTime subtract-yearMonthDurations time-equal time-greater-than time-less-than to union yearMonthDuration-equal yearMonthDuration-greater-than yearMonthDuration-less-than
|
||||
syn keyword xqOperator add-dayTimeDuration-to-date add-dayTimeDuration-to-dateTime add-dayTimeDuration-to-time add-dayTimeDurations add-yearMonthDuration-to-date add-yearMonthDuration-to-dateTime add-yearMonthDurations base64Binary-equal boolean-equal boolean-greater-than boolean-less-than concatenate date-equal date-greater-than date-less-than dateTime-equal dateTime-greater-than dateTime-less-than dayTimeDuration-equal dayTimeDuration-greater-than dayTimeDuration-less-than divide-dayTimeDuration divide-dayTimeDuration-by-dayTimeDuration divide-yearMonthDuration divide-yearMonthDuration-by-yearMonthDuration except gDay-equal gMonth-equal gMonthDay-equal gYear-equal gYearMonth-equal hexBinary-equal intersect is-same-node multiply-dayTimeDuration multiply-yearMonthDuration node-after node-before NOTATION-equal numeric-add numeric-divide numeric-equal numeric-greater-than numeric-integer-divide numeric-less-than numeric-mod numeric-multiply numeric-subtract numeric-unary-minus numeric-unary-plus QName-equal subtract-dates-yielding-dayTimeDuration subtract-dateTimes-yielding-dayTimeDuration subtract-dayTimeDuration-from-date subtract-dayTimeDuration-from-dateTime subtract-dayTimeDuration-from-time subtract-dayTimeDurations subtract-times subtract-yearMonthDuration-from-date subtract-yearMonthDuration-from-dateTime subtract-yearMonthDurations time-equal time-greater-than time-less-than to union yearMonthDuration-equal yearMonthDuration-greater-than yearMonthDuration-less-than
|
||||
|
||||
syn match xqType "xs:\(\|Datatype\|primitive\|string\|boolean\|float\|double\|decimal\|duration\|dateTime\|time\|date\|gYearMonth\|gYear\|gMonthDay\|gDay\|gMonth\|hexBinary\|base64Binary\|anyURI\|QName\|NOTATION\|\|normalizedString\|token\|language\|IDREFS\|ENTITIES\|NMTOKEN\|NMTOKENS\|Name\|NCName\|ID\|IDREF\|ENTITY\|integer\|nonPositiveInteger\|negativeInteger\|long\|int\|short\|byte\|nonNegativeInteger\|unsignedLong\|unsignedInt\|unsignedShort\|unsignedByte\|positiveInteger\)"
|
||||
|
||||
syn match xqueryType "xs:\(\|Datatype\|primitive\|string\|boolean\|float\|double\|decimal\|duration\|dateTime\|time\|date\|gYearMonth\|gYear\|gMonthDay\|gDay\|gMonth\|hexBinary\|base64Binary\|anyURI\|QName\|NOTATION\|\|normalizedString\|token\|language\|IDREFS\|ENTITIES\|NMTOKEN\|NMTOKENS\|Name\|NCName\|ID\|IDREF\|ENTITY\|integer\|nonPositiveInteger\|negativeInteger\|long\|int\|short\|byte\|nonNegativeInteger\|unsignedLong\|unsignedInt\|unsignedShort\|unsignedByte\|positiveInteger\)"
|
||||
|
||||
" From XPath grammar:
|
||||
syn keyword xqueryXPath some every in in satisfies if then else to div idiv mod union intersect except instance of treat castable cast eq ne lt le gt ge is child descendant attribute self descendant-or-self following-sibling following namespace parent ancestor preceding-sibling preceding ancestor-or-self void item node document-node text comment processing-instruction attribute schema-attribute schema-element
|
||||
syn keyword xqXPath some every in in satisfies if then else to div idiv mod union intersect except instance of treat castable cast eq ne lt le gt ge is child descendant attribute self descendant-or-self following-sibling following namespace parent ancestor preceding-sibling preceding ancestor-or-self void item node document-node text comment processing-instruction attribute schema-attribute schema-element
|
||||
|
||||
" eXist extensions
|
||||
syn match xqExist "&="
|
||||
@@ -37,44 +42,41 @@ syn match xqExist "&="
|
||||
" XQdoc
|
||||
syn match XQdoc contained "@\(param\|return\|author\)\>"
|
||||
|
||||
highlight def link xqueryStatement Statement
|
||||
highlight def link xqueryFunction Function
|
||||
highlight def link xqueryOperator Operator
|
||||
highlight def link xqueryType Type
|
||||
highlight def link xqueryXPath Operator
|
||||
highlight def link XQdoc Special
|
||||
highlight def link xqExist Operator
|
||||
" floating point number, with dot, optional exponent
|
||||
syn match xqFloat "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
|
||||
" floating point number, starting with a dot, optional exponent
|
||||
syn match xqFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
|
||||
" floating point number, without dot, with exponent
|
||||
syn match xqFloat "\d\+e[-+]\=\d\+[fl]\=\>"
|
||||
syn match xqNumber "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match xqNumber "\<\d\+\>"
|
||||
|
||||
syn region xqString start=+"+ end=+"+
|
||||
syn region xqComment start='(:' excludenl end=':)' contains=XQdoc
|
||||
|
||||
"floating point number, with dot, optional exponent
|
||||
syn match cFloat "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
|
||||
"floating point number, starting with a dot, optional exponent
|
||||
syn match cFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
|
||||
"floating point number, without dot, with exponent
|
||||
syn match cFloat "\d\+e[-+]\=\d\+[fl]\=\>"
|
||||
syn match cNumber "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match cNumber "\<\d\+\>"
|
||||
highlight def link cNumber Number
|
||||
highlight def link cFloat Number
|
||||
|
||||
syn region xqComment start='(:' excludenl end=':)' contains=XQdoc
|
||||
highlight def link xqComment Comment
|
||||
" syntax match xqVariable "$\w\+"
|
||||
syntax match xqVariable +$\<[a-zA-Z:_][-.0-9a-zA-Z0-9:_]*\>+
|
||||
highlight def link xqVariable Identifier
|
||||
|
||||
" Redefine the default XML highlighting:
|
||||
highlight def link xmlTag Structure
|
||||
highlight def link xmlTagName Structure
|
||||
highlight def link xmlEndTag Structure
|
||||
|
||||
syntax match xqSeparator ",\|;"
|
||||
highlight link xqSeparator Operator
|
||||
|
||||
syn region xqCode transparent contained start='{' excludenl end='}' contains=xmlRegionBis,xqComment,xqueryStatement,xmlString,xqSeparator,cNumber,xqVariable keepend extend
|
||||
syn match xqVariable "$\<[a-zA-Z:_][-.0-9a-zA-Z0-9:_]*\>"
|
||||
syn match xqSeparator ",\|;"
|
||||
syn region xqCode transparent contained start='{' excludenl end='}' contains=xqFunction,xqCode,xmlRegionBis,xqComment,xqStatement,xmlString,xqSeparator,xqNumber,xqVariable,xqString keepend extend
|
||||
|
||||
syn region xmlRegionBis start=+<\z([^ /!?<>"']\+\)+ skip=+<!--\_.\{-}-->+ end=+</\z1\_\s\{-}>+ end=+/>+ fold contains=xmlTag,xmlEndTag,xmlCdata,xmlRegionBis,xmlComment,xmlEntity,xmlProcessing,xqCode keepend extend
|
||||
|
||||
syn region List transparent start='(' excludenl end=')' contains=xqCode,xmlRegion,xqComment,xqSeparator,xqueryStatement,xqVariable,xqueryType keepend extend
|
||||
hi def link xqNumber Number
|
||||
hi def link xqFloat Number
|
||||
hi def link xqString String
|
||||
hi def link xqVariable Identifier
|
||||
hi def link xqComment Comment
|
||||
hi def link xqSeparator Operator
|
||||
hi def link xqStatement Statement
|
||||
hi def link xqFunction Function
|
||||
hi def link xqOperator Operator
|
||||
hi def link xqType Type
|
||||
hi def link xqXPath Operator
|
||||
hi def link XQdoc Special
|
||||
hi def link xqExist Operator
|
||||
|
||||
" override the xml highlighting
|
||||
"hi link xmlTag Structure
|
||||
"hi link xmlTagName Structure
|
||||
"hi link xmlEndTag Structure
|
||||
|
||||
let b:current_syntax = "xquery"
|
||||
|
||||
+17
-5
@@ -1,12 +1,22 @@
|
||||
" Vim syntax file
|
||||
" Language: Yacc
|
||||
" Maintainer: Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Aug 2, 2010
|
||||
" Version: 8
|
||||
" Last Change: Aug 12, 2010
|
||||
" Version: 9
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Options: {{{1
|
||||
" g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C
|
||||
"
|
||||
" Overall layout of a bison/yacc grammer:
|
||||
" %{
|
||||
" Prolog
|
||||
" %}
|
||||
" Bison/Yacc Declarations
|
||||
" %%
|
||||
" Grammar Rules
|
||||
" %%
|
||||
" Epilogue
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" this version of syntax/yacc.vim requires 6.0 or later
|
||||
@@ -35,7 +45,7 @@ endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Yacc Clusters: {{{1
|
||||
syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam
|
||||
syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam,yaccParseOption
|
||||
syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
@@ -50,7 +60,8 @@ HiFold syn region yaccEndCode matchgroup=yaccSectionSep start='^%%$' end='\%$'
|
||||
" ---------------------------------------------------------------------
|
||||
" Yacc Commands: {{{1
|
||||
syn match yaccDefines '^%define\s\+.*$'
|
||||
syn match yaccParseParam '%parse-param\>' skipwhite nextgroup=yaccParseParamStr
|
||||
syn match yaccParseParam '%\(parse\|lex\)-param\>' skipwhite nextgroup=yaccParseParamStr
|
||||
syn match yaccParseOption '%\%(api\.pure\|pure-parser\|locations\|error-verbose\)\>'
|
||||
syn region yaccParseParamStr contained matchgroup=Delimiter start='{' end='}' contains=cStructure
|
||||
|
||||
syn match yaccDelim "[:|]" contained
|
||||
@@ -96,7 +107,8 @@ if !exists("did_yacc_syn_inits")
|
||||
HiLink yaccCurly Delimiter
|
||||
HiLink yaccCurlyError Error
|
||||
HiLink yaccDefines cDefine
|
||||
HiLink yaccParseParam cDefine
|
||||
HiLink yaccParseParam yaccParseOption
|
||||
HiLink yaccParseOption cDefine
|
||||
HiLink yaccNonterminal Function
|
||||
HiLink yaccDelim Delimiter
|
||||
HiLink yaccKeyActn Special
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: YAML (YAML Ain't Markup Language) 1.2
|
||||
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
|
||||
" First author: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-09-16
|
||||
" Latest Revision: 2010-10-08
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
@@ -124,7 +124,7 @@ syn match yamlConstant '\<\~\>'
|
||||
|
||||
syn match yamlTimestamp /\%([\[\]{}, \t]\@!\p\)\@<!\%(\d\{4}-\d\d\=-\d\d\=\%(\%([Tt]\|\s\+\)\%(\d\d\=\):\%(\d\d\):\%(\d\d\)\%(\.\%(\d*\)\)\=\%(\s*\%(Z\|[+-]\d\d\=\%(:\d\d\)\=\)\)\=\)\=\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
|
||||
syn match yamlInteger /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(0\%(b[0-1_]\+\|[0-7_]\+\|x[0-9a-fA-F_]\+\)\=\|\%([1-9][0-9_]*\%(:[0-5]\=\d\)\+\)\)\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
syn match yamlInteger /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(0\%(b[0-1_]\+\|[0-7_]\+\|x[0-9a-fA-F_]\+\)\=\|\%([1-9][0-9_]*\%(:[0-5]\=\d\)\+\)\)\|[1-9][0-9_]*\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
syn match yamlFloat /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(\%(\d[0-9_]*\)\.[0-9_]*\%([eE][+-]\d\+\)\=\|\.[0-9_]\+\%([eE][-+][0-9]\+\)\=\|\d[0-9_]*\%(:[0-5]\=\d\)\+\.[0-9_]*\|\.\%(inf\|Inf\|INF\)\)\|\%(\.\%(nan\|NaN\|NAN\)\)\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
|
||||
execute 'syn match yamlNodeTag '.string(s:c_ns_tag_property)
|
||||
|
||||
@@ -17,6 +17,17 @@ CROSS = no
|
||||
# check also the executables
|
||||
MINGWOLD = no
|
||||
|
||||
# Link against the shared versions of libgcc/libstdc++ by default. Set
|
||||
# STATIC_STDCPLUS to "yes" to link against static versions instead.
|
||||
STATIC_STDCPLUS=no
|
||||
#STATIC_STDCPLUS=yes
|
||||
|
||||
# Note: -static-libstdc++ is not available until gcc 4.5.x.
|
||||
LDFLAGS += -shared
|
||||
ifeq (yes, $(STATIC_STDCPLUS))
|
||||
LDFLAGS += -static-libgcc -static-libstdc++
|
||||
endif
|
||||
|
||||
ifeq ($(CROSS),yes)
|
||||
DEL = rm
|
||||
ifeq ($(MINGWOLD),yes)
|
||||
@@ -33,7 +44,9 @@ DEL = del
|
||||
endif
|
||||
endif
|
||||
CXX := $(CROSS_COMPILE)g++
|
||||
WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED
|
||||
WINDRES := $(CROSS_COMPILE)windres
|
||||
WINDRES_CXX = $(CXX)
|
||||
WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED
|
||||
LIBS := -luuid
|
||||
RES := gvimext.res
|
||||
DEFFILE = gvimext_ming.def
|
||||
@@ -46,7 +59,7 @@ DLL := gvimext.dll
|
||||
all: all-before $(DLL) all-after
|
||||
|
||||
$(DLL): $(OBJ) $(RES) $(DEFFILE)
|
||||
$(CXX) -shared $(CXXFLAGS) -s -o $@ \
|
||||
$(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \
|
||||
-Wl,--enable-auto-image-base \
|
||||
-Wl,--enable-auto-import \
|
||||
-Wl,--whole-archive \
|
||||
@@ -58,7 +71,7 @@ gvimext.o: gvimext.cpp
|
||||
$(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@
|
||||
|
||||
$(RES): gvimext_ming.rc
|
||||
$(WINDRES) --input-format=rc --output-format=coff -DMING $? -o $@
|
||||
$(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@
|
||||
|
||||
clean: clean-custom
|
||||
-$(DEL) $(OBJ) $(RES) $(DLL)
|
||||
|
||||
@@ -1202,7 +1202,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>55</string>
|
||||
<string>57</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
||||
+167
-82
@@ -41,9 +41,14 @@
|
||||
#import "MMPreferenceController.h"
|
||||
#import "MMVimController.h"
|
||||
#import "MMWindowController.h"
|
||||
#import "MMTextView.h"
|
||||
#import "Miscellaneous.h"
|
||||
#import <unistd.h>
|
||||
#import <CoreServices/CoreServices.h>
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
// Need Carbon for TIS...() functions
|
||||
#import <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
|
||||
#define MM_HANDLE_XCODE_MOD_EVENT 0
|
||||
@@ -135,7 +140,12 @@ typedef struct
|
||||
- (NSDictionary *)convertVimControllerArguments:(NSDictionary *)args
|
||||
toCommandLine:(NSArray **)cmdline;
|
||||
- (NSString *)workingDirectoryForArguments:(NSDictionary *)args;
|
||||
- (NSScreen *)screenContainingPoint:(NSPoint)pt;
|
||||
- (NSScreen *)screenContainingTopLeftPoint:(NSPoint)pt;
|
||||
- (void)addInputSourceChangedObserver;
|
||||
- (void)removeInputSourceChangedObserver;
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
- (void)inputSourceChanged:(NSNotification *)notification;
|
||||
#endif
|
||||
@end
|
||||
|
||||
|
||||
@@ -212,6 +222,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
#ifdef INCLUDE_OLD_IM_CODE
|
||||
[NSNumber numberWithBool:YES], MMUseInlineImKey,
|
||||
#endif // INCLUDE_OLD_IM_CODE
|
||||
[NSNumber numberWithBool:NO], MMSuppressTerminationAlertKey,
|
||||
nil];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:dict];
|
||||
@@ -374,6 +385,8 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
[self startWatchingVimDir];
|
||||
}
|
||||
|
||||
[self addInputSourceChangedObserver];
|
||||
|
||||
ASLogInfo(@"MacVim finished launching");
|
||||
}
|
||||
|
||||
@@ -469,13 +482,11 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
int reply = NSTerminateNow;
|
||||
BOOL modifiedBuffers = NO;
|
||||
|
||||
// Go through windows, checking for modified buffers. (Each Vim process
|
||||
// tells MacVim when any buffer has been modified and MacVim sets the
|
||||
// 'documentEdited' flag of the window correspondingly.)
|
||||
NSEnumerator *e = [[NSApp windows] objectEnumerator];
|
||||
id window;
|
||||
while ((window = [e nextObject])) {
|
||||
if ([window isDocumentEdited]) {
|
||||
// Go through Vim controllers, checking for modified buffers.
|
||||
NSEnumerator *e = [vimControllers objectEnumerator];
|
||||
id vc;
|
||||
while ((vc = [e nextObject])) {
|
||||
if ([vc hasModifiedBuffer]) {
|
||||
modifiedBuffers = YES;
|
||||
break;
|
||||
}
|
||||
@@ -499,7 +510,8 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
reply = NSTerminateCancel;
|
||||
|
||||
[alert release];
|
||||
} else {
|
||||
} else if (![[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMSuppressTerminationAlertKey]) {
|
||||
// No unmodified buffers, but give a warning if there are multiple
|
||||
// windows and/or tabs open.
|
||||
int numWindows = [vimControllers count];
|
||||
@@ -507,7 +519,6 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
|
||||
// Count the number of open tabs
|
||||
e = [vimControllers objectEnumerator];
|
||||
id vc;
|
||||
while ((vc = [e nextObject]))
|
||||
numTabs += [[vc objectForVimStateKey:@"numTabs"] intValue];
|
||||
|
||||
@@ -521,6 +532,9 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
[alert setMessageText:NSLocalizedString(
|
||||
@"Are you sure you want to quit MacVim?",
|
||||
@"Quit dialog with no changed buffers, title")];
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
[alert setShowsSuppressionButton:YES];
|
||||
#endif
|
||||
|
||||
NSString *info = nil;
|
||||
if (numWindows > 1) {
|
||||
@@ -550,6 +564,13 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
if ([alert runModal] != NSAlertFirstButtonReturn)
|
||||
reply = NSTerminateCancel;
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
if ([[alert suppressionButton] state] == NSOnState) {
|
||||
[[NSUserDefaults standardUserDefaults]
|
||||
setBool:YES forKey:MMSuppressTerminationAlertKey];
|
||||
}
|
||||
#endif
|
||||
|
||||
[alert release];
|
||||
}
|
||||
}
|
||||
@@ -597,6 +618,8 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
{
|
||||
ASLogInfo(@"Terminating MacVim...");
|
||||
|
||||
[self removeInputSourceChangedObserver];
|
||||
|
||||
[self stopWatchingVimDir];
|
||||
|
||||
#if MM_HANDLE_XCODE_MOD_EVENT
|
||||
@@ -725,7 +748,9 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
if (!NSEqualPoints(topLeft, NSZeroPoint)) {
|
||||
// Try to tile from the correct screen in case the user has multiple
|
||||
// monitors ([win screen] always seems to return the "main" screen).
|
||||
NSScreen *screen = [self screenContainingPoint:topLeft];
|
||||
//
|
||||
// TODO: Check for screen _closest_ to top left?
|
||||
NSScreen *screen = [self screenContainingTopLeftPoint:topLeft];
|
||||
if (!screen)
|
||||
screen = [win screen];
|
||||
|
||||
@@ -856,10 +881,6 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
// a) filter out any already open files
|
||||
// b) open any remaining files
|
||||
//
|
||||
// A file is opened in an untitled window if there is one (it may be
|
||||
// currently launching, or it may already be visible), otherwise a new
|
||||
// window is opened.
|
||||
//
|
||||
// Each launching Vim process has a dictionary of arguments that are passed
|
||||
// to the process when in checks in (via connectBackend:pid:). The
|
||||
// arguments for each launching process can be looked up by its PID (in the
|
||||
@@ -874,29 +895,9 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
// a) Filter out any already open files
|
||||
//
|
||||
NSString *firstFile = [filenames objectAtIndex:0];
|
||||
MMVimController *firstController = nil;
|
||||
NSDictionary *openFilesDict = nil;
|
||||
filenames = [self filterOpenFiles:filenames openFilesDict:&openFilesDict];
|
||||
|
||||
// Pass arguments to vim controllers that had files open.
|
||||
id key;
|
||||
NSEnumerator *e = [openFilesDict keyEnumerator];
|
||||
|
||||
// (Indicate that we do not wish to open any files at the moment.)
|
||||
[arguments setObject:[NSNumber numberWithBool:YES] forKey:@"dontOpen"];
|
||||
|
||||
while ((key = [e nextObject])) {
|
||||
NSArray *files = [openFilesDict objectForKey:key];
|
||||
[arguments setObject:files forKey:@"filenames"];
|
||||
|
||||
MMVimController *vc = [key pointerValue];
|
||||
[vc passArguments:arguments];
|
||||
|
||||
// If this controller holds the first file, then remember it for later.
|
||||
if ([files containsObject:firstFile])
|
||||
firstController = vc;
|
||||
}
|
||||
|
||||
// The meaning of "layout" is defined by the WIN_* defines in main.c.
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
int layout = [ud integerForKey:MMOpenLayoutKey];
|
||||
@@ -908,29 +909,46 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
if (layout < 0 || (layout > MMLayoutTabs && openInCurrentWindow))
|
||||
layout = MMLayoutTabs;
|
||||
|
||||
if ([filenames count] == 0) {
|
||||
// Raise the window containing the first file that was already open,
|
||||
// and make sure that the tab containing that file is selected. Only
|
||||
// do this when there are no more files to open, otherwise sometimes
|
||||
// the window with 'firstFile' will be raised, other times it might be
|
||||
// the window that will open with the files in the 'filenames' array.
|
||||
firstFile = [firstFile stringByEscapingSpecialFilenameCharacters];
|
||||
// Pass arguments to vim controllers that had files open.
|
||||
id key;
|
||||
NSEnumerator *e = [openFilesDict keyEnumerator];
|
||||
|
||||
NSString *bufCmd = @"tab sb";
|
||||
switch (layout) {
|
||||
case MMLayoutHorizontalSplit: bufCmd = @"sb"; break;
|
||||
case MMLayoutVerticalSplit: bufCmd = @"vert sb"; break;
|
||||
case MMLayoutArglist: bufCmd = @"b"; break;
|
||||
// (Indicate that we do not wish to open any files at the moment.)
|
||||
[arguments setObject:[NSNumber numberWithBool:YES] forKey:@"dontOpen"];
|
||||
|
||||
while ((key = [e nextObject])) {
|
||||
MMVimController *vc = [key pointerValue];
|
||||
NSArray *files = [openFilesDict objectForKey:key];
|
||||
[arguments setObject:files forKey:@"filenames"];
|
||||
|
||||
if ([filenames count] == 0 && [files containsObject:firstFile]) {
|
||||
// Raise the window containing the first file that was already
|
||||
// open, and make sure that the tab containing that file is
|
||||
// selected. Only do this when there are no more files to open,
|
||||
// otherwise sometimes the window with 'firstFile' will be raised,
|
||||
// other times it might be the window that will open with the files
|
||||
// in the 'filenames' array.
|
||||
//
|
||||
// NOTE: Raise window before passing arguments, otherwise the
|
||||
// selection will be lost when selectionRange is set.
|
||||
firstFile = [firstFile stringByEscapingSpecialFilenameCharacters];
|
||||
|
||||
NSString *bufCmd = @"tab sb";
|
||||
switch (layout) {
|
||||
case MMLayoutHorizontalSplit: bufCmd = @"sb"; break;
|
||||
case MMLayoutVerticalSplit: bufCmd = @"vert sb"; break;
|
||||
case MMLayoutArglist: bufCmd = @"b"; break;
|
||||
}
|
||||
|
||||
NSString *input = [NSString stringWithFormat:@"<C-\\><C-N>"
|
||||
":let oldswb=&swb|let &swb=\"useopen,usetab\"|"
|
||||
"%@ %@|let &swb=oldswb|unl oldswb|"
|
||||
"cal foreground()<CR>", bufCmd, firstFile];
|
||||
|
||||
[vc addVimInput:input];
|
||||
}
|
||||
|
||||
NSString *input = [NSString stringWithFormat:@"<C-\\><C-N>"
|
||||
":let oldswb=&swb|let &swb=\"useopen,usetab\"|"
|
||||
"%@ %@|let &swb=oldswb|unl oldswb|"
|
||||
"cal foreground()<CR>", bufCmd, firstFile];
|
||||
|
||||
[firstController addVimInput:input];
|
||||
|
||||
return YES;
|
||||
[vc passArguments:arguments];
|
||||
}
|
||||
|
||||
// Add filenames to "Recent Files" menu, unless they are being edited
|
||||
@@ -940,6 +958,9 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
noteNewRecentFilePaths:filenames];
|
||||
}
|
||||
|
||||
if ([filenames count] == 0)
|
||||
return YES; // No files left to open (all were already open)
|
||||
|
||||
//
|
||||
// b) Open any remaining files
|
||||
//
|
||||
@@ -1377,7 +1398,16 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
|
||||
- (MMVimController *)topmostVimController
|
||||
{
|
||||
// Find the topmost visible window which has an associated vim controller.
|
||||
// Find the topmost visible window which has an associated vim controller
|
||||
// as follows:
|
||||
//
|
||||
// 1. Search through ordered windows as determined by NSApp. Unfortunately
|
||||
// this method can fail, e.g. if a full screen window is on another
|
||||
// "Space" (in this case NSApp returns no windows at all), so we have to
|
||||
// fall back on ...
|
||||
// 2. Search through all Vim controllers and return the first visible
|
||||
// window.
|
||||
|
||||
NSEnumerator *e = [[NSApp orderedWindows] objectEnumerator];
|
||||
id window;
|
||||
while ((window = [e nextObject]) && [window isVisible]) {
|
||||
@@ -1389,6 +1419,14 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
}
|
||||
}
|
||||
|
||||
unsigned i, count = [vimControllers count];
|
||||
for (i = 0; i < count; ++i) {
|
||||
MMVimController *vc = [vimControllers objectAtIndex:i];
|
||||
if ([[[vc windowController] window] isVisible]) {
|
||||
return vc;
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -1433,18 +1471,12 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
// The 'pidArguments' dictionary keeps arguments to be passed to the
|
||||
// process when it connects (this is in contrast to arguments which are
|
||||
// passed on the command line, like '-f' and '-g').
|
||||
// If this method is called with nil arguments we take this as a hint
|
||||
// that this is an "untitled window" being launched and add a null
|
||||
// object to the 'pidArguments' dictionary. This way we can detect if
|
||||
// an untitled window is being launched by looking for null objects in
|
||||
// this dictionary.
|
||||
// If this method is called with non-nil arguments then it is assumed
|
||||
// that the caller takes care of adding items to 'pidArguments' as
|
||||
// necessary (only some arguments are passed on connect, e.g. files to
|
||||
// open).
|
||||
if (!args)
|
||||
[pidArguments setObject:[NSNull null]
|
||||
forKey:[NSNumber numberWithInt:pid]];
|
||||
// NOTE: If there are no arguments to pass we still add a null object
|
||||
// so that we can use this dictionary to check if there are any
|
||||
// processes loading.
|
||||
NSNumber *pidKey = [NSNumber numberWithInt:pid];
|
||||
if (![pidArguments objectForKey:pidKey])
|
||||
[pidArguments setObject:[NSNull null] forKey:pidKey];
|
||||
} else {
|
||||
ASLogWarn(@"Failed to launch Vim process: args=%@, useLoginShell=%d",
|
||||
args, useLoginShell);
|
||||
@@ -1715,9 +1747,10 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
sr->unused2, sr->theDate);
|
||||
|
||||
if (sr->lineNum < 0) {
|
||||
// Should select a range of lines.
|
||||
// Should select a range of characters.
|
||||
range.location = sr->startRange + 1;
|
||||
range.length = sr->endRange - sr->startRange + 1;
|
||||
range.length = sr->endRange > sr->startRange
|
||||
? sr->endRange - sr->startRange : 1;
|
||||
} else {
|
||||
// Should only move cursor to a line.
|
||||
range.location = sr->lineNum + 1;
|
||||
@@ -2229,12 +2262,11 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
[vc passArguments:args];
|
||||
|
||||
// HACK! MacVim does not get activated if it is launched from the
|
||||
// terminal, so we forcibly activate here unless it is an untitled
|
||||
// window opening. Untitled windows are treated differently, else
|
||||
// MacVim would steal the focus if another app was activated while the
|
||||
// untitled window was loading.
|
||||
if (!args || args != [NSNull null])
|
||||
[self activateWhenNextWindowOpens];
|
||||
// terminal, so we forcibly activate here. Note that each process
|
||||
// launched from MacVim has an entry in the pidArguments dictionary,
|
||||
// which is how we detect if the process was launched from the
|
||||
// terminal.
|
||||
if (!args) [self activateWhenNextWindowOpens];
|
||||
|
||||
if (args)
|
||||
[pidArguments removeObjectForKey:pidKey];
|
||||
@@ -2296,11 +2328,12 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
NSRange r = NSRangeFromString(rangeString);
|
||||
[a addObject:@"-c"];
|
||||
if (r.length > 0) {
|
||||
// Select given range.
|
||||
[a addObject:[NSString stringWithFormat:@"norm %dGV%dGz.0",
|
||||
NSMaxRange(r), r.location]];
|
||||
// Select given range of characters.
|
||||
// TODO: This only works for encodings where 1 byte == 1 character
|
||||
[a addObject:[NSString stringWithFormat:@"norm %dgov%dgo",
|
||||
r.location, NSMaxRange(r)-1]];
|
||||
} else {
|
||||
// Position cursor on start of range.
|
||||
// Position cursor on line at start of range.
|
||||
[a addObject:[NSString stringWithFormat:@"norm %dGz.0",
|
||||
r.location]];
|
||||
}
|
||||
@@ -2357,18 +2390,70 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSScreen *)screenContainingPoint:(NSPoint)pt
|
||||
- (NSScreen *)screenContainingTopLeftPoint:(NSPoint)pt
|
||||
{
|
||||
// NOTE: The top left point has y-coordinate which lies one pixel above the
|
||||
// window which must be taken into consideration (this method used to be
|
||||
// called screenContainingPoint: but that method is "off by one" in
|
||||
// y-coordinate).
|
||||
|
||||
NSArray *screens = [NSScreen screens];
|
||||
NSUInteger i, count = [screens count];
|
||||
for (i = 0; i < count; ++i) {
|
||||
NSScreen *screen = [screens objectAtIndex:i];
|
||||
NSRect frame = [screen frame];
|
||||
if (NSPointInRect(pt, frame))
|
||||
if (pt.x >= frame.origin.x && pt.x < NSMaxX(frame)
|
||||
// NOTE: inequalities below are correct due to this being a top
|
||||
// left test (see comment above)
|
||||
&& pt.y > frame.origin.y && pt.y <= NSMaxY(frame))
|
||||
return screen;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)addInputSourceChangedObserver
|
||||
{
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
// The TIS symbols are weakly linked.
|
||||
if (NULL != TISCopyCurrentKeyboardInputSource) {
|
||||
// We get here when compiled on >=10.5 and running on >=10.5.
|
||||
|
||||
id nc = [NSDistributedNotificationCenter defaultCenter];
|
||||
NSString *notifyInputSourceChanged =
|
||||
(NSString *)kTISNotifySelectedKeyboardInputSourceChanged;
|
||||
[nc addObserver:self
|
||||
selector:@selector(inputSourceChanged:)
|
||||
name:notifyInputSourceChanged
|
||||
object:nil];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)removeInputSourceChangedObserver
|
||||
{
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
// The TIS symbols are weakly linked.
|
||||
if (NULL != TISCopyCurrentKeyboardInputSource) {
|
||||
// We get here when compiled on >=10.5 and running on >=10.5.
|
||||
|
||||
id nc = [NSDistributedNotificationCenter defaultCenter];
|
||||
[nc removeObserver:self];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
- (void)inputSourceChanged:(NSNotification *)notification
|
||||
{
|
||||
unsigned i, count = [vimControllers count];
|
||||
for (i = 0; i < count; ++i) {
|
||||
MMVimController *controller = [vimControllers objectAtIndex:i];
|
||||
MMWindowController *wc = [controller windowController];
|
||||
MMTextView *tv = (MMTextView *)[[wc vimView] textView];
|
||||
[tv checkImState];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@end // MMAppController (Private)
|
||||
|
||||
@@ -75,6 +75,7 @@ enum { MMMaxCellsPerChar = 2 };
|
||||
- (void)setAntialias:(BOOL)state;
|
||||
- (void)setImControl:(BOOL)enable;
|
||||
- (void)activateIm:(BOOL)enable;
|
||||
- (void)checkImState;
|
||||
- (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column;
|
||||
- (NSPoint)pointForRow:(int)row column:(int)col;
|
||||
- (NSRect)rectForRow:(int)row column:(int)col numRows:(int)nr
|
||||
|
||||
@@ -371,6 +371,11 @@ defaultLineHeightForFont(NSFont *font)
|
||||
[helper activateIm:enable];
|
||||
}
|
||||
|
||||
- (void)checkImState
|
||||
{
|
||||
[helper checkImState];
|
||||
}
|
||||
|
||||
- (BOOL)_wantsKeyDownForEvent:(id)event
|
||||
{
|
||||
// HACK! This is an undocumented method which is called from within
|
||||
|
||||
@@ -162,6 +162,8 @@ extern NSTimeInterval MMBalloonEvalInternalDelay;
|
||||
- (void)setLastToolTip:(NSString *)toolTip;
|
||||
#endif
|
||||
|
||||
- (void)addToMRU:(NSArray *)filenames;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
+38
-21
@@ -191,7 +191,7 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
- (void)startOdbEditWithArguments:(NSDictionary *)args;
|
||||
- (void)handleXcodeMod:(NSData *)data;
|
||||
- (void)handleOpenWithArguments:(NSDictionary *)args;
|
||||
- (BOOL)checkForModifiedBuffers;
|
||||
- (int)checkForModifiedBuffers;
|
||||
- (void)addInput:(NSString *)input;
|
||||
- (void)redrawScreen;
|
||||
- (void)handleFindReplace:(NSDictionary *)args;
|
||||
@@ -1182,12 +1182,10 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
|
||||
- (void)updateModifiedFlag
|
||||
{
|
||||
// Notify MacVim if _any_ buffer has changed from unmodified to modified or
|
||||
// vice versa.
|
||||
int msgid = [self checkForModifiedBuffers]
|
||||
? BuffersModifiedMsgID : BuffersNotModifiedMsgID;
|
||||
|
||||
[self queueMessage:msgid data:nil];
|
||||
int state = [self checkForModifiedBuffers];
|
||||
NSMutableData *data = [NSMutableData data];
|
||||
[data appendBytes:&state length:sizeof(int)];
|
||||
[self queueMessage:SetBuffersModifiedMsgID data:data];
|
||||
}
|
||||
|
||||
- (oneway void)processInput:(int)msgid data:(in bycopy NSData *)data
|
||||
@@ -1196,6 +1194,9 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
// This is a DO method which is called from inside MacVim to add new input
|
||||
// to this Vim process. It may get called when the run loop is updated.
|
||||
//
|
||||
// NOTE: DO NOT MODIFY VIM STATE IN THIS METHOD! (Adding data to input
|
||||
// buffers is OK however.)
|
||||
//
|
||||
// Add keyboard input to Vim's input buffer immediately. We have to do
|
||||
// this because in many places Vim polls the input buffer whilst waiting
|
||||
// for keyboard input (so Vim may lock up forever otherwise).
|
||||
@@ -1252,12 +1253,6 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
} else if (SetMarkedTextMsgID == msgid) {
|
||||
// NOTE: This message counts as keyboard input...
|
||||
[self handleMarkedText:data];
|
||||
} else if (ActivatedImMsgID == msgid) {
|
||||
// NOTE: This message counts as keyboard input...
|
||||
[self setImState:YES];
|
||||
} else if (DeactivatedImMsgID == msgid) {
|
||||
// NOTE: This message counts as keyboard input...
|
||||
[self setImState:NO];
|
||||
} else if (TerminateNowMsgID == msgid) {
|
||||
// Terminate immediately (the frontend is about to quit or this process
|
||||
// was aborted). Don't preserve modified files since the user would
|
||||
@@ -1657,6 +1652,9 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
- (void)setImState:(BOOL)activated
|
||||
{
|
||||
imState = activated;
|
||||
|
||||
gui_update_cursor(TRUE, FALSE);
|
||||
[self flushQueue:YES];
|
||||
}
|
||||
|
||||
static void netbeansReadCallback(CFSocketRef s,
|
||||
@@ -1714,6 +1712,12 @@ static void netbeansReadCallback(CFSocketRef s,
|
||||
}
|
||||
#endif
|
||||
|
||||
- (void)addToMRU:(NSArray *)filenames
|
||||
{
|
||||
[self queueMessage:AddToMRUMsgID properties:
|
||||
[NSDictionary dictionaryWithObject:filenames forKey:@"filenames"]];
|
||||
}
|
||||
|
||||
@end // MMBackend
|
||||
|
||||
|
||||
@@ -1818,6 +1822,8 @@ static void netbeansReadCallback(CFSocketRef s,
|
||||
nil];
|
||||
|
||||
// Put the state before all other messages.
|
||||
// TODO: If called multiple times the oldest state will be used! Should
|
||||
// remove any current Vim state messages from the queue first.
|
||||
int msgid = SetVimStateMsgID;
|
||||
[outputQueue insertObject:[vimState dictionaryAsData] atIndex:0];
|
||||
[outputQueue insertObject:[NSData dataWithBytes:&msgid length:sizeof(int)]
|
||||
@@ -2076,6 +2082,10 @@ static void netbeansReadCallback(CFSocketRef s,
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
|
||||
[self handleGesture:data];
|
||||
#endif
|
||||
} else if (ActivatedImMsgID == msgid) {
|
||||
[self setImState:YES];
|
||||
} else if (DeactivatedImMsgID == msgid) {
|
||||
[self setImState:NO];
|
||||
} else {
|
||||
ASLogWarn(@"Unknown message received (msgid=%d)", msgid);
|
||||
}
|
||||
@@ -2622,7 +2632,7 @@ static void netbeansReadCallback(CFSocketRef s,
|
||||
// filenames list of filenames
|
||||
// dontOpen don't open files specified in above argument
|
||||
// layout which layout to use to open files
|
||||
// selectionRange range of lines to select
|
||||
// selectionRange range of characters to select
|
||||
// searchText string to search for
|
||||
// cursorLine line to position the cursor on
|
||||
// cursorColumn column to position the cursor on
|
||||
@@ -2807,13 +2817,14 @@ static void netbeansReadCallback(CFSocketRef s,
|
||||
NSString *rangeString = [args objectForKey:@"selectionRange"];
|
||||
if (rangeString) {
|
||||
// Build a command line string that will select the given range of
|
||||
// lines. If range.length == 0, then position the cursor on the given
|
||||
// line but do not select.
|
||||
// characters. If range.length == 0, then position the cursor on the
|
||||
// line at start of range but do not select.
|
||||
NSRange range = NSRangeFromString(rangeString);
|
||||
NSString *cmd;
|
||||
if (range.length > 0) {
|
||||
cmd = [NSString stringWithFormat:@"<C-\\><C-N>%dGV%dGz.0",
|
||||
NSMaxRange(range), range.location];
|
||||
// TODO: This only works for encodings where 1 byte == 1 character
|
||||
cmd = [NSString stringWithFormat:@"<C-\\><C-N>%dgov%dgo",
|
||||
range.location, NSMaxRange(range)-1];
|
||||
} else {
|
||||
cmd = [NSString stringWithFormat:@"<C-\\><C-N>%dGz.0",
|
||||
range.location];
|
||||
@@ -2832,16 +2843,22 @@ static void netbeansReadCallback(CFSocketRef s,
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)checkForModifiedBuffers
|
||||
- (int)checkForModifiedBuffers
|
||||
{
|
||||
// Return 1 if current buffer is modified, -1 if other buffer is modified,
|
||||
// otherwise return 0.
|
||||
|
||||
if (curbuf && bufIsChanged(curbuf))
|
||||
return 1;
|
||||
|
||||
buf_T *buf;
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next) {
|
||||
if (bufIsChanged(buf)) {
|
||||
return YES;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (void)addInput:(NSString *)input
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
- (void)setAntialias:(BOOL)state;
|
||||
- (void)setImControl:(BOOL)enable;
|
||||
- (void)activateIm:(BOOL)enable;
|
||||
- (void)checkImState;
|
||||
- (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column;
|
||||
- (NSRect)rectForRow:(int)row column:(int)column numRows:(int)nr
|
||||
numColumns:(int)nc;
|
||||
|
||||
+20
-43
@@ -94,29 +94,17 @@ defaultLineHeightForFont(NSFont *font)
|
||||
}
|
||||
|
||||
static double
|
||||
defaultAdvanceForFont(CTFontRef fontRef)
|
||||
defaultAdvanceForFont(NSFont *font)
|
||||
{
|
||||
// We measure the default advance of a font as the advance of its glyph for
|
||||
// 'm'.
|
||||
double advance = 0.0;
|
||||
UniChar characters[] = { 'm' };
|
||||
int count = 1;
|
||||
CGGlyph glyphs[] = { 0 };
|
||||
// NOTE: Previously we used CTFontGetAdvancesForGlyphs() to get the advance
|
||||
// for 'm' but this sometimes returned advances that were too small making
|
||||
// the font spacing look too tight.
|
||||
// Instead use the same method to query the width of 'm' as MMTextStorage
|
||||
// uses to make things consistent across renderers.
|
||||
|
||||
if (CTFontGetGlyphsForCharacters(fontRef, characters, glyphs, count)) {
|
||||
advance = CTFontGetAdvancesForGlyphs(fontRef,
|
||||
kCTFontDefaultOrientation,
|
||||
glyphs,
|
||||
NULL,
|
||||
count);
|
||||
}
|
||||
|
||||
if (advance < 1.0) {
|
||||
ASLogWarn(@"Could not determine default advance for current font");
|
||||
advance = 10.0f;
|
||||
}
|
||||
|
||||
return advance;
|
||||
NSDictionary *a = [NSDictionary dictionaryWithObject:font
|
||||
forKey:NSFontAttributeName];
|
||||
return [@"m" sizeWithAttributes:a].width;
|
||||
}
|
||||
|
||||
@implementation MMCoreTextView
|
||||
@@ -274,34 +262,15 @@ defaultAdvanceForFont(CTFontRef fontRef)
|
||||
|
||||
- (void)setFont:(NSFont *)newFont
|
||||
{
|
||||
#if 0
|
||||
if (newFont && font != newFont) {
|
||||
[font release];
|
||||
font = [newFont retain];
|
||||
|
||||
float em = 7.0; //[newFont widthOfString:@"m"];
|
||||
float cellWidthMultiplier = [[NSUserDefaults standardUserDefaults]
|
||||
floatForKey:MMCellWidthMultiplierKey];
|
||||
|
||||
// NOTE! Even though NSFontFixedAdvanceAttribute is a float, it will
|
||||
// only render at integer sizes. Hence, we restrict the cell width to
|
||||
// an integer here, otherwise the window width and the actual text
|
||||
// width will not match.
|
||||
cellSize.width = ceilf(em * cellWidthMultiplier);
|
||||
cellSize.height = linespace + 15.0; //[newFont defaultLineHeightForFont];
|
||||
}
|
||||
#else
|
||||
if (!(newFont && font != newFont))
|
||||
return;
|
||||
|
||||
double em = round(defaultAdvanceForFont((CTFontRef)newFont));
|
||||
double em = round(defaultAdvanceForFont(newFont));
|
||||
double pt = round([newFont pointSize]);
|
||||
|
||||
NSDictionary *attr = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[newFont displayName], (NSString*)kCTFontNameAttribute,
|
||||
[NSNumber numberWithFloat:pt], (NSString*)kCTFontSizeAttribute,
|
||||
//[NSNumber numberWithFloat:em], (NSString*)kCTFontFixedAdvanceAttribute,
|
||||
nil];
|
||||
[NSNumber numberWithFloat:pt], (NSString*)kCTFontSizeAttribute, nil];
|
||||
CTFontDescriptorRef desc = CTFontDescriptorCreateWithAttributes(
|
||||
(CFDictionaryRef)attr);
|
||||
CTFontRef fontRef = CTFontCreateWithFontDescriptor(desc, pt, NULL);
|
||||
@@ -321,7 +290,6 @@ defaultAdvanceForFont(CTFontRef fontRef)
|
||||
cellSize.height = linespace + defaultLineHeightForFont(font);
|
||||
|
||||
fontDescent = ceil(CTFontGetDescent(fontRef));
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)setWideFont:(NSFont *)newFont
|
||||
@@ -403,6 +371,11 @@ defaultAdvanceForFont(CTFontRef fontRef)
|
||||
[helper activateIm:enable];
|
||||
}
|
||||
|
||||
- (void)checkImState
|
||||
{
|
||||
[helper checkImState];
|
||||
}
|
||||
|
||||
- (BOOL)_wantsKeyDownForEvent:(id)event
|
||||
{
|
||||
// HACK! This is an undocumented method which is called from within
|
||||
@@ -922,6 +895,10 @@ defaultAdvanceForFont(CTFontRef fontRef)
|
||||
// Convert UTF-8 chars to UTF-16
|
||||
CFStringRef sref = CFStringCreateWithBytesNoCopy(NULL, s, len,
|
||||
kCFStringEncodingUTF8, false, kCFAllocatorNull);
|
||||
if (sref == NULL) {
|
||||
ASLogWarn(@"Conversion error: some text may not be rendered");
|
||||
continue;
|
||||
}
|
||||
CFIndex unilength = CFStringGetLength(sref);
|
||||
const UniChar *unichars = CFStringGetCharactersPtr(sref);
|
||||
UniChar *buffer = NULL;
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
MMVimView *view;
|
||||
NSPoint oldPosition;
|
||||
NSString *oldTabBarStyle;
|
||||
int options;
|
||||
int state;
|
||||
|
||||
// These are only valid in fullscreen mode and store pre-fu vim size
|
||||
int nonFuRows, nonFuColumns;
|
||||
@@ -32,8 +34,8 @@
|
||||
|
||||
- (MMFullscreenWindow *)initWithWindow:(NSWindow *)t view:(MMVimView *)v
|
||||
backgroundColor:(NSColor *)back;
|
||||
|
||||
- (void)enterFullscreen:(int)fuoptions;
|
||||
- (void)setOptions:(int)opt;
|
||||
- (void)enterFullscreen;
|
||||
- (void)leaveFullscreen;
|
||||
- (void)centerView;
|
||||
|
||||
|
||||
+191
-69
@@ -37,11 +37,21 @@
|
||||
#define FUOPT_MAXHORZ 0x002
|
||||
#define FUOPT_BGCOLOR_HLGROUP 0x004
|
||||
|
||||
// Used for 'state' variable
|
||||
enum {
|
||||
BeforeFullScreen = 0,
|
||||
InFullScreen,
|
||||
LeftFullScreen
|
||||
};
|
||||
|
||||
|
||||
@interface MMFullscreenWindow (Private)
|
||||
- (BOOL)isOnPrimaryScreen;
|
||||
- (void)handleWindowDidBecomeMainNotification:(NSNotification *)notification;
|
||||
- (void)handleWindowDidResignMainNotification:(NSNotification *)notification;
|
||||
- (void)windowDidBecomeMain:(NSNotification *)notification;
|
||||
- (void)windowDidResignMain:(NSNotification *)notification;
|
||||
- (void)windowDidMove:(NSNotification *)notification;
|
||||
- (void)applicationDidChangeScreenParameters:(NSNotification *)notification;
|
||||
- (void)resizeVimView;
|
||||
@end
|
||||
|
||||
@implementation MMFullscreenWindow
|
||||
@@ -77,18 +87,27 @@
|
||||
[self setBackgroundColor:back];
|
||||
[self setReleasedWhenClosed:NO];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(handleWindowDidBecomeMainNotification:)
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
[nc addObserver:self
|
||||
selector:@selector(windowDidBecomeMain:)
|
||||
name:NSWindowDidBecomeMainNotification
|
||||
object:self];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(handleWindowDidResignMainNotification:)
|
||||
[nc addObserver:self
|
||||
selector:@selector(windowDidResignMain:)
|
||||
name:NSWindowDidResignMainNotification
|
||||
object:self];
|
||||
|
||||
[nc addObserver:self
|
||||
selector:@selector(windowDidMove:)
|
||||
name:NSWindowDidMoveNotification
|
||||
object:self];
|
||||
|
||||
[nc addObserver:self
|
||||
selector:@selector(applicationDidChangeScreenParameters:)
|
||||
name:NSApplicationDidChangeScreenParametersNotification
|
||||
object:NSApp];
|
||||
|
||||
// NOTE: Vim needs to process mouse moved events, so enable them here.
|
||||
[self setAcceptsMouseMovedEvents:YES];
|
||||
|
||||
@@ -107,8 +126,20 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)enterFullscreen:(int)fuoptions
|
||||
- (void)setOptions:(int)opt
|
||||
{
|
||||
options = opt;
|
||||
}
|
||||
|
||||
- (void)enterFullscreen
|
||||
{
|
||||
ASLogDebug(@"Enter full screen now");
|
||||
|
||||
// Hide Dock and menu bar now to avoid the hide animation from playing
|
||||
// after the fade to black (see also windowDidBecomeMain:).
|
||||
if ([self isOnPrimaryScreen])
|
||||
SetSystemUIMode(kUIModeAllSuppressed, 0);
|
||||
|
||||
// fade to black
|
||||
Boolean didBlend = NO;
|
||||
CGDisplayFadeReservationToken token;
|
||||
@@ -117,7 +148,11 @@
|
||||
kCGDisplayBlendSolidColor, .0, .0, .0, true);
|
||||
didBlend = YES;
|
||||
}
|
||||
|
||||
|
||||
// NOTE: The window may have moved to another screen in between init.. and
|
||||
// this call so set the frame again just in case.
|
||||
[self setFrame:[[target screen] frame] display:NO];
|
||||
|
||||
// fool delegate
|
||||
id delegate = [target delegate];
|
||||
[target setDelegate:nil];
|
||||
@@ -137,84 +172,55 @@
|
||||
|
||||
// NOTE: Calling setTitle:nil causes an exception to be raised (and it is
|
||||
// possible that 'target' has no title when we get here).
|
||||
if ([target title])
|
||||
if ([target title]) {
|
||||
[self setTitle:[target title]];
|
||||
|
||||
// NOTE: Cocoa does not add borderless windows to the "Window" menu so
|
||||
// we have to do it manually.
|
||||
[NSApp changeWindowsItem:self title:[target title] filename:NO];
|
||||
}
|
||||
|
||||
[self setOpaque:[target isOpaque]];
|
||||
|
||||
// don't set this sooner, so we don't get an additional
|
||||
// focus gained message
|
||||
[self setDelegate:delegate];
|
||||
|
||||
// resize vim view according to fuoptions
|
||||
int currRows, currColumns;
|
||||
[[view textView] getMaxRows:&currRows columns:&currColumns];
|
||||
// Store view dimension used before entering full screen, then resize the
|
||||
// view to match 'fuopt'.
|
||||
[[view textView] getMaxRows:&nonFuRows columns:&nonFuColumns];
|
||||
[self resizeVimView];
|
||||
|
||||
int fuRows = currRows, fuColumns = currColumns;
|
||||
// Store options used when entering full screen so that we can restore
|
||||
// dimensions when exiting full screen.
|
||||
startFuFlags = options;
|
||||
|
||||
// NOTE: Do not use [NSScreen visibleFrame] when determining the screen
|
||||
// size since it compensates for menu and dock.
|
||||
int maxRows, maxColumns;
|
||||
NSSize size = [[self screen] frame].size;
|
||||
[view constrainRows:&maxRows columns:&maxColumns toSize:size];
|
||||
|
||||
// Store current pre-fu vim size
|
||||
nonFuRows = currRows;
|
||||
nonFuColumns = currColumns;
|
||||
|
||||
// Compute current fu size
|
||||
if (fuoptions & FUOPT_MAXVERT)
|
||||
fuRows = maxRows;
|
||||
if (fuoptions & FUOPT_MAXHORZ)
|
||||
fuColumns = maxColumns;
|
||||
|
||||
startFuFlags = fuoptions;
|
||||
|
||||
// if necessary, resize vim to target fu size
|
||||
if (currRows != fuRows || currColumns != fuColumns) {
|
||||
|
||||
// The size sent here is queued and sent to vim when it's in
|
||||
// event processing mode again. Make sure to only send the values we
|
||||
// care about, as they override any changes that were made to 'lines'
|
||||
// and 'columns' after 'fu' was set but before the event loop is run.
|
||||
NSData *data = nil;
|
||||
int msgid = 0;
|
||||
if (currRows != fuRows && currColumns != fuColumns) {
|
||||
int newSize[2] = { fuRows, fuColumns };
|
||||
data = [NSData dataWithBytes:newSize length:2*sizeof(int)];
|
||||
msgid = SetTextDimensionsMsgID;
|
||||
} else if (currRows != fuRows) {
|
||||
data = [NSData dataWithBytes:&fuRows length:sizeof(int)];
|
||||
msgid = SetTextRowsMsgID;
|
||||
} else if (currColumns != fuColumns) {
|
||||
data = [NSData dataWithBytes:&fuColumns length:sizeof(int)];
|
||||
msgid = SetTextColumnsMsgID;
|
||||
}
|
||||
NSParameterAssert(data != nil && msgid != 0);
|
||||
|
||||
MMVimController *vimController =
|
||||
[[self windowController] vimController];
|
||||
|
||||
[vimController sendMessage:msgid data:data];
|
||||
[[view textView] setMaxRows:fuRows columns:fuColumns];
|
||||
}
|
||||
|
||||
startFuRows = fuRows;
|
||||
startFuColumns = fuColumns;
|
||||
|
||||
// move vim view to the window's center
|
||||
[self centerView];
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
// HACK! Put window on all Spaces to avoid Spaces (available on OS X 10.5
|
||||
// and later) from moving the full screen window to a separate Space from
|
||||
// the one the decorated window is occupying. The collection behavior is
|
||||
// restored further down.
|
||||
NSWindowCollectionBehavior wcb = [self collectionBehavior];
|
||||
[self setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
|
||||
#endif
|
||||
|
||||
// make us visible and target invisible
|
||||
[target orderOut:self];
|
||||
[self makeKeyAndOrderFront:self];
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
// Restore collection behavior (see hack above).
|
||||
[self setCollectionBehavior:wcb];
|
||||
#endif
|
||||
|
||||
// fade back in
|
||||
if (didBlend) {
|
||||
CGDisplayFade(token, .25, kCGDisplayBlendSolidColor,
|
||||
kCGDisplayBlendNormal, .0, .0, .0, false);
|
||||
CGReleaseDisplayFadeReservation(token);
|
||||
}
|
||||
|
||||
state = InFullScreen;
|
||||
}
|
||||
|
||||
- (void)leaveFullscreen
|
||||
@@ -281,8 +287,23 @@
|
||||
// button on the tabline steals the first responder status.
|
||||
[target setInitialFirstResponder:[view textView]];
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
// HACK! Put decorated window on all Spaces (available on OS X 10.5 and
|
||||
// later) so that the decorated window stays on the same Space as the full
|
||||
// screen window (they may occupy different Spaces e.g. if the full screen
|
||||
// window was dragged to another Space). The collection behavior is
|
||||
// restored further down.
|
||||
NSWindowCollectionBehavior wcb = [target collectionBehavior];
|
||||
[target setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
|
||||
#endif
|
||||
|
||||
[target makeKeyAndOrderFront:self];
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
// Restore collection behavior (see hack above).
|
||||
[target setCollectionBehavior:wcb];
|
||||
#endif
|
||||
|
||||
// ...but we don't want a focus gained message either, so don't set this
|
||||
// sooner
|
||||
[target setDelegate:delegate];
|
||||
@@ -295,6 +316,9 @@
|
||||
}
|
||||
|
||||
[self autorelease]; // Balance the above retain
|
||||
|
||||
state = LeftFullScreen;
|
||||
ASLogDebug(@"Left full screen");
|
||||
}
|
||||
|
||||
// Title-less windows normally don't receive key presses, override this
|
||||
@@ -365,7 +389,7 @@
|
||||
return [self screen] == [screens objectAtIndex:0];
|
||||
}
|
||||
|
||||
- (void)handleWindowDidBecomeMainNotification:(NSNotification *)notification
|
||||
- (void)windowDidBecomeMain:(NSNotification *)notification
|
||||
{
|
||||
// Hide menu and dock, both appear on demand.
|
||||
//
|
||||
@@ -383,7 +407,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleWindowDidResignMainNotification:(NSNotification *)notification
|
||||
- (void)windowDidResignMain:(NSNotification *)notification
|
||||
{
|
||||
// order menu and dock back in
|
||||
if ([self isOnPrimaryScreen]) {
|
||||
@@ -391,4 +415,102 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidMove:(NSNotification *)notification
|
||||
{
|
||||
if (state != InFullScreen)
|
||||
return;
|
||||
|
||||
// Window may move as a result of being dragged between Spaces.
|
||||
ASLogDebug(@"Full screen window moved, ensuring it covers the screen...");
|
||||
|
||||
// Ensure the full screen window is still covering the entire screen and
|
||||
// then resize view according to 'fuopt'.
|
||||
[self setFrame:[[self screen] frame] display:NO];
|
||||
[self resizeVimView];
|
||||
}
|
||||
|
||||
- (void)applicationDidChangeScreenParameters:(NSNotification *)notification
|
||||
{
|
||||
if (state != InFullScreen)
|
||||
return;
|
||||
|
||||
// This notification is sent when screen resolution may have changed (e.g.
|
||||
// due to a monitor being unplugged or the resolution being changed
|
||||
// manually) but it also seems to get called when the Dock is
|
||||
// hidden/displayed.
|
||||
ASLogDebug(@"Screen unplugged / resolution changed");
|
||||
|
||||
NSScreen *screen = [target screen];
|
||||
if (!screen) {
|
||||
// Paranoia: if window we originally used for full screen is gone, try
|
||||
// screen window is on now, and failing that (not sure this can happen)
|
||||
// use main screen.
|
||||
screen = [self screen];
|
||||
if (!screen)
|
||||
screen = [NSScreen mainScreen];
|
||||
}
|
||||
|
||||
// Ensure the full screen window is still covering the entire screen and
|
||||
// then resize view according to 'fuopt'.
|
||||
[self setFrame:[screen frame] display:NO];
|
||||
[self resizeVimView];
|
||||
}
|
||||
|
||||
- (void)resizeVimView
|
||||
{
|
||||
// Resize vim view according to options
|
||||
int currRows, currColumns;
|
||||
[[view textView] getMaxRows:&currRows columns:&currColumns];
|
||||
|
||||
int fuRows = currRows, fuColumns = currColumns;
|
||||
|
||||
// NOTE: Do not use [NSScreen visibleFrame] when determining the screen
|
||||
// size since it compensates for menu and dock.
|
||||
int maxRows, maxColumns;
|
||||
NSSize size = [[self screen] frame].size;
|
||||
[view constrainRows:&maxRows columns:&maxColumns toSize:size];
|
||||
|
||||
// Compute current fu size
|
||||
if (options & FUOPT_MAXVERT)
|
||||
fuRows = maxRows;
|
||||
if (options & FUOPT_MAXHORZ)
|
||||
fuColumns = maxColumns;
|
||||
|
||||
// if necessary, resize vim to target fu size
|
||||
if (currRows != fuRows || currColumns != fuColumns) {
|
||||
// The size sent here is queued and sent to vim when it's in
|
||||
// event processing mode again. Make sure to only send the values we
|
||||
// care about, as they override any changes that were made to 'lines'
|
||||
// and 'columns' after 'fu' was set but before the event loop is run.
|
||||
NSData *data = nil;
|
||||
int msgid = 0;
|
||||
if (currRows != fuRows && currColumns != fuColumns) {
|
||||
int newSize[2] = { fuRows, fuColumns };
|
||||
data = [NSData dataWithBytes:newSize length:2*sizeof(int)];
|
||||
msgid = SetTextDimensionsMsgID;
|
||||
} else if (currRows != fuRows) {
|
||||
data = [NSData dataWithBytes:&fuRows length:sizeof(int)];
|
||||
msgid = SetTextRowsMsgID;
|
||||
} else if (currColumns != fuColumns) {
|
||||
data = [NSData dataWithBytes:&fuColumns length:sizeof(int)];
|
||||
msgid = SetTextColumnsMsgID;
|
||||
}
|
||||
NSParameterAssert(data != nil && msgid != 0);
|
||||
|
||||
MMVimController *vc = [[self windowController] vimController];
|
||||
[vc sendMessage:msgid data:data];
|
||||
[[view textView] setMaxRows:fuRows columns:fuColumns];
|
||||
}
|
||||
|
||||
// The new view dimensions are stored and then consulted when attempting to
|
||||
// restore the windowed view dimensions when leaving full screen.
|
||||
// NOTE: Store them here and not only in enterFullscreen, otherwise the
|
||||
// windowed view dimensions will not be restored if the full screen was on
|
||||
// a screen that later was unplugged.
|
||||
startFuRows = fuRows;
|
||||
startFuColumns = fuColumns;
|
||||
|
||||
[self centerView];
|
||||
}
|
||||
|
||||
@end // MMFullscreenWindow (Private)
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
- (void)setAntialias:(BOOL)antialias;
|
||||
- (void)setImControl:(BOOL)enable;
|
||||
- (void)activateIm:(BOOL)enable;
|
||||
- (void)checkImState;
|
||||
|
||||
//
|
||||
// MMTextStorage methods
|
||||
|
||||
@@ -317,6 +317,11 @@
|
||||
[helper activateIm:enable];
|
||||
}
|
||||
|
||||
- (void)checkImState
|
||||
{
|
||||
[helper checkImState];
|
||||
}
|
||||
|
||||
- (NSFont *)font
|
||||
{
|
||||
return [(MMTextStorage*)[self textStorage] font];
|
||||
|
||||
@@ -103,5 +103,8 @@ enum {
|
||||
- (void)setImControl:(BOOL)enable;
|
||||
- (void)activateIm:(BOOL)enable;
|
||||
- (BOOL)useInlineIm;
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
- (void)checkImState;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@@ -36,7 +36,7 @@ static float MMDragAreaSize = 73.0f;
|
||||
- (MMVimController *)vimController;
|
||||
- (void)doKeyDown:(NSString *)key;
|
||||
- (void)doInsertText:(NSString *)text;
|
||||
- (void)checkImState;
|
||||
- (void)pollImState;
|
||||
- (void)hideMouseCursor;
|
||||
- (void)startDragTimerWithInterval:(NSTimeInterval)t;
|
||||
- (void)dragTimerFired:(NSTimer *)timer;
|
||||
@@ -129,11 +129,19 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
{
|
||||
ASLogDebug(@"%@", event);
|
||||
|
||||
// NOTE: Check IM state _before_ key has been interpreted or we'll pick up
|
||||
// the old IM state when it has been switched via a keyboard shortcut that
|
||||
// MacVim cannot handle.
|
||||
if (imControl)
|
||||
[self checkImState];
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
if (NULL == TISCopyCurrentKeyboardInputSource) {
|
||||
#endif
|
||||
|
||||
// NOTE: Check IM state _before_ key has been interpreted or we'll pick
|
||||
// up the old IM state when it has been switched via a keyboard shortcut
|
||||
// that MacVim cannot handle.
|
||||
if (imControl)
|
||||
[self pollImState];
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
}
|
||||
#endif
|
||||
|
||||
// NOTE: Keyboard handling is complicated by the fact that we must call
|
||||
// interpretKeyEvents: otherwise key equivalents set up by input methods do
|
||||
@@ -851,6 +859,34 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
#endif // INCLUDE_OLD_IM_CODE
|
||||
}
|
||||
|
||||
- (void)checkImState
|
||||
{
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
if (imControl && NULL != TISCopyCurrentKeyboardInputSource) {
|
||||
// We get here when compiled on >=10.5 and running on >=10.5.
|
||||
TISInputSourceRef cur = TISCopyCurrentKeyboardInputSource();
|
||||
BOOL state = !KeyboardInputSourcesEqual(asciiImSource, cur);
|
||||
BOOL isChanged = !KeyboardInputSourcesEqual(lastImSource, cur);
|
||||
if (state && isChanged) {
|
||||
// Remember current input source so we can switch back to it
|
||||
// when IM is once more enabled.
|
||||
ASLogDebug(@"Remember last input source: %@",
|
||||
TISGetInputSourceProperty(cur, kTISPropertyInputSourceID));
|
||||
if (lastImSource) CFRelease(lastImSource);
|
||||
lastImSource = cur;
|
||||
} else {
|
||||
CFRelease(cur);
|
||||
}
|
||||
if (imState != state) {
|
||||
imState = state;
|
||||
int msgid = state ? ActivatedImMsgID : DeactivatedImMsgID;
|
||||
[[self vimController] sendMessage:msgid data:nil];
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@end // MMTextViewHelper
|
||||
|
||||
|
||||
@@ -936,32 +972,8 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
[[self vimController] sendMessage:KeyDownMsgID data:data];
|
||||
}
|
||||
|
||||
- (void)checkImState
|
||||
- (void)pollImState
|
||||
{
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
if (NULL != TISCopyCurrentKeyboardInputSource) {
|
||||
// We get here when compiled on >=10.5 and running on >=10.5.
|
||||
TISInputSourceRef cur = TISCopyCurrentKeyboardInputSource();
|
||||
BOOL state = !KeyboardInputSourcesEqual(asciiImSource, cur);
|
||||
BOOL isChanged = !KeyboardInputSourcesEqual(lastImSource, cur);
|
||||
if (state && isChanged) {
|
||||
// Remember current input source so we can switch back to it
|
||||
// when IM is once more enabled.
|
||||
ASLogDebug(@"Remember last input source: %@",
|
||||
TISGetInputSourceProperty(cur, kTISPropertyInputSourceID));
|
||||
if (lastImSource) CFRelease(lastImSource);
|
||||
lastImSource = cur;
|
||||
} else {
|
||||
CFRelease(cur);
|
||||
}
|
||||
if (imState != state) {
|
||||
imState = state;
|
||||
int msgid = state ? ActivatedImMsgID : DeactivatedImMsgID;
|
||||
[[self vimController] sendMessage:msgid data:nil];
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5)
|
||||
// Compiled for <=10.4, running on 10.4
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
NSDictionary *vimState;
|
||||
BOOL isPreloading;
|
||||
NSDate *creationDate;
|
||||
BOOL hasModifiedBuffer;
|
||||
}
|
||||
|
||||
- (id)initWithBackend:(id)backend pid:(int)processIdentifier;
|
||||
@@ -48,6 +49,7 @@
|
||||
- (NSMenu *)mainMenu;
|
||||
- (BOOL)isPreloading;
|
||||
- (void)setIsPreloading:(BOOL)yn;
|
||||
- (BOOL)hasModifiedBuffer;
|
||||
- (NSDate *)creationDate;
|
||||
- (void)cleanup;
|
||||
- (void)dropFiles:(NSArray *)filenames forceOpen:(BOOL)force;
|
||||
|
||||
@@ -220,6 +220,11 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
isPreloading = yn;
|
||||
}
|
||||
|
||||
- (BOOL)hasModifiedBuffer
|
||||
{
|
||||
return hasModifiedBuffer;
|
||||
}
|
||||
|
||||
- (NSDate *)creationDate
|
||||
{
|
||||
return creationDate;
|
||||
@@ -266,6 +271,10 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
nil];
|
||||
|
||||
[self sendMessage:DropFilesMsgID data:[args dictionaryAsData]];
|
||||
|
||||
// Add dropped files to the "Recent Files" menu.
|
||||
[[NSDocumentController sharedDocumentController]
|
||||
noteNewRecentFilePaths:filenames];
|
||||
}
|
||||
|
||||
- (void)file:(NSString *)filename draggedToTabAtIndex:(NSUInteger)tabIndex
|
||||
@@ -765,10 +774,21 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
[windowController enterFullscreen:fuoptions backgroundColor:back];
|
||||
} else if (LeaveFullscreenMsgID == msgid) {
|
||||
[windowController leaveFullscreen];
|
||||
} else if (BuffersNotModifiedMsgID == msgid) {
|
||||
[windowController setBuffersModified:NO];
|
||||
} else if (BuffersModifiedMsgID == msgid) {
|
||||
[windowController setBuffersModified:YES];
|
||||
} else if (SetBuffersModifiedMsgID == msgid) {
|
||||
const void *bytes = [data bytes];
|
||||
// state < 0 <-> some buffer modified
|
||||
// state > 0 <-> current buffer modified
|
||||
int state = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
// NOTE: The window controller tracks whether current buffer is
|
||||
// modified or not (and greys out the proxy icon as well as putting a
|
||||
// dot in the red "close button" if necessary). The Vim controller
|
||||
// tracks whether any buffer has been modified (used to decide whether
|
||||
// to show a warning or not when quitting).
|
||||
//
|
||||
// TODO: Make 'hasModifiedBuffer' part of the Vim state?
|
||||
[windowController setBufferModified:(state > 0)];
|
||||
hasModifiedBuffer = (state != 0);
|
||||
} else if (SetPreEditPositionMsgID == msgid) {
|
||||
const int *dim = (const int*)[data bytes];
|
||||
[[[windowController vimView] textView] setPreEditRow:dim[0]
|
||||
@@ -845,6 +865,12 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
NSNumber *delay = dict ? [dict objectForKey:@"delay"] : nil;
|
||||
if (delay)
|
||||
[self setToolTipDelay:[delay floatValue]];
|
||||
} else if (AddToMRUMsgID == msgid) {
|
||||
NSDictionary *dict = [NSDictionary dictionaryWithData:data];
|
||||
NSArray *filenames = dict ? [dict objectForKey:@"filenames"] : nil;
|
||||
if (filenames)
|
||||
[[NSDocumentController sharedDocumentController]
|
||||
noteNewRecentFilePaths:filenames];
|
||||
|
||||
// IMPORTANT: When adding a new message, make sure to update
|
||||
// isUnsafeMessage() if necessary!
|
||||
@@ -881,7 +907,7 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
// are opened/saved from a :browse command are added to this menu).
|
||||
if (path)
|
||||
[[NSDocumentController sharedDocumentController]
|
||||
noteNewRecentFilePath:path];
|
||||
noteNewRecentFilePath:path];
|
||||
}
|
||||
@catch (NSException *ex) {
|
||||
ASLogDebug(@"Exception: pid=%d id=%d reason=%@", pid, identifier, ex);
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
MMVimController *vimController;
|
||||
MMVimView *vimView;
|
||||
BOOL setupDone;
|
||||
BOOL windowPresented;
|
||||
BOOL shouldResizeVimView;
|
||||
BOOL shouldRestoreUserTopLeft;
|
||||
int updateToolbarFlag;
|
||||
@@ -78,7 +79,7 @@
|
||||
- (void)leaveFullscreen;
|
||||
- (void)setFullscreenBackgroundColor:(NSColor *)back;
|
||||
|
||||
- (void)setBuffersModified:(BOOL)mod;
|
||||
- (void)setBufferModified:(BOOL)mod;
|
||||
- (void)setTopLeft:(NSPoint)pt;
|
||||
- (BOOL)getDefaultTopLeft:(NSPoint*)pt;
|
||||
|
||||
|
||||
@@ -253,26 +253,43 @@
|
||||
{
|
||||
// Indicates that the window is ready to be displayed, but do not display
|
||||
// (or place) it yet -- that is done in showWindow.
|
||||
//
|
||||
// TODO: Remove this method? Everything can probably be done in
|
||||
// presentWindow: but must carefully check dependencies on 'setupDone'
|
||||
// flag.
|
||||
|
||||
[self addNewTabViewItem];
|
||||
|
||||
setupDone = YES;
|
||||
|
||||
[self updateResizeConstraints];
|
||||
[self resizeWindowToFitContentSize:[vimView desiredSize]
|
||||
keepOnScreen:YES];
|
||||
}
|
||||
|
||||
- (BOOL)presentWindow:(id)unused
|
||||
{
|
||||
// Actually show the window on screen. However, if openWindow hasn't
|
||||
// already been called nothing will happen (the window will be displayed
|
||||
// later).
|
||||
// If openWindow hasn't already been called then the window will be
|
||||
// displayed later.
|
||||
if (!setupDone) return NO;
|
||||
|
||||
// Place the window now. If there are multiple screens then a choice is
|
||||
// made as to which screen the window should be on. This means that all
|
||||
// code that is executed before this point must not depend on the screen!
|
||||
|
||||
[[MMAppController sharedInstance] windowControllerWillOpen:self];
|
||||
[self updateResizeConstraints];
|
||||
[self resizeWindowToFitContentSize:[vimView desiredSize]
|
||||
keepOnScreen:YES];
|
||||
[[self window] makeKeyAndOrderFront:self];
|
||||
|
||||
// Flag that the window is now placed on screen. From now on it is OK for
|
||||
// code to depend on the screen state. (Such as constraining views etc.)
|
||||
windowPresented = YES;
|
||||
|
||||
if (fullscreenWindow) {
|
||||
// Delayed entering of full screen happens here (a ":set fu" in a
|
||||
// GUIEnter auto command could cause this).
|
||||
[fullscreenWindow enterFullscreen];
|
||||
fullscreenEnabled = YES;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@@ -289,8 +306,8 @@
|
||||
- (void)setTextDimensionsWithRows:(int)rows columns:(int)cols isLive:(BOOL)live
|
||||
keepOnScreen:(BOOL)onScreen
|
||||
{
|
||||
//ASLogDebug(@"setTextDimensionsWithRows:%d columns:%d isLive:%d "
|
||||
// "keepOnScreen:%d", rows, cols, live, onScreen);
|
||||
ASLogDebug(@"setTextDimensionsWithRows:%d columns:%d isLive:%d "
|
||||
"keepOnScreen:%d", rows, cols, live, onScreen);
|
||||
|
||||
// NOTE: The only place where the (rows,columns) of the vim view are
|
||||
// modified is here and when entering/leaving full-screen. Setting these
|
||||
@@ -343,8 +360,17 @@
|
||||
|
||||
- (void)setTitle:(NSString *)title
|
||||
{
|
||||
if (title)
|
||||
[decoratedWindow setTitle:title];
|
||||
if (!title)
|
||||
return;
|
||||
|
||||
[decoratedWindow setTitle:title];
|
||||
if (fullscreenEnabled) {
|
||||
[fullscreenWindow setTitle:title];
|
||||
|
||||
// NOTE: Cocoa does not update the "Window" menu for borderless windows
|
||||
// so we have to do it manually.
|
||||
[NSApp changeWindowsItem:fullscreenWindow title:title filename:NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setDocumentFilename:(NSString *)filename
|
||||
@@ -449,7 +475,10 @@
|
||||
if (updateToolbarFlag != 0)
|
||||
[self updateToolbar];
|
||||
|
||||
if (shouldResizeVimView) {
|
||||
// NOTE: If the window has not been presented then we must avoid resizing
|
||||
// the views since it will cause them to be constrained to the screen which
|
||||
// has not yet been set!
|
||||
if (windowPresented && shouldResizeVimView) {
|
||||
shouldResizeVimView = NO;
|
||||
|
||||
NSSize originalSize = [vimView frame].size;
|
||||
@@ -607,17 +636,28 @@
|
||||
{
|
||||
if (fullscreenEnabled) return;
|
||||
|
||||
// fullscreenWindow could be nil here if this is called multiple times
|
||||
// during startup.
|
||||
[fullscreenWindow release];
|
||||
|
||||
fullscreenWindow = [[MMFullscreenWindow alloc]
|
||||
initWithWindow:decoratedWindow view:vimView backgroundColor:back];
|
||||
[fullscreenWindow enterFullscreen:fuoptions];
|
||||
[fullscreenWindow setDelegate:self];
|
||||
initWithWindow:decoratedWindow view:vimView backgroundColor:back];
|
||||
[fullscreenWindow setOptions:fuoptions];
|
||||
[fullscreenWindow setRepresentedFilename:
|
||||
[decoratedWindow representedFilename]];
|
||||
fullscreenEnabled = YES;
|
||||
|
||||
// The resize handle disappears so the vim view needs to update the
|
||||
// scrollbars.
|
||||
shouldResizeVimView = YES;
|
||||
// NOTE: Do not enter full screen until the window has been presented since
|
||||
// we don't actually know which screen to use before then.
|
||||
if (windowPresented) {
|
||||
[fullscreenWindow enterFullscreen];
|
||||
fullscreenEnabled = YES;
|
||||
|
||||
// The resize handle disappears so the vim view needs to update the
|
||||
// scrollbars.
|
||||
shouldResizeVimView = YES;
|
||||
} else {
|
||||
ASLogDebug(@"Delay enter full screen");
|
||||
}
|
||||
}
|
||||
|
||||
- (void)leaveFullscreen
|
||||
@@ -635,11 +675,11 @@
|
||||
|
||||
- (void)setFullscreenBackgroundColor:(NSColor *)back
|
||||
{
|
||||
if (fullscreenEnabled)
|
||||
if (fullscreenWindow)
|
||||
[fullscreenWindow setBackgroundColor:back];
|
||||
}
|
||||
|
||||
- (void)setBuffersModified:(BOOL)mod
|
||||
- (void)setBufferModified:(BOOL)mod
|
||||
{
|
||||
// NOTE: We only set the document edited flag on the decorated window since
|
||||
// the full-screen window has no close button anyway. (It also saves us
|
||||
@@ -815,11 +855,10 @@
|
||||
return;
|
||||
|
||||
if (fullscreenEnabled) {
|
||||
// HACK! The full-screen is not supposed to be able to be moved. If we
|
||||
// NOTE: The full-screen is not supposed to be able to be moved. If we
|
||||
// do get here while in full-screen something unexpected happened (e.g.
|
||||
// the full-screen window was on an external display that got
|
||||
// unplugged) and we handle this situation by leaving full-screen.
|
||||
[self leaveFullscreen];
|
||||
// unplugged).
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -158,8 +158,7 @@ enum {
|
||||
SetServerNameMsgID,
|
||||
EnterFullscreenMsgID,
|
||||
LeaveFullscreenMsgID,
|
||||
BuffersNotModifiedMsgID,
|
||||
BuffersModifiedMsgID,
|
||||
SetBuffersModifiedMsgID,
|
||||
AddInputMsgID,
|
||||
SetPreEditPositionMsgID,
|
||||
TerminateNowMsgID,
|
||||
@@ -189,6 +188,7 @@ enum {
|
||||
SetTooltipMsgID,
|
||||
SetTooltipDelayMsgID,
|
||||
GestureMsgID,
|
||||
AddToMRUMsgID,
|
||||
LastMsgID // NOTE: MUST BE LAST MESSAGE IN ENUM!
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -68,8 +68,7 @@ char *MessageStrings[] =
|
||||
"SetServerNameMsgID",
|
||||
"EnterFullscreenMsgID",
|
||||
"LeaveFullscreenMsgID",
|
||||
"BuffersNotModifiedMsgID",
|
||||
"BuffersModifiedMsgID",
|
||||
"SetBuffersModifiedMsgID",
|
||||
"AddInputMsgID",
|
||||
"SetPreEditPositionMsgID",
|
||||
"TerminateNowMsgID",
|
||||
@@ -99,6 +98,7 @@ char *MessageStrings[] =
|
||||
"SetTooltipMsgID",
|
||||
"SetTooltipDelayMsgID",
|
||||
"GestureMsgID",
|
||||
"AddToMRUMsgID",
|
||||
"END OF MESSAGE IDs" // NOTE: Must be last!
|
||||
};
|
||||
|
||||
|
||||
@@ -447,6 +447,7 @@
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MacVim" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
@@ -621,7 +622,7 @@
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 55;
|
||||
CURRENT_PROJECT_VERSION = 57;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
|
||||
@@ -651,7 +652,7 @@
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 55;
|
||||
CURRENT_PROJECT_VERSION = 57;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
|
||||
|
||||
@@ -52,6 +52,7 @@ extern NSString *MMLastWindowClosedBehaviorKey;
|
||||
#ifdef INCLUDE_OLD_IM_CODE
|
||||
extern NSString *MMUseInlineImKey;
|
||||
#endif // INCLUDE_OLD_IM_CODE
|
||||
extern NSString *MMSuppressTerminationAlertKey;
|
||||
|
||||
|
||||
// Enum for MMUntitledWindowKey
|
||||
|
||||
@@ -44,6 +44,7 @@ NSString *MMLastWindowClosedBehaviorKey = @"MMLastWindowClosedBehavior";
|
||||
#ifdef INCLUDE_OLD_IM_CODE
|
||||
NSString *MMUseInlineImKey = @"MMUseInlineIm";
|
||||
#endif // INCLUDE_OLD_IM_CODE
|
||||
NSString *MMSuppressTerminationAlertKey = @"MMSuppressTerminationAlert";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
MacVim is a port of the text editor Vim to Mac OS X. More information can be
|
||||
found on the [project webpage][gcode]. The file `src/MacVim/README` gives an
|
||||
overview of the MacVim source code.
|
||||
|
||||
|
||||
### Branches ###
|
||||
|
||||
`master`
|
||||
: MacVim and core Vim sources
|
||||
`vim`
|
||||
: Core Vim sources pulled from the SVN repository with the latest runtime
|
||||
: files from the Vim FTP included
|
||||
`stable`
|
||||
: Used to build the Stable binary distribution
|
||||
|
||||
_Note:_ Branches starting with `feat/` are experimental and will be rebased
|
||||
against master occasionally (other branches will not be rebased).
|
||||
|
||||
|
||||
[gcode]: http://code.google.com/p/macvim/
|
||||
+60
-16
@@ -24,6 +24,13 @@ int use_gui_macvim_draw_string = 1;
|
||||
|
||||
static int use_graphical_sign = 0;
|
||||
|
||||
// Max number of files to add to MRU in one go (this matches the maximum that
|
||||
// Cocoa displays in the MRU -- if this changes in Cocoa then update this
|
||||
// number as well).
|
||||
static int MMMaxMRU = 10;
|
||||
// Enabled when files passed on command line should not be added to MRU.
|
||||
static BOOL MMNoMRU = NO;
|
||||
|
||||
static NSString *MMDefaultFontName = @"Menlo Regular";
|
||||
static int MMDefaultFontSize = 11;
|
||||
static int MMMinFontSize = 6;
|
||||
@@ -87,28 +94,45 @@ macvim_early_init()
|
||||
void
|
||||
gui_mch_prepare(int *argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < *argc; ++i) {
|
||||
if (strncmp(argv[i], "--mmwaitforack", 14) == 0) {
|
||||
[[MMBackend sharedInstance] setWaitForAck:YES];
|
||||
--*argc;
|
||||
if (*argc > i)
|
||||
mch_memmove(&argv[i], &argv[i+1], (*argc-i) * sizeof(char*));
|
||||
break;
|
||||
}
|
||||
}
|
||||
// NOTE! Vim expects this method to remove args that it handles from the
|
||||
// arg list but if the process then forks then these arguments will not
|
||||
// reach the child process due to the way forking is handled on Mac OS X.
|
||||
//
|
||||
// Thus, only delete arguments that imply that no forking is done.
|
||||
//
|
||||
// If you add an argument that does not imply no forking, then do not
|
||||
// delete it from the arg list. Such arguments must be ignored in main.c
|
||||
// command_line_scan() or Vim will issue an error on startup when that
|
||||
// argument is used.
|
||||
|
||||
int i = 0;
|
||||
while (i < *argc) {
|
||||
BOOL delarg = NO;
|
||||
if (strncmp(argv[i], "--mmwaitforack", 14) == 0) {
|
||||
// Implies -f (only called from front end)
|
||||
[[MMBackend sharedInstance] setWaitForAck:YES];
|
||||
delarg = YES;
|
||||
}
|
||||
#ifdef FEAT_NETBEANS_INTG
|
||||
for (i = 0; i < *argc; ++i) {
|
||||
if (strncmp(argv[i], "-nb", 3) == 0) {
|
||||
else if (strncmp(argv[i], "-nb", 3) == 0) {
|
||||
// TODO: Can this be used without -f? If so, should not del arg.
|
||||
netbeansArg = argv[i];
|
||||
delarg = YES;
|
||||
}
|
||||
#endif
|
||||
else if (strncmp(argv[i], "--nomru", 7) == 0) {
|
||||
// Can be used without -f, do not delete from arg list!
|
||||
MMNoMRU = YES;
|
||||
}
|
||||
|
||||
if (delarg) {
|
||||
// NOTE: See comment above about when to delete arguments!
|
||||
--*argc;
|
||||
if (*argc > i)
|
||||
mch_memmove(&argv[i], &argv[i+1], (*argc-i) * sizeof(char*));
|
||||
break;
|
||||
}
|
||||
} else
|
||||
++i;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -208,6 +232,25 @@ gui_mch_init(void)
|
||||
// in [g]vimrc.
|
||||
gui_mch_adjust_charheight();
|
||||
|
||||
if (!MMNoMRU && GARGCOUNT > 0) {
|
||||
// Add files passed on command line to MRU.
|
||||
NSMutableArray *filenames = [NSMutableArray array];
|
||||
int i, count = GARGCOUNT > MMMaxMRU ? MMMaxMRU : GARGCOUNT;
|
||||
for (i = 0; i < count; ++i) {
|
||||
char_u *fname = GARGLIST[i].ae_fname;
|
||||
if (!fname) continue;
|
||||
|
||||
// Expand to a full file name (including the full path).
|
||||
char_u *ffname = fix_fname(fname);
|
||||
if (!ffname) continue;
|
||||
|
||||
[filenames addObject:[NSString stringWithVimString:ffname]];
|
||||
vim_free(ffname);
|
||||
}
|
||||
|
||||
[[MMBackend sharedInstance] addToMRU:filenames];
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1388,7 +1431,8 @@ gui_mch_dialog(
|
||||
char_u *message,
|
||||
char_u *buttons,
|
||||
int dfltbutton,
|
||||
char_u *textfield)
|
||||
char_u *textfield,
|
||||
int ex_cmd) // UNUSED
|
||||
{
|
||||
ASLogDebug(@"type=%d title='%s' message='%s' buttons='%s' dfltbutton=%d "
|
||||
"textfield='%s'", type, title, message, buttons, dfltbutton,
|
||||
|
||||
+11
-4
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Makefile for VIM on Win32, using Cygnus gcc
|
||||
# Last updated by Dan Sharp. Last Change: 2010 Feb 24
|
||||
# Last updated by Dan Sharp. Last Change: 2010 Nov 03
|
||||
#
|
||||
# Also read INSTALLpc.txt!
|
||||
#
|
||||
@@ -27,6 +27,7 @@
|
||||
# MZSCHEME_VER define to version of MzScheme being used (209_000)
|
||||
# DYNAMIC_MZSCHEME no or yes: use yes to load the MzScheme DLLs dynamically (yes)
|
||||
# MZSCHEME_DLLS path to MzScheme DLLs (libmzgc and libmzsch), for "static" build.
|
||||
# MZSCHEME_USE_RACKET define to use "racket" instead of "mzsch".
|
||||
# LUA define to path to Lua dir to get Lua support (not defined)
|
||||
# LUA_VER define to version of Lua being used (51)
|
||||
# DYNAMIC_LUA no or yes: use yes to load the Lua DLL dynamically (yes)
|
||||
@@ -254,16 +255,22 @@ ifndef MZSCHEME_GENERATE_BASE
|
||||
MZSCHEME_GENERATE_BASE=no
|
||||
endif
|
||||
|
||||
ifndef MZSCHEME_USE_RACKET
|
||||
MZSCHEME_MAIN_LIB=mzsch
|
||||
else
|
||||
MZSCHEME_MAIN_LIB=racket
|
||||
endif
|
||||
|
||||
ifeq (yes, $(DYNAMIC_MZSCHEME))
|
||||
DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
|
||||
DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
|
||||
else
|
||||
ifndef MZSCHEME_DLLS
|
||||
MZSCHEME_DLLS = $(MZSCHEME)
|
||||
endif
|
||||
ifeq (yes,$(MZSCHEME_PRECISE_GC))
|
||||
MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER)
|
||||
MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
|
||||
else
|
||||
MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
|
||||
MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
|
||||
endif
|
||||
EXTRA_LIBS += -L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)/lib $(MZSCHEME_LIB)
|
||||
endif
|
||||
|
||||
+26
-7
@@ -56,6 +56,12 @@ CSCOPE=yes
|
||||
NETBEANS=$(GUI)
|
||||
|
||||
|
||||
# Link against the shared version of libstdc++ by default. Set
|
||||
# STATIC_STDCPLUS to "yes" to link against static version instead.
|
||||
ifndef STATIC_STDCPLUS
|
||||
STATIC_STDCPLUS=no
|
||||
endif
|
||||
|
||||
# If the user doesn't want gettext, undefine it.
|
||||
ifeq (no, $(GETTEXT))
|
||||
GETTEXT=
|
||||
@@ -141,11 +147,17 @@ ifndef MZSCHEME_GENERATE_BASE
|
||||
MZSCHEME_GENERATE_BASE=no
|
||||
endif
|
||||
|
||||
ifndef MZSCHEME_USE_RACKET
|
||||
MZSCHEME_MAIN_LIB=mzsch
|
||||
else
|
||||
MZSCHEME_MAIN_LIB=racket
|
||||
endif
|
||||
|
||||
ifeq (no,$(DYNAMIC_MZSCHEME))
|
||||
ifeq (yes,$(MZSCHEME_PRECISE_GC))
|
||||
MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER)
|
||||
MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
|
||||
else
|
||||
MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
|
||||
MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
|
||||
endif
|
||||
# the modern MinGW can dynamically link to dlls directly.
|
||||
# point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
|
||||
@@ -303,12 +315,14 @@ DIRSLASH = \\
|
||||
endif
|
||||
endif
|
||||
CC := $(CROSS_COMPILE)gcc
|
||||
WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" -DRC_INVOKED
|
||||
WINDRES := $(CROSS_COMPILE)windres
|
||||
WINDRES_CC = $(CC)
|
||||
|
||||
#>>>>> end of choices
|
||||
###########################################################################
|
||||
|
||||
CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
|
||||
WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
|
||||
|
||||
ifdef GETTEXT
|
||||
DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
|
||||
@@ -343,7 +357,7 @@ endif
|
||||
ifdef MZSCHEME
|
||||
CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\"
|
||||
ifeq (yes, $(DYNAMIC_MZSCHEME))
|
||||
CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
|
||||
CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -571,8 +585,13 @@ endif
|
||||
endif
|
||||
|
||||
ifeq (yes, $(OLE))
|
||||
LIB += -loleaut32 -lstdc++
|
||||
LIB += -loleaut32
|
||||
OBJ += $(OUTDIR)/if_ole.o
|
||||
ifeq (yes, $(STATIC_STDCPLUS))
|
||||
LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
|
||||
else
|
||||
LIB += -lstdc++
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (yes, $(MBYTE))
|
||||
@@ -650,10 +669,10 @@ $(OUTDIR)/%.o : %.c $(INCL)
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
$(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
|
||||
$(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
|
||||
$(WINDRES) $(WINDRES_FLAGS) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
|
||||
|
||||
$(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
|
||||
$(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
|
||||
$(WINDRES) $(WINDRES_FLAGS) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
|
||||
|
||||
$(OUTDIR):
|
||||
$(MKDIR) $(OUTDIR)
|
||||
|
||||
+12
-9
@@ -380,9 +380,6 @@ MSVCVER = 10.0
|
||||
!if "$(_NMAKE_VER)" == "10.00.30319.01"
|
||||
MSVCVER = 10.0
|
||||
!endif
|
||||
!if "$(_NMAKE_VER)" == "9.00.30729.01"
|
||||
MSVCVER = 9.0
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Abort bulding VIM if version of VC is unrecognised.
|
||||
@@ -705,12 +702,18 @@ PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib
|
||||
MZSCHEME_VER = 205_000
|
||||
!endif
|
||||
CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
|
||||
!if EXIST("$(MZSCHEME)\collects\scheme\base.ss")
|
||||
# for MzScheme 4.x we need to include byte code for basic Scheme stuff
|
||||
!if EXIST("$(MZSCHEME)\collects\scheme\base.ss") \
|
||||
|| EXIST("$(MZSCHEME)\collects\scheme\base.rkt")
|
||||
# for MzScheme >= 4 we need to include byte code for basic Scheme stuff
|
||||
MZSCHEME_EXTRA_DEP = mzscheme_base.c
|
||||
CFLAGS = $(CFLAGS) -DINCLUDE_MZSCHEME_BASE
|
||||
!endif
|
||||
!if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib") \
|
||||
!if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib")
|
||||
MZSCHEME_MAIN_LIB=mzsch
|
||||
!else
|
||||
MZSCHEME_MAIN_LIB=racket
|
||||
!endif
|
||||
!if EXIST("$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib") \
|
||||
&& !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib")
|
||||
!message Building with Precise GC
|
||||
MZSCHEME_PRECISE_GC = yes
|
||||
@@ -722,7 +725,7 @@ CFLAGS = $(CFLAGS) -DMZ_PRECISE_GC
|
||||
!endif
|
||||
!message MzScheme DLLs will be loaded dynamically
|
||||
CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \
|
||||
-DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" \
|
||||
-DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \
|
||||
-DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
|
||||
!else
|
||||
!if "$(MZSCHEME_DEBUG)" == "yes"
|
||||
@@ -730,10 +733,10 @@ CFLAGS = $(CFLAGS) -DMZSCHEME_FORCE_GC
|
||||
!endif
|
||||
!if "$(MZSCHEME_PRECISE_GC)" == "yes"
|
||||
# Precise GC does not use separate dll
|
||||
MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
|
||||
MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
|
||||
!else
|
||||
MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \
|
||||
$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
|
||||
$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
|
||||
!endif
|
||||
!endif
|
||||
MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
|
||||
|
||||
+11
-5
@@ -414,12 +414,16 @@ CClink = $(CC)
|
||||
# However, this may still cause problems, such as "import termios" failing.
|
||||
# Build two separate versions of Vim in that case.
|
||||
#CONF_OPT_PYTHON = --enable-pythoninterp
|
||||
#CONF_OPT_PYTHON = --enable-pythoninterp=dynamic
|
||||
#CONF_OPT_PYTHON3 = --enable-python3interp
|
||||
#CONF_OPT_PYTHON3 = --enable-python3interp=dynamic
|
||||
|
||||
# RUBY
|
||||
# Uncomment this when you want to include the Ruby interface.
|
||||
# First one for static linking, second one for loading when used.
|
||||
# Note: you need the development package (e.g., ruby1.9.1-dev on Ubuntu).
|
||||
#CONF_OPT_RUBY = --enable-rubyinterp
|
||||
#CONF_OPT_RUBY = --enable-rubyinterp=dynamic
|
||||
#CONF_OPT_RUBY = --enable-rubyinterp --with-ruby-command=ruby1.9.1
|
||||
|
||||
# TCL
|
||||
@@ -1047,8 +1051,9 @@ INSTALL_PROG = cp
|
||||
INSTALL_DATA = cp
|
||||
INSTALL_DATA_R = cp -r
|
||||
|
||||
### Program to run on installed binary
|
||||
### Program to run on installed binary. Use the second one to disable strip.
|
||||
#STRIP = strip
|
||||
#STRIP = /bin/true
|
||||
|
||||
### Permissions for binaries {{{1
|
||||
BINMOD = 755
|
||||
@@ -1337,7 +1342,7 @@ SHELL = /bin/sh
|
||||
.SUFFIXES: .c .o .pro
|
||||
|
||||
PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS)
|
||||
POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(TCL_CFLAGS) $(RUBY_CFLAGS) $(EXTRA_DEFS)
|
||||
POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(TCL_CFLAGS) $(EXTRA_DEFS)
|
||||
|
||||
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(POST_DEFS)
|
||||
|
||||
@@ -1345,7 +1350,7 @@ ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(POST_DEFS)
|
||||
# with "-E".
|
||||
OSDEF_CFLAGS = $(PRE_DEFS) $(POST_DEFS)
|
||||
|
||||
LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) -Dinline= -D__extension__= -Dalloca=alloca
|
||||
LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) $(RUBY_CFLAGS) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) -Dinline= -D__extension__= -Dalloca=alloca
|
||||
|
||||
LINT_EXTRA = -DUSE_SNIFF -DHANGUL_INPUT -D"__attribute__(x)="
|
||||
|
||||
@@ -1711,7 +1716,8 @@ $(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h
|
||||
$(CCC) version.c -o objects/version.o
|
||||
@LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \
|
||||
-o $(VIMTARGET) $(OBJ) objects/version.o $(ALL_LIBS)" \
|
||||
MAKE="$(MAKE)" sh $(srcdir)/link.sh
|
||||
MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \
|
||||
sh $(srcdir)/link.sh
|
||||
|
||||
xxd/xxd$(EXEEXT): xxd/xxd.c
|
||||
cd xxd; CC="$(CC)" CFLAGS="$(CPPFLAGS) $(CFLAGS)" \
|
||||
@@ -2557,7 +2563,7 @@ objects/if_python3.o: if_python3.c if_py_both.h
|
||||
$(CCC) $(PYTHON3_CFLAGS) $(PYTHON3_CFLAGS_EXTRA) -o $@ if_python3.c
|
||||
|
||||
objects/if_ruby.o: if_ruby.c
|
||||
$(CCC) -o $@ if_ruby.c
|
||||
$(CCC) $(RUBY_CFLAGS) -o $@ if_ruby.c
|
||||
|
||||
objects/if_sniff.o: if_sniff.c
|
||||
$(CCC) -o $@ if_sniff.c
|
||||
|
||||
Vendored
+185
-21
@@ -757,6 +757,7 @@ MSGFMT
|
||||
MAKEMO
|
||||
XCODEFLAGS
|
||||
DEPEND_CFLAGS_FILTER
|
||||
LINK_AS_NEEDED
|
||||
LIBOBJS
|
||||
LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
@@ -1352,7 +1353,7 @@ Optional Features:
|
||||
--enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
|
||||
--enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
|
||||
--enable-tclinterp Include Tcl interpreter.
|
||||
--enable-rubyinterp Include Ruby interpreter.
|
||||
--enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
|
||||
--enable-cscope Include cscope interface.
|
||||
--enable-workshop Include Sun Visual Workshop support.
|
||||
--disable-netbeans Disable NetBeans integration support.
|
||||
@@ -4970,16 +4971,36 @@ echo "${ECHO_T}yes" >&6; }
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
{ echo "$as_me:$LINENO: checking if scheme.h can be found in /usr/include/plt/" >&5
|
||||
echo $ECHO_N "checking if scheme.h can be found in /usr/include/plt/... $ECHO_C" >&6; }
|
||||
if test -f /usr/include/plt/scheme.h; then
|
||||
{ echo "$as_me:$LINENO: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
|
||||
echo $ECHO_N "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... $ECHO_C" >&6; }
|
||||
if test -f $vi_cv_path_mzscheme_pfx/include/racket/scheme.h; then
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; }
|
||||
SCHEME_INC=/usr/include/plt
|
||||
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
vi_cv_path_mzscheme_pfx=
|
||||
{ echo "$as_me:$LINENO: checking if scheme.h can be found in /usr/include/plt/" >&5
|
||||
echo $ECHO_N "checking if scheme.h can be found in /usr/include/plt/... $ECHO_C" >&6; }
|
||||
if test -f /usr/include/plt/scheme.h; then
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; }
|
||||
SCHEME_INC=/usr/include/plt
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
{ echo "$as_me:$LINENO: checking if scheme.h can be found in /usr/include/racket/" >&5
|
||||
echo $ECHO_N "checking if scheme.h can be found in /usr/include/racket/... $ECHO_C" >&6; }
|
||||
if test -f /usr/include/racket/scheme.h; then
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; }
|
||||
SCHEME_INC=/usr/include/racket
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
vi_cv_path_mzscheme_pfx=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -4991,12 +5012,22 @@ echo "${ECHO_T}no" >&6; }
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
|
||||
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
|
||||
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"; then
|
||||
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"
|
||||
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket.a"; then
|
||||
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libracket.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a"; then
|
||||
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
|
||||
else
|
||||
if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.so"; then
|
||||
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme3m"
|
||||
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.so"; then
|
||||
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lracket3m"
|
||||
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
|
||||
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket.so"; then
|
||||
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lracket -lmzgc"
|
||||
else
|
||||
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc"
|
||||
fi
|
||||
@@ -5009,10 +5040,20 @@ echo "${ECHO_T}no" >&6; }
|
||||
fi
|
||||
if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
|
||||
SCHEME_COLLECTS=lib/plt/
|
||||
else
|
||||
if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
|
||||
SCHEME_COLLECTS=lib/racket/
|
||||
fi
|
||||
fi
|
||||
if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
|
||||
MZSCHEME_EXTRA="mzscheme_base.c"
|
||||
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
|
||||
MZSCHEME_EXTRA="mzscheme_base.c"
|
||||
else
|
||||
if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
|
||||
MZSCHEME_EXTRA="mzscheme_base.c"
|
||||
fi
|
||||
fi
|
||||
if test "X$MZSCHEME_EXTRA" != "X" ; then
|
||||
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
|
||||
MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
|
||||
fi
|
||||
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
|
||||
@@ -5429,9 +5470,9 @@ fi
|
||||
|
||||
PYTHON_LIBS="${vi_cv_path_python_plibs}"
|
||||
if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
|
||||
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
|
||||
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
|
||||
else
|
||||
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}"
|
||||
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
|
||||
fi
|
||||
PYTHON_SRC="if_python.c"
|
||||
if test "x$MACOSX" = "xyes"; then
|
||||
@@ -5442,7 +5483,7 @@ fi
|
||||
if test "${vi_cv_var_python_version}" = "1.4"; then
|
||||
PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
|
||||
fi
|
||||
PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
|
||||
PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
|
||||
|
||||
{ echo "$as_me:$LINENO: checking if -pthread should be used" >&5
|
||||
echo $ECHO_N "checking if -pthread should be used... $ECHO_C" >&6; }
|
||||
@@ -5763,9 +5804,9 @@ fi
|
||||
|
||||
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
|
||||
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
|
||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}"
|
||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||
else
|
||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}"
|
||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||
fi
|
||||
PYTHON3_SRC="if_python3.c"
|
||||
if test "x$MACOSX" = "xyes"; then
|
||||
@@ -5926,10 +5967,10 @@ _ACEOF
|
||||
#define DYNAMIC_PYTHON3 1
|
||||
_ACEOF
|
||||
|
||||
{ echo "$as_me:$LINENO: checking whether we can do without RTLD_GLOBAL" >&5
|
||||
echo $ECHO_N "checking whether we can do without RTLD_GLOBAL... $ECHO_C" >&6; }
|
||||
{ echo "$as_me:$LINENO: checking whether we can do without RTLD_GLOBAL for Python" >&5
|
||||
echo $ECHO_N "checking whether we can do without RTLD_GLOBAL for Python... $ECHO_C" >&6; }
|
||||
cflags_save=$CFLAGS
|
||||
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
|
||||
CFLAGS="$CFLAGS $PYTHON_CFLAGS"
|
||||
ldflags_save=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -ldl"
|
||||
if test "$cross_compiling" = yes; then
|
||||
@@ -5948,15 +5989,17 @@ else
|
||||
* Only the first pyhton version used will be switched on.
|
||||
*/
|
||||
|
||||
int no_rtl_global_needed_for(char *python_instsoname)
|
||||
int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
|
||||
{
|
||||
int needed = 0;
|
||||
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
|
||||
if (pylib != 0)
|
||||
{
|
||||
void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
|
||||
void (*init)(void) = dlsym(pylib, "Py_Initialize");
|
||||
int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
|
||||
void (*final)(void) = dlsym(pylib, "Py_Finalize");
|
||||
(*pfx)(prefix);
|
||||
(*init)();
|
||||
needed = (*simple)("import termios") == -1;
|
||||
(*final)();
|
||||
@@ -5968,7 +6011,7 @@ else
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int not_needed = 0;
|
||||
if (no_rtl_global_needed_for("libpython2.7.so.1.0") && no_rtl_global_needed_for("libpython3.1.so.1.0"))
|
||||
if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
|
||||
not_needed = 1;
|
||||
return !not_needed;
|
||||
}
|
||||
@@ -6011,8 +6054,102 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$a
|
||||
fi
|
||||
|
||||
|
||||
|
||||
CFLAGS=$cflags_save
|
||||
LDFLAGS=$ldflags_save
|
||||
|
||||
{ echo "$as_me:$LINENO: checking whether we can do without RTLD_GLOBAL for Python3" >&5
|
||||
echo $ECHO_N "checking whether we can do without RTLD_GLOBAL for Python3... $ECHO_C" >&6; }
|
||||
cflags_save=$CFLAGS
|
||||
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
|
||||
ldflags_save=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -ldl"
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <wchar.h>
|
||||
/* If this program fails, then RTLD_GLOBAL is needed.
|
||||
* RTLD_GLOBAL will be used and then it is not possible to
|
||||
* have both python versions enabled in the same vim instance.
|
||||
* Only the first pyhton version used will be switched on.
|
||||
*/
|
||||
|
||||
int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
|
||||
{
|
||||
int needed = 0;
|
||||
void* pylib = dlopen(python_instsoname, RTLD_LAZY);
|
||||
if (pylib != 0)
|
||||
{
|
||||
void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
|
||||
void (*init)(void) = dlsym(pylib, "Py_Initialize");
|
||||
int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
|
||||
void (*final)(void) = dlsym(pylib, "Py_Finalize");
|
||||
(*pfx)(prefix);
|
||||
(*init)();
|
||||
needed = (*simple)("import termios") == -1;
|
||||
(*final)();
|
||||
dlclose(pylib);
|
||||
}
|
||||
return !needed;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int not_needed = 0;
|
||||
if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
|
||||
not_needed = 1;
|
||||
return !not_needed;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_link") 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
|
||||
{ (case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_try") 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; };cat >>confdefs.h <<\_ACEOF
|
||||
#define PY3_NO_RTLD_GLOBAL 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
echo "$as_me: program exited with status $ac_status" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
( exit $ac_status )
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
|
||||
CFLAGS=$cflags_save
|
||||
LDFLAGS=$ldflags_save
|
||||
|
||||
PYTHON_SRC="if_python.c"
|
||||
PYTHON_OBJ="objects/if_python.o"
|
||||
PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
|
||||
@@ -6394,7 +6531,7 @@ fi
|
||||
|
||||
{ echo "$as_me:$LINENO: result: $enable_rubyinterp" >&5
|
||||
echo "${ECHO_T}$enable_rubyinterp" >&6; }
|
||||
if test "$enable_rubyinterp" = "yes"; then
|
||||
if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
{ echo "$as_me:$LINENO: checking --with-ruby-command argument" >&5
|
||||
echo $ECHO_N "checking --with-ruby-command argument... $ECHO_C" >&6; }
|
||||
|
||||
@@ -6510,6 +6647,15 @@ echo "${ECHO_T}$rubyhdrdir" >&6; }
|
||||
#define FEAT_RUBY 1
|
||||
_ACEOF
|
||||
|
||||
if test "$enable_rubyinterp" = "dynamic"; then
|
||||
libruby=`$vi_cv_path_ruby -r rbconfig -e 'printf "lib%s.%s\n", Config::CONFIG["RUBY_SO_NAME"], Config::CONFIG["DLEXT"]'`
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define DYNAMIC_RUBY 1
|
||||
_ACEOF
|
||||
|
||||
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
|
||||
RUBY_LIBS=
|
||||
fi
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: not found; disabling Ruby" >&5
|
||||
echo "${ECHO_T}not found; disabling Ruby" >&6; }
|
||||
@@ -19281,6 +19427,23 @@ echo "${ECHO_T}no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking linker --as-needed support" >&5
|
||||
echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6; }
|
||||
LINK_AS_NEEDED=
|
||||
# Check if linker supports --as-needed and --no-as-needed options
|
||||
if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
|
||||
LDFLAGS="$LDFLAGS -Wl,--as-needed"
|
||||
LINK_AS_NEEDED=yes
|
||||
fi
|
||||
if test "$LINK_AS_NEEDED" = yes; then
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; }
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
@@ -20083,11 +20246,12 @@ MSGFMT!$MSGFMT$ac_delim
|
||||
MAKEMO!$MAKEMO$ac_delim
|
||||
XCODEFLAGS!$XCODEFLAGS$ac_delim
|
||||
DEPEND_CFLAGS_FILTER!$DEPEND_CFLAGS_FILTER$ac_delim
|
||||
LINK_AS_NEEDED!$LINK_AS_NEEDED$ac_delim
|
||||
LIBOBJS!$LIBOBJS$ac_delim
|
||||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 49; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 50; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
||||
+3
-3
@@ -643,6 +643,9 @@ free_buffer_stuff(buf, free_options)
|
||||
{
|
||||
clear_wininfo(buf); /* including window-local options */
|
||||
free_buf_options(buf, TRUE);
|
||||
#ifdef FEAT_SPELL
|
||||
ga_clear(&buf->b_s.b_langp);
|
||||
#endif
|
||||
}
|
||||
#ifdef FEAT_EVAL
|
||||
vars_clear(&buf->b_vars.dv_hashtab); /* free all internal variables */
|
||||
@@ -665,9 +668,6 @@ free_buffer_stuff(buf, free_options)
|
||||
vim_free(buf->b_start_fenc);
|
||||
buf->b_start_fenc = NULL;
|
||||
#endif
|
||||
#ifdef FEAT_SPELL
|
||||
ga_clear(&buf->b_s.b_langp);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user