mirror of
https://github.com/zoriya/vim.git
synced 2025-12-25 00:25:21 +00:00
Compare commits
77 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ccb265bd4 | ||
|
|
7d11244c99 | ||
|
|
97cc2384c0 | ||
|
|
14f5827940 | ||
|
|
8139889a5f | ||
|
|
6f3d6b48a6 | ||
|
|
e1704bada4 | ||
|
|
b213da0b57 | ||
|
|
ec3cfeb199 | ||
|
|
1e91f2606b | ||
|
|
718f007499 | ||
|
|
d09acef44b | ||
|
|
66b7985ec9 | ||
|
|
770456589e | ||
|
|
696c2116dc | ||
|
|
f94a13c286 | ||
|
|
01c10524d2 | ||
|
|
f5fe79a5f3 | ||
|
|
6f586de755 | ||
|
|
2b017fae8f | ||
|
|
4fabd7dd4a | ||
|
|
be1e9e9fc1 | ||
|
|
2623b4f412 | ||
|
|
e8cdcef875 | ||
|
|
fca93c093e | ||
|
|
c11073c9aa | ||
|
|
afa6b9af86 | ||
|
|
cdab905136 | ||
|
|
77fceb8908 | ||
|
|
e48a2dd3af | ||
|
|
231e1a1723 | ||
|
|
e2db4361d2 | ||
|
|
ac0ddc15e9 | ||
|
|
7c0a86b1e8 | ||
|
|
b4a80cdd91 | ||
|
|
7c82130a76 | ||
|
|
2c66669c33 | ||
|
|
57c0ea8692 | ||
|
|
465748e411 | ||
|
|
dd7d846475 | ||
|
|
0551410a14 | ||
|
|
3633dc0129 | ||
|
|
8f91399366 | ||
|
|
002a4edc5b | ||
|
|
18a1b9bd5f | ||
|
|
c6c1d8b802 | ||
|
|
1c75a03501 | ||
|
|
451cf63751 | ||
|
|
00b8ae0d3d | ||
|
|
dde0efed85 | ||
|
|
4d93dc2699 | ||
|
|
b9ce83e135 | ||
|
|
9b4512500a | ||
|
|
dd82d699c8 | ||
|
|
2b9578f0f8 | ||
|
|
2430586629 | ||
|
|
2dac213ac6 | ||
|
|
14f2474147 | ||
|
|
b02612b641 | ||
|
|
07e31c571a | ||
|
|
c1a995db49 | ||
|
|
ba6ba36fa2 | ||
|
|
04b2751899 | ||
|
|
c271c48e80 | ||
|
|
e66822e3d1 | ||
|
|
09168a77e4 | ||
|
|
da3cb831e9 | ||
|
|
e4195c5d84 | ||
|
|
8a0f3c78fe | ||
|
|
a07c831bef | ||
|
|
dad937f77f | ||
|
|
6c35beaa11 | ||
|
|
848f87633a | ||
|
|
0cbba94b7e | ||
|
|
9bdb9a0987 | ||
|
|
5fb9ec5ed7 | ||
|
|
9581b5f70e |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -30,6 +30,7 @@ src/auto/pathdef.c
|
||||
*.suo
|
||||
*.res
|
||||
*.RES
|
||||
src/if_perl.c
|
||||
src/pathdef.c
|
||||
src/Obj*/pathdef.c
|
||||
gvimext.dll
|
||||
@@ -41,6 +42,7 @@ gvimext.lib
|
||||
*.mo
|
||||
*.swp
|
||||
*~
|
||||
src/po/vim.pot
|
||||
|
||||
# Generated by "make test"
|
||||
src/po/*.ck
|
||||
|
||||
20
Filelist
20
Filelist
@@ -261,6 +261,7 @@ SRC_DOS = \
|
||||
src/Make_mvc.mak \
|
||||
src/Make_w16.mak \
|
||||
src/bigvim.bat \
|
||||
src/bigvim64.bat \
|
||||
src/msvcsetup.bat \
|
||||
src/msvc2008.bat \
|
||||
src/msvc2010.bat \
|
||||
@@ -349,6 +350,13 @@ SRC_DOS_BIN = \
|
||||
src/vim*.ico \
|
||||
src/vim.tlb \
|
||||
src/vimtbar.lib \
|
||||
src/xpm/COPYRIGHT \
|
||||
src/xpm/README.txt \
|
||||
src/xpm/include/*.h \
|
||||
src/xpm/x64/lib/libXpm.a \
|
||||
src/xpm/x64/lib/libXpm.lib \
|
||||
src/xpm/x86/lib/libXpm.a \
|
||||
src/xpm/x86/lib/libXpm.lib \
|
||||
src/vimtbar.dll \
|
||||
nsis/icons/*.bmp \
|
||||
nsis/icons/*.ico \
|
||||
@@ -685,9 +693,17 @@ LANG_GEN = \
|
||||
runtime/tutor/Makefile \
|
||||
runtime/tutor/tutor.utf-8 \
|
||||
runtime/tutor/tutor.?? \
|
||||
runtime/tutor/tutor.??.* \
|
||||
runtime/tutor/tutor.??.utf-8 \
|
||||
runtime/tutor/tutor.??.euc \
|
||||
runtime/tutor/tutor.??.sjis \
|
||||
runtime/tutor/tutor.??.iso9 \
|
||||
runtime/tutor/tutor.??.big5 \
|
||||
runtime/tutor/tutor.??.cp1250 \
|
||||
runtime/tutor/tutor.??.cp1251 \
|
||||
runtime/tutor/tutor.??.cp737 \
|
||||
runtime/tutor/tutor.??_??.utf-8 \
|
||||
runtime/tutor/tutor.bar \
|
||||
runtime/tutor/tutor.bar.* \
|
||||
runtime/tutor/tutor.bar.utf-8 \
|
||||
runtime/spell/README.txt \
|
||||
runtime/spell/??/*.diff \
|
||||
runtime/spell/??/main.aap \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for the tohtml plugin.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2011 Apr 05
|
||||
" Last Change: 2012 Jun 30
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
" this file uses line continuations
|
||||
let s:cpo_sav = &cpo
|
||||
set cpo-=C
|
||||
set cpo&vim
|
||||
|
||||
" Automatically find charsets from all encodings supported natively by Vim. With
|
||||
" the 8bit- and 2byte- prefixes, Vim can actually support more encodings than
|
||||
@@ -391,12 +391,25 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
call add(html, '<meta name="plugin-version" content="'.g:loaded_2html_plugin.'"'.tag_close)
|
||||
call add(html, '<meta name="settings" content="'.
|
||||
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
|
||||
\ ',prevent_copy='.s:settings.prevent_copy.
|
||||
\ '"'.tag_close)
|
||||
call add(html, '<meta name="colorscheme" content="'.
|
||||
\ (exists('g:colors_name')
|
||||
\ ? g:colors_name
|
||||
\ : 'none'). '"'.tag_close)
|
||||
|
||||
call add(html, '</head>')
|
||||
let body_line_num = len(html)
|
||||
call add(html, '<body>')
|
||||
call add(html, '<table border="1" width="100%">')
|
||||
if !empty(s:settings.prevent_copy)
|
||||
call add(html, "<body onload='FixCharWidth();'>")
|
||||
call add(html, "<!-- hidden divs used by javascript to get the width of a char -->")
|
||||
call add(html, "<div id='oneCharWidth'>0</div>")
|
||||
call add(html, "<div id='oneInputWidth'><input size='1' value='0'".tag_close."</div>")
|
||||
call add(html, "<div id='oneEmWidth' style='width: 1em;'></div>")
|
||||
else
|
||||
call add(html, '<body>')
|
||||
endif
|
||||
call add(html, "<table border='1' width='100%' id='vimCodeElement'>")
|
||||
|
||||
call add(html, '<tr>')
|
||||
for buf in a:win_list
|
||||
@@ -454,16 +467,19 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
let insert_index = diff_style_start
|
||||
endif
|
||||
|
||||
" Delete those parts that are not needed so
|
||||
" we can include the rest into the resulting table
|
||||
1,/^<body/d_
|
||||
" Delete those parts that are not needed so we can include the rest into the
|
||||
" resulting table.
|
||||
1,/^<body.*\%(\n<!--.*-->\_s\+.*id='oneCharWidth'.*\_s\+.*id='oneInputWidth'.*\_s\+.*id='oneEmWidth'\)\?\zs/d_
|
||||
$
|
||||
?</body>?,$d_
|
||||
let temp = getline(1,'$')
|
||||
" clean out id on the main content container because we already set it on
|
||||
" the table
|
||||
let temp[0] = substitute(temp[0], " id='vimCodeElement'", "", "")
|
||||
" undo deletion of start and end part
|
||||
" so we can later save the file as valid html
|
||||
" TODO: restore using grabbed lines if undolevel is 1?
|
||||
normal 2u
|
||||
normal! 2u
|
||||
if s:settings.use_css
|
||||
call add(html, '<td valign="top"><div>')
|
||||
elseif s:settings.use_xhtml
|
||||
@@ -520,12 +536,47 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
1
|
||||
let style_start = search('^</head>')-1
|
||||
|
||||
" add required javascript in reverse order so we can just call append again
|
||||
" and again without adjusting {{{
|
||||
|
||||
" insert script closing tag if any javascript is needed
|
||||
if s:settings.dynamic_folds || !empty(s:settings.prevent_copy)
|
||||
call append(style_start, [
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" insert script which corrects the size of small input elements in
|
||||
" prevent_copy mode. See 2html.vim for details on why this is needed and how
|
||||
" it works.
|
||||
if !empty(s:settings.prevent_copy)
|
||||
call append(style_start, [
|
||||
\ '',
|
||||
\ '/* simulate a "ch" unit by asking the browser how big a zero character is */',
|
||||
\ 'function FixCharWidth() {',
|
||||
\ ' /* get the hidden element which gives the width of a single character */',
|
||||
\ ' var goodWidth = document.getElementById("oneCharWidth").clientWidth;',
|
||||
\ ' /* get all input elements, we''ll filter on class later */',
|
||||
\ ' var inputTags = document.getElementsByTagName("input");',
|
||||
\ ' var ratio = 5;',
|
||||
\ ' var inputWidth = document.getElementById("oneInputWidth").clientWidth;',
|
||||
\ ' var emWidth = document.getElementById("oneEmWidth").clientWidth;',
|
||||
\ ' if (inputWidth > goodWidth) {',
|
||||
\ ' while (ratio < 100*goodWidth/emWidth && ratio < 100) {',
|
||||
\ ' ratio += 5;',
|
||||
\ ' }',
|
||||
\ ' document.getElementById("vimCodeElement").className = "em"+ratio;',
|
||||
\ ' }',
|
||||
\ '}'
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" 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'>",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : " <!--",
|
||||
\ " function toggleFold(objID)",
|
||||
\ " {",
|
||||
\ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)",
|
||||
@@ -542,9 +593,14 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
\ " }",
|
||||
\ " }",
|
||||
\ " }",
|
||||
\ s:settings.use_xhtml ? '//]]>' : " -->",
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" insert script tag if any javascript is needed
|
||||
if s:settings.dynamic_folds || s:settings.prevent_copy != ""
|
||||
call append(style_start, [
|
||||
\ "<script type='text/javascript'>",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
endif "}}}
|
||||
|
||||
" Insert styles from all the generated html documents and additional styles
|
||||
@@ -609,9 +665,10 @@ func! tohtml#GetUserSettings() "{{{
|
||||
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, 'no_foldcolumn', user_settings.ignore_folding)
|
||||
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_pre', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_invalid', 0 )
|
||||
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
|
||||
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
|
||||
" }}}
|
||||
@@ -637,6 +694,8 @@ func! tohtml#GetUserSettings() "{{{
|
||||
" dynamic folding implies css
|
||||
if user_settings.dynamic_folds
|
||||
let user_settings.use_css = 1
|
||||
else
|
||||
let user_settings.no_foldcolumn = 1 " won't do anything but for consistency and for the test suite
|
||||
endif
|
||||
|
||||
" if we're not using CSS we cannot use a pre section because <font> tags
|
||||
@@ -663,6 +722,7 @@ func! tohtml#GetUserSettings() "{{{
|
||||
endif
|
||||
" }}}
|
||||
|
||||
" textual options
|
||||
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
|
||||
@@ -705,6 +765,45 @@ func! tohtml#GetUserSettings() "{{{
|
||||
endif
|
||||
endif "}}}
|
||||
|
||||
" Default to making nothing uncopyable, because we default to
|
||||
" not-standards way of doing things, and also because Microsoft Word and
|
||||
" others paste the <input> elements anyway.
|
||||
"
|
||||
" html_prevent_copy only has an effect when using CSS.
|
||||
"
|
||||
" All options:
|
||||
" f - fold column
|
||||
" n - line numbers (also within fold text)
|
||||
" t - fold text
|
||||
" d - diff filler
|
||||
" c - concealed text (reserved future)
|
||||
" l - listchars (reserved possible future)
|
||||
" s - signs (reserved possible future)
|
||||
"
|
||||
" Normal text is always selectable.
|
||||
let user_settings.prevent_copy = ""
|
||||
if user_settings.use_css
|
||||
if exists("g:html_prevent_copy")
|
||||
if user_settings.dynamic_folds && !user_settings.no_foldcolumn && g:html_prevent_copy =~# 'f'
|
||||
let user_settings.prevent_copy .= 'f'
|
||||
endif
|
||||
if user_settings.number_lines && g:html_prevent_copy =~# 'n'
|
||||
let user_settings.prevent_copy .= 'n'
|
||||
endif
|
||||
if &diff && g:html_prevent_copy =~# 'd'
|
||||
let user_settings.prevent_copy .= 'd'
|
||||
endif
|
||||
if !user_settings.ignore_folding && g:html_prevent_copy =~# 't'
|
||||
let user_settings.prevent_copy .= 't'
|
||||
endif
|
||||
else
|
||||
let user_settings.prevent_copy = ""
|
||||
endif
|
||||
endif
|
||||
if empty(user_settings.prevent_copy)
|
||||
let user_settings.no_invalid = 0
|
||||
endif
|
||||
|
||||
" TODO: font
|
||||
|
||||
return user_settings
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Mono C# Compiler
|
||||
" Maintainer: Jarek Sobiecki <harijari@go2.pl>
|
||||
" Latest Revision: 2006-06-18
|
||||
" Last Updated By: Peter Collingbourne
|
||||
" Latest Revision: 2012 Jul 19
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -12,13 +13,18 @@ let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal errorformat=
|
||||
\%D%.%#Project\ \"%f/%[%^/\"]%#\"%.%#,
|
||||
\%X%.%#Done\ building\ project\ \"%f/%[%^/\"]%#\"%.%#,
|
||||
\%-G%\\s%.%#,
|
||||
\%E%f(%l):\ error\ CS%n:%m,
|
||||
\%W%f(%l):\ warning\ CS%n:%m,
|
||||
\%E%f(%l\\,%c):\ error\ CS%n:%m,
|
||||
\%W%f(%l\\,%c):\ warning\ CS%n:%m,
|
||||
\%E%>syntax\ error\\,%m,%Z%f(%l\\,%c):\ error\ CS%n:%m,
|
||||
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
|
||||
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
|
||||
\%DMaking\ %*\\a\ in\ %f,
|
||||
\%G-%.%#
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.3. Last change: 2012 Jul 10
|
||||
*autocmd.txt* For Vim version 7.3. Last change: 2012 Sep 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -263,8 +263,10 @@ Name triggered by ~
|
||||
Startup and exit
|
||||
|VimEnter| after doing all the startup stuff
|
||||
|GUIEnter| after starting the GUI successfully
|
||||
|GUIFailed| after starting the GUI failed
|
||||
|TermResponse| after the terminal response to |t_RV| is received
|
||||
|
||||
|QuitPre| when using `:quit`, before deciding whether to quit
|
||||
|VimLeavePre| before exiting Vim, before writing the viminfo file
|
||||
|VimLeave| before exiting Vim, after writing the viminfo file
|
||||
|
||||
@@ -312,6 +314,7 @@ Name triggered by ~
|
||||
|SessionLoadPost| after loading a session file
|
||||
|
||||
|MenuPopup| just before showing the popup menu
|
||||
|CompleteDone| after Insert mode completion is done
|
||||
|
||||
|User| to be used in combination with ":doautocmd"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.3. Last change: 2012 Jun 13
|
||||
*change.txt* For Vim version 7.3. Last change: 2012 Aug 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -666,6 +666,8 @@ The flags that you can use for the substitute commands:
|
||||
[n] Report the number of matches, do not actually substitute. The [c]
|
||||
flag is ignored. The matches are reported as if 'report' is zero.
|
||||
Useful to |count-items|.
|
||||
If \= |sub-replace-expression| is used, the expression will be
|
||||
evaluated in the |sandbox| at every match.
|
||||
|
||||
[p] Print the line containing the last substitute.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.3. Last change: 2012 May 18
|
||||
*diff.txt* For Vim version 7.3. Last change: 2012 Sep 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -86,16 +86,16 @@ diff mode. You could use a construct like this: >
|
||||
While already in Vim you can start diff mode in three ways.
|
||||
|
||||
*E98*
|
||||
:diffsplit {filename} *:diffs* *:diffsplit*
|
||||
:diffs[plit] {filename} *:diffs* *:diffsplit*
|
||||
Open a new window on the file {filename}. The options are set
|
||||
as for "vimdiff" for the current and the newly opened window.
|
||||
Also see 'diffexpr'.
|
||||
|
||||
*:difft* *:diffthis*
|
||||
:diffthis Make the current window part of the diff windows. This sets
|
||||
:difft[his] Make the current window part of the diff windows. This sets
|
||||
the options like for "vimdiff".
|
||||
|
||||
:diffpatch {patchfile} *E816* *:diffp* *:diffpatch*
|
||||
:diffp[atch] {patchfile} *E816* *:diffp* *:diffpatch*
|
||||
Use the current buffer, patch it with the diff found in
|
||||
{patchfile} and open a buffer on the result. The options are
|
||||
set as for "vimdiff".
|
||||
@@ -123,9 +123,9 @@ Since the option values are remembered with the buffer, you can edit another
|
||||
file for a moment and come back to the same file and be in diff mode again.
|
||||
|
||||
*:diffo* *:diffoff*
|
||||
:diffoff Switch off diff mode for the current window.
|
||||
:diffo[ff] Switch off diff mode for the current window.
|
||||
|
||||
:diffoff! Switch off diff mode for the current window and in all windows
|
||||
:diffo[ff]! Switch off diff mode for the current window and in all windows
|
||||
in the current tab page where 'diff' is set.
|
||||
|
||||
The ":diffoff" command resets the relevant options to their default value.
|
||||
@@ -333,7 +333,7 @@ diff. This example explains the format that Vim expects: >
|
||||
|
||||
The "1a2" item appends the line "bbb".
|
||||
The "4d4" item deletes the line "111".
|
||||
The '7c7" item replaces the line "GGG" with "ggg".
|
||||
The "7c7" item replaces the line "GGG" with "ggg".
|
||||
|
||||
When 'diffexpr' is not empty, Vim evaluates it to obtain a diff file in the
|
||||
format mentioned. These variables are set to the file names used:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.3. Last change: 2012 Jul 10
|
||||
*editing.txt* For Vim version 7.3. Last change: 2012 Aug 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -393,7 +393,7 @@ is to use "path\[[]abc]". Then the file "path[abc]" literally.
|
||||
*starstar-wildcard*
|
||||
Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems.
|
||||
This allows searching a directory tree. This goes up to 100 directories deep.
|
||||
Note there are some commands where this works slightly different, see
|
||||
Note there are some commands where this works slightly differently, see
|
||||
|file-searching|.
|
||||
Example: >
|
||||
:n **/*.txt
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.3. Last change: 2012 Jul 10
|
||||
*eval.txt* For Vim version 7.3. Last change: 2012 Sep 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -759,7 +759,7 @@ of a |List| is different from the original |List|. When using "is" without
|
||||
a |List| or a |Dictionary| it is equivalent to using "equal", using "isnot"
|
||||
equivalent to using "not equal". Except that a different type means the
|
||||
values are different: "4 == '4'" is true, "4 is '4'" is false and "0 is []" is
|
||||
false and not a error. "is#"/"isnot#" and "is?"/"isnot?" can be used to match
|
||||
false and not an error. "is#"/"isnot#" and "is?"/"isnot?" can be used to match
|
||||
and ignore case.
|
||||
|
||||
When comparing a String with a Number, the String is converted to a Number,
|
||||
@@ -3288,8 +3288,9 @@ getfperm({fname}) *getfperm()*
|
||||
"rwx" flags represent, in turn, the permissions of the owner
|
||||
of the file, the group the file belongs to, and other users.
|
||||
If a user does not have a given permission the flag for this
|
||||
is replaced with the string "-". Example: >
|
||||
is replaced with the string "-". Examples: >
|
||||
:echo getfperm("/etc/passwd")
|
||||
:echo getfperm(expand("~/.vimrc"))
|
||||
< This will hopefully (from a security point of view) display
|
||||
the string "rw-r--r--" or even "rw-------".
|
||||
|
||||
@@ -4634,8 +4635,8 @@ pyeval({expr}) *pyeval()*
|
||||
Numbers and strings are returned as they are (strings are
|
||||
copied though).
|
||||
Lists are represented as Vim |List| type.
|
||||
Dictionaries are represented as Vim |Dictionary| type with
|
||||
keys converted to strings.
|
||||
Dictionaries are represented as Vim |Dictionary| type,
|
||||
non-string keys result in error.
|
||||
{only available when compiled with the |+python| feature}
|
||||
|
||||
*E726* *E727*
|
||||
@@ -5252,8 +5253,9 @@ setreg({regname}, {value} [,{options}])
|
||||
|
||||
If {options} contains no register settings, then the default
|
||||
is to use character mode unless {value} ends in a <NL>.
|
||||
Setting the '=' register is not possible.
|
||||
Returns zero for success, non-zero for failure.
|
||||
Setting the '=' register is not possible, but you can use >
|
||||
:let @= = var_expr
|
||||
< Returns zero for success, non-zero for failure.
|
||||
|
||||
Examples: >
|
||||
:call setreg(v:register, @*)
|
||||
@@ -6325,6 +6327,7 @@ 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_sgr Compiled with support for sgr mouse.
|
||||
mouse_urxvt Compiled with support for urxvt mouse.
|
||||
mouse_xterm Compiled with support for xterm mouse.
|
||||
mouseshape Compiled with support for 'mouseshape'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w32.txt* For Vim version 7.3. Last change: 2011 Jul 23
|
||||
*gui_w32.txt* For Vim version 7.3. Last change: 2012 Aug 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -489,4 +489,16 @@ to:
|
||||
And add gvim to the list of applications. This problem only appears to happen
|
||||
with the Intellimouse driver 2.2 and when "Universal Scrolling" is turned on.
|
||||
|
||||
|
||||
XPM support *w32-xpm-support*
|
||||
|
||||
Gvim can be build on MS-Windows with support for XPM files. |+xpm_w32|
|
||||
See the Make_mvc.mak file for instructions, search for XPM.
|
||||
|
||||
To try out if XPM support works do this: >
|
||||
:help
|
||||
:exe 'sign define vimxpm icon=' . $VIMRUNTIME . '\\vim16x16.xpm'
|
||||
:exe 'sign place 1 line=1 name=vimxpm file=' . expand('%:p')
|
||||
<
|
||||
|
||||
vim:tw=78:sw=4:ts=8:ft=help:norl:
|
||||
|
||||
@@ -93,7 +93,7 @@ Details
|
||||
This is also the keymap when 'keymap=hebrew' is set. The advantage of
|
||||
'keymap' is that it works properly when using UTF8, e.g. it inserts the
|
||||
correct characters; 'hkmap' does not. The 'keymap' keyboard can also
|
||||
insert niqud and te`amim. To see what those mappings are,look at the
|
||||
insert niqud and te`amim. To see what those mappings are, look at the
|
||||
keymap file 'hebrew.vim' etc.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_perl.txt* For Vim version 7.3. Last change: 2010 Jul 21
|
||||
*if_perl.txt* For Vim version 7.3. Last change: 2012 Aug 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sven Verdoolaege
|
||||
@@ -44,15 +44,17 @@ The Perl patches for Vim were made by:
|
||||
Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
|
||||
Matt Gerassimof
|
||||
|
||||
Perl for MS-Windows can be found at:
|
||||
http://www.perl.com/CPAN/ports/nt/Standard/x86/
|
||||
Perl for MS-Windows can be found at: http://www.perl.com/
|
||||
The ActiveState one should work.
|
||||
|
||||
==============================================================================
|
||||
3. Using the Perl interface *perl-using*
|
||||
|
||||
*:perl* *:pe*
|
||||
:pe[rl] {cmd} Execute Perl command {cmd}. The current package
|
||||
is "main".
|
||||
is "main". Simple example to test if `:perl` is
|
||||
working: >
|
||||
:perl VIM::Msg("Hello")
|
||||
|
||||
:pe[rl] << {endpattern}
|
||||
{script}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2012 Feb 04
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2012 Sep 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -27,7 +27,9 @@ The Python 3 interface is available only when Vim was compiled with the
|
||||
|
||||
*:python* *:py* *E205* *E263* *E264*
|
||||
:[range]py[thon] {stmt}
|
||||
Execute Python statement {stmt}.
|
||||
Execute Python statement {stmt}. A simple check if
|
||||
the `:python` command is working: >
|
||||
:python print "Hello"
|
||||
|
||||
:[range]py[thon] << {endmarker}
|
||||
{script}
|
||||
@@ -157,6 +159,26 @@ vim.bindeval(str) *python-bindeval*
|
||||
vimlist or vimdictionary python type that are connected to original
|
||||
list or dictionary. Thus modifications to these objects imply
|
||||
modifications of the original.
|
||||
|
||||
Additionally, vimlist and vimdictionary type have read-write
|
||||
`.locked` attribute that returns
|
||||
Value Meaning ~
|
||||
zero Variable is not locked
|
||||
vim.VAR_LOCKED Variable is locked, but can be unlocked
|
||||
vim.VAR_FIXED Variable is locked and can't be unlocked
|
||||
integer constants. If variable is not fixed, you can do
|
||||
`var.locked=True` to lock it and `var.locked=False` to unlock.
|
||||
There is no recursive locking like |:lockvar|! does. There is also
|
||||
no way to lock a specific key or check whether it is locked (in any
|
||||
case these locks are ignored by anything except |:let|: |extend()|
|
||||
does not care, neither does python interface).
|
||||
|
||||
Vimdictionary type also supports `.scope` attribute which is one of
|
||||
Value Meaning ~
|
||||
zero Dictionary is not a scope one
|
||||
vim.VAR_DEF_SCOPE Function-local or global scope dictionary
|
||||
vim.VAR_SCOPE Other scope dictionary
|
||||
|
||||
2. if expression evaluates to a function reference, then it returns
|
||||
callable vimfunction object. Use self keyword argument to assign
|
||||
|self| object for dictionary functions.
|
||||
@@ -362,8 +384,10 @@ sure edit "gvim.exe" and search for "python\d*.dll\c".
|
||||
8. Python 3 *python3*
|
||||
|
||||
*:py3* *:python3*
|
||||
The |:py3| and |:python3| commands work similar to |:python|.
|
||||
*:py3file*
|
||||
The |:py3| and |:python3| commands work similar to |:python|. A simple check
|
||||
if the `:py3` command is wrong: >
|
||||
:py3 print("Hello")
|
||||
< *:py3file*
|
||||
The |:py3file| command works similar to |:pyfile|.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ruby.txt* For Vim version 7.3. Last change: 2010 Oct 27
|
||||
*if_ruby.txt* For Vim version 7.3. Last change: 2012 Aug 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Shugo Maeda
|
||||
@@ -25,7 +25,8 @@ downloading Ruby there.
|
||||
1. Commands *ruby-commands*
|
||||
|
||||
*:ruby* *:rub*
|
||||
:rub[y] {cmd} Execute Ruby command {cmd}.
|
||||
:rub[y] {cmd} Execute Ruby command {cmd}. A command to try it out: >
|
||||
:ruby print "Hello"
|
||||
|
||||
:rub[y] << {endpattern}
|
||||
{script}
|
||||
@@ -40,9 +41,6 @@ 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()
|
||||
@@ -211,6 +209,8 @@ for sure edit "gvim.exe" and search for "ruby\d*.dll\c".
|
||||
|
||||
If you want to build Vim with Ruby 1.9.1, you need to edit the config.h file
|
||||
and comment-out the check for _MSC_VER.
|
||||
You may also need to rename the include directory name to match the version,
|
||||
strangely for Ruby 1.9.3 the directory is called 1.9.1.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_tcl.txt* For Vim version 7.3. Last change: 2008 Aug 16
|
||||
*if_tcl.txt* For Vim version 7.3. Last change: 2012 Aug 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ingo Wilken
|
||||
@@ -27,7 +27,9 @@ comments, ideas etc to <Ingo.Wilken@informatik.uni-oldenburg.de>
|
||||
1. Commands *tcl-ex-commands* *E571* *E572*
|
||||
|
||||
*:tcl* *:tc*
|
||||
:tc[l] {cmd} Execute Tcl command {cmd}.
|
||||
:tc[l] {cmd} Execute Tcl command {cmd}. A simple check if `:tcl`
|
||||
is working: >
|
||||
:tcl puts "Hello"
|
||||
|
||||
:[range]tc[l] << {endmarker}
|
||||
{script}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 7.3. Last change: 2011 Sep 02
|
||||
*indent.txt* For Vim version 7.3. Last change: 2012 Aug 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -540,7 +540,7 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
*cino-star*
|
||||
*N Vim searches for unclosed comments at most N lines away. This
|
||||
limits the time needed to search for the start of a comment.
|
||||
If your /* */ comments stop indenting afer N lines this is the
|
||||
If your /* */ comments stop indenting after N lines this is the
|
||||
value you will want to change.
|
||||
(default 70 lines).
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.3. Last change: 2011 Aug 06
|
||||
*index.txt* For Vim version 7.3. Last change: 2012 Jul 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -719,6 +719,8 @@ tag char note action in Normal mode ~
|
||||
|gH| gH start Select line mode
|
||||
|gI| gI 2 like "I", but always start in column 1
|
||||
|gJ| gJ 2 join lines without inserting space
|
||||
|gN| gN 1,2 find the previous match with the last used
|
||||
search pattern and Visually select it
|
||||
|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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.3. Last change: 2011 May 15
|
||||
*intro.txt* For Vim version 7.3. Last change: 2012 Sep 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -394,6 +394,8 @@ CTRL-{char} {char} typed as a control character; that is, typing {char}
|
||||
*quotecommandquote*
|
||||
"command" A reference to a command that you can type is enclosed in
|
||||
double quotes.
|
||||
`command` New style command, this distinguishes it from other
|
||||
quoted text and strings.
|
||||
|
||||
*key-notation* *key-codes* *keycodes*
|
||||
These names for keys are used in the documentation. They can also be used
|
||||
|
||||
@@ -1244,6 +1244,7 @@ completion can be enabled:
|
||||
-complete=syntax syntax file names |'syntax'|
|
||||
-complete=tag tags
|
||||
-complete=tag_listfiles tags, file names are shown when CTRL-D is hit
|
||||
-complete=user user names
|
||||
-complete=var user variables
|
||||
-complete=custom,{func} custom completion, defined via {func}
|
||||
-complete=customlist,{func} custom completion, defined via {func}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.3. Last change: 2012 Jul 06
|
||||
*motion.txt* For Vim version 7.3. Last change: 2012 Aug 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -57,7 +57,7 @@ or change text. The following operators are available:
|
||||
|>| > shift right
|
||||
|<| < shift left
|
||||
|zf| zf define a fold
|
||||
|g@| g@ call function set with the 'operatorfunc' option
|
||||
|g@| g@ call function set with the 'operatorfunc' option
|
||||
|
||||
If the motion includes a count and the operator also had a count before it,
|
||||
the two counts are multiplied. For example: "2d3w" deletes six words.
|
||||
@@ -326,6 +326,7 @@ gg Goto line [count], default first line, on the first
|
||||
non-blank character |linewise|. If 'startofline' not
|
||||
set, keep the same column.
|
||||
|
||||
*:[range]*
|
||||
:[range] Set the cursor on the last line number in [range].
|
||||
[range] can also be just one line number, e.g., ":1"
|
||||
or ":'m".
|
||||
@@ -513,6 +514,8 @@ always select less text than the "a" commands.
|
||||
These commands are {not in Vi}.
|
||||
These commands are not available when the |+textobjects| feature has been
|
||||
disabled at compile time.
|
||||
Also see `gn` and `gN`, operating on the last search pattern.
|
||||
|
||||
*v_aw* *aw*
|
||||
aw "a word", select [count] words (see |word|).
|
||||
Leading or trailing white space is included, but not
|
||||
@@ -689,6 +692,7 @@ movement commands are used.
|
||||
"daw" delete a word *daw*
|
||||
"diW" delete inner WORD (see |WORD|) *diW*
|
||||
"daW" delete a WORD (see |WORD|) *daW*
|
||||
"dgn" delete the next search pattern match *dgn*
|
||||
"dd" delete one line |dd|
|
||||
"dis" delete inner sentence *dis*
|
||||
"das" delete a sentence *das*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.3. Last change: 2012 Jul 10
|
||||
*options.txt* For Vim version 7.3. Last change: 2012 Aug 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -6119,6 +6119,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to buffer
|
||||
Number of spaces to use for each step of (auto)indent. Used for
|
||||
|'cindent'|, |>>|, |<<|, etc.
|
||||
When zero the 'ts' value will be used.
|
||||
|
||||
*'shortmess'* *'shm'*
|
||||
'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "",
|
||||
@@ -7425,6 +7426,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
pterm QNX pterm mouse handling.
|
||||
*urxvt-mouse*
|
||||
urxvt Mouse handling for the urxvt (rxvt-unicode) terminal.
|
||||
*sgr-mouse*
|
||||
sgr Mouse handling for the terminal that emits SGR-styled
|
||||
mouse reporting. Works with xterm version 277 or
|
||||
later.
|
||||
|
||||
The mouse handling must be enabled at compile time |+mouse_xterm|
|
||||
|+mouse_dec| |+mouse_netterm|.
|
||||
@@ -7437,6 +7442,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
or "xterm2" already. The main use of this option is to set it to
|
||||
"xterm", when the terminal name doesn't start with "xterm", but it can
|
||||
handle xterm mouse codes.
|
||||
The "sgr" value will be set if the xterm version is 277 or later.
|
||||
The "xterm2" value will be set if the xterm version is reported to be
|
||||
95 or higher. This only works when compiled with the |+termresponse|
|
||||
feature and if |t_RV| is set to the escape sequence to request the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_gzip.txt* For Vim version 7.3. Last change: 2002 Oct 29
|
||||
*pi_gzip.txt* For Vim version 7.3. Last change: 2012 Jul 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -25,6 +25,8 @@ with these extensions:
|
||||
*.Z compress (Lempel-Ziv)
|
||||
*.gz gzip
|
||||
*.bz2 bzip2
|
||||
*.lzma lzma
|
||||
*.xz xz
|
||||
|
||||
That's actually the only thing you need to know. There are no options.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.3. Last change: 2012 Jun 13
|
||||
*syntax.txt* For Vim version 7.3. Last change: 2012 Jul 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -380,194 +380,23 @@ settings, depending on which syntax is active. Example: >
|
||||
This is not a syntax file itself, but a script that converts the current
|
||||
window into HTML. Vim opens a new window in which it builds the HTML file.
|
||||
|
||||
After you save the resulting file, you can view it with any browser. The
|
||||
colors should be exactly the same as you see them in Vim.
|
||||
|
||||
You are not supposed to set the 'filetype' or 'syntax' option to "2html"!
|
||||
Source the script to convert the current file: >
|
||||
|
||||
:runtime! syntax/2html.vim
|
||||
<
|
||||
*:TOhtml*
|
||||
Or use the ":TOhtml" user command. It is defined in a standard plugin.
|
||||
":TOhtml" also works with a range and in a Visual area: >
|
||||
|
||||
:10,40TOhtml
|
||||
|
||||
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
|
||||
|
||||
":TOhtml" has another special feature: if the window is in diff mode, it will
|
||||
generate HTML that shows all the related windows. This can be disabled by
|
||||
setting the g:html_diff_one_file variable: >
|
||||
|
||||
let g:html_diff_one_file = 1
|
||||
|
||||
After you save the resulting file, you can view it with any browser. The
|
||||
colors should be exactly the same as you see them in Vim.
|
||||
|
||||
To restrict the conversion to a range of lines, use a range with the |:TOhtml|
|
||||
command, or set "g:html_start_line" and "g:html_end_line" to the first and
|
||||
last line to be converted. Example, using the last set Visual area: >
|
||||
|
||||
:let g:html_start_line = line("'<")
|
||||
:let g:html_end_line = line("'>")
|
||||
|
||||
The lines are numbered according to 'number' option and the Number
|
||||
highlighting. You can force lines to be numbered in the HTML output by
|
||||
setting "html_number_lines" to non-zero value: >
|
||||
:let g:html_number_lines = 1
|
||||
Force to omit the line numbers by using a zero value: >
|
||||
:let g:html_number_lines = 0
|
||||
Go back to the default to use 'number' by deleting the variable: >
|
||||
:unlet g:html_number_lines
|
||||
|
||||
By default, valid HTML 4.01 using cascading style sheets (CSS1) is generated.
|
||||
If you need to generate markup for really old browsers or some other user
|
||||
agent that lacks basic CSS support, use: >
|
||||
:let g:html_use_css = 0
|
||||
|
||||
Concealed text is removed from the HTML and replaced with the appropriate
|
||||
character from |:syn-cchar| or 'listchars' depending on the current value of
|
||||
'conceallevel'. If you always want to display all text in your document,
|
||||
either set 'conceallevel' to zero before invoking 2html, or use: >
|
||||
:let g:html_ignore_conceal = 1
|
||||
|
||||
Similarly, closed folds are put in the HTML as they are displayed. If you
|
||||
don't want this, use the |zR| command before invoking 2html, or use: >
|
||||
:let g:html_ignore_folding = 1
|
||||
|
||||
You may want to generate HTML that includes all the data within the folds, and
|
||||
allow the user to view the folded data similar to how they would in Vim. To
|
||||
generate this dynamic fold information, use: >
|
||||
:let g:html_dynamic_folds = 1
|
||||
|
||||
Using html_dynamic_folds will imply html_use_css, because it would be far too
|
||||
difficult to do it for old browsers. However, html_ignore_folding overrides
|
||||
html_dynamic_folds.
|
||||
|
||||
Using html_dynamic_folds will default to generating a foldcolumn in the html
|
||||
similar to Vim's foldcolumn, that will use javascript to open and close the
|
||||
folds in the HTML document. The width of this foldcolumn starts at the current
|
||||
setting of |'foldcolumn'| but grows to fit the greatest foldlevel in your
|
||||
document. If you do not want to show a foldcolumn at all, use: >
|
||||
:let g:html_no_foldcolumn = 1
|
||||
|
||||
Using this option, there will be no foldcolumn available to open the folds in
|
||||
the HTML. For this reason, another option is provided: html_hover_unfold.
|
||||
Enabling this option will use CSS 2.0 to allow a user to open a fold by
|
||||
hovering the mouse pointer over it. Note that old browsers (notably Internet
|
||||
Explorer 6) will not support this feature. Browser-specific markup for IE6 is
|
||||
included to fall back to the normal CSS1 code so that the folds show up
|
||||
correctly for this browser, but they will not be openable without a
|
||||
foldcolumn. Note that using html_hover_unfold will allow modern browsers with
|
||||
disabled javascript to view closed folds. To use this option, use: >
|
||||
:let g:html_hover_unfold = 1
|
||||
|
||||
Setting html_no_foldcolumn with html_dynamic_folds will automatically set
|
||||
html_hover_unfold, because otherwise the folds wouldn't be dynamic.
|
||||
|
||||
By default "<pre>" and "</pre>" are used around the text. When 'wrap' is set
|
||||
in the window being converted, the CSS 2.0 "white-space:pre-wrap" value is
|
||||
used to wrap the text. You can explicitly enable the wrapping with: >
|
||||
:let g:html_pre_wrap = 1
|
||||
or disable with >
|
||||
:let g:html_pre_wrap = 0
|
||||
This generates HTML that looks very close to the Vim window, but unfortunately
|
||||
there can be minor differences such as the lack of a 'showbreak' option in in
|
||||
the HTML, or where line breaks can occur.
|
||||
|
||||
Another way to obtain text wrapping in the HTML, at the risk of making some
|
||||
things look even more different, is to use: >
|
||||
:let g:html_no_pre = 1
|
||||
This will use <br> at the end of each line and use " " for repeated
|
||||
spaces. Doing it this way is more compatible with old browsers, but modern
|
||||
browsers support the "white-space" method.
|
||||
|
||||
If you do stick with the default "<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
|
||||
|
||||
For most buffers, TOhtml uses the current value of 'fileencoding' if set, or
|
||||
'encoding' if not, to determine the charset and 'fileencoding' of the HTML
|
||||
file. 'encoding' is always used for certain 'buftype' values. 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*
|
||||
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 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|.
|
||||
Many variables affect the output of 2html.vim; see below. Any of the on/off
|
||||
options listed below 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:
|
||||
- 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
|
||||
- The latest TOhtml may actually 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.
|
||||
|
||||
@@ -575,6 +404,311 @@ Here is an example how to run the script over all .c and .h files from a
|
||||
Unix shell: >
|
||||
for f in *.[ch]; do gvim -f +"syn on" +"run! syntax/2html.vim" +"wq" +"q" $f; done
|
||||
<
|
||||
*g:html_start_line* *g:html_end_line*
|
||||
To restrict the conversion to a range of lines, use a range with the |:TOhtml|
|
||||
command below, or set "g:html_start_line" and "g:html_end_line" to the first
|
||||
and last line to be converted. Example, using the last set Visual area: >
|
||||
|
||||
:let g:html_start_line = line("'<")
|
||||
:let g:html_end_line = line("'>")
|
||||
:runtime! syntax/2html.vim
|
||||
<
|
||||
*:TOhtml*
|
||||
:[range]TOhtml The ":TOhtml" command is defined in a standard plugin.
|
||||
This command will source |2html.vim| for you. When a
|
||||
range is given, set |g:html_start_line| and
|
||||
|g:html_end_line| to the start and end of the range,
|
||||
respectively. Default range is the entire buffer.
|
||||
|
||||
If the current window is part of a |diff|, unless
|
||||
|g:html_diff_one_file| is set, :TOhtml will convert
|
||||
all windows which are part of the diff in the current
|
||||
tab and place them side-by-side in a <table> element
|
||||
in the generated HTML.
|
||||
|
||||
Examples: >
|
||||
|
||||
:10,40TOhtml " convert lines 10-40 to html
|
||||
:'<,'>TOhtml " convert current/last visual selection
|
||||
:TOhtml " convert entire buffer
|
||||
<
|
||||
*g:html_diff_one_file*
|
||||
Default: 0.
|
||||
When 0, all windows involved in a |diff| in the current tab page are converted
|
||||
to HTML and placed side-by-side in a <table> element.
|
||||
When 1, only the current buffer is converted.
|
||||
Example: >
|
||||
|
||||
let g:html_diff_one_file = 1
|
||||
<
|
||||
*g:html_whole_filler*
|
||||
Default: 0.
|
||||
When 0, if |g:html_diff_one_file| is 1, a sequence of more than 3 filler lines
|
||||
is displayed as three lines with the middle line mentioning the total number
|
||||
of inserted lines.
|
||||
When 1, always display all inserted lines as if |g:html_diff_one_file| were
|
||||
not set.
|
||||
>
|
||||
:let g:html_whole_filler = 1
|
||||
<
|
||||
*TOhtml-performance* *g:html_no_progress*
|
||||
Default: 0.
|
||||
When 0, display a progress bar in the statusline for each major step in the
|
||||
2html.vim conversion process.
|
||||
When 1, do not display the progress bar. This offers a minor speed improvement
|
||||
but you won't have any idea how much longer the conversion might take; for big
|
||||
files it can take a long time!
|
||||
Example: >
|
||||
|
||||
let g:html_no_progress = 1
|
||||
<
|
||||
You can obtain better performance improvements by also instructing Vim to not
|
||||
run interactively, so that too much time is not taken to redraw as the script
|
||||
moves through the buffer, switches windows, and the like: >
|
||||
|
||||
vim -E -s -c "let g:html_no_progress=1" -c "syntax on" -c "set ft=c" -c "runtime syntax/2html.vim" -cwqa myfile.c
|
||||
<
|
||||
Note that the -s flag prevents loading your .vimrc and any plugins, so you
|
||||
need to explicitly source/enable anything that will affect the HTML
|
||||
conversion. See |-E| and |-s-ex| for details. It is probably best to create a
|
||||
script to replace all the -c commands and use it with the -u flag instead of
|
||||
specifying each command separately.
|
||||
|
||||
*g:html_number_lines*
|
||||
Default: current 'number' setting.
|
||||
When 0, buffer text is displayed in the generated HTML without line numbering.
|
||||
When 1, a column of line numbers is added to the generated HTML with the same
|
||||
highlighting as the line number column in Vim (|hl-LineNr|).
|
||||
Force line numbers even if 'number' is not set: >
|
||||
:let g:html_number_lines = 1
|
||||
Force to omit the line numbers: >
|
||||
:let g:html_number_lines = 0
|
||||
Go back to the default to use 'number' by deleting the variable: >
|
||||
:unlet g:html_number_lines
|
||||
<
|
||||
*g:html_use_css*
|
||||
Default: 1.
|
||||
When 1, generate valid HTML 4.01 markup with CSS1 styling, supported in all
|
||||
modern browsers and most old browsers.
|
||||
When 0, generate <font> tags and similar outdated markup. This is not
|
||||
recommended but it may work better in really old browsers, email clients,
|
||||
forum posts, and similar situations where basic CSS support is unavailable.
|
||||
Example: >
|
||||
:let g:html_use_css = 0
|
||||
<
|
||||
*g:html_ignore_conceal*
|
||||
Default: 0.
|
||||
When 0, concealed text is removed from the HTML and replaced with a character
|
||||
from |:syn-cchar| or 'listchars' as appropriate, depending on the current
|
||||
value of 'conceallevel'.
|
||||
When 1, include all text from the buffer in the generated HTML, even if it is
|
||||
|conceal|ed.
|
||||
|
||||
Either of the following commands will ensure that all text in the buffer is
|
||||
included in the generated HTML (unless it is folded): >
|
||||
:let g:html_ignore_conceal = 1
|
||||
:setl conceallevel=0
|
||||
<
|
||||
*g:html_ignore_folding*
|
||||
Default: 0.
|
||||
When 0, text in a closed fold is replaced by the text shown for the fold in
|
||||
Vim (|fold-foldtext|). See |g:html_dynamic_folds| if you also want to allow
|
||||
the user to expand the fold as in Vim to see the text inside.
|
||||
When 1, include all text from the buffer in the generated HTML; whether the
|
||||
text is in a fold has no impact at all. |g:html_dynamic_folds| has no effect.
|
||||
|
||||
Either of these commands will ensure that all text in the buffer is included
|
||||
in the generated HTML (unless it is concealed): >
|
||||
zR
|
||||
:let g:html_ignore_folding = 1
|
||||
<
|
||||
*g:html_dynamic_folds*
|
||||
Default: 0.
|
||||
When 0, text in a closed fold is not included at all in the generated HTML.
|
||||
When 1, generate javascript to open a fold and show the text within, just like
|
||||
in Vim.
|
||||
|
||||
Setting this variable to 1 causes 2html.vim to always use CSS for styling,
|
||||
regardless of what |g:html_use_css| is set to.
|
||||
|
||||
This variable is ignored when |g:html_ignore_folding| is set.
|
||||
>
|
||||
:let g:html_dynamic_folds = 1
|
||||
<
|
||||
*g:html_no_foldcolumn*
|
||||
Default: 0.
|
||||
When 0, if |g:html_dynamic_folds| is 1, generate a column of text similar to
|
||||
Vim's foldcolumn (|fold-foldcolumn|) the user can click on to toggle folds
|
||||
open or closed. The minimum width of the generated text column is the current
|
||||
'foldcolumn' setting.
|
||||
When 1, do not generate this column; instead, hovering the mouse cursor over
|
||||
folded text will open the fold as if |g:html_hover_unfold| were set.
|
||||
>
|
||||
:let g:html_no_foldcolumn = 1
|
||||
<
|
||||
*TOhtml-uncopyable-text* *g:html_prevent_copy*
|
||||
Default: empty string.
|
||||
This option prevents certain regions of the generated HTML from being copied,
|
||||
when you select all text in document rendered in a browser and copy it. Useful
|
||||
for allowing users to copy-paste only the source text even if a fold column or
|
||||
line numbers are shown in the generated content. Specify regions to be
|
||||
affected in this way as follows:
|
||||
f: fold column
|
||||
n: line numbers (also within fold text)
|
||||
t: fold text
|
||||
d: diff filler
|
||||
|
||||
Example, to make the fold column and line numbers uncopyable: >
|
||||
:let g:html_prevent_copy = "fn"
|
||||
<
|
||||
This feature is currently implemented by inserting read-only <input> elements
|
||||
into the markup to contain the uncopyable areas. This does not work well in
|
||||
all cases. When pasting to some applications which understand HTML, the
|
||||
<input> elements also get pasted. But plain-text paste destinations should
|
||||
always work.
|
||||
|
||||
*g:html_no_invalid*
|
||||
Default: 0.
|
||||
When 0, if |g:html_prevent_copy| is non-empty, an invalid attribute is
|
||||
intentionally inserted into the <input> element for the uncopyable areas. This
|
||||
increases the number of applications you can paste to without also pasting the
|
||||
<input> elements. Specifically, Microsoft Word will not paste the <input>
|
||||
elements if they contain this invalid attribute.
|
||||
When 1, no invalid markup is ever intentionally inserted, and the generated
|
||||
page should validate. However, be careful pasting into Microsoft Word when
|
||||
|g:html_prevent_copy| is non-empty; it can be hard to get rid of the <input>
|
||||
elements which get pasted.
|
||||
|
||||
*g:html_hover_unfold*
|
||||
Default: 0.
|
||||
When 0, the only way to open a fold generated by 2html.vim with
|
||||
|g:html_dynamic_folds| set, is to click on the generated fold column.
|
||||
When 1, use CSS 2.0 to allow the user to open a fold by moving the mouse
|
||||
cursor over the displayed fold text. This is useful to allow users with
|
||||
disabled javascript to view the folded text.
|
||||
|
||||
Note that old browsers (notably Internet Explorer 6) will not support this
|
||||
feature. Browser-specific markup for IE6 is included to fall back to the
|
||||
normal CSS1 styling so that the folds show up correctly for this browser, but
|
||||
they will not be openable without a foldcolumn.
|
||||
>
|
||||
:let g:html_hover_unfold = 1
|
||||
<
|
||||
*TOhtml-wrap-text* *g:html_pre_wrap*
|
||||
Default: current 'wrap' setting.
|
||||
When 0, if |g:html_no_pre| is 0 or unset, the text in the generated HTML does
|
||||
not wrap at the edge of the browser window.
|
||||
When 1, if |g:html_use_css| is 1, the CSS 2.0 "white-space:pre-wrap" value is
|
||||
used, causing the text to wrap at whitespace at the edge of the browser
|
||||
window.
|
||||
Explicitly enable text wrapping: >
|
||||
:let g:html_pre_wrap = 1
|
||||
Explicitly disable wrapping: >
|
||||
:let g:html_pre_wrap = 0
|
||||
Go back to default, determine wrapping from 'wrap' setting: >
|
||||
:unlet g:html_pre_wrap
|
||||
<
|
||||
*g:html_no_pre*
|
||||
Default: 0.
|
||||
When 0, buffer text in the generated HTML is surrounded by <pre>...</pre>
|
||||
tags. Series of whitespace is shown as in Vim without special markup, and tab
|
||||
characters can be included literally (see |g:html_expand_tabs|).
|
||||
When 1 (not recommended), the <pre> tags are omitted, and a plain <div> is
|
||||
used instead. Whitespace is replaced by a series of character
|
||||
references, and <br> is used to end each line. This is another way to allow
|
||||
text in the generated HTML is wrap (see |g:html_pre_wrap|) which also works in
|
||||
old browsers, but may cause noticeable differences between Vim's display and
|
||||
the rendered page generated by 2html.vim.
|
||||
>
|
||||
:let g:html_no_pre = 1
|
||||
<
|
||||
*g:html_expand_tabs*
|
||||
Default: 1 if 'tabstop' is 8, 'expandtab' is 0, and no fold column or line
|
||||
numbers occur in the generated HTML;
|
||||
0 otherwise.
|
||||
When 0, <Tab> characters in the buffer text are replaced with an appropriate
|
||||
number of space characters, or references if |g:html_no_pre| is 1.
|
||||
When 1, if |g:html_no_pre| is 0 or unset, <Tab> characters in the buffer text
|
||||
are included as-is in the generated HTML. This is useful for when you want to
|
||||
allow copy and paste from a browser without losing the actual whitespace in
|
||||
the source document. Note that this can easily break text alignment and
|
||||
indentation in the HTML, unless set by default.
|
||||
|
||||
Force |2html.vim| to keep <Tab> characters: >
|
||||
:let g:html_expand_tabs = 0
|
||||
<
|
||||
Force tabs to be expanded: >
|
||||
:let g:html_expand_tabs = 1
|
||||
<
|
||||
*TOhtml-encoding-detect* *TOhtml-encoding*
|
||||
It is highly recommended to set your desired encoding with
|
||||
|g:html_use_encoding| for any content which will be placed on a web server.
|
||||
|
||||
If you do not specify an encoding, |2html.vim| uses the preferred IANA name
|
||||
for the current value of 'fileencoding' if set, or 'encoding' if not.
|
||||
'encoding' is always used for certain 'buftype' values. 'fileencoding' will be
|
||||
set to match the chosen document encoding.
|
||||
|
||||
Automatic detection works for the encodings mentioned specifically by name in
|
||||
|encoding-names|, but TOhtml will only automatically use those encodings with
|
||||
wide browser support. However, you can override this to support specific
|
||||
encodings that may not be automatically detected by default (see options
|
||||
below). See http://www.iana.org/assignments/character-sets for the IANA names.
|
||||
|
||||
Note, by default all Unicode encodings are converted to UTF-8 with no BOM in
|
||||
the generated HTML, as recommended by W3C:
|
||||
|
||||
http://www.w3.org/International/questions/qa-choosing-encodings
|
||||
http://www.w3.org/International/questions/qa-byte-order-mark
|
||||
|
||||
*g:html_use_encoding*
|
||||
Default: none, uses IANA name for current 'fileencoding' as above.
|
||||
To overrule all automatic charset detection, set g:html_use_encoding to the
|
||||
name of the charset to be used. 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 (NOT recommended): >
|
||||
:let g:html_use_encoding = ""
|
||||
To go back to the automatic mechanism, delete the |g:html_use_encoding|
|
||||
variable: >
|
||||
:unlet g:html_use_encoding
|
||||
<
|
||||
*g:html_encoding_override*
|
||||
Default: none, autoload/tohtml.vim contains default conversions for encodings
|
||||
mentioned by name at |encoding-names|.
|
||||
This option allows |2html.vim| to detect the correct 'fileencoding' when you
|
||||
specify an encoding with |g:html_use_encoding| which is not in the default
|
||||
list of conversions.
|
||||
|
||||
This is a dictionary of charset-encoding pairs that will replace existing
|
||||
pairs automatically detected by TOhtml, or supplement with new pairs.
|
||||
|
||||
Detect the HTML charset "windows-1252" as the encoding "8bit-cp1252": >
|
||||
:let g:html_encoding_override = {'windows-1252': '8bit-cp1252'}
|
||||
<
|
||||
*g:html_charset_override*
|
||||
Default: none, autoload/tohtml.vim contains default conversions for encodings
|
||||
mentioned by name at |encoding-names| and which have wide
|
||||
browser support.
|
||||
This option allows |2html.vim| 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 some major browsers.
|
||||
|
||||
*convert-to-XML* *convert-to-XHTML* *g:html_use_xhtml*
|
||||
Default: 0.
|
||||
When 0, generate standard HTML 4.01 (strict when possible).
|
||||
When 1, generate XHTML 1.0 instead (XML compliant HTML).
|
||||
>
|
||||
:let g:html_use_xhtml = 1
|
||||
<
|
||||
|
||||
ABEL *abel.vim* *ft-abel-syntax*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tabpage.txt* For Vim version 7.3. Last change: 2010 Jul 31
|
||||
*tabpage.txt* For Vim version 7.3. Last change: 2012 Aug 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -113,7 +113,7 @@ something else.
|
||||
this is a "safe" command.
|
||||
|
||||
:tabc[lose][!] {count}
|
||||
Close tab page {count}. Fails in the same way as ':tabclose"
|
||||
Close tab page {count}. Fails in the same way as `:tabclose`
|
||||
above.
|
||||
|
||||
*:tabo* *:tabonly*
|
||||
|
||||
@@ -1186,6 +1186,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
+mouse_gpm various.txt /*+mouse_gpm*
|
||||
+mouse_netterm various.txt /*+mouse_netterm*
|
||||
+mouse_pterm various.txt /*+mouse_pterm*
|
||||
+mouse_sgr various.txt /*+mouse_sgr*
|
||||
+mouse_sysmouse various.txt /*+mouse_sysmouse*
|
||||
+mouse_urxvt various.txt /*+mouse_urxvt*
|
||||
+mouse_xterm various.txt /*+mouse_xterm*
|
||||
@@ -1836,6 +1837,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:X editing.txt /*:X*
|
||||
:XMLent insert.txt /*:XMLent*
|
||||
:XMLns insert.txt /*:XMLns*
|
||||
:[range] motion.txt /*:[range]*
|
||||
:\bar cmdline.txt /*:\\bar*
|
||||
:_! cmdline.txt /*:_!*
|
||||
:_# cmdline.txt /*:_#*
|
||||
@@ -4463,6 +4465,11 @@ Syntax autocmd.txt /*Syntax*
|
||||
T motion.txt /*T*
|
||||
TCL if_tcl.txt /*TCL*
|
||||
TERM starting.txt /*TERM*
|
||||
TOhtml-encoding syntax.txt /*TOhtml-encoding*
|
||||
TOhtml-encoding-detect syntax.txt /*TOhtml-encoding-detect*
|
||||
TOhtml-performance syntax.txt /*TOhtml-performance*
|
||||
TOhtml-uncopyable-text syntax.txt /*TOhtml-uncopyable-text*
|
||||
TOhtml-wrap-text syntax.txt /*TOhtml-wrap-text*
|
||||
TSQL ft_sql.txt /*TSQL*
|
||||
TTpro-telnet syntax.txt /*TTpro-telnet*
|
||||
Tab intro.txt /*Tab*
|
||||
@@ -5285,6 +5292,7 @@ develop-spell develop.txt /*develop-spell*
|
||||
develop-spell-suggestions develop.txt /*develop-spell-suggestions*
|
||||
develop.txt develop.txt /*develop.txt*
|
||||
development develop.txt /*development*
|
||||
dgn motion.txt /*dgn*
|
||||
dh change.txt /*dh*
|
||||
diB motion.txt /*diB*
|
||||
diW motion.txt /*diW*
|
||||
@@ -5828,6 +5836,27 @@ g:gnat.Project_File ft_ada.txt /*g:gnat.Project_File*
|
||||
g:gnat.Set_Project_File() ft_ada.txt /*g:gnat.Set_Project_File()*
|
||||
g:gnat.Tags() ft_ada.txt /*g:gnat.Tags()*
|
||||
g:gnat.Tags_Command ft_ada.txt /*g:gnat.Tags_Command*
|
||||
g:html_charset_override syntax.txt /*g:html_charset_override*
|
||||
g:html_diff_one_file syntax.txt /*g:html_diff_one_file*
|
||||
g:html_dynamic_folds syntax.txt /*g:html_dynamic_folds*
|
||||
g:html_encoding_override syntax.txt /*g:html_encoding_override*
|
||||
g:html_end_line syntax.txt /*g:html_end_line*
|
||||
g:html_expand_tabs syntax.txt /*g:html_expand_tabs*
|
||||
g:html_hover_unfold syntax.txt /*g:html_hover_unfold*
|
||||
g:html_ignore_conceal syntax.txt /*g:html_ignore_conceal*
|
||||
g:html_ignore_folding syntax.txt /*g:html_ignore_folding*
|
||||
g:html_no_foldcolumn syntax.txt /*g:html_no_foldcolumn*
|
||||
g:html_no_invalid syntax.txt /*g:html_no_invalid*
|
||||
g:html_no_pre syntax.txt /*g:html_no_pre*
|
||||
g:html_no_progress syntax.txt /*g:html_no_progress*
|
||||
g:html_number_lines syntax.txt /*g:html_number_lines*
|
||||
g:html_pre_wrap syntax.txt /*g:html_pre_wrap*
|
||||
g:html_prevent_copy syntax.txt /*g:html_prevent_copy*
|
||||
g:html_start_line syntax.txt /*g:html_start_line*
|
||||
g:html_use_css syntax.txt /*g:html_use_css*
|
||||
g:html_use_encoding syntax.txt /*g:html_use_encoding*
|
||||
g:html_use_xhtml syntax.txt /*g:html_use_xhtml*
|
||||
g:html_whole_filler syntax.txt /*g:html_whole_filler*
|
||||
g:netrw_alto pi_netrw.txt /*g:netrw_alto*
|
||||
g:netrw_altv pi_netrw.txt /*g:netrw_altv*
|
||||
g:netrw_banner pi_netrw.txt /*g:netrw_banner*
|
||||
@@ -5949,6 +5978,7 @@ gF editing.txt /*gF*
|
||||
gH visual.txt /*gH*
|
||||
gI insert.txt /*gI*
|
||||
gJ change.txt /*gJ*
|
||||
gN visual.txt /*gN*
|
||||
gP change.txt /*gP*
|
||||
gQ intro.txt /*gQ*
|
||||
gR change.txt /*gR*
|
||||
@@ -6033,6 +6063,7 @@ glvs-options pi_getscript.txt /*glvs-options*
|
||||
glvs-plugins pi_getscript.txt /*glvs-plugins*
|
||||
glvs-usage pi_getscript.txt /*glvs-usage*
|
||||
gm motion.txt /*gm*
|
||||
gn visual.txt /*gn*
|
||||
gnat#Insert_Tags_Header() ft_ada.txt /*gnat#Insert_Tags_Header()*
|
||||
gnat#New() ft_ada.txt /*gnat#New()*
|
||||
gnat-xref ft_ada.txt /*gnat-xref*
|
||||
@@ -7510,6 +7541,7 @@ setuid change.txt /*setuid*
|
||||
setwinvar() eval.txt /*setwinvar()*
|
||||
sftp pi_netrw.txt /*sftp*
|
||||
sgml.vim syntax.txt /*sgml.vim*
|
||||
sgr-mouse options.txt /*sgr-mouse*
|
||||
sh-awk syntax.txt /*sh-awk*
|
||||
sh-embed syntax.txt /*sh-embed*
|
||||
sh.vim syntax.txt /*sh.vim*
|
||||
@@ -8296,11 +8328,13 @@ v_d change.txt /*v_d*
|
||||
v_g? change.txt /*v_g?*
|
||||
v_gF editing.txt /*v_gF*
|
||||
v_gJ change.txt /*v_gJ*
|
||||
v_gN visual.txt /*v_gN*
|
||||
v_gV visual.txt /*v_gV*
|
||||
v_g] tagsrch.txt /*v_g]*
|
||||
v_g_CTRL-G editing.txt /*v_g_CTRL-G*
|
||||
v_g_CTRL-] tagsrch.txt /*v_g_CTRL-]*
|
||||
v_gf editing.txt /*v_gf*
|
||||
v_gn visual.txt /*v_gn*
|
||||
v_gq change.txt /*v_gq*
|
||||
v_gv visual.txt /*v_gv*
|
||||
v_gw change.txt /*v_gw*
|
||||
@@ -8463,6 +8497,7 @@ vt100-cursor-keys term.txt /*vt100-cursor-keys*
|
||||
vt100-function-keys term.txt /*vt100-function-keys*
|
||||
w motion.txt /*w*
|
||||
w32-clientserver remote.txt /*w32-clientserver*
|
||||
w32-xpm-support gui_w32.txt /*w32-xpm-support*
|
||||
w:current_syntax syntax.txt /*w:current_syntax*
|
||||
w:quickfix_title quickfix.txt /*w:quickfix_title*
|
||||
w:var eval.txt /*w:var*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.3. Last change: 2012 Jul 11
|
||||
*todo.txt* For Vim version 7.3. Last change: 2012 Oct 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,51 +38,108 @@ Go through more coverity reports.
|
||||
|
||||
Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
|
||||
|
||||
Checking runtime scripts: Thilo Six, 2012 Jun 6.
|
||||
|
||||
Crash with 1023 byte directory name. (Danek Duvall, 2012 Sep 19)
|
||||
|
||||
Patch for wrong text in balloon, Issue 58. (Dominique Pelle)
|
||||
|
||||
Patch for menu.vim to correct message about adding spell file.
|
||||
(Jiri Sedlak, 2012 Sep 24)
|
||||
|
||||
GTK: problem with 'L' in 'guioptions' changing the window width.
|
||||
(Aaron Cornelius, 2012 Feb 6)
|
||||
|
||||
Checking runtime scripts: Thilo Six, 2012 Jun 6.
|
||||
Patch for SGR mouse with older xterm. (Hayaki Saito, 2012 Sep 19)
|
||||
|
||||
List of broken mirrors. (Chris Pentago, 2012 Jun 15)
|
||||
/tmp/broken-mirrors.csv
|
||||
Patch for crash with an autocommand. (ZyX, 2012 Sep 6, second one)
|
||||
Also patch for garbage, but use vim_strncpy() instead.
|
||||
|
||||
Patch to fix crash on Win32 when setting 'encoding'. (Jiri Sedlak, 2012 Sep
|
||||
12)
|
||||
|
||||
Patch to update example using empty(). (ZyX, 2012 Sep 13)
|
||||
|
||||
Javascript file where indent gets stuck on: GalaxyMaster, 2012 May 3.
|
||||
|
||||
Patch to fix black on black for terminal with 8 colors.
|
||||
(James McCoy, 2012 Jul 10)
|
||||
Updated French and Esperanto files. (Dominique Pelle, 2012 Aug 19)
|
||||
|
||||
Patch to make winrestview() work better. (Lech Lorens, 2012 Jul 10)
|
||||
When showing diffs filler lines may be hidden at first.
|
||||
Patch by Christian Brabandt, 2012 Sep 6.
|
||||
|
||||
Patch for memory leaks on exception. (ZyX, 2012 Sep 9)
|
||||
|
||||
The CompleteDone autocommand needs some info passed to it:
|
||||
- The word that was selected (empty if abandoned complete)
|
||||
- Type of completion: tag, omnifunc, user func.
|
||||
|
||||
Completefunc gets number passed instead of string.
|
||||
Patch from Yakuhiro Matsumoto, 2012 Jul 10
|
||||
mouse_sgr is not ordered alphabetically in :version output.
|
||||
Docs list mouse_urxvt as normal feature, should be big. (Hayaki Saito, 2012
|
||||
Aug 16)
|
||||
|
||||
User command complete can't handle spaces. Patch by Yasuhiro Matsumoto, 2012
|
||||
Jul 11.
|
||||
":gundo" command: global undo. Undoes changes spread over multiple files in
|
||||
the order they were made. Also ":gredo". Both with a count. Useful when
|
||||
tests fail after making changes and you forgot in which files.
|
||||
|
||||
Crash with vimdiff. (Don Cruickshank, 2012 Sep 23)
|
||||
|
||||
Win32: use 'guifontwide' for IME composition. (Taro Muraoka, 2012 Sep 30)
|
||||
Update Oct 2.
|
||||
|
||||
Patch to make multibyte input work on Win32 console when codepage differs from
|
||||
'encoding'. (Ken Takata, 2012 Sep 29)
|
||||
|
||||
It's possible to defined an input() function that overrides the built-in one.
|
||||
(ZyX, 2012 Sep 28)
|
||||
|
||||
Win32: When a directory name contains an exclamation mark, completion doesn't
|
||||
complete the contents of the directory. No escaping for the "!"? (Jan
|
||||
Stocker, 2012 Jan 5)
|
||||
|
||||
Help for v/V is not quite right. (Ben Fritz, 2012 Jun 4)
|
||||
Change [count]v to select last visual area [count] times?
|
||||
Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep
|
||||
28) Asked for tests.
|
||||
|
||||
Patch for IME handling, adds 'imactivatefunc' and 'imstatusfunc' option.
|
||||
(Yukihiro Nakadaira, 2012 Aug 16)
|
||||
Patch to improve IME handling. (Yasuhiro Matsumoto, 2012 Jul 18)
|
||||
|
||||
Issue 54: document behavior of -complete, also expands arg.
|
||||
|
||||
New syntax files for apt. (quidame, 2012 Sep 21)
|
||||
|
||||
Patch for if_lua. (Luis Carvalho, 2012 Aug 26, update Aug 29, another Aug 30,
|
||||
then Sep 1)
|
||||
|
||||
Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
MS-Windows: Crash opening very long file name starting with "\\".
|
||||
(Christian Brock, 2012 Jun 29)
|
||||
|
||||
Win32: patch for current directory, "loading iof conv". (Ken Takata, 2012 Sep
|
||||
15)
|
||||
|
||||
Syntax update problem in one buffer opened in two windows, bottom window is
|
||||
not correctly updated. (Paul Harris, 2012 Feb 27)
|
||||
|
||||
Patch to add assignments in cscope. (Uli Meis, Estabrooks, 2012 Sep 1)
|
||||
Alternate patch by Gary Johnson, Sep 4.
|
||||
|
||||
Patch to add getsid(). (Tyru, 2011 Oct 2) Do we want this? Update Oct 4.
|
||||
Or use expand('<sid>')?
|
||||
|
||||
Patch for :tabcloseleft, after closing a tab go to left tab. (William Bowers,
|
||||
2012 Aug 4)
|
||||
|
||||
Patch for Tab behavior with 'conceal'. (Dominique Pelle, 2012 Mar 18)
|
||||
Patch to test functionality of 'conceal' with tabs. (Simon Ruderich, 2012 Sep
|
||||
5) Update with screencol() and screenrow() functions: Sep 7.
|
||||
|
||||
Crash in autocmd that unloads buffers in a BufUnload event. (Andrew Pimlott,
|
||||
2012 Aug 11) Disallow :new when BufUnload is being handled?
|
||||
|
||||
MS-Windows ACL support doesn't work well. Patch from Ken Takata, 2012 Aug 29.
|
||||
Update Aug 31.
|
||||
|
||||
MS-Windows resizing problems:
|
||||
- Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun
|
||||
20. Uses getWindowRect() instead of GetWindowPlacement()
|
||||
@@ -99,30 +156,41 @@ The input map for CTRL-O in mswin.vim causes problems after CTRL-X CTRL-O.
|
||||
Suggestion for another map. (Philip Mat, 2012 Jun 18)
|
||||
But use "gi" instead of "a". Or use CTRL-\ CTRL-O.
|
||||
|
||||
Patch to support user name completion on MS-Windows. (Yasuhiro Matsumoto, 2012
|
||||
Aug 16)
|
||||
|
||||
URXVT:
|
||||
- will get stuck if byte sequence does not containe expected semicolon.
|
||||
- Use urxvt mouse support also in xterm. Explanations:
|
||||
http://www.midnight-commander.org/ticket/2662
|
||||
|
||||
Patch to add tests for if_xcmdsrv.c., Jul 8, need some more work. (Brian Burns)
|
||||
New tests Jul 13. Update Jul 17. Discussion Jul 18.
|
||||
|
||||
When running Vim in silent ex mode, an existing swapfile causes Vim to wait
|
||||
for a user action without a prompt. (Maarten Billemont, 2012 Feb 3)
|
||||
Do give the prompt? Quit with an error?
|
||||
|
||||
Patch for Make_mvc.mak and Make_ming.mak for Ruby support. (Yasuhiro
|
||||
Matsumoto, 2012 Jan 30)
|
||||
|
||||
Patch for 'backupcopy' default behavior for symlinks on Windows. (David Pope,
|
||||
2012 Mar 21, update Mar 31)
|
||||
With fix for memory leak: Ken Takata, 2012 Aug 24
|
||||
Another update Sep 24.
|
||||
|
||||
Patch to list user digraphs. (Christian Brabandt, 2012 Apr 14)
|
||||
|
||||
Patch for input method status. (Hirohito Higashi, 2012 Apr 18)
|
||||
|
||||
Patch to print the result of a :python command. (Maxim Philippov
|
||||
<philippovmi@gmail.com>, 2012 Aug 16) Update Aug 17.
|
||||
|
||||
Problem with winfixheight and resizing. (Yukihiro Nakadaira, 2011 Sep 17)
|
||||
Patch Sep 18.
|
||||
|
||||
Patch for IME problems. Remove hacking code for old IM. (Yukihiro Nakadaira,
|
||||
2012 Jul 20)
|
||||
|
||||
/[^\n] does match at a line break. Expected to do the same as /.
|
||||
|
||||
Patch for has('unnamedplus') docs. (Tony Mechelynck, 2011 Sep 27)
|
||||
And one for gui_x11.txt.
|
||||
|
||||
@@ -135,9 +203,6 @@ And one for gui_x11.txt.
|
||||
Problem with starting Visual block mode with :norm when 'virtualedit' is set.
|
||||
(David glts, 2012 Jun 5)
|
||||
|
||||
When 'guioptions' contains 'c' (use console dialog) then inputdialog() returns
|
||||
a different value when the dialog is cancelled. (David Fishburn, 2012 Jul 10)
|
||||
|
||||
":cd" doesn't work when current directory path contains "**".
|
||||
finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10)
|
||||
Requires a rewrite of the file_file_in_path code.
|
||||
@@ -169,9 +234,6 @@ Patch to add ":py3do". (Lilydjwg, 2012 Apr 7)
|
||||
|
||||
Plugin for Modeleasy. (Massimiliano Tripoli, 2011 Nov 29)
|
||||
|
||||
When using remote-silent the -R flag is not passed on. (Axel Bender, 2012 May
|
||||
31)
|
||||
|
||||
Updated syntax file for ssh_config, maintainer doesn't respond.
|
||||
(Leonard Ehrenfried, 2011 Sep 26)
|
||||
|
||||
@@ -288,6 +350,10 @@ Vim using lots of memory when joining lines. (John Little, 2010 Dec 3)
|
||||
|
||||
Changes to manpage plugin. (Elias Toivanen, 2011 Jul 25)
|
||||
|
||||
Patch to make "z=" work when 'spell' is off. Does this have nasty side
|
||||
effects? (Christian Brabandt, 2012 Aug 5)
|
||||
Would also need to do this for spellbadword() and spellsuggest().
|
||||
|
||||
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.
|
||||
@@ -393,7 +459,7 @@ Searching mixed with Visual mode doesn't redraw properly. (James Vega, 2010 Nov
|
||||
|
||||
New esperanto spell file can't be processed. (Dominique Pelle, 2011 Jan 30)
|
||||
- move compflags to separate growarray?
|
||||
- instead of a regexp use a hashtable. Expand '?', '*", '+'. What would be
|
||||
- instead of a regexp use a hashtable. Expand '?', '*', '+'. What would be
|
||||
the maximum repeat for * and +?
|
||||
|
||||
"L'Italie" noted as a spell error at start of the sentence. (Dominique Pelle,
|
||||
@@ -546,7 +612,7 @@ Find tail? Might have a / in argument. Find space? Might have space in
|
||||
path.
|
||||
|
||||
Test 51 fails when language set to German. (Marco, 2011 Jan 9)
|
||||
Dominique can't reproduc it.
|
||||
Dominique can't reproduce it.
|
||||
|
||||
'ambiwidth' should be global-local.
|
||||
|
||||
@@ -601,9 +667,6 @@ 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.
|
||||
|
||||
":e ~br<Tab>" does not complete to ":e /home/bram/". Would need to use
|
||||
getpwent() to find all the matches.
|
||||
|
||||
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
|
||||
@@ -731,10 +794,6 @@ 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)
|
||||
|
||||
Win32 GUI: Changing manifest helps for dpi changes (Joe Castro, 2009 Mar 27)
|
||||
|
||||
Win32 GUI: last message from startup doesn't show up when there is an echoerr
|
||||
@@ -920,6 +979,15 @@ escaping characters where the backslash is not removed later. Asked Chris for
|
||||
an alternate solution, also for src/ex_getln.c.
|
||||
This also fails when the file or directory name contains "%". (Thoml, 2008
|
||||
July 7)
|
||||
Using --remote-silent while the current directory has a # in the name does not
|
||||
work, the # needs to be escaped. (Tramblay Bruno, 2012 Sep 15)
|
||||
|
||||
When using remote-silent the -R flag is not passed on. (Axel Bender, 2012 May
|
||||
31)
|
||||
|
||||
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)
|
||||
|
||||
Problem with 'langmap' being used on the rhs of a mapping. (Nikolai Weibull,
|
||||
2008 May 14)
|
||||
|
||||
@@ -1681,7 +1681,7 @@ in your plugin file!
|
||||
HEADER
|
||||
|
||||
You will probably add new corrections to the plugin and soon have several
|
||||
versions laying around. And when distributing this file, people will want to
|
||||
versions lying around. And when distributing this file, people will want to
|
||||
know who wrote this wonderful plugin and where they can send remarks.
|
||||
Therefore, put a header at the top of your plugin: >
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 7.3. Last change: 2012 Jan 15
|
||||
*various.txt* For Vim version 7.3. Last change: 2012 Aug 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -355,6 +355,7 @@ N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse|
|
||||
B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse|
|
||||
N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal|
|
||||
N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|
|
||||
B *+mouse_sgr* Unix only: sgr mouse handling |sgr-mouse|
|
||||
N *+mouse_urxvt* Unix only: urxvt mouse handling |urxvt-mouse|
|
||||
N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse|
|
||||
B *+multi_byte* 16 and 32 bit characters |multibyte|
|
||||
@@ -415,7 +416,7 @@ S *+windows* more than one window
|
||||
m *+writebackup* |'writebackup'| is default on
|
||||
m *+xim* X input method |xim|
|
||||
*+xfontset* X fontset support |xfontset|
|
||||
m *+xpm_w32* Win32 GUI only: pixmap support |:sign-define|
|
||||
m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support|
|
||||
*+xsmp* XSMP (X session management) support
|
||||
*+xsmp_interact* interactive XSMP (X session management) support
|
||||
N *+xterm_clipboard* Unix only: xterm clipboard handling
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version5.txt* For Vim version 7.3. Last change: 2008 Dec 17
|
||||
*version5.txt* For Vim version 7.3. Last change: 2012 Aug 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -6,7 +6,7 @@
|
||||
Welcome to Vim Version 5.0!
|
||||
|
||||
This document lists the differences between Vim 4.x and Vim 5.0.
|
||||
Although 5.0 is mentioned here, this is also for version 5.1, 5.2, etc..
|
||||
Although 5.0 is mentioned here, this is also for version 5.1, 5.2, etc.
|
||||
See |vi_diff.txt| for an overview of differences between Vi and Vim 5.0.
|
||||
See |version4.txt| for differences between Vim 3.0 and Vim 4.0.
|
||||
|
||||
@@ -3888,7 +3888,7 @@ character is typed. Helps to close a /* */ comment in C. (Webb)
|
||||
When expand() has a second argument which is non-zero, don't use 'suffixes'
|
||||
and 'wildignore', return all matches.
|
||||
|
||||
'O' flag in 'cpoptions: When not included, Vim will not overwrite a file, if
|
||||
'O' flag in 'cpoptions' When not included, Vim will not overwrite a file, if
|
||||
it didn't exist when editing started but it does exist when the buffer is
|
||||
written to the file. The file must have been created outside of Vim, possibly
|
||||
without the user knowing it. When this is detected after a shell command,
|
||||
@@ -4499,7 +4499,7 @@ Could not get all windows back when using a smaller terminal screen. Didn't
|
||||
restore all windows when "winsize" was not in 'sessionoptions'. (Webb)
|
||||
|
||||
Command line completion for ":buffer" depended on 'ignorecase' for Unix, but
|
||||
not for DOS et al.. Now don't use 'ignorecase', but let it depend on whether
|
||||
not for DOS et al. Now don't use 'ignorecase', but let it depend on whether
|
||||
file names are case sensitive or not (like when expanding file names).
|
||||
|
||||
Win32 GUI: (Negri)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||
*version7.txt* For Vim version 7.3. Last change: 2012 Aug 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3587,7 +3587,7 @@ Files: src/eval.c, src/getchar.c, src/globals.h, src/main.c
|
||||
|
||||
Patch 7.0.085
|
||||
Problem: When doing "make test" the viminfo file is modified.
|
||||
Solution: Use another viminfo file after setting 'compatible.
|
||||
Solution: Use another viminfo file after setting 'compatible'.
|
||||
Files: src/testdir/test56.in
|
||||
|
||||
Patch 7.0.086
|
||||
@@ -7314,8 +7314,6 @@ Command line completion for :lmap and :lunmap.
|
||||
|
||||
Support syntax and filetype completion for user commands. (Christian Brabandt)
|
||||
|
||||
Add completion for ":ownsyntax" and improve completion for ":filetype".
|
||||
|
||||
Avoid use of the GTK main_loop() so that the GtkFileChooser can be used.
|
||||
(James Vega)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vi_diff.txt* For Vim version 7.3. Last change: 2011 Aug 29
|
||||
*vi_diff.txt* For Vim version 7.3. Last change: 2012 Aug 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -192,7 +192,7 @@ Syntax highlighting. |:syntax|
|
||||
|
||||
Spell checking. |spell|
|
||||
When the 'spell' option is set Vim will highlight spelling mistakes.
|
||||
About 40 languages are currently supported, selected with the
|
||||
About 50 languages are currently supported, selected with the
|
||||
'spelllang' option. In source code only comments and strings are
|
||||
checked for spelling.
|
||||
|
||||
@@ -653,7 +653,7 @@ You can backspace, CTRL-U and CTRL-W over line breaks if the 'backspace' (bs)
|
||||
option includes "eol". You can backspace over the start of insert if the
|
||||
'backspace' option includes "start".
|
||||
|
||||
When the 'paste' option is set, a few option are reset and mapping in insert
|
||||
When the 'paste' option is set, a few options are reset and mapping in insert
|
||||
mode and abbreviation are disabled. This allows for pasting text in windowing
|
||||
systems without unexpected results. When the 'paste' option is reset, the old
|
||||
option values are restored.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*visual.txt* For Vim version 7.3. Last change: 2012 Jun 14
|
||||
*visual.txt* For Vim version 7.3. Last change: 2012 Aug 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -62,8 +62,15 @@ position.
|
||||
|
||||
*v* *characterwise-visual*
|
||||
[count]v Start Visual mode per character.
|
||||
With [count] select that many characters, like moving
|
||||
the cursor right [count] characters. One less when
|
||||
With [count] select the same number of characters or
|
||||
lines as used for the last Visual operation, but at
|
||||
the current cursor position, multiplied by [count].
|
||||
When the previous Visual operation was on a block both
|
||||
the width and height of the block are multiplied by
|
||||
[count].
|
||||
When there was no previous Visual operation [count]
|
||||
characters are selected. This is like moving the
|
||||
cursor right N * [count] characters. One less when
|
||||
'selection' is not "exclusive".
|
||||
|
||||
*V* *linewise-visual*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 Jun 20
|
||||
" Last Change: 2012 Oct 03
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -633,6 +633,9 @@ au BufNewFile,BufRead *.dsl setf dsl
|
||||
" DTD (Document Type Definition for XML)
|
||||
au BufNewFile,BufRead *.dtd setf dtd
|
||||
|
||||
" DTS/DSTI (device tree files)
|
||||
au BufNewFile,BufRead *.dts,*.dtsi setf dts
|
||||
|
||||
" EDIF (*.edf,*.edif,*.edn,*.edo)
|
||||
au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif
|
||||
|
||||
@@ -1119,6 +1122,9 @@ au BufNewFile,BufRead *.nb setf mma
|
||||
" Maya Extension Language
|
||||
au BufNewFile,BufRead *.mel setf mel
|
||||
|
||||
" Mercurial (hg) commit file
|
||||
au BufNewFile,BufRead hg-editor-*.txt setf hgcommit
|
||||
|
||||
" Mercurial config (looks like generic config file)
|
||||
au BufNewFile,BufRead *.hgrc,*hgrc setf cfg
|
||||
|
||||
@@ -1769,6 +1775,10 @@ func! SetFileTypeSH(name)
|
||||
" Some .sh scripts contain #!/bin/tcsh.
|
||||
call SetFileTypeShell("tcsh")
|
||||
return
|
||||
elseif a:name =~ '\<zsh\>'
|
||||
" Some .sh scripts contain #!/bin/zsh.
|
||||
call SetFileTypeShell("zsh")
|
||||
return
|
||||
elseif a:name =~ '\<ksh\>'
|
||||
let b:is_kornshell = 1
|
||||
if exists("b:is_bash")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: generic Changelog file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-05-02
|
||||
" Latest Revision: 2012-08-23
|
||||
" Variables:
|
||||
" g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) -
|
||||
" description: the timeformat used in ChangeLog entries.
|
||||
@@ -106,10 +106,10 @@ if &filetype == 'changelog'
|
||||
|
||||
function! s:passwd_field(line, field)
|
||||
let fields = split(a:line, ':', 1)
|
||||
if len(fields) < field
|
||||
if len(fields) < a:field
|
||||
return ""
|
||||
endif
|
||||
return fields[field - 1]
|
||||
return fields[a:field - 1]
|
||||
endfunction
|
||||
|
||||
function! s:capitalize(word)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Zimbu
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 May 18
|
||||
" Last Change: 2012 Sep 08
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -34,7 +34,7 @@ setlocal errorformat^=%f\ line\ %l\ col\ %c:\ %m,ERROR:\ %m
|
||||
|
||||
" When the matchit plugin is loaded, this makes the % command skip parens and
|
||||
" braces in comments.
|
||||
let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=}\|\<UNTIL\>'
|
||||
let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=\(}\|\<UNTIL\>\)'
|
||||
|
||||
let b:match_skip = 's:comment\|string\|zimbuchar'
|
||||
|
||||
@@ -43,12 +43,36 @@ setlocal et sts=2 sw=2
|
||||
|
||||
" Does replace when a dot, space or closing brace is typed.
|
||||
func! GCUpperDot(what)
|
||||
let col = col(".") - strlen(a:what)
|
||||
if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != '.' && v:char != ')' && v:char != '}'
|
||||
if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != '.' && v:char != ')' && v:char != '}' && v:char != ','
|
||||
" no space or dot after the typed text
|
||||
let g:got_char = v:char
|
||||
return a:what
|
||||
endif
|
||||
return GCUpperCommon(a:what)
|
||||
endfunc
|
||||
|
||||
" Does not replace when a dot is typed.
|
||||
func! GCUpper(what)
|
||||
if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != ')' && v:char != ','
|
||||
" no space or other "terminating" character after the typed text
|
||||
let g:got_char = v:char
|
||||
return a:what
|
||||
endif
|
||||
return GCUpperCommon(a:what)
|
||||
endfunc
|
||||
|
||||
" Only replaces when a space is typed.
|
||||
func! GCUpperSpace(what)
|
||||
if v:char != ' '
|
||||
" no space after the typed text
|
||||
let g:got_char = v:char
|
||||
return a:what
|
||||
endif
|
||||
return GCUpperCommon(a:what)
|
||||
endfunc
|
||||
|
||||
func! GCUpperCommon(what)
|
||||
let col = col(".") - strlen(a:what)
|
||||
if col > 1 && getline('.')[col - 2] != ' '
|
||||
" no space before the typed text
|
||||
let g:got_char = 999
|
||||
@@ -64,34 +88,15 @@ func! GCUpperDot(what)
|
||||
return toupper(a:what)
|
||||
endfunc
|
||||
|
||||
" Does not replace when a dot is typed.
|
||||
func! GCUpper(what)
|
||||
if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != ')'
|
||||
" no space after the typed text
|
||||
let g:got_char = v:char
|
||||
return a:what
|
||||
endif
|
||||
return GCUpperDot(a:what)
|
||||
endfunc
|
||||
|
||||
" Only replaces when a space is typed.
|
||||
func! GCUpperSpace(what)
|
||||
if v:char != ' '
|
||||
" no space after the typed text
|
||||
let g:got_char = v:char
|
||||
return a:what
|
||||
endif
|
||||
return GCUpperDot(a:what)
|
||||
endfunc
|
||||
|
||||
iabbr <buffer> <expr> alias GCUpperSpace("alias")
|
||||
iabbr <buffer> <expr> arg GCUpperDot("arg")
|
||||
iabbr <buffer> <expr> bad GCUpper("bad")
|
||||
iabbr <buffer> <expr> break GCUpper("break")
|
||||
iabbr <buffer> <expr> case GCUpperSpace("case")
|
||||
iabbr <buffer> <expr> catch GCUpperSpace("catch")
|
||||
iabbr <buffer> <expr> check GCUpperDot("check")
|
||||
iabbr <buffer> <expr> class GCUpperSpace("class")
|
||||
iabbr <buffer> <expr> interface GCUpperSpace("interface")
|
||||
iabbr <buffer> <expr> implements GCUpperSpace("implements")
|
||||
iabbr <buffer> <expr> shared GCUpperSpace("shared")
|
||||
iabbr <buffer> <expr> continue GCUpper("continue")
|
||||
iabbr <buffer> <expr> default GCUpper("default")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 May 20
|
||||
" Last Change: 2012 Aug 02
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -22,6 +22,16 @@ let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
function GetVimIndent()
|
||||
let ignorecase_save = &ignorecase
|
||||
try
|
||||
let &ignorecase = 0
|
||||
return GetVimIndentIntern()
|
||||
finally
|
||||
let &ignorecase = ignorecase_save
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
function GetVimIndentIntern()
|
||||
" Find a non-blank line above the current line.
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Language: xml
|
||||
" Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2012 May 18
|
||||
" Last Change: 2012 Jul 25
|
||||
" Notes: 1) does not indent pure non-xml code (e.g. embedded scripts)
|
||||
" 2) will be confused by unbalanced tags in comments
|
||||
" or CDATA sections.
|
||||
@@ -31,8 +31,16 @@ if !exists('b:xml_indent_close')
|
||||
" let b:xml_indent_close = '.\{-}</\(address\)\@!'
|
||||
endif
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" [-- finish, if the function already exists --]
|
||||
if exists('*XmlIndentGet') | finish | endif
|
||||
if exists('*XmlIndentGet')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
fun! <SID>XmlIndentWithPattern(line, pat)
|
||||
let s = substitute('x'.a:line, a:pat, "\1", 'g')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Zimbu
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2011 Jun 19
|
||||
" Last Change: 2012 Sep 08
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -101,7 +101,7 @@ func GetZimbuIndent(lnum)
|
||||
endwhile
|
||||
endif
|
||||
|
||||
if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|BITS\|MODULE\|SHARED\)\>'
|
||||
if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|INTERFACE\|BITS\|MODULE\|SHARED\)\>'
|
||||
let plindent += &sw
|
||||
endif
|
||||
if thisline =~ '^\s*\(}\|ELSEIF\>\|ELSE\>\|CATCH\|FINALLY\|GENERATE_ELSEIF\>\|GENERATE_ELSE\>\|UNTIL\>\)'
|
||||
|
||||
87
runtime/keymap/belarusian-jcuken.vim
Normal file
87
runtime/keymap/belarusian-jcuken.vim
Normal file
@@ -0,0 +1,87 @@
|
||||
" Vim Keymap file for Belarusian characters, layout 'jcuken', classical variant
|
||||
" Useful mainly with UTF-8, but may work with other encodings.
|
||||
|
||||
" Derived From: russian-jcuken.vim
|
||||
" Maintainer: Aliaksei Nestserau <aliaksei@screencustoms.com>
|
||||
" Last Changed: 2012 Jul 23
|
||||
|
||||
" All characters are given literally, conversion to another encoding (e.g.,
|
||||
" UTF-8) should work.
|
||||
scriptencoding utf-8
|
||||
|
||||
let b:keymap_name = "by"
|
||||
|
||||
loadkeymap
|
||||
~ Ё CYRILLIC CAPITAL LETTER IO
|
||||
` ё CYRILLIC SMALL LETTER IO
|
||||
F А CYRILLIC CAPITAL LETTER A
|
||||
< Б CYRILLIC CAPITAL LETTER BE
|
||||
D В CYRILLIC CAPITAL LETTER VE
|
||||
U Г CYRILLIC CAPITAL LETTER GHE
|
||||
L Д CYRILLIC CAPITAL LETTER DE
|
||||
T Е CYRILLIC CAPITAL LETTER IE
|
||||
: Ж CYRILLIC CAPITAL LETTER ZHE
|
||||
P З CYRILLIC CAPITAL LETTER ZE
|
||||
B І CYRILLIC CAPITAL LETTER I
|
||||
Q Й CYRILLIC CAPITAL LETTER SHORT I
|
||||
R К CYRILLIC CAPITAL LETTER KA
|
||||
K Л CYRILLIC CAPITAL LETTER EL
|
||||
V М CYRILLIC CAPITAL LETTER EM
|
||||
Y Н CYRILLIC CAPITAL LETTER EN
|
||||
J О CYRILLIC CAPITAL LETTER O
|
||||
G П CYRILLIC CAPITAL LETTER PE
|
||||
H Р CYRILLIC CAPITAL LETTER ER
|
||||
C С CYRILLIC CAPITAL LETTER ES
|
||||
N Т CYRILLIC CAPITAL LETTER TE
|
||||
E У CYRILLIC CAPITAL LETTER U
|
||||
A Ф CYRILLIC CAPITAL LETTER EF
|
||||
{ Х CYRILLIC CAPITAL LETTER HA
|
||||
W Ц CYRILLIC CAPITAL LETTER TSE
|
||||
X Ч CYRILLIC CAPITAL LETTER CHE
|
||||
I Ш CYRILLIC CAPITAL LETTER SHA
|
||||
O Ў CYRILLIC CAPITAL LETTER ASYLLABIC U
|
||||
} ' APOSTROPHE
|
||||
S Ы CYRILLIC CAPITAL LETTER YERU
|
||||
M Ь CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
\" Э CYRILLIC CAPITAL LETTER E
|
||||
> Ю CYRILLIC CAPITAL LETTER YU
|
||||
Z Я CYRILLIC CAPITAL LETTER YA
|
||||
f а CYRILLIC SMALL LETTER A
|
||||
, б CYRILLIC SMALL LETTER BE
|
||||
d в CYRILLIC SMALL LETTER VE
|
||||
u г CYRILLIC SMALL LETTER GHE
|
||||
l д CYRILLIC SMALL LETTER DE
|
||||
t е CYRILLIC SMALL LETTER IE
|
||||
; ж CYRILLIC SMALL LETTER ZHE
|
||||
p з CYRILLIC SMALL LETTER ZE
|
||||
b і CYRILLIC SMALL LETTER I
|
||||
q й CYRILLIC SMALL LETTER SHORT I
|
||||
r к CYRILLIC SMALL LETTER KA
|
||||
k л CYRILLIC SMALL LETTER EL
|
||||
v м CYRILLIC SMALL LETTER EM
|
||||
y н CYRILLIC SMALL LETTER EN
|
||||
j о CYRILLIC SMALL LETTER O
|
||||
g п CYRILLIC SMALL LETTER PE
|
||||
h р CYRILLIC SMALL LETTER ER
|
||||
c с CYRILLIC SMALL LETTER ES
|
||||
n т CYRILLIC SMALL LETTER TE
|
||||
e у CYRILLIC SMALL LETTER U
|
||||
a ф CYRILLIC SMALL LETTER EF
|
||||
[ х CYRILLIC SMALL LETTER HA
|
||||
w ц CYRILLIC SMALL LETTER TSE
|
||||
x ч CYRILLIC SMALL LETTER CHE
|
||||
i ш CYRILLIC SMALL LETTER SHA
|
||||
o ў CYRILLIC SMALL LETTER ASYLLABIC U
|
||||
] ' APOSTROPHE
|
||||
s ы CYRILLIC SMALL LETTER YERU
|
||||
m ь CYRILLIC SMALL LETTER SOFT SIGN
|
||||
' э CYRILLIC SMALL LETTER E
|
||||
. ю CYRILLIC SMALL LETTER YU
|
||||
z я CYRILLIC SMALL LETTER YA
|
||||
@ "
|
||||
# '
|
||||
$ *
|
||||
% :
|
||||
^ ,
|
||||
& .
|
||||
* ;
|
||||
@@ -1,7 +1,7 @@
|
||||
" Set options and add mapping such that Vim behaves a lot like MS-Windows
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2012 Jun 13
|
||||
" Last change: 2012 Jul 25
|
||||
|
||||
" bail out if this isn't wanted (mrsvim.vim uses this).
|
||||
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
|
||||
@@ -45,7 +45,7 @@ cmap <S-Insert> <C-R>+
|
||||
" Use CTRL-G u to have CTRL-Z only undo the paste.
|
||||
|
||||
exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
|
||||
exe 'vnoremap <script> <C-V>' . paste#paste_cmd['v']
|
||||
exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
|
||||
|
||||
imap <S-Insert> <C-V>
|
||||
vmap <S-Insert> <C-V>
|
||||
|
||||
@@ -1,40 +1,95 @@
|
||||
" Vim plugin for converting a syntax highlighted file to HTML.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2011 May 26
|
||||
" Last Change: 2012 Jul 12
|
||||
"
|
||||
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
|
||||
" $VIMRUNTIME/syntax/2html.vim
|
||||
"
|
||||
" TODO:
|
||||
" TODO: {{{
|
||||
" * Bug: still a 1px gap throughout the fold column when html_prevent_copy is
|
||||
" "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome
|
||||
" on Windows). Perhaps it is font related?
|
||||
" * Bug: still some gaps in the fold column when html_prevent_copy contains
|
||||
" 'd' and showing the whole diff (observed in multiple browsers). Only gaps
|
||||
" on diff lines though.
|
||||
" * anchors on each line so you can do file.html#1234 to get to line 1234
|
||||
" * add a modeline to the generated html to set nofoldenable or fdm=manual
|
||||
" because syntax folding takes a terribly long time to work with the weird
|
||||
" formatting the script does.
|
||||
" * Options for generating the CSS in external style sheets. New :TOcss
|
||||
" command to convert the current color scheme into a (mostly) generic CSS
|
||||
" stylesheet which can be re-used. Alternate stylesheet support?
|
||||
" * Undercurl support via CSS3, with fallback to dotted or something:
|
||||
" https://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion
|
||||
" * Redo updates for modified default foldtext (v11) when/if the patch is
|
||||
" accepted to modify it.
|
||||
" * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold
|
||||
" +ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress
|
||||
" +number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml
|
||||
" does not show the whole diff filler as it is supposed to.
|
||||
" * Add option for not generating the hyperlink on stuff that looks like a
|
||||
" URL? Or just color the link to fit with the colorscheme (and only special
|
||||
" when hovering)?
|
||||
" * Bug: when 'isprint' is wrong for the current encoding, will generate
|
||||
" invalid content. Can/should anything be done about this? Maybe a separate
|
||||
" plugin to correct 'isprint' based on encoding?
|
||||
" * Check to see if the windows-125\d encodings actually work in Unix without
|
||||
" the 8bit- prefix. Add prefix to autoload dictionaries for Unix if not.
|
||||
" * Font auto-detection similar to
|
||||
" http://www.vim.org/scripts/script.php?script_id=2384 but for a variety of
|
||||
" platforms.
|
||||
" * Error thrown when sourcing 2html.vim directly when plugins are not loaded.
|
||||
" * Pull in code from http://www.vim.org/scripts/script.php?script_id=3113 :
|
||||
" - listchars support
|
||||
" - full-line background highlight
|
||||
" - other?
|
||||
" * Font auto-detection similar to
|
||||
" http://www.vim.org/scripts/script.php?script_id=2384
|
||||
" * Explicitly trigger IE8+ Standards Mode?
|
||||
" * Make it so deleted lines in a diff don't create side-scrolling
|
||||
" * Explicitly trigger IE8+ Standards Mode? Doesn't seem necessary yet.
|
||||
" * Make it so deleted lines in a diff don't create side-scrolling (get it
|
||||
" free with full-line background highlight above).
|
||||
" * Restore open/closed folds and cursor position after processing each file
|
||||
" with option not to restore for speed increase
|
||||
" * Undercurl support via dotted bottom border?
|
||||
" with option not to restore for speed increase.
|
||||
" * 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
|
||||
"
|
||||
"}}}
|
||||
|
||||
if exists('g:loaded_2html_plugin')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_2html_plugin = 'vim7.3_v10'
|
||||
let g:loaded_2html_plugin = 'vim7.3_v12'
|
||||
|
||||
"
|
||||
" Changelog:
|
||||
" 7.3_v10 (this version): Fix error E684 when converting a range wholly inside
|
||||
" Changelog: {{{
|
||||
"
|
||||
" 7.3_v12 (this version): Fix modeline mangling to also work for when multiple
|
||||
" highlight groups make up the start-of-modeline text.
|
||||
" Improve render time of page with uncopyable regions
|
||||
" by not using one-input-per-char. Change name of
|
||||
" uncopyable option from html_unselectable to
|
||||
" html_prevent_copy. Added html_no_invalid option and
|
||||
" default to inserting invalid markup for uncopyable
|
||||
" regions to prevent MS Word from pasting undeletable
|
||||
" <input> elements. Fix 'cpo' handling (Thilo Six).
|
||||
" 7.3_v12b1: Add html_unselectable option. Rework logic to
|
||||
" eliminate post-processing substitute commands in
|
||||
" favor of doing the work up front. Remove unnecessary
|
||||
" special treatment of 'LineNr' highlight group. Minor
|
||||
" speed improvements. Fix modeline mangling in
|
||||
" generated output so it works for text in the first
|
||||
" column. Fix missing line number and fold column in
|
||||
" diff filler lines. Fix that some fonts have a 1px
|
||||
" gap (using a dirty hack, improvements welcome). Add
|
||||
" "colorscheme" meta tag. Does NOT include support for
|
||||
" the new default foldtext added in v11, as the patch
|
||||
" adding it has not yet been included in Vim.
|
||||
" 7.3_v11 ( unreleased ): Support new default foldtext from patch by Christian
|
||||
" Brabandt in
|
||||
" http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion.
|
||||
" This patch has not yet been included in Vim, thus
|
||||
" these changes are removed in the next version.
|
||||
" 7.3_v10 (fd09a9c8468e): Fix error E684 when converting a range wholly inside
|
||||
" multiple nested folds with dynamic folding on.
|
||||
" Also fix problem with foldtext in this situation.
|
||||
" 7.3_v9 (0877b8d6370e): Add html_pre_wrap option active with html_use_css
|
||||
@@ -81,14 +136,15 @@ let g:loaded_2html_plugin = 'vim7.3_v10'
|
||||
" 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
|
||||
"}}}
|
||||
|
||||
" Define the :TOhtml command when:
|
||||
" - 'compatible' is not set
|
||||
" - this plugin was not already loaded
|
||||
" - user commands are available.
|
||||
" - user commands are available. {{{
|
||||
if !&cp && !exists(":TOhtml") && has("user_commands")
|
||||
command -range=% TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
|
||||
endif
|
||||
endif "}}}
|
||||
|
||||
" 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 support file to detect file types in scripts
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2010 Sep 22
|
||||
" Last change: 2012 Aug 30
|
||||
|
||||
" This file is called by an autocommand for every file that has just been
|
||||
" loaded into a buffer. It checks if the type of file can be recognized by
|
||||
@@ -198,7 +198,8 @@ else
|
||||
" - "=== ", line of "=", "---", "+++ " (SVK diff)
|
||||
" - "=== ", "--- ", "+++ " (bzr diff, common case)
|
||||
" - "=== (removed|added|renamed|modified)" (bzr diff, alternative)
|
||||
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)'
|
||||
" - "# HG changeset patch" in first line (Mercurial export format)
|
||||
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)'
|
||||
\ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ')
|
||||
\ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ')
|
||||
\ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ')
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
*** br_FR.orig.aff 2010-04-14 18:44:36.365731271 +0200
|
||||
--- br_FR.aff 2010-04-14 18:43:31.069137439 +0200
|
||||
*** br_FR.aff.orig 2012-08-01 22:40:24.000000000 +0200
|
||||
--- br_FR.aff 2012-08-01 22:46:03.028851510 +0200
|
||||
***************
|
||||
*** 9,14 ****
|
||||
--- 9,16 ----
|
||||
*** 13,20 ****
|
||||
SET UTF-8
|
||||
TRY esiaùnñrtolcdugmphbyfvkwzESIAÙNÑRTOLCDUGMPHBYFVKWZ'
|
||||
|
||||
# Permet à l'utilitaire en ligne de commande hunspell de fonctionner avec les mots contenant des quotes (lec'hienn, ...)
|
||||
! WORDCHARS '
|
||||
|
||||
FLAG long
|
||||
|
||||
--- 13,22 ----
|
||||
SET UTF-8
|
||||
TRY esiaùnñrtolcdugmphbyfvkwzESIAÙNÑRTOLCDUGMPHBYFVKWZ'
|
||||
|
||||
+ MIDWORD '
|
||||
+
|
||||
PFX m Y 1
|
||||
PFX m 0 m' [aehiouy]
|
||||
# Permet à l'utilitaire en ligne de commande hunspell de fonctionner avec les mots contenant des quotes (lec'hienn, ...)
|
||||
! WORDCHARS '-
|
||||
|
||||
FLAG long
|
||||
|
||||
|
||||
@@ -25,16 +25,16 @@ $SPELLDIR/br.utf-8.spl : $FILES
|
||||
#
|
||||
# Fetching the files from OpenOffice.org.
|
||||
#
|
||||
OODIR = http://extensions.services.openoffice.org/e-files/2207/3
|
||||
:attr {fetch = $OODIR/%file%} dict-br_0.3.oxt
|
||||
OODIR = http://extensions.services.openoffice.org/e-files/2207/6
|
||||
:attr {fetch = $OODIR/%file%} dict-br_0.8.oxt
|
||||
|
||||
# The files don't depend on the .zip file so that we can delete it.
|
||||
# Only download the zip file if the targets don't exist.
|
||||
br_FR.aff br_FR.dic: {buildcheck=}
|
||||
:assertpkg unzip patch
|
||||
:fetch dict-br_0.3.oxt
|
||||
:sys $UNZIP dict-br_0.3.oxt
|
||||
:delete dict-br_0.3.oxt
|
||||
:fetch dict-br_0.8.oxt
|
||||
:sys $UNZIP dict-br_0.8.oxt
|
||||
:delete dict-br_0.8.oxt
|
||||
:copy dictionaries/br_FR.aff br_FR.aff
|
||||
:copy dictionaries/br_FR.dic br_FR.dic
|
||||
# The br_FR.aff file contains a BOM, remove it.
|
||||
@@ -65,12 +65,12 @@ diff:
|
||||
|
||||
check:
|
||||
:assertpkg unzip diff
|
||||
:fetch dict-br_0.3.oxt
|
||||
:fetch dict-br_0.8.oxt
|
||||
:mkdir tmp
|
||||
:cd tmp
|
||||
@try:
|
||||
@import stat
|
||||
:sys $UNZIP ../dict-br_0.3.oxt
|
||||
:sys $UNZIP ../dict-br_0.8.oxt
|
||||
:sys {force} diff ../dictionaries/br_FR.aff br_FR.aff >d
|
||||
@if os.stat('d')[stat.ST_SIZE] > 0:
|
||||
:copy br_FR.aff ../br_FR.new.aff
|
||||
@@ -80,7 +80,7 @@ check:
|
||||
@finally:
|
||||
:cd ..
|
||||
:delete {r}{f}{q} tmp
|
||||
:delete dict-br_0.3.oxt
|
||||
:delete dict-br_0.8.oxt
|
||||
|
||||
|
||||
# vim: set sts=4 sw=4 :
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Good old CFG files
|
||||
" Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru)
|
||||
" Last change: 2001 Sep 02
|
||||
" Last change: 2012 Aug 11
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -18,7 +18,7 @@ syn match UncPath "\\\\\p*" contained
|
||||
"Dos Drive:\Path
|
||||
syn match CfgDirectory "[a-zA-Z]:\\\p*" contained
|
||||
"Parameters
|
||||
syn match CfgParams ".*="me=e-1 contains=CfgComment
|
||||
syn match CfgParams ".\{0}="me=e-1 contains=CfgComment
|
||||
"... and their values (don't want to highlight '=' sign)
|
||||
syn match CfgValues "=.*"hs=s+1 contains=CfgDirectory,UncPath,CfgComment,CfgString,CfgOnOff
|
||||
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
" Vim syntax file
|
||||
" Language: CL
|
||||
" (pronounced alphabetically, and NOT known as Clever)
|
||||
" (CL was created by Multibase, http://www.mbase.com.au)
|
||||
" Language: CL
|
||||
" (pronounced alphabetically, and NOT known as Clever)
|
||||
" (CL was created by Multibase, http://www.mbase.com.au)
|
||||
" Filename extensions: *.ent
|
||||
" *.eni
|
||||
" *.eni
|
||||
" Maintainer: Philip Uren <philuSPAX@ieee.org> Remove SPAX spam block
|
||||
" Version: 4
|
||||
" Last Change: May 11 2012
|
||||
" Version: 5
|
||||
" Last Change: Aug 16 2012
|
||||
|
||||
" 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
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
|
||||
if version >= 600
|
||||
setlocal iskeyword=@,48-57,_,-,
|
||||
setlocal iskeyword=@,48-57,_,-,
|
||||
else
|
||||
set iskeyword=@,48-57,_,-,
|
||||
set iskeyword=@,48-57,_,-,
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
@@ -27,87 +27,87 @@ syn case ignore
|
||||
syn sync lines=300
|
||||
|
||||
"If/else/elsif/endif and while/wend mismatch errors
|
||||
syn match clifError "\<wend\>"
|
||||
syn match clifError "\<elsif\>"
|
||||
syn match clifError "\<else\>"
|
||||
syn match clifError "\<endif\>"
|
||||
syn match clifError "\<wend\>"
|
||||
syn match clifError "\<elsif\>"
|
||||
syn match clifError "\<else\>"
|
||||
syn match clifError "\<endif\>"
|
||||
|
||||
syn match clSpaceError "\s\+$"
|
||||
syn match clSpaceError "\s\+$"
|
||||
|
||||
" If and while regions
|
||||
syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
|
||||
syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure
|
||||
syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
|
||||
syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure
|
||||
|
||||
" Make those TODO notes and debugging stand out!
|
||||
syn keyword clTodo contained TODO BUG DEBUG FIX
|
||||
syn match clNeedsWork contained "NEED[S]*\s\s*WORK"
|
||||
syn keyword clDebug contained debug
|
||||
syn keyword clTodo contained TODO BUG DEBUG FIX
|
||||
syn match clNeedsWork contained "NEED[S]*\s\s*WORK"
|
||||
syn keyword clDebug contained debug
|
||||
|
||||
syn match clComment "#.*$" contains=clTodo,clNeedsWork
|
||||
syn region clProcedure oneline start="^\s*[{}]" end="$"
|
||||
syn match clInclude "^\s*include\s.*"
|
||||
syn match clComment "#.*$" contains=clTodo,clNeedsWork,@Spell
|
||||
syn region clProcedure oneline start="^\s*[{}]" end="$"
|
||||
syn match clInclude "^\s*include\s.*"
|
||||
|
||||
" We don't put "debug" in the clSetOptions;
|
||||
" we contain it in clSet so we can make it stand out.
|
||||
syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
|
||||
syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug
|
||||
syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
|
||||
syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug
|
||||
|
||||
syn match clPreProc "^\s*#P.*"
|
||||
syn match clPreProc "^\s*#P.*"
|
||||
|
||||
syn keyword clConditional else elsif
|
||||
syn keyword clWhile continue endloop
|
||||
syn keyword clConditional else elsif
|
||||
syn keyword clWhile continue endloop
|
||||
" 'break' needs to be a region so we can sync on it above.
|
||||
syn region clBreak oneline start="^\s*break" end="$"
|
||||
syn region clBreak oneline start="^\s*break" end="$"
|
||||
|
||||
syn match clOperator "[!;|)(:.><+*=-]"
|
||||
syn match clOperator "[!;|)(:.><+*=-]"
|
||||
|
||||
syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
|
||||
syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
|
||||
|
||||
syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+
|
||||
syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+
|
||||
syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+ contains=@Spell
|
||||
syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+ contains=@Spell
|
||||
|
||||
syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
|
||||
syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
|
||||
|
||||
syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
|
||||
syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
|
||||
|
||||
syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
|
||||
syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
|
||||
|
||||
" 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_cl_syntax_inits")
|
||||
if version < 508
|
||||
let did_cl_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
if version >= 508 || !exists("did_cl_syntax_inits")
|
||||
if version < 508
|
||||
let did_cl_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink clifError Error
|
||||
HiLink clSpaceError Error
|
||||
HiLink clWhile Repeat
|
||||
HiLink clConditional Conditional
|
||||
HiLink clDebug Debug
|
||||
HiLink clNeedsWork Todo
|
||||
HiLink clTodo Todo
|
||||
HiLink clComment Comment
|
||||
HiLink clProcedure Procedure
|
||||
HiLink clBreak Procedure
|
||||
HiLink clInclude Include
|
||||
HiLink clSetOption Statement
|
||||
HiLink clSet Identifier
|
||||
HiLink clPreProc PreProc
|
||||
HiLink clOperator Operator
|
||||
HiLink clNumber Number
|
||||
HiLink clString String
|
||||
HiLink clQuote Delimiter
|
||||
HiLink clReserved Identifier
|
||||
HiLink clFunction Function
|
||||
HiLink clStatement Statement
|
||||
HiLink clifError Error
|
||||
HiLink clSpaceError Error
|
||||
HiLink clWhile Repeat
|
||||
HiLink clConditional Conditional
|
||||
HiLink clDebug Debug
|
||||
HiLink clNeedsWork Todo
|
||||
HiLink clTodo Todo
|
||||
HiLink clComment Comment
|
||||
HiLink clProcedure Procedure
|
||||
HiLink clBreak Procedure
|
||||
HiLink clInclude Include
|
||||
HiLink clSetOption Statement
|
||||
HiLink clSet Identifier
|
||||
HiLink clPreProc PreProc
|
||||
HiLink clOperator Operator
|
||||
HiLink clNumber Number
|
||||
HiLink clString String
|
||||
HiLink clQuote Delimiter
|
||||
HiLink clReserved Identifier
|
||||
HiLink clFunction Function
|
||||
HiLink clStatement Statement
|
||||
|
||||
delcommand HiLink
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "cl"
|
||||
|
||||
" vim: ts=8 sw=4
|
||||
" vim: ts=8 sw=8
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
" Vim syntax file
|
||||
" Language: Cascading Style Sheets
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/css.vim
|
||||
" Last Change: 2011 Dec 14
|
||||
" CSS2 by Nikolai Weibull
|
||||
" Full CSS2, HTML4 support by Yeti
|
||||
" Language: Cascading Style Sheets
|
||||
" Previous Contributor List:
|
||||
" Claudio Fleiner <claudio@fleiner.com> (Maintainer)
|
||||
" Yeti (Add full CSS2, HTML4 support)
|
||||
" Nikolai Weibull (Add CSS2 support)
|
||||
" Maintainer: Jules Wang <w.jq0722@gmail.com>
|
||||
" Last Change: 2012 Aug 21
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -19,6 +20,7 @@ endif
|
||||
|
||||
syn case ignore
|
||||
|
||||
" All HTML4 tags
|
||||
syn keyword cssTagName abbr acronym address applet area a b base
|
||||
syn keyword cssTagName basefont bdo big blockquote body br button
|
||||
syn keyword cssTagName caption center cite code col colgroup dd del
|
||||
@@ -27,32 +29,51 @@ syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i
|
||||
syn keyword cssTagName iframe img input ins isindex kbd label legend li
|
||||
syn keyword cssTagName link map menu meta noframes noscript ol optgroup
|
||||
syn keyword cssTagName option p param pre q s samp script select small
|
||||
syn keyword cssTagName span strike strong style sub sup tbody td
|
||||
syn keyword cssTagName span strike strong style sub sup table tbody td
|
||||
syn keyword cssTagName textarea tfoot th thead title tr tt ul u var
|
||||
syn match cssTagName "\<table\>"
|
||||
syn keyword cssTagName object
|
||||
|
||||
" HTML5 new tags 5*6=30
|
||||
syn keyword cssTagName article aside audio bdi canvas command
|
||||
syn keyword cssTagName datalist details embed figcaption figure footer
|
||||
syn keyword cssTagName header hgroup keygen mark meter nav
|
||||
syn keyword cssTagName output progress rt rp ruby section
|
||||
syn keyword cssTagName source summary time track video wbr
|
||||
|
||||
" Tags not supported in HTML5
|
||||
syn keyword cssDeprecated acronym applet basefont big center dir
|
||||
syn keyword cssDeprecated font frame frameset noframes strike tt
|
||||
|
||||
"syn match cssTagName "\<table\>"
|
||||
syn match cssTagName "\*"
|
||||
|
||||
syn match cssTagName "@page\>" nextgroup=cssDefinition
|
||||
|
||||
syn match cssSelectorOp "[+>.]"
|
||||
syn match cssSelectorOp2 "[~|]\?=" contained
|
||||
" selectors
|
||||
syn match cssSelectorOp "[,>+]"
|
||||
syn match cssSelectorOp2 "[~|^$*]\?=" contained
|
||||
" FIXME: add HTML5 attribute
|
||||
syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
|
||||
|
||||
" .class and #id
|
||||
syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+"
|
||||
|
||||
try
|
||||
syn match cssIdentifier "#[A-Za-z<>-<2D>_@][A-Za-z<>-<2D>0-9_@-]*"
|
||||
catch /^.*/
|
||||
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
|
||||
endtry
|
||||
|
||||
syn match cssTagName "@page\>" nextgroup=cssDefinition
|
||||
" FIXME: use cssVendor here
|
||||
syn match cssTagName "@\(-\(webkit\|moz\|o\|ms\)-\)\=keyframes\>" nextgroup=cssDefinition
|
||||
|
||||
syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl
|
||||
syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl
|
||||
syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
|
||||
"syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
|
||||
syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssError,cssComment,cssDefinition,cssURL,cssUnicodeEscape,cssIdentifier
|
||||
|
||||
syn match cssValueInteger contained "[-+]\=\d\+"
|
||||
syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\="
|
||||
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)"
|
||||
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\)"
|
||||
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)"
|
||||
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)"
|
||||
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)"
|
||||
@@ -73,20 +94,78 @@ syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon na
|
||||
syn case match
|
||||
syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background
|
||||
syn case ignore
|
||||
|
||||
syn match cssImportant contained "!\s*important\>"
|
||||
|
||||
syn match cssColor contained "\<transparent\>"
|
||||
syn match cssColor contained "\<white\>"
|
||||
syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>"
|
||||
syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>"
|
||||
"syn match cssColor contained "\<rgb\s*(\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*)"
|
||||
|
||||
syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\)\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\)\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\)\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear\|radial\)-gradient\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(matrix\(3d\)\=\|scale\(3d\|X\|Y|\Z\)\=\|translate\(3d\|X\|Y|\Z\)\=\|skew\(X\|Y\)\=\|rotate\(3d\|X\|Y|\Z\)\=\|perspective\)\s*(" end=")" oneline keepend
|
||||
|
||||
syn match cssImportant contained "!\s*important\>"
|
||||
|
||||
syn keyword cssCommonAttr contained auto none inherit
|
||||
" Prop and Attr
|
||||
" Reference: http://www.w3schools.com/cssref/default.asp
|
||||
syn keyword cssCommonAttr contained auto none inherit all
|
||||
syn keyword cssCommonAttr contained top bottom
|
||||
syn keyword cssCommonAttr contained medium normal
|
||||
|
||||
|
||||
syn match cssAnimationProp contained "\<animation\(-\(name\|duration\|timing-function\|delay\|iteration-cout\|play-state\)\)\=\>"
|
||||
|
||||
|
||||
syn keyword cssAnimationAttr contained infinite alternate paused running
|
||||
" bugfix: escape linear-gradient
|
||||
syn match cssAnimationAttr contained "\<linear\(-gradient\)\@!\>"
|
||||
syn match cssAnimationAttr contained "\<ease\(-\(in-out\|out\|in\)\)\=\>"
|
||||
|
||||
syn match cssBackgroundProp contained "\<background\(-\(color\|image\|attachment\|position\|clip\|origin\|size\)\)\=\>"
|
||||
syn keyword cssBackgroundAttr contained center fixed over contain
|
||||
syn match cssBackgroundAttr contained "\<no-repeat\>"
|
||||
syn match cssBackgroundAttr contained "\<repeat\(-[xy]\)\=\>"
|
||||
syn match cssBackgroundAttr contained "\<\(border\|content\|padding\)-box\>"
|
||||
|
||||
|
||||
syn match cssBorderOutlineProp contained "\<border\(-\(top\|right\|bottom\|left\)\)\=\(-\(width\|color\|style\)\)\=\>"
|
||||
syn match cssBorderOutlineProp contained "\<outline\(-\(width\|style\|color\)\)\=\>"
|
||||
syn match cssBorderOutlineProp contained "\<border-\(top\|bottom\)-\(left\|right\)\(-radius\)\=\>"
|
||||
syn match cssBorderOutlineProp contained "\<border-image\(-\(outset\|repeat\|slice\|source\|width\)\)\=\>"
|
||||
syn match cssBorderOutlineProp contained "\<border-radius\>"
|
||||
syn keyword cssBorderOutlineAttr contained thin thick medium
|
||||
syn keyword cssBorderOutlineAttr contained dotted dashed solid double groove ridge inset outset
|
||||
syn keyword cssBorderOutlineAttr contained hidden visible scroll collapse
|
||||
syn keyword cssBorderOutlineAttr contained stretch round
|
||||
|
||||
|
||||
syn match cssBoxProp contained "\<overflow\(-\(x\|y\|style\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<rotation\(-point\)=\>"
|
||||
syn keyword cssBoxAttr contained visible hidden scroll auto
|
||||
syn match cssBoxAttr contained "\<no-\(display\|content\)\>"
|
||||
|
||||
syn keyword cssColorProp contained opacity
|
||||
syn match cssColorProp contained "\<color-profile\>"
|
||||
syn match cssColorProp contained "\<rendering-intent\>"
|
||||
|
||||
|
||||
syn match cssDimensionProp contained "\<\(min\|max\)-\(width\|height\)\>"
|
||||
syn keyword cssDimensionProp contained height
|
||||
syn keyword cssDimensionProp contained width
|
||||
|
||||
" shadow and sizing are in other property groups
|
||||
syn match cssFlexibleBoxProp contained "\<box-\(align\|direction\|flex\|ordinal-group\|orient\|pack\|shadow\|sizing\)\>"
|
||||
syn keyword cssFlexibleBoxAttr contained start end center baseline stretch
|
||||
syn keyword cssFlexibleBoxAttr contained normal reverse
|
||||
syn keyword cssFlexibleBoxAttr contained single mulitple
|
||||
syn keyword cssFlexibleBoxAttr contained horizontal
|
||||
" bugfix: escape vertial-align
|
||||
syn match cssFlexibleBoxAttr contained "\<vertical\(-align\)\@!\>"
|
||||
syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>"
|
||||
|
||||
|
||||
syn match cssFontProp contained "\<font\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\)\=\>"
|
||||
syn match cssFontAttr contained "\<\(sans-\)\=\<serif\>"
|
||||
syn match cssFontAttr contained "\<small\(-\(caps\|caption\)\)\=\>"
|
||||
@@ -95,67 +174,92 @@ syn match cssFontAttr contained "\<message-box\>"
|
||||
syn match cssFontAttr contained "\<status-bar\>"
|
||||
syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>"
|
||||
syn keyword cssFontAttr contained cursive fantasy monospace italic oblique
|
||||
syn keyword cssFontAttr contained bold bolder lighter larger smaller
|
||||
syn keyword cssFontAttr contained icon menu
|
||||
syn match cssFontAttr contained "\<caption\>"
|
||||
syn keyword cssFontAttr contained large smaller larger
|
||||
syn keyword cssFontAttr contained narrower wider
|
||||
syn keyword cssFontAttr contained bold bolder light lighter larger smaller
|
||||
syn keyword cssFontAttr contained icon menu caption
|
||||
syn keyword cssFontAttr contained large smaller larger narrower wider
|
||||
syn keyword cssFontAttr contained Courier Arial Georgia Times
|
||||
|
||||
syn keyword cssColorProp contained color
|
||||
syn match cssColorProp contained "\<background\(-\(color\|image\|attachment\|position\)\)\=\>"
|
||||
syn keyword cssColorAttr contained center scroll fixed
|
||||
syn match cssColorAttr contained "\<repeat\(-[xy]\)\=\>"
|
||||
syn match cssColorAttr contained "\<no-repeat\>"
|
||||
|
||||
syn keyword cssGeneratedContentProp contained content quotes crop
|
||||
syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
|
||||
syn match cssGeneratedContentProp contained "\<move-to\>"
|
||||
syn match cssGeneratedContentProp contained "\<page-policy\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
|
||||
|
||||
|
||||
syn match cssGridProp contained "\<grid-\(columns\|rows\)\>"
|
||||
|
||||
syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>"
|
||||
|
||||
syn match cssListProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>"
|
||||
syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
|
||||
syn match cssListAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
|
||||
syn match cssListAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
|
||||
syn keyword cssListAttr contained disc circle square hebrew armenian georgian
|
||||
syn keyword cssListAttr contained inside outside
|
||||
|
||||
|
||||
syn match cssMarginProp contained "\<margin\(-\(top\|right\|bottom\|left\)\)\=\>"
|
||||
|
||||
syn match cssMultiColumnProp contained "\<column\(-\(\break-\(after\|before\)\|count\|gap\|rule\(-\(color\|style\|width\)\)\=\)\|span\|width\)\=\>"
|
||||
|
||||
|
||||
syn match cssPaddingProp contained "\<padding\(-\(top\|right\|bottom\|left\)\)\=\>"
|
||||
|
||||
syn keyword cssPositioningProp contained bottom clear clip display float left
|
||||
syn keyword cssPositioningProp contained position right top visibility
|
||||
syn match cssPositioningProp contained "\<z-index\>"
|
||||
syn keyword cssPositioningAttr contained block inline compact
|
||||
syn match cssPositioningAttr contained "\<table\(-\(row-gorup\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>"
|
||||
syn keyword cssPositioningAttr contained left right both
|
||||
syn match cssPositioningAttr contained "\<list-item\>"
|
||||
syn match cssPositioningAttr contained "\<inline-\(block\|table\)\>"
|
||||
syn keyword cssPositioningAttr contained static relative absolute fixed
|
||||
|
||||
syn match cssPrintProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
|
||||
syn keyword cssPrintProp contained orphans widows
|
||||
syn keyword cssPrintAttr contained landscape portrait crop cross always avoid
|
||||
|
||||
syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>"
|
||||
syn keyword cssTableAttr contained fixed collapse separate show hide once always
|
||||
|
||||
|
||||
syn keyword cssTextProp contained color direction
|
||||
syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>"
|
||||
syn match cssTextProp contained "\<text-\(justify\|\outline\|overflow\|warp\|align-last\)\>"
|
||||
syn match cssTextProp contained "\<word-\(break\|\wrap\)\>"
|
||||
syn match cssTextProp contained "\<white-space\>"
|
||||
syn match cssTextProp contained "\<hanging-punctuation\>"
|
||||
syn match cssTextProp contained "\<punctuation-trim\>"
|
||||
syn match cssTextAttr contained "\<line-through\>"
|
||||
syn match cssTextAttr contained "\<text-indent\>"
|
||||
syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>"
|
||||
syn keyword cssTextAttr contained ltr rtl embed nowrap
|
||||
syn keyword cssTextAttr contained underline overline blink sub super middle
|
||||
syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super
|
||||
syn keyword cssTextAttr contained capitalize uppercase lowercase
|
||||
syn keyword cssTextAttr contained center justify baseline sub super
|
||||
syn match cssTextAttr contained "\<pre\(-\(line\|wrap\)\)\=\>"
|
||||
syn match cssTextAttr contained "\<\(allow\|force\)-end\>"
|
||||
syn keyword cssTextAttr contained start end adjacent
|
||||
syn match cssTextAttr contained "\<inter-\(word\|ideographic\|cluster\)\>"
|
||||
syn keyword cssTextAttr contained distribute kashida first last
|
||||
syn keyword cssTextAttr contained clip ellipsis unrestricted suppress
|
||||
syn match cssTextAttr contained "\<break-all\>"
|
||||
syn match cssTextAttr contained "\<break-word\>"
|
||||
syn keyword cssTextAttr contained hyphenate
|
||||
|
||||
syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<border-\(\(\(top\|right\|bottom\|left\)-\)\=\(width\|color\|style\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<\(width\|z-index\)\>"
|
||||
syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>"
|
||||
syn keyword cssBoxProp contained width height float clear overflow clip visibility
|
||||
syn keyword cssBoxAttr contained thin thick both
|
||||
syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset
|
||||
syn keyword cssBoxAttr contained hidden visible scroll collapse
|
||||
|
||||
syn keyword cssGeneratedContentProp contained content quotes
|
||||
syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
|
||||
syn match cssGeneratedContentProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
|
||||
syn match cssAuralAttr contained "\<lower\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
|
||||
syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian
|
||||
syn keyword cssGeneratedContentAttr contained inside outside
|
||||
syn match cssTransformProp contained "\<transform\(-\(origin\|style\)\)\=\>"
|
||||
syn match cssTransformProp contained "\<perspective\(-origin\)\=\>"
|
||||
syn match cssTransformProp contained "\<backface-visibility\>"
|
||||
|
||||
syn match cssPagingProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
|
||||
syn keyword cssPagingProp contained size marks inside orphans widows
|
||||
syn keyword cssPagingAttr contained landscape portrait crop cross always avoid
|
||||
|
||||
syn keyword cssUIProp contained cursor
|
||||
syn match cssUIProp contained "\<outline\(-\(width\|style\|color\)\)\=\>"
|
||||
syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
|
||||
syn keyword cssUIAttr contained default crosshair pointer move wait help
|
||||
syn keyword cssUIAttr contained thin thick
|
||||
syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset
|
||||
syn keyword cssUIAttr contained invert
|
||||
|
||||
syn match cssRenderAttr contained "\<marker\>"
|
||||
syn match cssRenderProp contained "\<\(display\|marker-offset\|unicode-bidi\|white-space\|list-item\|run-in\|inline-table\)\>"
|
||||
syn keyword cssRenderProp contained position top bottom direction
|
||||
syn match cssRenderProp contained "\<\(left\|right\)\>"
|
||||
syn keyword cssRenderAttr contained block inline compact
|
||||
syn match cssRenderAttr contained "\<table\(-\(row-gorup\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>"
|
||||
syn keyword cssRenderAttr contained static relative absolute fixed
|
||||
syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap
|
||||
syn match cssRenderAttr contained "\<bidi-override\>"
|
||||
syn match cssTransitionProp contained "\<transition\(-\(delay\|duration\|property\|timing-function\)\)\=\>"
|
||||
|
||||
syn match cssUIProp contained "\<nav-\(down\|index\|left\|right\|up\)\=\>"
|
||||
syn match cssUIProp contained "\<outline-offset\>"
|
||||
syn match cssUIProp contained "\<box-sizing\>"
|
||||
syn keyword cssUIProp contained appearance icon resize
|
||||
syn keyword cssUIAttr contained window button menu field
|
||||
|
||||
syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>"
|
||||
syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numerals\)\)\=\)\>"
|
||||
@@ -171,30 +275,54 @@ syn keyword cssAuralAttr contained below level above higher
|
||||
syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>"
|
||||
syn keyword cssAuralAttr contained faster slower
|
||||
syn keyword cssAuralAttr contained male female child code digits continuous
|
||||
syn match cssAuralAttr contained "\<lower\>"
|
||||
|
||||
" cursor
|
||||
syn keyword cssUIProp contained cursor
|
||||
syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
|
||||
syn keyword cssUIAttr contained crosshair default help move pointer
|
||||
syn keyword cssUIAttr contained progress wait
|
||||
|
||||
" FIXME: I could not find them in reference
|
||||
syn keyword cssUIAttr contained invert maker size zoom
|
||||
syn match cssRenderAttr contained "\<run-in\>"
|
||||
syn match cssRenderAttr contained "\<text-rendering\>"
|
||||
syn match cssRenderAttr contained "\<font-smoothing\>"
|
||||
syn match cssRenderProp contained "\<marker-offset\>"
|
||||
syn match cssRenderAttr contained "\<bidi-override\>"
|
||||
|
||||
syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\|speak-header\)\>"
|
||||
syn keyword cssTableAttr contained fixed collapse separate show hide once always
|
||||
|
||||
" FIXME: This allows cssMediaBlock before the semicolon, which is wrong.
|
||||
syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
|
||||
syn match cssBraces contained "[{}]"
|
||||
syn match cssError contained "{@<>"
|
||||
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape
|
||||
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition
|
||||
syn match cssBraceError "}"
|
||||
|
||||
" Pseudo class
|
||||
syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssPseudoClassId,cssUnicodeEscape
|
||||
syn keyword cssPseudoClassId contained link visited active hover focus before after left right
|
||||
syn keyword cssPseudoClassId link visited active hover focus before after left right lang
|
||||
syn match cssPseudoClassId contained "\<first\(-\(line\|letter\|child\)\)\=\>"
|
||||
syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline
|
||||
" FIXME: handle functions.
|
||||
"syn region cssPseudoClassLang matchgroup=cssPseudoClassId start="lang(" end=")"
|
||||
syn match cssPseudoClassId contained "\<\(last\|only\|nth\|nth-last\)-child\>"
|
||||
syn match cssPseudoClassId contained "\<\(first\|last\|only\|nth\|nth-last\)-of-type\>"
|
||||
syn keyword cssPseudoClassId root empty target enable disabled checked not invalid
|
||||
syn match cssPseudoClassId contained "::\(-moz-\)\=selection"
|
||||
|
||||
" Comment
|
||||
syn region cssComment start="/\*" end="\*/" contains=@Spell
|
||||
syn region cssComment start="//" skip="\\$" end="$" keepend contains=@Spell
|
||||
|
||||
syn match cssUnicodeEscape "\\\x\{1,6}\s\?"
|
||||
syn match cssSpecialCharQQ +\\"+ contained
|
||||
syn match cssSpecialCharQ +\\'+ contained
|
||||
syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ
|
||||
syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ
|
||||
syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+"
|
||||
|
||||
" Vendor Prefix
|
||||
syn match cssVendor contained "\(-\(webkit\|moz\|o\|ms\)-\)"
|
||||
|
||||
|
||||
if main_syntax == "css"
|
||||
syn sync minlines=10
|
||||
@@ -212,31 +340,75 @@ if version >= 508 || !exists("did_css_syn_inits")
|
||||
endif
|
||||
|
||||
HiLink cssComment Comment
|
||||
HiLink cssVendor Comment
|
||||
HiLink cssTagName Statement
|
||||
HiLink cssDeprecated Error
|
||||
HiLink cssSelectorOp Special
|
||||
HiLink cssSelectorOp2 Special
|
||||
HiLink cssFontProp StorageClass
|
||||
HiLink cssColorProp StorageClass
|
||||
HiLink cssTextProp StorageClass
|
||||
|
||||
HiLink cssAnimationProp StorageClass
|
||||
HiLink cssBackgroundProp StorageClass
|
||||
HiLink cssBorderOutlineProp StorageClass
|
||||
HiLink cssBoxProp StorageClass
|
||||
HiLink cssRenderProp StorageClass
|
||||
HiLink cssColorProp StorageClass
|
||||
HiLink cssContentForPagedMediaProp StorageClass
|
||||
HiLink cssDimensionProp StorageClass
|
||||
HiLink cssFlexibleBoxProp StorageClass
|
||||
HiLink cssFontProp StorageClass
|
||||
HiLink cssGeneratedContentProp StorageClass
|
||||
HiLink cssGridProp StorageClass
|
||||
HiLink cssHyerlinkProp StorageClass
|
||||
HiLink cssLineboxProp StorageClass
|
||||
HiLink cssListProp StorageClass
|
||||
HiLink cssMarginProp StorageClass
|
||||
HiLink cssMarqueeProp StorageClass
|
||||
HiLink cssMultiColumnProp StorageClass
|
||||
HiLink cssPaddingProp StorageClass
|
||||
HiLink cssPagedMediaProp StorageClass
|
||||
HiLink cssPositioningProp StorageClass
|
||||
HiLink cssPrintProp StorageClass
|
||||
HiLink cssRubyProp StorageClass
|
||||
HiLink cssSpeechProp StorageClass
|
||||
HiLink cssTableProp StorageClass
|
||||
HiLink cssTextProp StorageClass
|
||||
HiLink cssTransformProp StorageClass
|
||||
HiLink cssTransitionProp StorageClass
|
||||
HiLink cssUIProp StorageClass
|
||||
HiLink cssAuralProp StorageClass
|
||||
HiLink cssRenderProp StorageClass
|
||||
HiLink cssGeneratedContentProp StorageClass
|
||||
HiLink cssPagingProp StorageClass
|
||||
HiLink cssTableProp StorageClass
|
||||
HiLink cssUIProp StorageClass
|
||||
HiLink cssFontAttr Type
|
||||
HiLink cssColorAttr Type
|
||||
HiLink cssTextAttr Type
|
||||
|
||||
HiLink cssAnimationAttr Type
|
||||
HiLink cssBackgroundAttr Type
|
||||
HiLink cssBorderOutlineAttr Type
|
||||
HiLink cssBoxAttr Type
|
||||
HiLink cssRenderAttr Type
|
||||
HiLink cssAuralAttr Type
|
||||
HiLink cssColorAttr Type
|
||||
HiLink cssContentForPagedMediaAttr Type
|
||||
HiLink cssDimensionAttr Type
|
||||
HiLink cssFlexibleBoxAttr Type
|
||||
HiLink cssFontAttr Type
|
||||
HiLink cssGeneratedContentAttr Type
|
||||
HiLink cssPagingAttr Type
|
||||
HiLink cssGridAttr Type
|
||||
HiLink cssHyerlinkAttr Type
|
||||
HiLink cssLineboxAttr Type
|
||||
HiLink cssListAttr Type
|
||||
HiLink cssMarginAttr Type
|
||||
HiLink cssMarqueeAttr Type
|
||||
HiLink cssMultiColumnAttr Type
|
||||
HiLink cssPaddingAttr Type
|
||||
HiLink cssPagedMediaAttr Type
|
||||
HiLink cssPositioningAttr Type
|
||||
HiLink cssPrintAttr Type
|
||||
HiLink cssRubyAttr Type
|
||||
HiLink cssSpeechAttr Type
|
||||
HiLink cssTableAttr Type
|
||||
HiLink cssTextAttr Type
|
||||
HiLink cssTransformAttr Type
|
||||
HiLink cssTransitionAttr Type
|
||||
HiLink cssUIAttr Type
|
||||
HiLink cssAuralAttr Type
|
||||
HiLink cssRenderAttr Type
|
||||
HiLink cssCommonAttr Type
|
||||
|
||||
HiLink cssPseudoClassId PreProc
|
||||
HiLink cssPseudoClassLang Constant
|
||||
HiLink cssValueLength Number
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: group(5) user group file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-04-19
|
||||
" Latest Revision: 2012-08-05
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -12,7 +12,7 @@ set cpo&vim
|
||||
|
||||
syn match groupBegin display '^' nextgroup=groupName
|
||||
|
||||
syn match groupName contained display '[a-z_][a-z0-9_-]\{0,15}'
|
||||
syn match groupName contained display '[^:]\+'
|
||||
\ nextgroup=groupPasswordColon
|
||||
|
||||
syn match groupPasswordColon contained display ':'
|
||||
@@ -30,7 +30,7 @@ syn match groupGID contained display '\d*'
|
||||
|
||||
syn match groupUserListColon contained display ':' nextgroup=groupUserList
|
||||
|
||||
syn match groupUserList contained '[a-z_][a-z0-9_-]*'
|
||||
syn match groupUserList contained '[^,]\+'
|
||||
\ nextgroup=groupUserListSep
|
||||
|
||||
syn match groupUserListSep contained display ',' nextgroup=groupUserList
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
||||
" Last Change: 2012 May 18
|
||||
" Last Change: 2012 Jul 16
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -12,8 +12,8 @@ let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()]*[ \t]\+\*"me=e-1
|
||||
syn match helpSectionDelim "^=\{3,}.*===$"
|
||||
syn match helpSectionDelim "^-\{3,}.*--$"
|
||||
syn match helpSectionDelim "^===.*===$"
|
||||
syn match helpSectionDelim "^---.*--$"
|
||||
syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<"
|
||||
if has("ebcdic")
|
||||
syn match helpHyperTextJump "\\\@<!|[^"*|]\+|" contains=helpBar
|
||||
|
||||
27
runtime/syntax/hgcommit.vim
Normal file
27
runtime/syntax/hgcommit.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" Vim syntax file
|
||||
" Language: hg (Mercurial) commit file
|
||||
" Maintainer: Ken Takata <kentkt at csc dot jp>
|
||||
" Last Change: 2012 Aug 23
|
||||
" Filenames: hg-editor-*.txt
|
||||
" License: VIM License
|
||||
" URL: https://github.com/k-takata/hg-vim
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match hgcommitComment "^HG:.*$" contains=@NoSpell
|
||||
syn match hgcommitUser "^HG: user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitBranch "^HG: branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitAdded "^HG: \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitChanged "^HG: \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitRemoved "^HG: \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
|
||||
hi def link hgcommitComment Comment
|
||||
hi def link hgcommitUser String
|
||||
hi def link hgcommitBranch String
|
||||
hi def link hgcommitAdded Identifier
|
||||
hi def link hgcommitChanged Special
|
||||
hi def link hgcommitRemoved Constant
|
||||
|
||||
let b:current_syntax = "hgcommit"
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2
|
||||
" Maintainer: Marcus Aurelius Farias <masserahguard-lua 'at' yahoo com>
|
||||
" First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br>
|
||||
" Last Change: 2012 Feb 07
|
||||
" Last Change: 2012 Aug 12
|
||||
" Options: lua_version = 4 or 5
|
||||
" lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2)
|
||||
" default 5.2
|
||||
@@ -48,39 +48,41 @@ syn match luaComment "\%^#!.*"
|
||||
|
||||
" catch errors caused by wrong parenthesis and wrong curly brackets or
|
||||
" keywords placed outside their respective blocks
|
||||
syn region luaParen transparent start='(' end=')' contains=ALLBUT,luaParenError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement
|
||||
syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=ALLBUT,luaBraceError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement
|
||||
|
||||
syn region luaParen transparent start='(' end=')' contains=TOP,luaParenError
|
||||
syn match luaParenError ")"
|
||||
syn match luaError "}"
|
||||
syn match luaBraceError "}"
|
||||
syn match luaError "\<\%(end\|else\|elseif\|then\|until\|in\)\>"
|
||||
|
||||
" Function declaration
|
||||
syn region luaFunctionBlock transparent matchgroup=luaFunction start="\<function\>" end="\<end\>" contains=TOP
|
||||
|
||||
" else
|
||||
syn keyword luaCondElse matchgroup=luaCond contained containedin=luaCondEnd else
|
||||
|
||||
" then ... end
|
||||
syn region luaCondEnd contained transparent matchgroup=luaCond start="\<then\>" end="\<end\>" contains=TOP
|
||||
|
||||
" elseif ... then
|
||||
syn region luaCondElseif contained containedin=luaCondEnd transparent matchgroup=luaCond start="\<elseif\>" end="\<then\>" contains=TOP
|
||||
" function ... end
|
||||
syn region luaFunctionBlock transparent matchgroup=luaFunction start="\<function\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn
|
||||
|
||||
" if ... then
|
||||
syn region luaCondStart transparent matchgroup=luaCond start="\<if\>" end="\<then\>"me=e-4 contains=TOP nextgroup=luaCondEnd skipwhite skipempty
|
||||
syn region luaIfThen transparent matchgroup=luaCond start="\<if\>" end="\<then\>"me=e-4 contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaIn nextgroup=luaThenEnd skipwhite skipempty
|
||||
|
||||
" then ... end
|
||||
syn region luaThenEnd contained transparent matchgroup=luaCond start="\<then\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaThenEnd,luaIn
|
||||
|
||||
" elseif ... then
|
||||
syn region luaElseifThen contained transparent matchgroup=luaCond start="\<elseif\>" end="\<then\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn
|
||||
|
||||
" else
|
||||
syn keyword luaElse contained else
|
||||
|
||||
" do ... end
|
||||
syn region luaBlock transparent matchgroup=luaStatement start="\<do\>" end="\<end\>" contains=TOP
|
||||
syn region luaBlock transparent matchgroup=luaStatement start="\<do\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn
|
||||
|
||||
" repeat ... until
|
||||
syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\<repeat\>" end="\<until\>" contains=TOP
|
||||
syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<repeat\>" end="\<until\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn
|
||||
|
||||
" while ... do
|
||||
syn region luaWhile transparent matchgroup=luaRepeat start="\<while\>" end="\<do\>"me=e-2 contains=TOP nextgroup=luaBlock skipwhite skipempty
|
||||
syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<while\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaIn nextgroup=luaBlock skipwhite skipempty
|
||||
|
||||
" for ... do and for ... in ... do
|
||||
syn region luaFor transparent matchgroup=luaRepeat start="\<for\>" end="\<do\>"me=e-2 contains=TOP nextgroup=luaBlock skipwhite skipempty
|
||||
syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<for\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd nextgroup=luaBlock skipwhite skipempty
|
||||
|
||||
syn keyword luaFor contained containedin=luaFor in
|
||||
syn keyword luaIn contained in
|
||||
|
||||
" other keywords
|
||||
syn keyword luaStatement return local break
|
||||
@@ -131,9 +133,6 @@ if lua_version >= 5
|
||||
endif
|
||||
endif
|
||||
|
||||
" tables
|
||||
syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=TOP,luaStatement
|
||||
|
||||
syn keyword luaFunc assert collectgarbage dofile error next
|
||||
syn keyword luaFunc print rawget rawset tonumber tostring type _VERSION
|
||||
|
||||
@@ -343,15 +342,17 @@ if version >= 508 || !exists("did_lua_syntax_inits")
|
||||
HiLink luaString2 String
|
||||
HiLink luaNumber Number
|
||||
HiLink luaOperator Operator
|
||||
HiLink luaIn Operator
|
||||
HiLink luaConstant Constant
|
||||
HiLink luaCond Conditional
|
||||
HiLink luaCondElse Conditional
|
||||
HiLink luaElse Conditional
|
||||
HiLink luaFunction Function
|
||||
HiLink luaComment Comment
|
||||
HiLink luaTodo Todo
|
||||
HiLink luaTable Structure
|
||||
HiLink luaError Error
|
||||
HiLink luaParenError Error
|
||||
HiLink luaBraceError Error
|
||||
HiLink luaSpecial SpecialChar
|
||||
HiLink luaFunc Identifier
|
||||
HiLink luaLabel Label
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
" Filename extensions: *.p (collides with Pascal),
|
||||
" *.i (collides with assembler)
|
||||
" *.w (collides with cweb)
|
||||
" Maintainer: Philip Uren <philuSPAX@ieee.org> Remove SPAX spam block
|
||||
" Contributors: Chris Ruprecht <chris@ruprecht.org>
|
||||
" Philip Uren <philu@computer.org>
|
||||
" Mikhail Kuperblum <mikhail@whasup.com>
|
||||
" John Florian <jflorian@voyager.net>
|
||||
" Version: 11
|
||||
" Last Change: May 11 2012
|
||||
" Maintainer: Philip Uren <philuSPAX@ieee.org> Remove SPAX spam block
|
||||
" Contributors: Chris Ruprecht <chris@ruprecht.org>
|
||||
" Philip Uren <philu@computer.org>
|
||||
" Mikhail Kuperblum <mikhail@whasup.com>
|
||||
" John Florian <jflorian@voyager.net>
|
||||
" Version: 12
|
||||
" Last Change: Aug 16 2012
|
||||
|
||||
" For version 5.x: Clear all syntax item
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
@@ -34,7 +34,7 @@ set expandtab
|
||||
syn case ignore
|
||||
|
||||
" Progress Blocks of code and mismatched "end." errors.
|
||||
syn match ProgressEndError "\<end\>"
|
||||
syn match ProgressEndError "\<end\>"
|
||||
syn region ProgressDoBlock transparent matchgroup=ProgressDo start="\<do\>" matchgroup=ProgressDo end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction
|
||||
syn region ProgressForBlock transparent matchgroup=ProgressFor start="\<for\>" matchgroup=ProgressFor end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction
|
||||
syn region ProgressRepeatBlock transparent matchgroup=ProgressRepeat start="\<repeat\>" matchgroup=ProgressRepeat end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction
|
||||
@@ -44,20 +44,20 @@ syn region ProgressCaseBlock transparent matchgroup=ProgressCase start="\<case\>
|
||||
" and they could go in ProgressReserved,
|
||||
" but I found it more helpful to highlight them in a different color.
|
||||
syn keyword ProgressConditional if else then when otherwise
|
||||
syn keyword ProgressFor each where
|
||||
syn keyword ProgressFor each where
|
||||
|
||||
" Make those TODO and debugging notes stand out!
|
||||
syn keyword ProgressTodo contained TODO BUG FIX
|
||||
syn keyword ProgressDebug contained DEBUG
|
||||
syn keyword ProgressTodo contained TODO BUG FIX
|
||||
syn keyword ProgressDebug contained DEBUG
|
||||
syn keyword ProgressDebug debugger
|
||||
|
||||
" If you like to highlight the whole line of
|
||||
" the start and end of procedures
|
||||
" to make the whole block of code stand out:
|
||||
syn match ProgressProcedure "^\s*procedure.*"
|
||||
syn match ProgressProcedure "^\s*end\s\s*procedure.*"
|
||||
syn match ProgressFunction "^\s*function.*"
|
||||
syn match ProgressFunction "^\s*end\s\s*function.*"
|
||||
syn match ProgressProcedure "^\s*procedure.*"
|
||||
syn match ProgressProcedure "^\s*end\s\s*procedure.*"
|
||||
syn match ProgressFunction "^\s*function.*"
|
||||
syn match ProgressFunction "^\s*end\s\s*function.*"
|
||||
" ... otherwise use this:
|
||||
" syn keyword ProgressFunction procedure function
|
||||
|
||||
@@ -99,14 +99,14 @@ syn keyword ProgressReserved window-maxim[ized] window-minim[ized] window-normal
|
||||
" Strings. Handles embedded quotes.
|
||||
" Note that, for some reason, Progress doesn't use the backslash, "\"
|
||||
" as the escape character; it uses tilde, "~".
|
||||
syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~'\|\~\~+
|
||||
syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~+
|
||||
syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~'\|\~\~+ contains=@Spell
|
||||
syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~+ contains=@Spell
|
||||
|
||||
syn match ProgressIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>()"
|
||||
|
||||
" syn match ProgressDelimiter "()"
|
||||
|
||||
syn match ProgressMatrixDelimiter "[][]"
|
||||
syn match ProgressMatrixDelimiter "[][]"
|
||||
" If you prefer you can highlight the range:
|
||||
"syn match ProgressMatrixDelimiter "[\d\+\.\.\d\+]"
|
||||
|
||||
@@ -114,7 +114,7 @@ syn match ProgressNumber "\<\-\=\d\+\(u\=l\=\|lu\|f\)\>"
|
||||
syn match ProgressByte "\$[0-9a-fA-F]\+"
|
||||
|
||||
" More values: Logicals, and Progress's unknown value, ?.
|
||||
syn match ProgressNumber "?"
|
||||
syn match ProgressNumber "?"
|
||||
syn keyword ProgressNumber true false yes no
|
||||
|
||||
" If you don't like tabs:
|
||||
@@ -123,9 +123,9 @@ syn match ProgressShowTab "\t"
|
||||
" If you don't like white space on the end of lines, uncomment this:
|
||||
" syn match ProgressSpaceError "\s\+$"
|
||||
|
||||
syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug
|
||||
syn region ProgressInclude start="^[ ]*[{]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,ProgressComment
|
||||
syn region ProgressPreProc start="&" end="\>" contained
|
||||
syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug,@Spell
|
||||
syn region ProgressInclude start="^[ ]*[{]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,ProgressComment
|
||||
syn region ProgressPreProc start="&" end="\>" contained
|
||||
|
||||
" This next line works reasonably well.
|
||||
" syn match ProgressOperator "[!;|)(:.><+*=-]"
|
||||
@@ -277,7 +277,7 @@ syn keyword ProgressOperator write-fragment write-message write-processing-instr
|
||||
syn keyword ProgressOperator xml-data-type xml-node-name xml-node-type xml-schema-pat[h] xml-suppress-namespace-processing y y-of year year-offset yes-no
|
||||
syn keyword ProgressOperator yes-no-cancel
|
||||
|
||||
syn keyword ProgressType char[acter] int[eger] int64 dec[imal] log[ical] da[te] datetime datetime-tz
|
||||
syn keyword ProgressType char[acter] int[eger] int64 dec[imal] log[ical] da[te] datetime datetime-tz
|
||||
|
||||
syn sync lines=800
|
||||
|
||||
@@ -285,40 +285,40 @@ syn sync lines=800
|
||||
" 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_progress_syntax_inits")
|
||||
if version < 508
|
||||
let did_progress_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
if version < 508
|
||||
let did_progress_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
" The default methods for highlighting. Can be overridden later.
|
||||
HiLink ProgressByte Number
|
||||
HiLink ProgressCase Repeat
|
||||
HiLink ProgressComment Comment
|
||||
HiLink ProgressConditional Conditional
|
||||
HiLink ProgressDebug Debug
|
||||
HiLink ProgressDo Repeat
|
||||
HiLink ProgressEndError Error
|
||||
HiLink ProgressFor Repeat
|
||||
HiLink ProgressFunction Procedure
|
||||
HiLink ProgressIdentifier Identifier
|
||||
HiLink ProgressInclude Include
|
||||
HiLink ProgressMatrixDelimiter Identifier
|
||||
HiLink ProgressNumber Number
|
||||
HiLink ProgressOperator Operator
|
||||
HiLink ProgressPreProc PreProc
|
||||
HiLink ProgressProcedure Procedure
|
||||
HiLink ProgressQuote Delimiter
|
||||
HiLink ProgressRepeat Repeat
|
||||
HiLink ProgressReserved Statement
|
||||
HiLink ProgressSpaceError Error
|
||||
HiLink ProgressString String
|
||||
HiLink ProgressTodo Todo
|
||||
HiLink ProgressType Statement
|
||||
HiLink ProgressShowTab Error
|
||||
" The default methods for highlighting. Can be overridden later.
|
||||
HiLink ProgressByte Number
|
||||
HiLink ProgressCase Repeat
|
||||
HiLink ProgressComment Comment
|
||||
HiLink ProgressConditional Conditional
|
||||
HiLink ProgressDebug Debug
|
||||
HiLink ProgressDo Repeat
|
||||
HiLink ProgressEndError Error
|
||||
HiLink ProgressFor Repeat
|
||||
HiLink ProgressFunction Procedure
|
||||
HiLink ProgressIdentifier Identifier
|
||||
HiLink ProgressInclude Include
|
||||
HiLink ProgressMatrixDelimiter Identifier
|
||||
HiLink ProgressNumber Number
|
||||
HiLink ProgressOperator Operator
|
||||
HiLink ProgressPreProc PreProc
|
||||
HiLink ProgressProcedure Procedure
|
||||
HiLink ProgressQuote Delimiter
|
||||
HiLink ProgressRepeat Repeat
|
||||
HiLink ProgressReserved Statement
|
||||
HiLink ProgressSpaceError Error
|
||||
HiLink ProgressString String
|
||||
HiLink ProgressTodo Todo
|
||||
HiLink ProgressType Statement
|
||||
HiLink ProgressShowTab Error
|
||||
|
||||
delcommand HiLink
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "progress"
|
||||
@@ -326,4 +326,4 @@ let b:current_syntax = "progress"
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8 sw=4
|
||||
" vim: ts=8 sw=8
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: reStructuredText documentation format
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-01-23
|
||||
" Latest Revision: 2012-08-05
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -141,8 +141,8 @@ syn sync minlines=50 linebreaks=1
|
||||
|
||||
hi def link rstTodo Todo
|
||||
hi def link rstComment Comment
|
||||
hi def link rstSections Type
|
||||
hi def link rstTransition Type
|
||||
hi def link rstSections Title
|
||||
hi def link rstTransition rstSections
|
||||
hi def link rstLiteralBlock String
|
||||
hi def link rstQuotedLiteralBlock String
|
||||
hi def link rstDoctestBlock PreProc
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
" Language: Subversion (svn) commit file
|
||||
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
||||
" URL: https://github.com/hdima/vim-scripts/blob/master/syntax/svn.vim
|
||||
" Last Change: 2012-04-15
|
||||
" Last Change: 2012-07-21
|
||||
" Filenames: svn-commit*.tmp
|
||||
" Version: 1.8
|
||||
" Version: 1.9
|
||||
|
||||
" Contributors:
|
||||
" Stefano Zacchiroli
|
||||
" A. S. Budden
|
||||
" Myk Taylor
|
||||
" Ingo Karkat
|
||||
|
||||
" For version 5.x: Clear all syntax items.
|
||||
" For version 6.x: Quit when a syntax file was already loaded.
|
||||
@@ -19,7 +20,9 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn region svnRegion start="^--.*--$" end="\%$" contains=ALL contains=@NoSpell
|
||||
syn region svnText start="\%^" end="^--.*--$"me=s-1 contains=@Spell
|
||||
|
||||
syn region svnRegion start="^--.*--$" end="\%$" contains=ALL
|
||||
syn match svnRemoved "^D .*$" contained
|
||||
syn match svnRenamed "^R[ M][ U][ +] .*$" contained
|
||||
syn match svnAdded "^A[ M][ U][ +] .*$" contained
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 Feb 11
|
||||
" Last Change: 2012 Sep 25
|
||||
|
||||
" This file sets up for syntax highlighting.
|
||||
" It is loaded from "syntax.vim" and "manual.vim".
|
||||
@@ -46,6 +46,8 @@ fun! s:SynSet()
|
||||
echohl None
|
||||
endif
|
||||
let s = &filetype
|
||||
elseif s == "OFF"
|
||||
let s = ""
|
||||
endif
|
||||
|
||||
if s != ""
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vimparse.pl - Reformats the error messages of the Perl interpreter for use
|
||||
# with the quickfix mode of Vim
|
||||
#
|
||||
# Copyright (<EFBFBD>) 2001 by J<EFBFBD>rg Ziefle <joerg.ziefle@gmx.de>
|
||||
# Copyright (c) 2001 by Joerg Ziefle <joerg.ziefle@gmx.de>
|
||||
# You may use and distribute this software under the same terms as Perl itself.
|
||||
#
|
||||
# Usage: put one of the two configurations below in your ~/.vimrc (without the
|
||||
|
||||
@@ -658,7 +658,7 @@ NOTE: If you were to exit Vim and start it again with vim TEST , the file
|
||||
4. Type w TEST , where TEST is a filename that does not exist yet. Verify
|
||||
that you see :'<,'>w TEST before you press <ENTER>.
|
||||
|
||||
5. Vim will write the selected lines to the file TEST. Use :!dir or !ls
|
||||
5. Vim will write the selected lines to the file TEST. Use :!dir or :!ls
|
||||
to see it. Do not remove it yet! We will use it in the next lesson.
|
||||
|
||||
NOTE: Pressing v starts Visual selection. You can move the cursor around
|
||||
|
||||
@@ -645,7 +645,7 @@ RIMARKO: Ĉiuj : komandoj devas finiĝi per tajpo de <Enenklavo>
|
||||
3. Nun tajpu: :w TESTO (kie TESTO estas la elektita dosiernomo)
|
||||
|
||||
4. Tio konservas la tutan dosieron (instruilon de Vim) kun la nomo TESTO.
|
||||
Por kontroli tion, tajpu :!dir aŭ !ls denove por vidigi vian
|
||||
Por kontroli tion, tajpu :!dir aŭ :!ls denove por vidigi vian
|
||||
dosierujon.
|
||||
|
||||
RIMARKO: Se vi volus eliri el Vim kaj restartigi ĝin denove per vim TESTO,
|
||||
|
||||
@@ -707,7 +707,7 @@ NOTE : Si vous quittez Vim et le red
|
||||
V<>rifiez que vous voyez :'<,'>w TEST avant de d'appuyer sur <Entr<74>e>.
|
||||
|
||||
5. Vim va enregistrer les lignes s<>lectionn<6E>es dans le fichier TEST.
|
||||
Utilisez :!dir ou !ls pour le voir. Ne l'effacez pas encore !
|
||||
Utilisez :!dir ou :!ls pour le voir. Ne l'effacez pas encore !
|
||||
Nous allons l'utiliser dans la le<6C>on suivante.
|
||||
|
||||
NOTE : L'appui de v d<>marre la s<>lection Visuelle. Vous pouvez d<>placer le
|
||||
|
||||
@@ -707,7 +707,7 @@ NOTE : Si vous quittez Vim et le redémarrez de nouveau avec le fichier TEST,
|
||||
Vérifiez que vous voyez :'<,'>w TEST avant de d'appuyer sur <Entrée>.
|
||||
|
||||
5. Vim va enregistrer les lignes sélectionnées dans le fichier TEST.
|
||||
Utilisez :!dir ou !ls pour le voir. Ne l'effacez pas encore !
|
||||
Utilisez :!dir ou :!ls pour le voir. Ne l'effacez pas encore !
|
||||
Nous allons l'utiliser dans la leçon suivante.
|
||||
|
||||
NOTE : L'appui de v démarre la sélection Visuelle. Vous pouvez déplacer le
|
||||
|
||||
@@ -659,7 +659,7 @@ NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST ,
|
||||
Provjerite da zaista pi<70>e :'<,'>w TEST
|
||||
prije nego <20>to pritisnite <ENTER>.
|
||||
|
||||
5. Vim <20>e spremiti ozna<6E>eni tekst u TEST. Provjerite sa :!dir ili !ls .
|
||||
5. Vim <20>e spremiti ozna<6E>eni tekst u TEST. Provjerite sa :!dir ili :!ls .
|
||||
Nemojte je jo<6A> brisati! Koristiti <20>e te je u sljede<64>oj lekciji.
|
||||
|
||||
NAPOMENA: Tipka v zapo<70>inje Vizualno ozna<6E>avanje. Mo<4D>ete pomicati kursor
|
||||
|
||||
@@ -659,7 +659,7 @@ NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST ,
|
||||
Provjerite da zaista pi<70>e :'<,'>w TEST
|
||||
prije nego <20>to pritisnite <ENTER>.
|
||||
|
||||
5. Vim <20>e spremiti ozna<6E>eni tekst u TEST. Provjerite sa :!dir ili !ls .
|
||||
5. Vim <20>e spremiti ozna<6E>eni tekst u TEST. Provjerite sa :!dir ili :!ls .
|
||||
Nemojte je jo<6A> brisati! Koristiti <20>e te je u sljede<64>oj lekciji.
|
||||
|
||||
NAPOMENA: Tipka v zapo<70>inje Vizualno ozna<6E>avanje. Mo<4D>ete pomicati kursor
|
||||
|
||||
@@ -659,7 +659,7 @@ NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST ,
|
||||
Provjerite da zaista piše :'<,'>w TEST
|
||||
prije nego što pritisnite <ENTER>.
|
||||
|
||||
5. Vim će spremiti označeni tekst u TEST. Provjerite sa :!dir ili !ls .
|
||||
5. Vim će spremiti označeni tekst u TEST. Provjerite sa :!dir ili :!ls .
|
||||
Nemojte je još brisati! Koristiti će te je u sljedećoj lekciji.
|
||||
|
||||
NAPOMENA: Tipka v započinje Vizualno označavanje. Možete pomicati kursor
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
== <20> d v <20> z <20> l j <20> k a V I M - o k t a t <20> b a n - 1.5-<2D>s verzi<7A> ==
|
||||
===============================================================================
|
||||
|
||||
A Vim egy nagyon hat<61>kony szerkeszt<7A>, amelnyek rengeteg utas<61>t<EFBFBD>sa
|
||||
A Vim egy nagyon hat<61>kony szerkeszt<7A>, amelynek rengeteg utas<61>t<EFBFBD>sa
|
||||
van, t<>l sok, hogy egy ilyen oktat<61>ban (tutorban), mint az itteni
|
||||
mindet elmagyar<61>zzuk. Ez az oktat<61> arra t<>rekszik, hogy annyit
|
||||
elmagyar<61>zzon, amennyi el<65>g, hogy k<>nnyed<65>n haszn<7A>ljuk a Vim-et, az
|
||||
<20>ltal<61>nos c<>l<EFBFBD> sz<73>vegszerkeszt<7A>t.
|
||||
|
||||
A feladatok megold<6C>s<EFBFBD>hoz 25-30 perc sz<73>ks<6B>ges att<74>l f<>gg<67>en,
|
||||
mennyit t<>lt<6C>nk a kis<EFBFBD>rletez<EFBFBD>ssel.
|
||||
mennyit t<>lt<6C>nk a k<EFBFBD>s<EFBFBD>rletez<EFBFBD>ssel.
|
||||
|
||||
A leck<63>ben szerepl<70> utas<61>t<EFBFBD>sok m<>dos<6F>tani fogj<67>k a sz<73>vegek.
|
||||
A leck<63>ben szerepl<70> utas<61>t<EFBFBD>sok m<>dos<6F>tani fogj<67>k a sz<73>veget.
|
||||
K<>sz<73>tsen m<>solatot err<72>l a f<>jlr<6C>l, ha gyakorolni akar.
|
||||
(Ha "vimtutor"-ral ind<6E>totta, akkor ez m<>r egy m<>solat.)
|
||||
|
||||
@@ -81,7 +81,7 @@ Megj: A kurzor gomboknak is m
|
||||
2. A hib<69>k kijav<61>t<EFBFBD>s<EFBFBD>hoz mozgassa a kurzort am<61>g a t<>rlend<6E> karakter
|
||||
f<>l<EFBFBD> nem <20>r.
|
||||
|
||||
3. Nyomja meg az x gombot, hogy t<>r<EFBFBD>lje a nemk<6D>v<EFBFBD>nt karaktert.
|
||||
3. Nyomja meg az x gombot, hogy t<>r<EFBFBD>lje a nem k<EFBFBD>v<EFBFBD>nt karaktert.
|
||||
|
||||
4. Ism<73>telje a 2, 3, 4-es l<>p<EFBFBD>seket, hogy kijav<61>tsa a mondatot.
|
||||
|
||||
@@ -172,7 +172,7 @@ Most folytassuk a 2. leck
|
||||
|
||||
3. Mozgassa a kurzort a helyes sor v<>g<EFBFBD>re (az els<6C> . UT<55>N)!
|
||||
|
||||
4. d$ beg<65>pel<65>s<EFBFBD>velt<6C>r<EFBFBD>lje a sor v<>g<EFBFBD>t!
|
||||
4. d$ beg<65>pel<65>s<EFBFBD>vel t<EFBFBD>r<EFBFBD>lje a sor v<>g<EFBFBD>t!
|
||||
|
||||
---> Valaki a sor v<>g<EFBFBD>t k<>tszer g<>pelte be. k<>tszer g<>pelte be.
|
||||
|
||||
@@ -184,30 +184,30 @@ Most folytassuk a 2. leck
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
2.3. lecke: UTAS<41>T<EFBFBD>SOKR<4B>L <20>S OBJEKTUMOKR<EFBFBD>L
|
||||
2.3. lecke: UTAS<41>T<EFBFBD>SOKR<4B>L <20>S MOZG<EFBFBD>SOKR<EFBFBD>L
|
||||
|
||||
|
||||
A d (delete=t<>rl<72>s) utas<61>t<EFBFBD>s form<72>ja a k<>vetkez<65>:
|
||||
|
||||
[sz<73>m] d objektum VAGY d [sz<73>m] objektum
|
||||
[sz<73>m] d mozg<EFBFBD>s VAGY d [sz<73>m] mozg<EFBFBD>s
|
||||
Ahol:
|
||||
sz<73>m - h<>nyszor hajt<6A>djon v<>gre a parancs (elhagyhat<61>, alap<61>rt<72>k=1).
|
||||
d - a t<>rl<72>s (delete) utas<61>t<EFBFBD>s.
|
||||
objektum - amin a parancsnak teljes<65>lnie kell (al<61>bb list<73>zva).
|
||||
mozg<EFBFBD>s - amin a parancsnak teljes<65>lnie kell (al<61>bb list<73>zva).
|
||||
|
||||
Objektumok r<>vid list<73>ja:
|
||||
Mozg<EFBFBD>sok r<>vid list<73>ja:
|
||||
w - a kurzort<72>l a sz<73> v<>g<EFBFBD>ig, bele<6C>rtve a sz<73>k<EFBFBD>zt.
|
||||
e - a kurzort<72>l a sz<73> v<>g<EFBFBD>ig, NEM bele<6C>rtve a sz<73>k<EFBFBD>zt.
|
||||
$ - a kurzort<72>l a sor v<>g<EFBFBD>ig.
|
||||
|
||||
MEGJ: V<EFBFBD>llalkoz<EFBFBD>bbak kedv<64><76>rt, csup<75>n az objektum beg<65>pel<65>s<EFBFBD>vel parancs n<>lk<6C>l
|
||||
a kurzor oda ker<65>l, amit az objektumlista megad.
|
||||
MEGJ: Csup<EFBFBD>n a mozg<7A>s beg<65>pel<65>s<EFBFBD>vel (parancs n<>lk<6C>l)
|
||||
a kurzor mozg<EFBFBD>s <20>ltal megadott helyre ker<65>l.
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
2.4. lecke: EGY KIV<49>TEL A 'PARANCSOBJEKTUM' AL<41>L
|
||||
2.4. lecke: EG<EFBFBD>SZ SOROK FELDOLGOZ<4F>SA
|
||||
|
||||
|
||||
** dd be<62>r<EFBFBD>s<EFBFBD>val t<>r<EFBFBD>lheti az eg<65>sz sort. **
|
||||
@@ -217,8 +217,8 @@ MEGJ: V
|
||||
|
||||
1. Mozgassa a kurzort az al<61>bbi kifejez<65>sek m<>sodik sor<6F>ra!
|
||||
2. dd beg<65>pel<65>s<EFBFBD>vel t<>r<EFBFBD>lje a sort!
|
||||
3. Menjen a 4. (eredetileg 5.) sorra!
|
||||
4. 2dd (ugyeb<65>r sz<73>m-utas<61>t<EFBFBD>s-objektum) beg<65>pel<65>s<EFBFBD>vel t<>r<EFBFBD>lj<6C>n k<>t sort!
|
||||
3. Menjen a 3. (eredetileg 4.) sorra!
|
||||
4. 2dd (ugyeb<65>r sz<73>m-utas<61>t<EFBFBD>s-mozg<EFBFBD>s) beg<65>pel<65>s<EFBFBD>vel t<>r<EFBFBD>lj<6C>n k<>t sort!
|
||||
|
||||
1) Alv<6C> szegek a j<>ghideg homokban,
|
||||
2) - kezdi a k<>lt<6C> -
|
||||
@@ -238,9 +238,9 @@ MEGJ: V
|
||||
1. Menj<6E>nk az al<61>bbi ---> kezdet<65> sor els<6C> hib<69>j<EFBFBD>ra!
|
||||
2. x lenyom<6F>s<EFBFBD>val t<>r<EFBFBD>lje az els<6C> felesleges karaktert!
|
||||
3. u megnyom<6F>s<EFBFBD>val vonja vissza az utols<6C>nak v<>grehajtott utas<61>t<EFBFBD>st!
|
||||
4. M<>sodj<64>ra jav<61>tson ki minden hib<69>t a sorben az x utas<61>t<EFBFBD>ssal!
|
||||
4. M<>sodj<64>ra jav<61>tson ki minden hib<69>t a sorban az x utas<61>t<EFBFBD>ssal!
|
||||
5. Most nagy U -val <20>ll<6C>tsa vissza a sor eredeti <20>llapot<6F>t!
|
||||
6. Nyomja meg az u gombot p<>rszor, hogy az U <20>s sz el<65>z<EFBFBD> utas<61>t<EFBFBD>sokat
|
||||
6. Nyomja meg az u gombot p<>rszor, hogy az U <20>s az azt megel<EFBFBD>z<EFBFBD> utas<61>t<EFBFBD>sokat
|
||||
vissza<7A>ll<6C>tsa!
|
||||
7. CTRL-R (CTRL gomb lenyom<6F>sa mellett <20>ss<73>n R-t) p<>rszor csin<69>lja <20>jra a
|
||||
visszavont parancsokat (redo)!
|
||||
@@ -263,11 +263,11 @@ MEGJ: V
|
||||
|
||||
4. Egy utas<61>t<EFBFBD>s alakja norm<72>l m<>dban:
|
||||
|
||||
[sz<73>m] utas<61>t<EFBFBD>s objektum VAGY utas<61>t<EFBFBD>s [sz<73>m] objektum
|
||||
[sz<73>m] utas<61>t<EFBFBD>s mozg<EFBFBD>s VAGY utas<61>t<EFBFBD>s [sz<73>m] mozg<EFBFBD>s
|
||||
ahol:
|
||||
sz<73>m - h<>nyszor ism<73>telj<6C>k a parancsot
|
||||
utas<61>t<EFBFBD>s - mit tegy<67>nk, pl. d a t<>rl<72>skor
|
||||
objektum - mire hasson az utas<61>t<EFBFBD>s, p<>ld<6C>ul w (sz<73>=word),
|
||||
mozg<EFBFBD>s - mire hasson az utas<61>t<EFBFBD>s, p<>ld<6C>ul w (sz<73>=word),
|
||||
$ (a sor v<>g<EFBFBD>ig), stb.
|
||||
|
||||
5. Az el<65>z<EFBFBD> tett visszavon<6F>sa (undo): u (kis u)
|
||||
@@ -278,11 +278,11 @@ MEGJ: V
|
||||
3.1. lecke: A BEILLESZT<5A>S (PUT) PARANCS
|
||||
|
||||
|
||||
** p le<6C>t<EFBFBD>s<EFBFBD>vel az utols<6C>nak t<>r<EFBFBD>ltet a kurzor ut<75>n illeszhetj<74>k. **
|
||||
** p le<6C>t<EFBFBD>s<EFBFBD>vel az utols<6C>nak t<>r<EFBFBD>ltet a kurzor ut<75>n illeszthetj<EFBFBD>k. **
|
||||
|
||||
1. Mozgassuk a kurzort az al<61>bbi sorok els<6C> sor<6F>ra.
|
||||
|
||||
2. dd le<6C>t<EFBFBD>s<EFBFBD>vel t<>r<EFBFBD>lj<6C>k a sort <20>s elt<6C>rol<6F>dik a Vim puffer<65>ben.
|
||||
2. dd le<6C>t<EFBFBD>s<EFBFBD>vel t<>r<EFBFBD>lj<6C>k a sort <20>s elt<6C>rol<6F>dik a Vim puffer<65>ben.
|
||||
|
||||
3. Mozgassuk a kurzort azel<65>tt a sor EL<45>TTI sorba, ahov<6F> mozgatni
|
||||
szeretn<74>nk a t<>r<EFBFBD>lt sort.
|
||||
@@ -350,13 +350,13 @@ Vegy
|
||||
3.4. lecke: T<>BBF<42>LE V<>LTOZTAT<41>S c-VEL
|
||||
|
||||
|
||||
** A c utas<61>t<EFBFBD>s haszn<7A>lhat<61> ugyanazokkal az objektumokkal mint a t<>rl<72>s **
|
||||
** A c utas<61>t<EFBFBD>s haszn<7A>lhat<61> ugyanazokkal az mozg<EFBFBD>sokkal mint a t<>rl<72>s **
|
||||
|
||||
1. A change utas<61>t<EFBFBD>s a t<>rl<72>ssel azonosan viselkedik. A forma:
|
||||
|
||||
[sz<73>m] c objektum OR c [sz<73>m] objektum
|
||||
[sz<73>m] c mozg<EFBFBD>s OR c [sz<73>m] mozg<EFBFBD>s
|
||||
|
||||
2. Az objektumok is azonosak, pl. w (sz<73>), $ (sorv<72>g), stb.
|
||||
2. A mozg<7A>sok is azonosak, pl. w (sz<73>), $ (sorv<72>g), stb.
|
||||
|
||||
3. Mozgassuk a kurzort az els<6C> ---> kezdet<65> sorra!
|
||||
|
||||
@@ -374,18 +374,18 @@ Vegy
|
||||
|
||||
|
||||
1. A m<>r t<>r<EFBFBD>lt sort beilleszt<7A>s<EFBFBD>hez nyomjunk p-t. Ez a t<>r<EFBFBD>lt sz<73>veget
|
||||
a kurzor UT<55>N helyezi (ha sor ker<65>lt t<>rl<72>sre, a kurzor allatti sorba).
|
||||
a kurzor UT<55>N helyezi (ha sor ker<65>lt t<>rl<72>sre, a kurzor alatti sorba).
|
||||
|
||||
2. A kurzor alatti karakter <20>t<EFBFBD>r<EFBFBD>s<EFBFBD>hoz az r-et <20>s azt a karaktert
|
||||
nyomjuk, amellyel az eredetit fel<65>l szeretn<74>nk <20>rni.
|
||||
|
||||
3. A v<>ltoztat<61>s (c) utas<61>t<EFBFBD>s a karaktert<72>l az objektum v<>g<EFBFBD>ig
|
||||
v<>ltoztatja meg az objektumot. P<>ld<6C>ul a cw a kurzort<72>l a sz<73> v<>g<EFBFBD>ig,
|
||||
3. A v<>ltoztat<61>s (c) utas<61>t<EFBFBD>s a karaktert<72>l az mozg<EFBFBD>s v<>g<EFBFBD>ig
|
||||
v<>ltoztatja meg az mozg<EFBFBD>st. P<>ld<6C>ul a cw a kurzort<72>l a sz<73> v<>g<EFBFBD>ig,
|
||||
a c$ a sor v<>g<EFBFBD>ig.
|
||||
|
||||
4. A v<>ltoztat<61>s form<72>tuma:
|
||||
|
||||
[sz<73>m] c objektum VAGY c [sz<73>m] objektum
|
||||
[sz<73>m] c mozg<EFBFBD>s VAGY c [sz<73>m] mozg<EFBFBD>s
|
||||
|
||||
Ugorjunk a k<>vetkez<65> leck<63>re!
|
||||
|
||||
@@ -428,7 +428,7 @@ Ugorjunk a k
|
||||
3. A kifejez<65>s <20>jabb keres<65>s<EFBFBD>hez <20>ss<73>k le egyszer<65>en: n .
|
||||
A kifejez<65>s ellenkez<65> ir<69>nyban t<>rt<72>n<EFBFBD> keres<65>s<EFBFBD>hez ezt <20>ss<73>k be: Shift-N .
|
||||
|
||||
4. Ha visszafel<65> szeretne keresni, akkor ? kell a ! helyett.
|
||||
4. Ha visszafel<65> szeretne keresni, akkor ? kell a / helyett.
|
||||
|
||||
---> "hiibaa" nem a helyes m<>dja a hiba le<6C>r<EFBFBD>s<EFBFBD>nak; a hiibaa egy hiba.
|
||||
|
||||
@@ -462,7 +462,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a
|
||||
4.4. lecke: A HIB<49>K KIJAV<41>T<EFBFBD>S<EFBFBD>NAK EGY M<>DJA
|
||||
|
||||
|
||||
** :s/<EFBFBD>j/r<EFBFBD>gi/g beg<65>pel<65>s<EFBFBD>vel az '<27>j'-ra cser<65>lj<6C>k a 'r<>gi'-t. **
|
||||
** :s/r<>gi/<EFBFBD>j/g beg<65>pel<65>s<EFBFBD>vel az '<27>j'-ra cser<65>lj<6C>k a 'r<>gi'-t. **
|
||||
|
||||
1. Menj<6E>nk a ---> kezdet<65> sorra!
|
||||
|
||||
@@ -579,7 +579,7 @@ Megj: Ha
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
5.4. lecke: RETRIEVING AND MERGING FILES
|
||||
5.4. lecke: F<EFBFBD>JLOK VISSZA<5A>LL<4C>T<EFBFBD>SA <20>S <20>SSZEF<45>Z<EFBFBD>SE
|
||||
|
||||
|
||||
** Egy f<>jl tartalm<6C>nak beilleszt<7A>s<EFBFBD>hez <20>rja :r F<>JLN<4C>V **
|
||||
@@ -592,11 +592,11 @@ MEGJ: A 3. l
|
||||
keresse meg ism<73>t ezt a leck<63>t.
|
||||
|
||||
3. Most sz<73>rja be a TESZT nev<65> f<>jlt a :r TESZT paranccsal, ahol
|
||||
TESZT az <20>n f<>jlj<6C>nak a neve.
|
||||
TESZT az <20>n f<>jlj<6C>nak a neve.
|
||||
|
||||
MEGJ: A f<>jl, amit beillesztett a kurzora alatt helyezkedik el.
|
||||
|
||||
4. Hogy ellen<65>rizz<7A>k, hogy a f<>jlt t<>nyleg beillsztett<74>k, menjen
|
||||
4. Hogy ellen<65>rizz<7A>k, hogy a f<>jlt t<>nyleg beillesztett<EFBFBD>k, menjen
|
||||
vissza, <20>s n<>zze meg, hogy k<>tszer szerepel az 5.3. lecke! Az eredeti
|
||||
mellett a f<>jlb<6C>l bem<65>solt is ott van.
|
||||
|
||||
@@ -616,11 +616,11 @@ MEGJ: A f
|
||||
2. :w F<>JLN<4C>V ki<6B>rja a jelenlegi Vim-f<>jlt a lemezre F<>JN<4A>V n<>ven.
|
||||
|
||||
3. :#,#w F<>JLN<4C>V ki<6B>rja a k<>t sorsz<73>m (#) k<>z<EFBFBD>tti sorokat F<>JLN<4C>V-be
|
||||
M<>sik lehet<65>s<EFBFBD>g, hogy a kezd<7A>sorn<72>l Ctrl-v-t nyom lemegy az utols<6C>
|
||||
M<>sik lehet<65>s<EFBFBD>g, hogy a kezd<7A>sorn<72>l Shift-v-t nyom lemegy az utols<6C>
|
||||
sorra, majd ezt <20>ti be :w F<>JLN<4C>V
|
||||
|
||||
4. :r F<>JLN<4C>V beolvassa a F<>JLN<4C>V f<>jlt <20>s behelyezi a jelenlegi f<>jlba
|
||||
a kurzorpozici<EFBFBD> ut<75>ni sorba.
|
||||
a kurzorpoz<EFBFBD>ci<EFBFBD> ut<75>ni sorba.
|
||||
|
||||
|
||||
|
||||
@@ -629,7 +629,7 @@ MEGJ: A f
|
||||
6.1. lecke: A MEGNYIT<49>S (OPEN) PARANCS
|
||||
|
||||
|
||||
** o be<62>r<EFBFBD>s<EFBFBD>val nyithat egy <20>j sort a kurzor alatt <20>s v<EFBFBD>lthat besz<EFBFBD>r<EFBFBD> m<>dba **
|
||||
** o be<62>r<EFBFBD>s<EFBFBD>val nyit egy <20>j sort a kurzor alatt <20>s besz<73>r<EFBFBD> m<>dba v<EFBFBD>lt **
|
||||
|
||||
1. Mozgassuk a kurzort a ---> kezdet<65> sorra.
|
||||
|
||||
@@ -641,7 +641,7 @@ MEGJ: A f
|
||||
|
||||
---> Az o lenyom<6F>sa ut<75>n a kurzor a k<>vetkez<65> sor elej<65>n <20>ll besz<73>r<EFBFBD> m<>dban.
|
||||
|
||||
4. A kurzor FELETTI for megnyit<69>s<EFBFBD>hoz egyzser<EFBFBD>en a nagy O bet<65>t <20>rjon
|
||||
4. A kurzor FELETTI sor megnyit<69>s<EFBFBD>hoz egyszer<EFBFBD>en nagy O bet<65>t <20>rjon
|
||||
kicsi helyett. Pr<50>b<EFBFBD>lja ki a k<>vetkez<65> soron!
|
||||
Nyisson egy <20>j sort efelett Shift-O megnyom<6F>s<EFBFBD>val, mialatt a kurzor
|
||||
ezen a soron <20>ll.
|
||||
@@ -654,16 +654,16 @@ ezen a soron
|
||||
6.2. lecke: AZ APPEND PARANCS
|
||||
|
||||
|
||||
** a lenyom<6F>s<EFBFBD>val a kuror UT<55>N sz<73>rhatunk sz<73>veget. **
|
||||
** a lenyom<6F>s<EFBFBD>val a kurzor UT<55>N sz<73>rhatunk sz<73>veget. **
|
||||
|
||||
1. Mozgassuk a kurzort a k<>vetkez<65> ---> kezdet<65> sor v<>g<EFBFBD>re <20>gy,
|
||||
hogy norm<72>l m<>dban $ <20>r be.
|
||||
hogy norm<EFBFBD>l m<EFBFBD>dban $-t <20>r be.
|
||||
|
||||
2. a (kicsi) le<6C>t<EFBFBD>s<EFBFBD>vel sz<73>veget sz<73>rhat be AM<41>G<EFBFBD> a karakter m<>g<EFBFBD>,
|
||||
2. Kis "a" le<6C>t<EFBFBD>s<EFBFBD>vel sz<73>veget sz<73>rhat be AM<41>G<EFBFBD> a karakter m<>g<EFBFBD>,
|
||||
amelyen a kurzor <20>ll.
|
||||
(A nagy A az eg<65>sz sor v<>g<EFBFBD>re <20>rja a sz<73>veget.)
|
||||
(A nagy "A" az eg<65>sz sor v<>g<EFBFBD>re <20>rja a sz<73>veget.)
|
||||
|
||||
Megj: A Vimben a sor legv<67>g<EFBFBD>re is lehet <20>llni, azonba ez el<65>dj<64>ben
|
||||
Megj: A Vimben a sor legv<67>g<EFBFBD>re is lehet <20>llni, azonban ez el<65>dj<64>ben
|
||||
a Vi-ban nem lehets<74>ges, ez<65>rt abban az a n<>lk<6C>l el<65>g k<>r<EFBFBD>lm<6C>nyes
|
||||
a sor v<>g<EFBFBD>hez sz<73>veget <20>rni.
|
||||
|
||||
@@ -687,13 +687,13 @@ Megj: A Vimben a sor legv
|
||||
2. Helyezze a kurzort az els<6C> sz<73> elej<65>re amely elt<6C>r a m<>sodik
|
||||
---> kezdet<65> sor tartalm<6C>t<EFBFBD>l (a 'az utols<6C>val' r<>szt<7A>l).
|
||||
|
||||
3. Nyomjon R karaktert <20>s <20>rja <20>t a sz<73>veg marad<61>k<EFBFBD>t az els<6C> sorban
|
||||
3. Nyomjon R karaktert <20>s <20>rja <20>t a sz<73>veg marad<61>k<EFBFBD>t az els<6C> sorban
|
||||
<20>gy, hogy a k<>t sor egyez<65> legyen.
|
||||
|
||||
---> Az els<6C> sort tegye azonoss<73> az utols<6C>val: haszn<7A>lja a gombokat.
|
||||
---> Az els<6C> sort tegye azonoss<73> a m<>sodikkal: <20>rjon R-t <20>s az <20>j sz<73>veget.
|
||||
|
||||
4. Jegyezz<7A>k meg, ha <ESC>-et nyomok, akkor a v<>ltozatlanuk hagyott
|
||||
4. Jegyezz<7A>k meg, ha <ESC>-et nyomok, akkor a v<>ltozatlanul hagyott
|
||||
sz<73>vegek v<>ltozatlanok maradnak.
|
||||
|
||||
|
||||
@@ -826,5 +826,5 @@ Megj: A Vimben a sor legv
|
||||
|
||||
A Vimhez idom<6F>totta Bram Moolenaar.
|
||||
|
||||
Magyar<61>totta: Horv<72>th <20>rp<72>d <horvath.arpad@roik.bmf.hu>, 2006-2008
|
||||
Magyar<61>totta: Horv<72>th <20>rp<72>d <horvath.arpad@arek.uni-opbuda.hu>, 2006-2012
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
== <20> d v <20> z <20> l j <20> k a V I M - o k t a t <20> b a n - 1.5-<2D>s verzi<7A> ==
|
||||
===============================================================================
|
||||
|
||||
A Vim egy nagyon hat<61>kony szerkeszt<7A>, amelnyek rengeteg utas<61>t<EFBFBD>sa
|
||||
A Vim egy nagyon hat<61>kony szerkeszt<7A>, amelynek rengeteg utas<61>t<EFBFBD>sa
|
||||
van, t<>l sok, hogy egy ilyen oktat<61>ban (tutorban), mint az itteni
|
||||
mindet elmagyar<61>zzuk. Ez az oktat<61> arra t<>rekszik, hogy annyit
|
||||
elmagyar<61>zzon, amennyi el<65>g, hogy k<>nnyed<65>n haszn<7A>ljuk a Vim-et, az
|
||||
<20>ltal<61>nos c<>l<EFBFBD> sz<73>vegszerkeszt<7A>t.
|
||||
|
||||
A feladatok megold<6C>s<EFBFBD>hoz 25-30 perc sz<73>ks<6B>ges att<74>l f<>gg<67>en,
|
||||
mennyit t<>lt<6C>nk a kis<EFBFBD>rletez<EFBFBD>ssel.
|
||||
mennyit t<>lt<6C>nk a k<EFBFBD>s<EFBFBD>rletez<EFBFBD>ssel.
|
||||
|
||||
A leck<63>ben szerepl<70> utas<61>t<EFBFBD>sok m<>dos<6F>tani fogj<67>k a sz<73>vegek.
|
||||
A leck<63>ben szerepl<70> utas<61>t<EFBFBD>sok m<>dos<6F>tani fogj<67>k a sz<73>veget.
|
||||
K<>sz<73>tsen m<>solatot err<72>l a f<>jlr<6C>l, ha gyakorolni akar.
|
||||
(Ha "vimtutor"-ral ind<6E>totta, akkor ez m<>r egy m<>solat.)
|
||||
|
||||
@@ -81,7 +81,7 @@ Megj: A kurzor gomboknak is m
|
||||
2. A hib<69>k kijav<61>t<EFBFBD>s<EFBFBD>hoz mozgassa a kurzort am<61>g a t<>rlend<6E> karakter
|
||||
f<>l<EFBFBD> nem <20>r.
|
||||
|
||||
3. Nyomja meg az x gombot, hogy t<>r<EFBFBD>lje a nemk<6D>v<EFBFBD>nt karaktert.
|
||||
3. Nyomja meg az x gombot, hogy t<>r<EFBFBD>lje a nem k<EFBFBD>v<EFBFBD>nt karaktert.
|
||||
|
||||
4. Ism<73>telje a 2, 3, 4-es l<>p<EFBFBD>seket, hogy kijav<61>tsa a mondatot.
|
||||
|
||||
@@ -172,7 +172,7 @@ Most folytassuk a 2. leck
|
||||
|
||||
3. Mozgassa a kurzort a helyes sor v<>g<EFBFBD>re (az els<6C> . UT<55>N)!
|
||||
|
||||
4. d$ beg<65>pel<65>s<EFBFBD>velt<6C>r<EFBFBD>lje a sor v<>g<EFBFBD>t!
|
||||
4. d$ beg<65>pel<65>s<EFBFBD>vel t<EFBFBD>r<EFBFBD>lje a sor v<>g<EFBFBD>t!
|
||||
|
||||
---> Valaki a sor v<>g<EFBFBD>t k<>tszer g<>pelte be. k<>tszer g<>pelte be.
|
||||
|
||||
@@ -184,30 +184,30 @@ Most folytassuk a 2. leck
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
2.3. lecke: UTAS<41>T<EFBFBD>SOKR<4B>L <20>S OBJEKTUMOKR<EFBFBD>L
|
||||
2.3. lecke: UTAS<41>T<EFBFBD>SOKR<4B>L <20>S MOZG<EFBFBD>SOKR<EFBFBD>L
|
||||
|
||||
|
||||
A d (delete=t<>rl<72>s) utas<61>t<EFBFBD>s form<72>ja a k<>vetkez<65>:
|
||||
|
||||
[sz<73>m] d objektum VAGY d [sz<73>m] objektum
|
||||
[sz<73>m] d mozg<EFBFBD>s VAGY d [sz<73>m] mozg<EFBFBD>s
|
||||
Ahol:
|
||||
sz<73>m - h<>nyszor hajt<6A>djon v<>gre a parancs (elhagyhat<61>, alap<61>rt<72>k=1).
|
||||
d - a t<>rl<72>s (delete) utas<61>t<EFBFBD>s.
|
||||
objektum - amin a parancsnak teljes<65>lnie kell (al<61>bb list<73>zva).
|
||||
mozg<EFBFBD>s - amin a parancsnak teljes<65>lnie kell (al<61>bb list<73>zva).
|
||||
|
||||
Objektumok r<>vid list<73>ja:
|
||||
Mozg<EFBFBD>sok r<>vid list<73>ja:
|
||||
w - a kurzort<72>l a sz<73> v<>g<EFBFBD>ig, bele<6C>rtve a sz<73>k<EFBFBD>zt.
|
||||
e - a kurzort<72>l a sz<73> v<>g<EFBFBD>ig, NEM bele<6C>rtve a sz<73>k<EFBFBD>zt.
|
||||
$ - a kurzort<72>l a sor v<>g<EFBFBD>ig.
|
||||
|
||||
MEGJ: V<EFBFBD>llalkoz<EFBFBD>bbak kedv<64><76>rt, csup<75>n az objektum beg<65>pel<65>s<EFBFBD>vel parancs n<>lk<6C>l
|
||||
a kurzor oda ker<65>l, amit az objektumlista megad.
|
||||
MEGJ: Csup<EFBFBD>n a mozg<7A>s beg<65>pel<65>s<EFBFBD>vel (parancs n<>lk<6C>l)
|
||||
a kurzor mozg<EFBFBD>s <20>ltal megadott helyre ker<65>l.
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
2.4. lecke: EGY KIV<49>TEL A 'PARANCSOBJEKTUM' AL<41>L
|
||||
2.4. lecke: EG<EFBFBD>SZ SOROK FELDOLGOZ<4F>SA
|
||||
|
||||
|
||||
** dd be<62>r<EFBFBD>s<EFBFBD>val t<>r<EFBFBD>lheti az eg<65>sz sort. **
|
||||
@@ -217,8 +217,8 @@ MEGJ: V
|
||||
|
||||
1. Mozgassa a kurzort az al<61>bbi kifejez<65>sek m<>sodik sor<6F>ra!
|
||||
2. dd beg<65>pel<65>s<EFBFBD>vel t<>r<EFBFBD>lje a sort!
|
||||
3. Menjen a 4. (eredetileg 5.) sorra!
|
||||
4. 2dd (ugyeb<65>r sz<73>m-utas<61>t<EFBFBD>s-objektum) beg<65>pel<65>s<EFBFBD>vel t<>r<EFBFBD>lj<6C>n k<>t sort!
|
||||
3. Menjen a 3. (eredetileg 4.) sorra!
|
||||
4. 2dd (ugyeb<65>r sz<73>m-utas<61>t<EFBFBD>s-mozg<EFBFBD>s) beg<65>pel<65>s<EFBFBD>vel t<>r<EFBFBD>lj<6C>n k<>t sort!
|
||||
|
||||
1) Alv<6C> szegek a j<>ghideg homokban,
|
||||
2) - kezdi a k<>lt<6C> -
|
||||
@@ -238,9 +238,9 @@ MEGJ: V
|
||||
1. Menj<6E>nk az al<61>bbi ---> kezdet<65> sor els<6C> hib<69>j<EFBFBD>ra!
|
||||
2. x lenyom<6F>s<EFBFBD>val t<>r<EFBFBD>lje az els<6C> felesleges karaktert!
|
||||
3. u megnyom<6F>s<EFBFBD>val vonja vissza az utols<6C>nak v<>grehajtott utas<61>t<EFBFBD>st!
|
||||
4. M<>sodj<64>ra jav<61>tson ki minden hib<69>t a sorben az x utas<61>t<EFBFBD>ssal!
|
||||
4. M<>sodj<64>ra jav<61>tson ki minden hib<69>t a sorban az x utas<61>t<EFBFBD>ssal!
|
||||
5. Most nagy U -val <20>ll<6C>tsa vissza a sor eredeti <20>llapot<6F>t!
|
||||
6. Nyomja meg az u gombot p<>rszor, hogy az U <20>s sz el<65>z<EFBFBD> utas<61>t<EFBFBD>sokat
|
||||
6. Nyomja meg az u gombot p<>rszor, hogy az U <20>s az azt megel<EFBFBD>z<EFBFBD> utas<61>t<EFBFBD>sokat
|
||||
vissza<7A>ll<6C>tsa!
|
||||
7. CTRL-R (CTRL gomb lenyom<6F>sa mellett <20>ss<73>n R-t) p<>rszor csin<69>lja <20>jra a
|
||||
visszavont parancsokat (redo)!
|
||||
@@ -263,11 +263,11 @@ MEGJ: V
|
||||
|
||||
4. Egy utas<61>t<EFBFBD>s alakja norm<72>l m<>dban:
|
||||
|
||||
[sz<73>m] utas<61>t<EFBFBD>s objektum VAGY utas<61>t<EFBFBD>s [sz<73>m] objektum
|
||||
[sz<73>m] utas<61>t<EFBFBD>s mozg<EFBFBD>s VAGY utas<61>t<EFBFBD>s [sz<73>m] mozg<EFBFBD>s
|
||||
ahol:
|
||||
sz<73>m - h<>nyszor ism<73>telj<6C>k a parancsot
|
||||
utas<61>t<EFBFBD>s - mit tegy<67>nk, pl. d a t<>rl<72>skor
|
||||
objektum - mire hasson az utas<61>t<EFBFBD>s, p<>ld<6C>ul w (sz<73>=word),
|
||||
mozg<EFBFBD>s - mire hasson az utas<61>t<EFBFBD>s, p<>ld<6C>ul w (sz<73>=word),
|
||||
$ (a sor v<>g<EFBFBD>ig), stb.
|
||||
|
||||
5. Az el<65>z<EFBFBD> tett visszavon<6F>sa (undo): u (kis u)
|
||||
@@ -278,11 +278,11 @@ MEGJ: V
|
||||
3.1. lecke: A BEILLESZT<5A>S (PUT) PARANCS
|
||||
|
||||
|
||||
** p le<6C>t<EFBFBD>s<EFBFBD>vel az utols<6C>nak t<>r<EFBFBD>ltet a kurzor ut<75>n illeszhetj<74>k. **
|
||||
** p le<6C>t<EFBFBD>s<EFBFBD>vel az utols<6C>nak t<>r<EFBFBD>ltet a kurzor ut<75>n illeszthetj<EFBFBD>k. **
|
||||
|
||||
1. Mozgassuk a kurzort az al<61>bbi sorok els<6C> sor<6F>ra.
|
||||
|
||||
2. dd le<6C>t<EFBFBD>s<EFBFBD>vel t<>r<EFBFBD>lj<6C>k a sort <20>s elt<6C>rol<6F>dik a Vim puffer<65>ben.
|
||||
2. dd le<6C>t<EFBFBD>s<EFBFBD>vel t<>r<EFBFBD>lj<6C>k a sort <20>s elt<6C>rol<6F>dik a Vim puffer<65>ben.
|
||||
|
||||
3. Mozgassuk a kurzort azel<65>tt a sor EL<45>TTI sorba, ahov<6F> mozgatni
|
||||
szeretn<74>nk a t<>r<EFBFBD>lt sort.
|
||||
@@ -350,13 +350,13 @@ Vegy
|
||||
3.4. lecke: T<>BBF<42>LE V<>LTOZTAT<41>S c-VEL
|
||||
|
||||
|
||||
** A c utas<61>t<EFBFBD>s haszn<7A>lhat<61> ugyanazokkal az objektumokkal mint a t<>rl<72>s **
|
||||
** A c utas<61>t<EFBFBD>s haszn<7A>lhat<61> ugyanazokkal az mozg<EFBFBD>sokkal mint a t<>rl<72>s **
|
||||
|
||||
1. A change utas<61>t<EFBFBD>s a t<>rl<72>ssel azonosan viselkedik. A forma:
|
||||
|
||||
[sz<73>m] c objektum OR c [sz<73>m] objektum
|
||||
[sz<73>m] c mozg<EFBFBD>s OR c [sz<73>m] mozg<EFBFBD>s
|
||||
|
||||
2. Az objektumok is azonosak, pl. w (sz<73>), $ (sorv<72>g), stb.
|
||||
2. A mozg<7A>sok is azonosak, pl. w (sz<73>), $ (sorv<72>g), stb.
|
||||
|
||||
3. Mozgassuk a kurzort az els<6C> ---> kezdet<65> sorra!
|
||||
|
||||
@@ -374,18 +374,18 @@ Vegy
|
||||
|
||||
|
||||
1. A m<>r t<>r<EFBFBD>lt sort beilleszt<7A>s<EFBFBD>hez nyomjunk p-t. Ez a t<>r<EFBFBD>lt sz<73>veget
|
||||
a kurzor UT<55>N helyezi (ha sor ker<65>lt t<>rl<72>sre, a kurzor allatti sorba).
|
||||
a kurzor UT<55>N helyezi (ha sor ker<65>lt t<>rl<72>sre, a kurzor alatti sorba).
|
||||
|
||||
2. A kurzor alatti karakter <20>t<EFBFBD>r<EFBFBD>s<EFBFBD>hoz az r-et <20>s azt a karaktert
|
||||
nyomjuk, amellyel az eredetit fel<65>l szeretn<74>nk <20>rni.
|
||||
|
||||
3. A v<>ltoztat<61>s (c) utas<61>t<EFBFBD>s a karaktert<72>l az objektum v<>g<EFBFBD>ig
|
||||
v<>ltoztatja meg az objektumot. P<>ld<6C>ul a cw a kurzort<72>l a sz<73> v<>g<EFBFBD>ig,
|
||||
3. A v<>ltoztat<61>s (c) utas<61>t<EFBFBD>s a karaktert<72>l az mozg<EFBFBD>s v<>g<EFBFBD>ig
|
||||
v<>ltoztatja meg az mozg<EFBFBD>st. P<>ld<6C>ul a cw a kurzort<72>l a sz<73> v<>g<EFBFBD>ig,
|
||||
a c$ a sor v<>g<EFBFBD>ig.
|
||||
|
||||
4. A v<>ltoztat<61>s form<72>tuma:
|
||||
|
||||
[sz<73>m] c objektum VAGY c [sz<73>m] objektum
|
||||
[sz<73>m] c mozg<EFBFBD>s VAGY c [sz<73>m] mozg<EFBFBD>s
|
||||
|
||||
Ugorjunk a k<>vetkez<65> leck<63>re!
|
||||
|
||||
@@ -428,7 +428,7 @@ Ugorjunk a k
|
||||
3. A kifejez<65>s <20>jabb keres<65>s<EFBFBD>hez <20>ss<73>k le egyszer<65>en: n .
|
||||
A kifejez<65>s ellenkez<65> ir<69>nyban t<>rt<72>n<EFBFBD> keres<65>s<EFBFBD>hez ezt <20>ss<73>k be: Shift-N .
|
||||
|
||||
4. Ha visszafel<65> szeretne keresni, akkor ? kell a ! helyett.
|
||||
4. Ha visszafel<65> szeretne keresni, akkor ? kell a / helyett.
|
||||
|
||||
---> "hiibaa" nem a helyes m<>dja a hiba le<6C>r<EFBFBD>s<EFBFBD>nak; a hiibaa egy hiba.
|
||||
|
||||
@@ -462,7 +462,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a
|
||||
4.4. lecke: A HIB<49>K KIJAV<41>T<EFBFBD>S<EFBFBD>NAK EGY M<>DJA
|
||||
|
||||
|
||||
** :s/<EFBFBD>j/r<EFBFBD>gi/g beg<65>pel<65>s<EFBFBD>vel az '<27>j'-ra cser<65>lj<6C>k a 'r<>gi'-t. **
|
||||
** :s/r<>gi/<EFBFBD>j/g beg<65>pel<65>s<EFBFBD>vel az '<27>j'-ra cser<65>lj<6C>k a 'r<>gi'-t. **
|
||||
|
||||
1. Menj<6E>nk a ---> kezdet<65> sorra!
|
||||
|
||||
@@ -579,7 +579,7 @@ Megj: Ha
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
5.4. lecke: RETRIEVING AND MERGING FILES
|
||||
5.4. lecke: F<EFBFBD>JLOK VISSZA<5A>LL<4C>T<EFBFBD>SA <20>S <20>SSZEF<45>Z<EFBFBD>SE
|
||||
|
||||
|
||||
** Egy f<>jl tartalm<6C>nak beilleszt<7A>s<EFBFBD>hez <20>rja :r F<>JLN<4C>V **
|
||||
@@ -592,11 +592,11 @@ MEGJ: A 3. l
|
||||
keresse meg ism<73>t ezt a leck<63>t.
|
||||
|
||||
3. Most sz<73>rja be a TESZT nev<65> f<>jlt a :r TESZT paranccsal, ahol
|
||||
TESZT az <20>n f<>jlj<6C>nak a neve.
|
||||
TESZT az <20>n f<>jlj<6C>nak a neve.
|
||||
|
||||
MEGJ: A f<>jl, amit beillesztett a kurzora alatt helyezkedik el.
|
||||
|
||||
4. Hogy ellen<65>rizz<7A>k, hogy a f<>jlt t<>nyleg beillsztett<74>k, menjen
|
||||
4. Hogy ellen<65>rizz<7A>k, hogy a f<>jlt t<>nyleg beillesztett<EFBFBD>k, menjen
|
||||
vissza, <20>s n<>zze meg, hogy k<>tszer szerepel az 5.3. lecke! Az eredeti
|
||||
mellett a f<>jlb<6C>l bem<65>solt is ott van.
|
||||
|
||||
@@ -616,11 +616,11 @@ MEGJ: A f
|
||||
2. :w F<>JLN<4C>V ki<6B>rja a jelenlegi Vim-f<>jlt a lemezre F<>JN<4A>V n<>ven.
|
||||
|
||||
3. :#,#w F<>JLN<4C>V ki<6B>rja a k<>t sorsz<73>m (#) k<>z<EFBFBD>tti sorokat F<>JLN<4C>V-be
|
||||
M<>sik lehet<65>s<EFBFBD>g, hogy a kezd<7A>sorn<72>l Ctrl-v-t nyom lemegy az utols<6C>
|
||||
M<>sik lehet<65>s<EFBFBD>g, hogy a kezd<7A>sorn<72>l Shift-v-t nyom lemegy az utols<6C>
|
||||
sorra, majd ezt <20>ti be :w F<>JLN<4C>V
|
||||
|
||||
4. :r F<>JLN<4C>V beolvassa a F<>JLN<4C>V f<>jlt <20>s behelyezi a jelenlegi f<>jlba
|
||||
a kurzorpozici<EFBFBD> ut<75>ni sorba.
|
||||
a kurzorpoz<EFBFBD>ci<EFBFBD> ut<75>ni sorba.
|
||||
|
||||
|
||||
|
||||
@@ -629,7 +629,7 @@ MEGJ: A f
|
||||
6.1. lecke: A MEGNYIT<49>S (OPEN) PARANCS
|
||||
|
||||
|
||||
** o be<62>r<EFBFBD>s<EFBFBD>val nyithat egy <20>j sort a kurzor alatt <20>s v<EFBFBD>lthat besz<EFBFBD>r<EFBFBD> m<>dba **
|
||||
** o be<62>r<EFBFBD>s<EFBFBD>val nyit egy <20>j sort a kurzor alatt <20>s besz<73>r<EFBFBD> m<>dba v<EFBFBD>lt **
|
||||
|
||||
1. Mozgassuk a kurzort a ---> kezdet<65> sorra.
|
||||
|
||||
@@ -641,7 +641,7 @@ MEGJ: A f
|
||||
|
||||
---> Az o lenyom<6F>sa ut<75>n a kurzor a k<>vetkez<65> sor elej<65>n <20>ll besz<73>r<EFBFBD> m<>dban.
|
||||
|
||||
4. A kurzor FELETTI for megnyit<69>s<EFBFBD>hoz egyzser<EFBFBD>en a nagy O bet<65>t <20>rjon
|
||||
4. A kurzor FELETTI sor megnyit<69>s<EFBFBD>hoz egyszer<EFBFBD>en nagy O bet<65>t <20>rjon
|
||||
kicsi helyett. Pr<50>b<EFBFBD>lja ki a k<>vetkez<65> soron!
|
||||
Nyisson egy <20>j sort efelett Shift-O megnyom<6F>s<EFBFBD>val, mialatt a kurzor
|
||||
ezen a soron <20>ll.
|
||||
@@ -654,16 +654,16 @@ ezen a soron
|
||||
6.2. lecke: AZ APPEND PARANCS
|
||||
|
||||
|
||||
** a lenyom<6F>s<EFBFBD>val a kuror UT<55>N sz<73>rhatunk sz<73>veget. **
|
||||
** a lenyom<6F>s<EFBFBD>val a kurzor UT<55>N sz<73>rhatunk sz<73>veget. **
|
||||
|
||||
1. Mozgassuk a kurzort a k<>vetkez<65> ---> kezdet<65> sor v<>g<EFBFBD>re <20>gy,
|
||||
hogy norm<72>l m<>dban $ <20>r be.
|
||||
hogy norm<EFBFBD>l m<EFBFBD>dban $-t <20>r be.
|
||||
|
||||
2. a (kicsi) le<6C>t<EFBFBD>s<EFBFBD>vel sz<73>veget sz<73>rhat be AM<41>G<EFBFBD> a karakter m<>g<EFBFBD>,
|
||||
2. Kis "a" le<6C>t<EFBFBD>s<EFBFBD>vel sz<73>veget sz<73>rhat be AM<41>G<EFBFBD> a karakter m<>g<EFBFBD>,
|
||||
amelyen a kurzor <20>ll.
|
||||
(A nagy A az eg<65>sz sor v<>g<EFBFBD>re <20>rja a sz<73>veget.)
|
||||
(A nagy "A" az eg<65>sz sor v<>g<EFBFBD>re <20>rja a sz<73>veget.)
|
||||
|
||||
Megj: A Vimben a sor legv<67>g<EFBFBD>re is lehet <20>llni, azonba ez el<65>dj<64>ben
|
||||
Megj: A Vimben a sor legv<67>g<EFBFBD>re is lehet <20>llni, azonban ez el<65>dj<64>ben
|
||||
a Vi-ban nem lehets<74>ges, ez<65>rt abban az a n<>lk<6C>l el<65>g k<>r<EFBFBD>lm<6C>nyes
|
||||
a sor v<>g<EFBFBD>hez sz<73>veget <20>rni.
|
||||
|
||||
@@ -687,13 +687,13 @@ Megj: A Vimben a sor legv
|
||||
2. Helyezze a kurzort az els<6C> sz<73> elej<65>re amely elt<6C>r a m<>sodik
|
||||
---> kezdet<65> sor tartalm<6C>t<EFBFBD>l (a 'az utols<6C>val' r<>szt<7A>l).
|
||||
|
||||
3. Nyomjon R karaktert <20>s <20>rja <20>t a sz<73>veg marad<61>k<EFBFBD>t az els<6C> sorban
|
||||
3. Nyomjon R karaktert <20>s <20>rja <20>t a sz<73>veg marad<61>k<EFBFBD>t az els<6C> sorban
|
||||
<20>gy, hogy a k<>t sor egyez<65> legyen.
|
||||
|
||||
---> Az els<6C> sort tegye azonoss<73> az utols<6C>val: haszn<7A>lja a gombokat.
|
||||
---> Az els<6C> sort tegye azonoss<73> a m<>sodikkal: <20>rjon R-t <20>s az <20>j sz<73>veget.
|
||||
|
||||
4. Jegyezz<7A>k meg, ha <ESC>-et nyomok, akkor a v<>ltozatlanuk hagyott
|
||||
4. Jegyezz<7A>k meg, ha <ESC>-et nyomok, akkor a v<>ltozatlanul hagyott
|
||||
sz<73>vegek v<>ltozatlanok maradnak.
|
||||
|
||||
|
||||
@@ -826,5 +826,5 @@ Megj: A Vimben a sor legv
|
||||
|
||||
A Vimhez idom<6F>totta Bram Moolenaar.
|
||||
|
||||
Magyar<61>totta: Horv<72>th <20>rp<72>d <horvath.arpad@roik.bmf.hu>, 2006-2008
|
||||
Magyar<61>totta: Horv<72>th <20>rp<72>d <horvath.arpad@arek.uni-opbuda.hu>, 2006-2012
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
== Ü d v ö z ö l j ü k a V I M - o k t a t ó b a n - 1.5-ös verzió ==
|
||||
===============================================================================
|
||||
|
||||
A Vim egy nagyon hatékony szerkesztő, amelnyek rengeteg utasítása
|
||||
A Vim egy nagyon hatékony szerkesztő, amelynek rengeteg utasítása
|
||||
van, túl sok, hogy egy ilyen oktatóban (tutorban), mint az itteni
|
||||
mindet elmagyarázzuk. Ez az oktató arra törekszik, hogy annyit
|
||||
elmagyarázzon, amennyi elég, hogy könnyedén használjuk a Vim-et, az
|
||||
általános célú szövegszerkesztőt.
|
||||
|
||||
A feladatok megoldásához 25-30 perc szükséges attól függően,
|
||||
mennyit töltünk a kisérletezéssel.
|
||||
mennyit töltünk a kísérletezéssel.
|
||||
|
||||
A leckében szereplő utasítások módosítani fogják a szövegek.
|
||||
A leckében szereplő utasítások módosítani fogják a szöveget.
|
||||
Készítsen másolatot erről a fájlról, ha gyakorolni akar.
|
||||
(Ha "vimtutor"-ral indította, akkor ez már egy másolat.)
|
||||
|
||||
@@ -81,7 +81,7 @@ Megj: A kurzor gomboknak is működniük kell, de a hjkl használatával
|
||||
2. A hibák kijavításához mozgassa a kurzort amíg a törlendő karakter
|
||||
fölé nem ér.
|
||||
|
||||
3. Nyomja meg az x gombot, hogy törölje a nemkívánt karaktert.
|
||||
3. Nyomja meg az x gombot, hogy törölje a nem kívánt karaktert.
|
||||
|
||||
4. Ismételje a 2, 3, 4-es lépéseket, hogy kijavítsa a mondatot.
|
||||
|
||||
@@ -172,7 +172,7 @@ Most folytassuk a 2. leckével!
|
||||
|
||||
3. Mozgassa a kurzort a helyes sor végére (az első . UTÁN)!
|
||||
|
||||
4. d$ begépeléséveltörölje a sor végét!
|
||||
4. d$ begépelésével törölje a sor végét!
|
||||
|
||||
---> Valaki a sor végét kétszer gépelte be. kétszer gépelte be.
|
||||
|
||||
@@ -184,30 +184,30 @@ Most folytassuk a 2. leckével!
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
2.3. lecke: UTASÍTÁSOKRÓL ÉS OBJEKTUMOKRÓL
|
||||
2.3. lecke: UTASÍTÁSOKRÓL ÉS MOZGÁSOKRÓL
|
||||
|
||||
|
||||
A d (delete=törlés) utasítás formája a következő:
|
||||
|
||||
[szám] d objektum VAGY d [szám] objektum
|
||||
[szám] d mozgás VAGY d [szám] mozgás
|
||||
Ahol:
|
||||
szám - hányszor hajtódjon végre a parancs (elhagyható, alapérték=1).
|
||||
d - a törlés (delete) utasítás.
|
||||
objektum - amin a parancsnak teljesülnie kell (alább listázva).
|
||||
mozgás - amin a parancsnak teljesülnie kell (alább listázva).
|
||||
|
||||
Objektumok rövid listája:
|
||||
Mozgások rövid listája:
|
||||
w - a kurzortól a szó végéig, beleértve a szóközt.
|
||||
e - a kurzortól a szó végéig, NEM beleértve a szóközt.
|
||||
$ - a kurzortól a sor végéig.
|
||||
|
||||
MEGJ: Vállalkozóbbak kedvéért, csupán az objektum begépelésével parancs nélkül
|
||||
a kurzor oda kerül, amit az objektumlista megad.
|
||||
MEGJ: Csupán a mozgás begépelésével (parancs nélkül)
|
||||
a kurzor mozgás által megadott helyre kerül.
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
2.4. lecke: EGY KIVÉTEL A 'PARANCSOBJEKTUM' ALÓL
|
||||
2.4. lecke: EGÉSZ SOROK FELDOLGOZÁSA
|
||||
|
||||
|
||||
** dd beírásával törölheti az egész sort. **
|
||||
@@ -217,8 +217,8 @@ MEGJ: Vállalkozóbbak kedvéért, csupán az objektum begépelésével parancs
|
||||
|
||||
1. Mozgassa a kurzort az alábbi kifejezések második sorára!
|
||||
2. dd begépelésével törölje a sort!
|
||||
3. Menjen a 4. (eredetileg 5.) sorra!
|
||||
4. 2dd (ugyebár szám-utasítás-objektum) begépelésével töröljön két sort!
|
||||
3. Menjen a 3. (eredetileg 4.) sorra!
|
||||
4. 2dd (ugyebár szám-utasítás-mozgás) begépelésével töröljön két sort!
|
||||
|
||||
1) Alvó szegek a jéghideg homokban,
|
||||
2) - kezdi a költő -
|
||||
@@ -238,9 +238,9 @@ MEGJ: Vállalkozóbbak kedvéért, csupán az objektum begépelésével parancs
|
||||
1. Menjünk az alábbi ---> kezdetű sor első hibájára!
|
||||
2. x lenyomásával törölje az első felesleges karaktert!
|
||||
3. u megnyomásával vonja vissza az utolsónak végrehajtott utasítást!
|
||||
4. Másodjára javítson ki minden hibát a sorben az x utasítással!
|
||||
4. Másodjára javítson ki minden hibát a sorban az x utasítással!
|
||||
5. Most nagy U -val állítsa vissza a sor eredeti állapotát!
|
||||
6. Nyomja meg az u gombot párszor, hogy az U és sz előző utasításokat
|
||||
6. Nyomja meg az u gombot párszor, hogy az U és az azt megelőző utasításokat
|
||||
visszaállítsa!
|
||||
7. CTRL-R (CTRL gomb lenyomása mellett üssön R-t) párszor csinálja újra a
|
||||
visszavont parancsokat (redo)!
|
||||
@@ -263,11 +263,11 @@ MEGJ: Vállalkozóbbak kedvéért, csupán az objektum begépelésével parancs
|
||||
|
||||
4. Egy utasítás alakja normál módban:
|
||||
|
||||
[szám] utasítás objektum VAGY utasítás [szám] objektum
|
||||
[szám] utasítás mozgás VAGY utasítás [szám] mozgás
|
||||
ahol:
|
||||
szám - hányszor ismételjük a parancsot
|
||||
utasítás - mit tegyünk, pl. d a törléskor
|
||||
objektum - mire hasson az utasítás, például w (szó=word),
|
||||
mozgás - mire hasson az utasítás, például w (szó=word),
|
||||
$ (a sor végéig), stb.
|
||||
|
||||
5. Az előző tett visszavonása (undo): u (kis u)
|
||||
@@ -278,11 +278,11 @@ MEGJ: Vállalkozóbbak kedvéért, csupán az objektum begépelésével parancs
|
||||
3.1. lecke: A BEILLESZTÉS (PUT) PARANCS
|
||||
|
||||
|
||||
** p leütésével az utolsónak töröltet a kurzor után illeszhetjük. **
|
||||
** p leütésével az utolsónak töröltet a kurzor után illeszthetjük. **
|
||||
|
||||
1. Mozgassuk a kurzort az alábbi sorok első sorára.
|
||||
|
||||
2. dd leütésével töröljük a sort és eltérolódik a Vim pufferében.
|
||||
2. dd leütésével töröljük a sort és eltárolódik a Vim pufferében.
|
||||
|
||||
3. Mozgassuk a kurzort azelőtt a sor ELŐTTI sorba, ahová mozgatni
|
||||
szeretnénk a törölt sort.
|
||||
@@ -350,13 +350,13 @@ Vegyük észre, hogy a cw nem csak a szót írja át, hanem beszúró
|
||||
3.4. lecke: TÖBBFÉLE VÁLTOZTATÁS c-VEL
|
||||
|
||||
|
||||
** A c utasítás használható ugyanazokkal az objektumokkal mint a törlés **
|
||||
** A c utasítás használható ugyanazokkal az mozgásokkal mint a törlés **
|
||||
|
||||
1. A change utasítás a törléssel azonosan viselkedik. A forma:
|
||||
|
||||
[szám] c objektum OR c [szám] objektum
|
||||
[szám] c mozgás OR c [szám] mozgás
|
||||
|
||||
2. Az objektumok is azonosak, pl. w (szó), $ (sorvég), stb.
|
||||
2. A mozgások is azonosak, pl. w (szó), $ (sorvég), stb.
|
||||
|
||||
3. Mozgassuk a kurzort az első ---> kezdetű sorra!
|
||||
|
||||
@@ -374,18 +374,18 @@ Vegyük észre, hogy a cw nem csak a szót írja át, hanem beszúró
|
||||
|
||||
|
||||
1. A már törölt sort beillesztéséhez nyomjunk p-t. Ez a törölt szöveget
|
||||
a kurzor UTÁN helyezi (ha sor került törlésre, a kurzor allatti sorba).
|
||||
a kurzor UTÁN helyezi (ha sor került törlésre, a kurzor alatti sorba).
|
||||
|
||||
2. A kurzor alatti karakter átírásához az r-et és azt a karaktert
|
||||
nyomjuk, amellyel az eredetit felül szeretnénk írni.
|
||||
|
||||
3. A változtatás (c) utasítás a karaktertől az objektum végéig
|
||||
változtatja meg az objektumot. Például a cw a kurzortól a szó végéig,
|
||||
3. A változtatás (c) utasítás a karaktertől az mozgás végéig
|
||||
változtatja meg az mozgást. Például a cw a kurzortól a szó végéig,
|
||||
a c$ a sor végéig.
|
||||
|
||||
4. A változtatás formátuma:
|
||||
|
||||
[szám] c objektum VAGY c [szám] objektum
|
||||
[szám] c mozgás VAGY c [szám] mozgás
|
||||
|
||||
Ugorjunk a következő leckére!
|
||||
|
||||
@@ -428,7 +428,7 @@ Ugorjunk a következő leckére!
|
||||
3. A kifejezés újabb kereséséhez üssük le egyszerűen: n .
|
||||
A kifejezés ellenkező irányban történő kereséséhez ezt üssük be: Shift-N .
|
||||
|
||||
4. Ha visszafelé szeretne keresni, akkor ? kell a ! helyett.
|
||||
4. Ha visszafelé szeretne keresni, akkor ? kell a / helyett.
|
||||
|
||||
---> "hiibaa" nem a helyes módja a hiba leírásának; a hiibaa egy hiba.
|
||||
|
||||
@@ -462,7 +462,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a
|
||||
4.4. lecke: A HIBÁK KIJAVÍTÁSÁNAK EGY MÓDJA
|
||||
|
||||
|
||||
** :s/új/régi/g begépelésével az 'új'-ra cseréljük a 'régi'-t. **
|
||||
** :s/régi/új/g begépelésével az 'új'-ra cseréljük a 'régi'-t. **
|
||||
|
||||
1. Menjünk a ---> kezdetű sorra!
|
||||
|
||||
@@ -579,7 +579,7 @@ Megj: Ha Ön kilépne a Vimből és és visszatérne a TESZT fájlnévvel, akkor
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
5.4. lecke: RETRIEVING AND MERGING FILES
|
||||
5.4. lecke: FÁJLOK VISSZAÁLLÍTÁSA ÉS ÖSSZEFŰZÉSE
|
||||
|
||||
|
||||
** Egy fájl tartalmának beillesztéséhez írja :r FÁJLNÉV **
|
||||
@@ -592,11 +592,11 @@ MEGJ: A 3. lépés után az 5.3. leckét fogja látni. Azután LEFELÉ indulva
|
||||
keresse meg ismét ezt a leckét.
|
||||
|
||||
3. Most szúrja be a TESZT nevű fájlt a :r TESZT paranccsal, ahol
|
||||
TESZT az Ön fájljénak a neve.
|
||||
TESZT az Ön fájljának a neve.
|
||||
|
||||
MEGJ: A fájl, amit beillesztett a kurzora alatt helyezkedik el.
|
||||
|
||||
4. Hogy ellenőrizzük, hogy a fájlt tényleg beillsztettük, menjen
|
||||
4. Hogy ellenőrizzük, hogy a fájlt tényleg beillesztettük, menjen
|
||||
vissza, és nézze meg, hogy kétszer szerepel az 5.3. lecke! Az eredeti
|
||||
mellett a fájlból bemásolt is ott van.
|
||||
|
||||
@@ -616,11 +616,11 @@ MEGJ: A fájl, amit beillesztett a kurzora alatt helyezkedik el.
|
||||
2. :w FÁJLNÉV kiírja a jelenlegi Vim-fájlt a lemezre FÁJNÉV néven.
|
||||
|
||||
3. :#,#w FÁJLNÉV kiírja a két sorszám (#) közötti sorokat FÁJLNÉV-be
|
||||
Másik lehetőség, hogy a kezdősornál Ctrl-v-t nyom lemegy az utolsó
|
||||
Másik lehetőség, hogy a kezdősornál Shift-v-t nyom lemegy az utolsó
|
||||
sorra, majd ezt üti be :w FÁJLNÉV
|
||||
|
||||
4. :r FÁJLNÉV beolvassa a FÁJLNÉV fájlt és behelyezi a jelenlegi fájlba
|
||||
a kurzorpozició utáni sorba.
|
||||
a kurzorpozíció utáni sorba.
|
||||
|
||||
|
||||
|
||||
@@ -629,7 +629,7 @@ MEGJ: A fájl, amit beillesztett a kurzora alatt helyezkedik el.
|
||||
6.1. lecke: A MEGNYITÁS (OPEN) PARANCS
|
||||
|
||||
|
||||
** o beírásával nyithat egy új sort a kurzor alatt és válthat beszúró módba **
|
||||
** o beírásával nyit egy új sort a kurzor alatt és beszúró módba vált **
|
||||
|
||||
1. Mozgassuk a kurzort a ---> kezdetű sorra.
|
||||
|
||||
@@ -641,7 +641,7 @@ MEGJ: A fájl, amit beillesztett a kurzora alatt helyezkedik el.
|
||||
|
||||
---> Az o lenyomása után a kurzor a következő sor elején áll beszúró módban.
|
||||
|
||||
4. A kurzor FELETTI for megnyitásához egyzserűen a nagy O betűt írjon
|
||||
4. A kurzor FELETTI sor megnyitásához egyszerűen nagy O betűt írjon
|
||||
kicsi helyett. Próbálja ki a következő soron!
|
||||
Nyisson egy új sort efelett Shift-O megnyomásával, mialatt a kurzor
|
||||
ezen a soron áll.
|
||||
@@ -654,16 +654,16 @@ ezen a soron áll.
|
||||
6.2. lecke: AZ APPEND PARANCS
|
||||
|
||||
|
||||
** a lenyomásával a kuror UTÁN szúrhatunk szöveget. **
|
||||
** a lenyomásával a kurzor UTÁN szúrhatunk szöveget. **
|
||||
|
||||
1. Mozgassuk a kurzort a következő ---> kezdetű sor végére úgy,
|
||||
hogy normál módban $ ír be.
|
||||
hogy normál módban $-t ír be.
|
||||
|
||||
2. a (kicsi) leütésével szöveget szúrhat be AMöGÉ a karakter mögé,
|
||||
2. Kis "a" leütésével szöveget szúrhat be AMÖGÉ a karakter mögé,
|
||||
amelyen a kurzor áll.
|
||||
(A nagy A az egész sor végére írja a szöveget.)
|
||||
(A nagy "A" az egész sor végére írja a szöveget.)
|
||||
|
||||
Megj: A Vimben a sor legvégére is lehet állni, azonba ez elődjében
|
||||
Megj: A Vimben a sor legvégére is lehet állni, azonban ez elődjében
|
||||
a Vi-ban nem lehetséges, ezért abban az a nélkül elég körülményes
|
||||
a sor végéhez szöveget írni.
|
||||
|
||||
@@ -687,13 +687,13 @@ Megj: A Vimben a sor legvégére is lehet állni, azonba ez elődjében
|
||||
2. Helyezze a kurzort az első szó elejére amely eltér a második
|
||||
---> kezdetű sor tartalmától (a 'az utolsóval' résztől).
|
||||
|
||||
3. Nyomjon R karaktert és írja ét a szöveg maradékát az első sorban
|
||||
3. Nyomjon R karaktert és írja át a szöveg maradékát az első sorban
|
||||
úgy, hogy a két sor egyező legyen.
|
||||
|
||||
---> Az első sort tegye azonossá az utolsóval: használja a gombokat.
|
||||
---> Az első sort tegye azonossá a másodikkal: írjon R-t és az új szöveget.
|
||||
|
||||
4. Jegyezzük meg, ha <ESC>-et nyomok, akkor a változatlanuk hagyott
|
||||
4. Jegyezzük meg, ha <ESC>-et nyomok, akkor a változatlanul hagyott
|
||||
szövegek változatlanok maradnak.
|
||||
|
||||
|
||||
@@ -826,5 +826,5 @@ Megj: A Vimben a sor legvégére is lehet állni, azonba ez elődjében
|
||||
|
||||
A Vimhez idomította Bram Moolenaar.
|
||||
|
||||
Magyarította: Horváth Árpád <horvath.arpad@roik.bmf.hu>, 2006-2008
|
||||
Magyarította: Horváth Árpád <horvath.arpad@arek.uni-opbuda.hu>, 2006-2012
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ NOTE:
|
||||
<20><><EFBFBD>å<EFBFBD><C3A5><EFBFBD> 1.5: <20>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD> - <20>ɲ<EFBFBD>
|
||||
|
||||
|
||||
** <20>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɲä<C9B2><C3A4><EFBFBD><EFBFBD>ˤ<EFBFBD> A <20><EFBFBD><F2B2A1A4>ޤ<EFBFBD><DEA4>礦 **
|
||||
** <20>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD>ɲä<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤ<EFBFBD> A <20><EFBFBD><F2B2A1A4>ޤ<EFBFBD><DEA4>礦 **
|
||||
|
||||
1. <20>ʲ<EFBFBD><CAB2><EFBFBD> ---> <20>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD>줿<EFBFBD>ǽ<EFBFBD><C7BD>ιԤ˥<D4A4><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD>ޤ<EFBFBD><DEA4>礦<EFBFBD><E7A4A6>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뤬<EFBFBD><EBA4AC><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD>ˤ<EFBFBD><CBA4>äƤ⤫<C6A4>ޤ<EFBFBD><DEA4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -232,7 +232,7 @@ NOTE: <ESC>
|
||||
<20><><EFBFBD>å<EFBFBD><C3A5><EFBFBD> 2.3: <20><><EFBFBD>ڥ졼<DAA5><ECA1BC><EFBFBD>ȥ⡼<C8A5><E2A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
¿<><C2BF><EFBFBD>Υ<EFBFBD><CEA5>ޥ<EFBFBD><DEA5>ɤϥ<C9A4><CFA5>ڥ졼<DAA5><ECA1BC><EFBFBD>ȥ⡼<C8A5><E2A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A4ABA4>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD>äޤ<C3A4><DEA4><EFBFBD>
|
||||
¿<><C2BF><EFBFBD>Υ<EFBFBD><CEA5>ޥ<EFBFBD><DEA5>ɤϥ<C9A4><CFA5>ڥ졼<DAA5><ECA1BC><EFBFBD>ȥ⡼<C8A5><E2A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A4ABA4>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD>ä<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޥ<EFBFBD><DEA5><EFBFBD> d <20>Υ<EFBFBD><CEA5>ڥ졼<DAA5><ECA1BC><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD>ͤˤʤäƤ<C3A4><C6A4>ޤ<EFBFBD>:
|
||||
|
||||
d <20>⡼<EFBFBD><E2A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -259,7 +259,7 @@ NOTE:
|
||||
|
||||
1. <20>ʲ<EFBFBD><CAB2><EFBFBD> ---> <20>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD>줿<EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD>Ƭ<EFBFBD>˥<EFBFBD><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
|
||||
|
||||
2. 2dw <20><EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4><EFBFBD>ñ<EFBFBD><C3B1>2<EFBFBD><32>ʬ<EFBFBD><CAAC>ư<EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
||||
2. 2dw <20><EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4><EFBFBD>ñ<EFBFBD><C3B1>2<EFBFBD><32>ʬ<EFBFBD><CAAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
3. 3e <20><EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4><EFBFBD>3<EFBFBD><33><EFBFBD>ܤ<EFBFBD>ñ<EFBFBD><C3B1><EFBFBD>ν<EFBFBD>ü<EFBFBD>˰<EFBFBD>ư<EFBFBD><C6B0><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
|
||||
|
||||
@@ -326,8 +326,8 @@ NOTE:
|
||||
|
||||
** <20>Ǹ<EFBFBD><C7B8>Υ<EFBFBD><CEA5>ޥ<EFBFBD><DEA5>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ä<EFBFBD><C3A4>ˤ<EFBFBD> u <20><EFBFBD><F2B2A1A4>ޤ<EFBFBD><DEA4><EFBFBD>U <20>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD>Τμ<CEA4><CEBC>äǤ<C3A4><C7A4><EFBFBD> **
|
||||
|
||||
1. <20>ʲ<EFBFBD><CAB2><EFBFBD> ---> <20>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD>줿<EFBFBD>Ԥ˥<D4A4><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><C7BD>δְ㤤<D6B0>˥<EFBFBD><CBA5><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD>礦<EFBFBD><EFBFBD>
|
||||
1. <20>ʲ<EFBFBD><CAB2><EFBFBD> ---> <20>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD>줿<EFBFBD>Ԥ˥<D4A4><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><C7BD>δְ㤤<D6B0>˥<EFBFBD><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>ư<EFBFBD><C6B0><EFBFBD>ޤ<EFBFBD><DEA4>礦<EFBFBD><E7A4A6>
|
||||
2. x <20><EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD>Ƭ<EFBFBD><C6AC>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4>礦<EFBFBD><E7A4A6>
|
||||
3. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>u <20><EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4>ƺǸ<C6BA><C7B8>˼¹Ԥ<C2B9><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޥ<EFBFBD><DEA5>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ä<EFBFBD><C3A4>ޤ<EFBFBD><DEA4>礦<EFBFBD><E7A4A6>
|
||||
4. <20><><EFBFBD>٤ϡ<D9A4>x <20><><EFBFBD><EFBFBD><EFBFBD>Ѥ<EFBFBD><D1A4>Ƹ<EFBFBD><C6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4>礦<EFBFBD><E7A4A6>
|
||||
|
||||
@@ -117,7 +117,7 @@ NOTE:
|
||||
<20><><EFBFBD>b<EFBFBD>X<EFBFBD><58> 1.5: <20>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD>ҏW - <20>lj<EFBFBD>
|
||||
|
||||
|
||||
** <20>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD>lj<EFBFBD><C789><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD> A <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤 **
|
||||
** <20>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD><EFBFBD><EFBFBD>lj<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD> A <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤 **
|
||||
|
||||
1. <20>ȉ<EFBFBD><C889><EFBFBD> ---> <20>Ǝ<EFBFBD><C68E><EFBFBD><EFBFBD>ꂽ<EFBFBD>ŏ<EFBFBD><C58F>̍s<CC8D>ɃJ<C983>[<5B>\<5C><><EFBFBD><EFBFBD><EFBFBD>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤<EFBFBD>B
|
||||
<20>J<EFBFBD>[<5B>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̕<EFBFBD><CC95><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>܂<EFBFBD><DC82>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B
|
||||
@@ -232,7 +232,7 @@ NOTE: <ESC>
|
||||
<20><><EFBFBD>b<EFBFBD>X<EFBFBD><58> 2.3: <20>I<EFBFBD>y<EFBFBD><79><EFBFBD>[<5B>^<5E>ƃ<EFBFBD><C683>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD>̃R<CC83>}<7D><><EFBFBD>h<EFBFBD>̓I<CD83>y<EFBFBD><79><EFBFBD>[<5B>^<5E>ƃ<EFBFBD><C683>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD>ɕύX<CF8D><58><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD>̃R<CC83>}<7D><><EFBFBD>h<EFBFBD>̓I<CD83>y<EFBFBD><79><EFBFBD>[<5B>^<5E>ƃ<EFBFBD><C683>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD>ɕύX<CF8D><58><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B
|
||||
<20>폜<EFBFBD>R<EFBFBD>}<7D><><EFBFBD>h d <20>̃I<CC83>y<EFBFBD><79><EFBFBD>[<5B>^<5E>͎<EFBFBD><CD8E>̗l<CC97>ɂȂ<C982><C882>Ă<EFBFBD><C482>܂<EFBFBD>:
|
||||
|
||||
d <20><><EFBFBD>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD>
|
||||
@@ -259,7 +259,7 @@ NOTE:
|
||||
|
||||
1. <20>ȉ<EFBFBD><C889><EFBFBD> ---> <20>Ǝ<EFBFBD><C68E><EFBFBD><EFBFBD>ꂽ<EFBFBD>s<EFBFBD>̐擪<CC90>ɃJ<C983>[<5B>\<5C><><EFBFBD><EFBFBD><EFBFBD>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
|
||||
|
||||
2. 2dw <20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>ĒP<C492><50>2<EFBFBD><EFBFBD><C295>ړ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B
|
||||
2. 2dw <20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>ĒP<C492><50>2<EFBFBD><EFBFBD><C295>폜<EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B
|
||||
|
||||
3. 3e <20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD>3<EFBFBD>ڂ̒P<CC92><50><EFBFBD>̏I<CC8F>[<5B>Ɉړ<C988><DA93><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
|
||||
|
||||
@@ -326,8 +326,8 @@ NOTE:
|
||||
|
||||
** <20>Ō<EFBFBD><C58C>̃R<CC83>}<7D><><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD> u <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>BU <20>͍s<CD8D>S<EFBFBD>̂̎<CC82><CC8E><EFBFBD><EFBFBD>ł<EFBFBD><C582>B **
|
||||
|
||||
1. <20>ȉ<EFBFBD><C889><EFBFBD> ---> <20>Ǝ<EFBFBD><C68E><EFBFBD><EFBFBD>ꂽ<EFBFBD>s<EFBFBD>ɃJ<C983>[<5B>\<5C><><EFBFBD><EFBFBD><EFBFBD>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>A<EFBFBD>ŏ<EFBFBD><C58F>̊ԈႢ<D488>ɃJ<C983>[<5B>\
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD>ړ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>傤<EFBFBD>B
|
||||
1. <20>ȉ<EFBFBD><C889><EFBFBD> ---> <20>Ǝ<EFBFBD><C68E><EFBFBD><EFBFBD>ꂽ<EFBFBD>s<EFBFBD>ɃJ<C983>[<5B>\<5C><><EFBFBD><EFBFBD><EFBFBD>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>A<EFBFBD>ŏ<EFBFBD><C58F>̊ԈႢ<D488>ɃJ<C983>[<5B>\<EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤<EFBFBD>B
|
||||
2. x <20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>擪<EFBFBD>̕<EFBFBD><CC95><EFBFBD><EFBFBD><EFBFBD><EFBFBD>폜<EFBFBD><ED8F9C><EFBFBD>܂<EFBFBD><DC82>傤<EFBFBD>B
|
||||
3. <20><><EFBFBD><EFBFBD><EFBFBD>Au <20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>čŌ<C48D><C58C>Ɏ<EFBFBD><C98E>s<EFBFBD><73><EFBFBD><EFBFBD><EFBFBD>R<EFBFBD>}<7D><><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤<EFBFBD>B
|
||||
4. <20><><EFBFBD>x<EFBFBD>́Ax <20><><EFBFBD>g<EFBFBD>p<EFBFBD><70><EFBFBD>Č<EFBFBD><C48C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>S<EFBFBD>ďC<C48F><43><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>傤<EFBFBD>B
|
||||
|
||||
@@ -117,7 +117,7 @@ NOTE: 全てのレッスンを通じて、覚えようとするのではなく
|
||||
レッスン 1.5: テキスト編集 - 追加
|
||||
|
||||
|
||||
** テキスト追加するには A を押しましょう **
|
||||
** テキストを追加するには A を押しましょう **
|
||||
|
||||
1. 以下の ---> と示された最初の行にカーソルを移動しましょう。
|
||||
カーソルがその文字上にあってもかまいません。
|
||||
@@ -232,7 +232,7 @@ NOTE: <ESC> キーを押すとノーマルモードに移行します。その
|
||||
レッスン 2.3: オペレータとモーション
|
||||
|
||||
|
||||
多くのコマンドはオペレータとモーションからテキストに変更を加ます。
|
||||
多くのコマンドはオペレータとモーションからテキストに変更を加えます。
|
||||
削除コマンド d のオペレータは次の様になっています:
|
||||
|
||||
d モーション
|
||||
@@ -259,7 +259,7 @@ NOTE: 冒険したい人は、ノーマルモードにてコマンドなしに
|
||||
|
||||
1. 以下の ---> と示された行の先頭にカーソルを移動します。
|
||||
|
||||
2. 2dw をタイプして単語2つ分移動します。
|
||||
2. 2dw をタイプして単語2つ分削除します。
|
||||
|
||||
3. 3e をタイプして3つ目の単語の終端に移動します。
|
||||
|
||||
@@ -326,8 +326,8 @@ NOTE: オペレータ d とモーションの間にカウントを使った場
|
||||
|
||||
** 最後のコマンドを取り消すには u を押します。U は行全体の取消です。 **
|
||||
|
||||
1. 以下の ---> と示された行にカーソルを移動し、最初の間違いにカーソ
|
||||
ルを移動しましょう。
|
||||
1. 以下の ---> と示された行にカーソルを移動し、最初の間違いにカーソル
|
||||
を移動しましょう。
|
||||
2. x をタイプしていらない先頭の文字を削除しましょう。
|
||||
3. さぁ、u をタイプして最後に実行したコマンドを取り消しましょう。
|
||||
4. 今度は、x を使用して誤りを全て修正しましょう。
|
||||
|
||||
@@ -551,7 +551,7 @@ cw
|
||||
|
||||
** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ϻθ<CFBA> <20><><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7><EFBFBD>, :#,# w FILENAME <20>Ͻʽÿ<CABD>. **
|
||||
|
||||
1. <20>ٽ<EFBFBD> <20>ѹ<EFBFBD>, :!dir <20>̳<EFBFBD> !ls <20><> <20>Է<EFBFBD><D4B7>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>丮<EFBFBD><E4B8AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƿ<DEBE> <20><>
|
||||
1. <20>ٽ<EFBFBD> <20>ѹ<EFBFBD>, :!dir <20>̳<EFBFBD> :!ls <20><> <20>Է<EFBFBD><D4B7>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>丮<EFBFBD><E4B8AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƿ<DEBE> <20><>
|
||||
TEST <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
2. Ŀ<><C4BF><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ű<EFBFBD> <20><>, Ctrl-g <20><> <20>Է<EFBFBD><D4B7>Ͽ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20>ٹ<EFBFBD>ȣ<EFBFBD><C8A3>
|
||||
|
||||
@@ -551,7 +551,7 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
|
||||
|
||||
** 파일의 일부를 저장하려면, :#,# w FILENAME 하십시오. **
|
||||
|
||||
1. 다시 한번, :!dir 이나 !ls 를 입력하여 디렉토리의 목록을 받아온 후
|
||||
1. 다시 한번, :!dir 이나 :!ls 를 입력하여 디렉토리의 목록을 받아온 후
|
||||
TEST 같은 적합한 이름을 선택합니다.
|
||||
|
||||
2. 커서를 이 페이지의 처음으로 옮긴 후, Ctrl-g 를 입력하여 그 줄의 줄번호를
|
||||
|
||||
@@ -658,7 +658,7 @@ Merk: Hvis du n
|
||||
4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller
|
||||
at du ser :'<,'>w TEST f<EFBFBD>r du trykker Enter.
|
||||
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller :!ls
|
||||
for <EFBFBD> se den. Ikke slett den enda! Vi vil bruke den i neste leksjon.
|
||||
|
||||
MERK: Ved <EFBFBD> trykke v startes visuelt valg. Du kan flytte mark<EFBFBD>ren rundt for
|
||||
|
||||
@@ -658,7 +658,7 @@ Merk: Hvis du nå hadde avsluttet Vim og startet på nytt igjen med «vim TEST»
|
||||
4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller
|
||||
at du ser :'<,'>w TEST før du trykker Enter.
|
||||
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller :!ls
|
||||
for å se den. Ikke slett den enda! Vi vil bruke den i neste leksjon.
|
||||
|
||||
MERK: Ved å trykke v startes visuelt valg. Du kan flytte markøren rundt for
|
||||
|
||||
@@ -658,7 +658,7 @@ Merk: Hvis du n
|
||||
4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller
|
||||
at du ser :'<,'>w TEST f<>r du trykker Enter.
|
||||
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller :!ls
|
||||
for <20> se den. Ikke slett den enda! Vi vil bruke den i neste leksjon.
|
||||
|
||||
MERK: Ved <20> trykke v startes visuelt valg. Du kan flytte mark<72>ren rundt for
|
||||
|
||||
@@ -658,7 +658,7 @@ Merk: Hvis du nå hadde avsluttet Vim og startet på nytt igjen med «vim TEST»
|
||||
4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller
|
||||
at du ser :'<,'>w TEST før du trykker Enter.
|
||||
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls
|
||||
5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller :!ls
|
||||
for å se den. Ikke slett den enda! Vi vil bruke den i neste leksjon.
|
||||
|
||||
MERK: Ved å trykke v startes visuelt valg. Du kan flytte markøren rundt for
|
||||
|
||||
@@ -671,7 +671,7 @@ Pozn
|
||||
4. Nap<61><70> w TEST , kde TEST je meno s<>boru, ktor<6F> zatial neexistuje.
|
||||
Skontroluj, e vid<69><64> :'<,'>w TEST predt<64>m ne<6E> stla<6C><61><EFBFBD> Enter.
|
||||
|
||||
5. Vim zap<61><70>e ozna<6E>en<65> riadky do s<>boru TEST. Pou<6F>i :!dir alebo !ls
|
||||
5. Vim zap<61><70>e ozna<6E>en<65> riadky do s<>boru TEST. Pou<6F>i :!dir alebo :!ls
|
||||
pre overenie. Zatial ho e<>te nema<6D>! Pou<6F>ijeme ho v <20>al<61>ej lekcii.
|
||||
|
||||
POZN<EFBFBD>MKA: Stla<6C>en<65>m kl<6B>vesy v sa spust<73> vizu<7A>lne ozna<6E>ovanie.
|
||||
|
||||
@@ -671,7 +671,7 @@ Pozn
|
||||
4. Nap<61><70> w TEST , kde TEST je meno s<>boru, ktor<6F> zatial neexistuje.
|
||||
Skontroluj, e vid<69><64> :'<,'>w TEST predt<64>m ne<6E> stla<6C><61><EFBFBD> Enter.
|
||||
|
||||
5. Vim zap<61><70>e ozna<6E>en<65> riadky do s<>boru TEST. Pou<6F>i :!dir alebo !ls
|
||||
5. Vim zap<61><70>e ozna<6E>en<65> riadky do s<>boru TEST. Pou<6F>i :!dir alebo :!ls
|
||||
pre overenie. Zatial ho e<>te nema<6D>! Pou<6F>ijeme ho v <20>al<61>ej lekcii.
|
||||
|
||||
POZN<EFBFBD>MKA: Stla<6C>en<65>m kl<6B>vesy v sa spust<73> vizu<7A>lne ozna<6E>ovanie.
|
||||
|
||||
@@ -671,7 +671,7 @@ Poznámka: že ak ukončíš prácu s editorom Vim a znovu ho spustíš príkazo
|
||||
4. Napíš w TEST , kde TEST je meno súboru, ktorý zatial neexistuje.
|
||||
Skontroluj, e vidíš :'<,'>w TEST predtým než stlačíš Enter.
|
||||
|
||||
5. Vim zapíše označené riadky do súboru TEST. Použi :!dir alebo !ls
|
||||
5. Vim zapíše označené riadky do súboru TEST. Použi :!dir alebo :!ls
|
||||
pre overenie. Zatial ho ešte nemaž! Použijeme ho v ďalšej lekcii.
|
||||
|
||||
POZNÁMKA: Stlačením klávesy v sa spustí vizuálne označovanie.
|
||||
|
||||
@@ -658,7 +658,7 @@ NOTE: If you were to exit Vim and start it again with vim TEST , the file
|
||||
4. Type w TEST , where TEST is a filename that does not exist yet. Verify
|
||||
that you see :'<,'>w TEST before you press <ENTER>.
|
||||
|
||||
5. Vim will write the selected lines to the file TEST. Use :!dir or !ls
|
||||
5. Vim will write the selected lines to the file TEST. Use :!dir or :!ls
|
||||
to see it. Do not remove it yet! We will use it in the next lesson.
|
||||
|
||||
NOTE: Pressing v starts Visual selection. You can move the cursor around
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim tutor support file
|
||||
" Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Last Change: 2008 Jul 21
|
||||
" Last Change: 2012 Sep 21
|
||||
|
||||
" This Vim script is used for detecting if a translation of the
|
||||
" tutor file exist, i.e., a tutor.xx file, where xx is the language.
|
||||
@@ -72,14 +72,20 @@ if s:ext =~? '\.ko'
|
||||
endif
|
||||
endif
|
||||
|
||||
" The Chinese tutor is available in two encodings, guess which one to use
|
||||
" The Chinese tutor is available in three encodings, guess which one to use
|
||||
" This segment is from the above lines and modified by
|
||||
" Mendel L Chan <beos@turbolinux.com.cn> for Chinese vim tutorial
|
||||
" When 'encoding' is utf-8, choose between China (simplified) and Taiwan
|
||||
" (traditional) based on the language, suggested by Alick Zhao.
|
||||
if s:ext =~? '\.zh'
|
||||
if &enc =~ 'big5\|cp950'
|
||||
let s:ext = ".zh.big5"
|
||||
elseif &enc != 'utf-8'
|
||||
let s:ext = ".zh.euc"
|
||||
elseif s:ext =~? 'zh_tw' || (exists("s:lang") && s:lang =~? 'zh_tw')
|
||||
let s:ext = ".zh_tw"
|
||||
else
|
||||
let s:ext = ".zh_cn"
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
996
runtime/tutor/tutor.zh_cn.utf-8
Normal file
996
runtime/tutor/tutor.zh_cn.utf-8
Normal file
@@ -0,0 +1,996 @@
|
||||
===============================================================================
|
||||
= 欢 迎 阅 读 《 V I M 教 程 》 —— 版本 1.7 =
|
||||
===============================================================================
|
||||
|
||||
Vim 是一个具有很多命令的功能非常强大的编辑器。限于篇幅,在本教程当中
|
||||
就不详细介绍了。本教程的设计目标是讲述一些必要的基本命令,而掌握好这
|
||||
些命令,您就能够很容易地将 Vim 当作一个通用编辑器来使用了。
|
||||
|
||||
完成本教程的内容大约需要25-30分钟,取决于您训练的时间。
|
||||
|
||||
注意:
|
||||
每一节的命令操作将会更改本文。推荐您复制本文的一个副本,然后在副本上
|
||||
进行训练(如果您是通过"vimtutor"来启动教程的,那么本文就已经是副本了)。
|
||||
|
||||
切记一点:本教程的设计思路是在使用中进行学习的。也就是说,您需要通过
|
||||
执行命令来学习它们本身的正确用法。如果您只是阅读而不操作,那么您可能
|
||||
会很快遗忘这些命令的!
|
||||
|
||||
好了,现在请确定您的Shift-Lock(大小写锁定键)还没有按下,然后按键盘上
|
||||
的字母键 j 足够多次来移动光标,直到第一节的内容能够完全充满屏幕。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第一节:移动光标
|
||||
|
||||
|
||||
** 要移动光标,请依照说明分别按下 h、j、k、l 键。 **
|
||||
|
||||
^
|
||||
k 提示: h 的键位于左边,每次按下就会向左移动。
|
||||
< h l > l 的键位于右边,每次按下就会向右移动。
|
||||
j j 键看起来很象一支尖端方向朝下的箭头。
|
||||
v
|
||||
|
||||
1. 请随意在屏幕内移动光标,直至您觉得舒服为止。
|
||||
|
||||
2. 按下下行键(j),直到出现光标重复下行。
|
||||
|
||||
---> 现在您应该已经学会如何移动到下一讲吧。
|
||||
|
||||
3. 现在请使用下行键,将光标移动到第一讲第二节。
|
||||
|
||||
提示:如果您不敢确定您所按下的字母,请按下<ESC>键回到正常(Normal)模式。
|
||||
然后再次从键盘输入您想要的命令。
|
||||
|
||||
提示:光标键应当也能正常工作的。但是使用hjkl键,在习惯之后您就能够更快
|
||||
地在屏幕内四处移动光标。真的是这样!
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第二节:VIM的进入和退出
|
||||
|
||||
|
||||
!! 特别提示:敬请阅读本一节的完整内容,然后再执行以下所讲解的命令。
|
||||
|
||||
1. 按<ESC>键(这是为了确保您处在正常模式)。
|
||||
|
||||
2. 然后输入: :q! <回车>
|
||||
这种方式的退出编辑器会丢弃您进入编辑器以来所做的改动。
|
||||
|
||||
3. 如果您看到了命令行提示符,请输入能够带您回到本教程的命令,那就是:
|
||||
vimtutor <回车>
|
||||
|
||||
4. 如果您自信已经牢牢记住了这些步骤的话,请从步骤1执行到步骤3退出,然
|
||||
后再次进入编辑器。
|
||||
|
||||
提示: :q! <回车> 会丢弃您所做的任何改动。几讲之后您将学会如何保存改动到文件。
|
||||
|
||||
5. 将光标下移到第一讲第三节。
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第三节:文本编辑之删除
|
||||
|
||||
|
||||
** 在正常(Normal)模式下,可以按下 x 键来删除光标所在位置的字符。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的那一行。
|
||||
|
||||
2. 为了修正输入错误,请将光标移至准备删除的字符的位置处。
|
||||
|
||||
3. 然后按下 x 键将错误字符删除掉。
|
||||
|
||||
4. 重复步骤2到步骤4,直到句子修正为止。
|
||||
|
||||
---> The ccow jumpedd ovverr thhe mooon.
|
||||
|
||||
5. 好了,该行已经修正了,下面是第一讲第四节。
|
||||
|
||||
特别提示:在浏览本教程时,不要强行记忆。记住一点:在使用中学习。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第四节:文本编辑之插入
|
||||
|
||||
|
||||
** 在正常模式下,可以按下 i 键来插入文本。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的第一行。
|
||||
|
||||
2. 为了使得第一行内容雷同于第二行,请将光标移至文本第一个准备插入字符
|
||||
的位置。
|
||||
|
||||
3. 然后按下 i 键,接着输入必要的文本字符。
|
||||
|
||||
4. 每个错误修正完毕后,请按下 <ESC> 键返回正常模式。
|
||||
重复步骤2至步骤4以便修正句子。
|
||||
|
||||
---> There is text misng this .
|
||||
---> There is some text missing from this line.
|
||||
|
||||
5. 如果您对文本插入操作已经很满意,请接着阅读下面的第一讲第五节。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第五节:文本编辑之添加
|
||||
|
||||
|
||||
** 按 A 键以添加文本。 **
|
||||
|
||||
1. 移动光标到下面第一个标记有 ---> 的一行。
|
||||
光标放在那一行的哪个字符上并不重要。
|
||||
|
||||
2. 按 A 键输入必要的添加内容。
|
||||
|
||||
3. 文本添加完毕后,按 <ESC> 键回到正常模式。
|
||||
|
||||
4. 移动光标到下面第二个标记有 ---> 的一行。重复步骤2和步骤3以改正这个句子。
|
||||
|
||||
---> There is some text missing from th
|
||||
There is some text missing from this line.
|
||||
---> There is also some text miss
|
||||
There is also some text missing here.
|
||||
|
||||
5. 当您对添加文本操作感到满意时,请继续学习第一讲第六节。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲第六节:编辑文件
|
||||
|
||||
** 使用 :wq 以保存文件并退出。 **
|
||||
|
||||
特别提示:在执行以下步骤之前,请先读完整个小节!
|
||||
|
||||
1. 如您在第一讲第二节中所做的那样退出本教程: :q!
|
||||
或者,如果您可以访问另一个终端,请在那里执行以下操作。
|
||||
|
||||
2. 在 shell 的提示符下输入命令: vim tutor <回车>
|
||||
'vim'是启动 Vim 编辑器的命令,'tutor'是您希望编辑的文件的名字。
|
||||
请使用一个可以改动的文件。
|
||||
|
||||
3. 使用您在前面的教程中学到的命令插入删除文本。
|
||||
|
||||
4. 保存改动过的文件并退出 Vim,按这些键: :wq <回车>
|
||||
|
||||
5. 如果您在步骤1中已经退出 vimtutor,请重启 vimtutor 移动到下面的小结一节。
|
||||
|
||||
6. 阅读完以上步骤,弄懂它们的意义,然后在实践中进行练习。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第一讲小结
|
||||
|
||||
|
||||
1. 光标在屏幕文本中的移动既可以用箭头键,也可以使用 hjkl 字母键。
|
||||
h (左移) j (下行) k (上行) l (右移)
|
||||
|
||||
2. 欲进入 Vim 编辑器(从命令行提示符),请输入:vim 文件名 <回车>
|
||||
|
||||
3. 欲退出 Vim 编辑器,请输入 <ESC> :q! <回车> 放弃所有改动。
|
||||
或者输入 <ESC> :wq <回车> 保存改动。
|
||||
|
||||
4. 在正常模式下删除光标所在位置的字符,请按: x
|
||||
|
||||
5. 欲插入或添加文本,请输入:
|
||||
|
||||
i 输入欲插入文本 <ESC> 在光标前插入文本
|
||||
A 输入欲添加文本 <ESC> 在一行后添加文本
|
||||
|
||||
特别提示:按下 <ESC> 键会带您回到正常模式或者撤消一个不想输入或部分完整
|
||||
的命令。
|
||||
|
||||
好了,第一讲到此结束。下面接下来继续第二讲的内容。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第一节:删除类命令
|
||||
|
||||
|
||||
** 输入 dw 可以从光标处删除至一个单词的末尾。**
|
||||
|
||||
1. 请按下 <ESC> 键确保您处于正常模式。
|
||||
|
||||
2. 请将光标移动到本节中下面标记有 ---> 的那一行。
|
||||
|
||||
3. 请将光标移至准备要删除的单词的起始处。
|
||||
|
||||
4. 接着输入 dw 删除掉该单词。
|
||||
|
||||
特别提示:当您输入时,字母 d 会同时出现在屏幕的最后一行。Vim 在等待您输入
|
||||
字母 w。如果您看到的是除 d 外的其他字符,那表明您按错了;请按下 <ESC> 键,
|
||||
然后重新再来。
|
||||
|
||||
---> There are a some words fun that don't belong paper in this sentence.
|
||||
|
||||
5. 重复步骤3和步骤4,直至句子修正完毕。接着继续第二讲第二节内容。
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第二节:更多删除类命令
|
||||
|
||||
|
||||
** 输入 d$ 从当前光标删除到行末。**
|
||||
|
||||
1. 请按下 <ESC> 键确保您处于正常模式。
|
||||
|
||||
2. 请将光标移动到本节中下面标记有 ---> 的那一行。
|
||||
|
||||
3. 请将光标移动到该行的尾部(也就是在第一个点号‘.’后面)。
|
||||
|
||||
4. 然后输入 d$ 从光标处删至当前行尾部。
|
||||
|
||||
---> Somebody typed the end of this line twice. end of this line twice.
|
||||
|
||||
|
||||
5. 请继续学习第二讲第三节就知道是怎么回事了。
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第三节:关于命令和对象
|
||||
|
||||
|
||||
许多改变文本的命令都由一个操作符和一个动作构成。
|
||||
使用删除操作符 d 的删除命令的格式如下:
|
||||
|
||||
d motion
|
||||
|
||||
其中:
|
||||
d - 删除操作符。
|
||||
motion - 操作符的操作对象(在下面列出)。
|
||||
|
||||
一个简短的动作列表:
|
||||
w - 从当前光标当前位置直到下一个单词起始处,不包括它的第一个字符。
|
||||
e - 从当前光标当前位置直到单词末尾,包括最后一个字符。
|
||||
$ - 从当前光标当前位置直到当前行末。
|
||||
|
||||
因此输入 de 会从当前光标位置删除到单词末尾。
|
||||
|
||||
特别提示:
|
||||
对于勇于探索者,请在正常模式下面仅按代表相应动作的键而不使用操作符,您
|
||||
将看到光标的移动正如上面的对象列表所代表的一样。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第四节:使用计数指定动作
|
||||
|
||||
|
||||
** 在动作前输入数字会使它重复那么多次。 **
|
||||
|
||||
1. 移动光标到下面标记有 ---> 的一行的开始。
|
||||
|
||||
2. 输入 2w 使光标向前移动两个单词。
|
||||
|
||||
3. 输入 3e 使光标向前移动到第三个单词的末尾。
|
||||
|
||||
4. 输入 0 (数字零) 移动光标到行首。
|
||||
|
||||
5. 重复步骤2和步骤3,尝试不同的数字。
|
||||
|
||||
---> This is just a line with words you can move around in.
|
||||
|
||||
6. 请继续学习第二讲第五节。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第五节:使用计数以删除更多
|
||||
|
||||
|
||||
** 使用操作符时输入数字可以使它重复那么多次。 **
|
||||
|
||||
上面已经提到过删除操作符和动作的组合,您可以在组合中动作之前插入一个数字以
|
||||
删除更多:
|
||||
d number(数字) motion
|
||||
|
||||
1. 移动光标到下面标记有 ---> 的一行中第一个大写字母单词上。
|
||||
|
||||
2. 输入 d2w 以删除两个大写字母单词。
|
||||
|
||||
3. 重复步骤1和步骤2,使用不同的数字使得用一个命令就能删除全部相邻的大写字母
|
||||
单词
|
||||
|
||||
---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第六节:操作整行
|
||||
|
||||
|
||||
** 输入 dd 可以删除整一个当前行。 **
|
||||
|
||||
鉴于整行删除的高频度,Vi 的设计者决定要简化整行删除操作,您仅需要在同一行上
|
||||
击打两次 d 就可以删除掉光标所在的整行了。
|
||||
|
||||
1. 请将光标移动到本节中下面的短句段落中的第二行。
|
||||
2. 输入 dd 删除该行。
|
||||
3. 然后移动到第四行。
|
||||
4. 接着输入 2dd 删除两行。
|
||||
|
||||
---> 1) Roses are red,
|
||||
---> 2) Mud is fun,
|
||||
---> 3) Violets are blue,
|
||||
---> 4) I have a car,
|
||||
---> 5) Clocks tell time,
|
||||
---> 6) Sugar is sweet
|
||||
---> 7) And so are you.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲第七节:撤消类命令
|
||||
|
||||
|
||||
** 输入 u 来撤消最后执行的命令,输入 U 来撤消对整行的修改。 **
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的那一行,并将其置于第一个错误
|
||||
处。
|
||||
2. 输入 x 删除第一个不想保留的字母。
|
||||
3. 然后输入 u 撤消最后执行的(一次)命令。
|
||||
4. 这次要使用 x 修正本行的所有错误。
|
||||
5. 现在输入一个大写的 U ,恢复到该行的原始状态。
|
||||
6. 接着多次输入 u 以撤消 U 以及更前的命令。
|
||||
7. 然后多次输入 CTRL-R (先按下 CTRL 键不放开,接着按 R 键),这样就
|
||||
可以重做被撤消的命令,也就是撤消掉撤消命令。
|
||||
|
||||
---> Fiix the errors oon thhis line and reeplace them witth undo.
|
||||
|
||||
8. 这些都是非常有用的命令。下面是第二讲的小结了。
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第二讲小结
|
||||
|
||||
|
||||
1. 欲从当前光标删除至下一个单词,请输入:dw
|
||||
2. 欲从当前光标删除至当前行末尾,请输入:d$
|
||||
3. 欲删除整行,请输入:dd
|
||||
|
||||
4. 欲重复一个动作,请在它前面加上一个数字:2w
|
||||
5. 在正常模式下修改命令的格式是:
|
||||
operator [number] motion
|
||||
其中:
|
||||
operator - 操作符,代表要做的事情,比如 d 代表删除
|
||||
[number] - 可以附加的数字,代表动作重复的次数
|
||||
motion - 动作,代表在所操作的文本上的移动,例如 w 代表单词(word),
|
||||
$ 代表行末等等。
|
||||
|
||||
6. 欲移动光标到行首,请按数字0键:0
|
||||
|
||||
7. 欲撤消以前的操作,请输入:u (小写的u)
|
||||
欲撤消在一行中所做的改动,请输入:U (大写的U)
|
||||
欲撤消以前的撤消命令,恢复以前的操作结果,请输入:CTRL-R
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第三讲第一节:置入类命令
|
||||
|
||||
|
||||
** 输入 p 将最后一次删除的内容置入光标之后。 **
|
||||
|
||||
1. 请将光标移动到本节中下面第一个标记有 ---> 的一行。
|
||||
|
||||
2. 输入 dd 将该行删除,这样会将该行保存到 Vim 的一个寄存器中。
|
||||
|
||||
3. 接着将光标移动到 c) 一行,即准备置入的位置的上方。记住:是上方哦。
|
||||
|
||||
4. 然后在正常模式下(<ESC>键进入)输入 p 将该行粘贴置入。
|
||||
|
||||
5. 重复步骤2至步骤4,将所有的行依序放置到正确的位置上。
|
||||
|
||||
---> d) Can you learn too?
|
||||
---> b) Violets are blue,
|
||||
---> c) Intelligence is learned,
|
||||
---> a) Roses are red,
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第三讲第二节:替换类命令
|
||||
|
||||
|
||||
** 输入 r 和一个字符替换光标所在位置的字符。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的第一行。
|
||||
|
||||
2. 请移动光标到第一个出错的位置。
|
||||
|
||||
3. 接着输入 r 和要替换成的字符,这样就能将错误替换掉了。
|
||||
|
||||
4. 重复步骤2和步骤3,直到第一行已经修改完毕。
|
||||
|
||||
---> Whan this lime was tuoed in, someone presswd some wrojg keys!
|
||||
---> When this line was typed in, someone pressed some wrong keys!
|
||||
|
||||
5. 然后我们继续学习第三讲第三节。
|
||||
|
||||
特别提示:切记您要在使用中学习,而不是在记忆中学习。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第三讲第三节:更改类命令
|
||||
|
||||
|
||||
** 要改变文本直到一个单词的末尾,请输入 ce **
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的第一行。
|
||||
|
||||
2. 接着把光标放在单词 lubw 的字母 u 的位置那里。
|
||||
|
||||
3. 然后输入 cw 以及正确的单词(在本例中是输入 ine )。
|
||||
|
||||
4. 最后按 <ESC> 键,然后光标定位到下一个错误第一个准备更改的字母处。
|
||||
|
||||
5. 重复步骤3和步骤4,直到第一个句子完全雷同第二个句子。
|
||||
|
||||
---> This lubw has a few wptfd that mrrf changing usf the change operator.
|
||||
---> This line has a few words that need changing using the change operator.
|
||||
|
||||
提示:请注意 ce 命令不仅仅是删除了一个单词,它也让您进入插入模式了。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第三讲第四节:使用c更改更多
|
||||
|
||||
|
||||
** 更改类操作符可以与删除中使用的同样的动作配合使用。 **
|
||||
|
||||
1. 更改类操作符的工作方式跟删除类是一致的。操作格式是:
|
||||
|
||||
c [number] motion
|
||||
|
||||
2. 动作参数(motion)也是一样的,比如 w 代表单词,$代表行末等等。
|
||||
|
||||
3. 请将光标移动到本节中下面标记有 ---> 的第一行。
|
||||
|
||||
4. 接着将光标移动到第一个错误处。
|
||||
|
||||
5. 然后输入 c$ 使得该行剩下的部分更正得同第二行一样。最后按 <ESC> 键。
|
||||
|
||||
---> The end of this line needs some help to make it like the second.
|
||||
---> The end of this line needs to be corrected using the c$ command.
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第三讲小结
|
||||
|
||||
|
||||
1. 要重新置入已经删除的文本内容,请按小写字母 p 键。该操作可以将已删除
|
||||
的文本内容置于光标之后。如果最后一次删除的是一个整行,那么该行将置
|
||||
于当前光标所在行的下一行。
|
||||
|
||||
2. 要替换光标所在位置的字符,请输入小写的 r 和要替换掉原位置字符的新字
|
||||
符即可。
|
||||
|
||||
3. 更改类命令允许您改变从当前光标所在位置直到动作指示的位置中间的文本。
|
||||
比如输入 ce 可以替换当前光标到单词的末尾的内容;输入 c$ 可以替换当
|
||||
前光标到行末的内容。
|
||||
|
||||
4. 更改类命令的格式是:
|
||||
|
||||
c [number] motion
|
||||
|
||||
现在我们继续学习下一讲。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第四讲第一节:定位及文件状态
|
||||
|
||||
** 输入 CTRL-G 显示当前编辑文件中当前光标所在行位置以及文件状态信息。
|
||||
输入大写 G 则直接跳转到文件中的某一指定行。**
|
||||
|
||||
提示:切记要先通读本节内容,之后才可以执行以下步骤!!!
|
||||
|
||||
1. 按下 CTRL 键不放开然后按 g 键。我们称这个键组合为 CTRL-G。
|
||||
您会看到页面最底部出现一个状态信息行,显示的内容是当前编辑的文件名
|
||||
和文件中光标位置。请记住行号,它会在步骤3中用到。
|
||||
|
||||
提示:您也许会在屏幕的右下角看到光标位置,这会在 'ruler' 选项设置时发生
|
||||
(参见 :help 'ruler')
|
||||
|
||||
2. 输入大写 G 可以使得当前光标直接跳转到文件最后一行。
|
||||
输入 gg 可以使得当前光标直接跳转到文件第一行。
|
||||
|
||||
3. 输入您曾停留的行号,然后输入大写 G。这样就可以返回到您第一次按下
|
||||
CTRL-G 时所在的行了。
|
||||
|
||||
4. 如果您觉得没问题的话,请执行步骤1至步骤3的操作进行练习。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第四讲第二节:搜索类命令
|
||||
|
||||
|
||||
** 输入 / 加上一个字符串可以用以在当前文件中查找该字符串。**
|
||||
|
||||
1. 在正常模式下输入 / 字符。您此时会注意到该字符和光标都会出现在屏幕底
|
||||
部,这跟 : 命令是一样的。
|
||||
|
||||
2. 接着输入 errroor <回车>。那个errroor就是您要查找的字符串。
|
||||
|
||||
3. 要查找同上一次的字符串,只需要按 n 键。要向相反方向查找同上一次的字
|
||||
符串,请输入大写 N 即可。
|
||||
|
||||
4. 如果您想逆向查找字符串,请使用 ? 代替 / 进行。
|
||||
|
||||
5. 要回到您之前的位置按 CTRL-O (按住 Ctrl 键不放同时按下字母 o)。重复按可以
|
||||
回退更多步。CTRL-I 会跳转到较新的位置。
|
||||
|
||||
---> "errroor" is not the way to spell error; errroor is an error.
|
||||
提示:如果查找已经到达文件末尾,查找会自动从文件头部继续查找,除非
|
||||
'wrapscan' 选项被复位。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第四讲第三节:配对括号的查找
|
||||
|
||||
|
||||
** 输入 % 可以查找配对的括号 )、]、}。**
|
||||
|
||||
1. 把光标放在本节下面标记有 --> 那一行中的任何一个 (、[ 或 { 处。
|
||||
|
||||
2. 接着按 % 字符。
|
||||
|
||||
3. 此时光标的位置应当是在配对的括号处。
|
||||
|
||||
4. 再次按 % 就可以跳回配对的第一个括号处。
|
||||
|
||||
5. 移动光标到另一个 (、)、[、]、{ 或 } 处,按 % 查看其所作所为。
|
||||
|
||||
---> This ( is a test line with ('s, ['s ] and {'s } in it. ))
|
||||
|
||||
|
||||
提示:在程序调试时,这个功能用来查找不配对的括号是很有用的。
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第四讲第四节:替换命令
|
||||
|
||||
|
||||
** 输入 :s/old/new/g 可以替换 old 为 new。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的那一行。
|
||||
|
||||
2. 输入 :s/thee/the <回车> 。请注意该命令只改变光标所在行的第一个匹配
|
||||
串。
|
||||
|
||||
3. 输入 :s/thee/the/g 则是替换全行的匹配串,该行中所有的 "thee" 都会被
|
||||
改变。
|
||||
|
||||
---> thee best time to see thee flowers is in thee spring.
|
||||
|
||||
4. 要替换两行之间出现的每个匹配串,请
|
||||
输入 :#,#s/old/new/g 其中 #,# 代表的是替换操作的若干行中
|
||||
首尾两行的行号。
|
||||
输入 :%s/old/new/g 则是替换整个文件中的每个匹配串。
|
||||
输入 :%s/old/new/gc 会找到整个文件中的每个匹配串,并且对每个匹配串
|
||||
提示是否进行替换。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第四讲小结
|
||||
|
||||
|
||||
1. CTRL-G 用于显示当前光标所在位置和文件状态信息。
|
||||
G 用于将光标跳转至文件最后一行。
|
||||
先敲入一个行号然后输入大写 G 则是将光标移动至该行号代表的行。
|
||||
gg 用于将光标跳转至文件第一行。
|
||||
|
||||
2. 输入 / 然后紧随一个字符串是在当前所编辑的文档中正向查找该字符串。
|
||||
输入 ? 然后紧随一个字符串则是在当前所编辑的文档中反向查找该字符串。
|
||||
完成一次查找之后按 n 键是重复上一次的命令,可在同一方向上查
|
||||
找下一个匹配字符串所在;或者按大写 N 向相反方向查找下一匹配字符串所在。
|
||||
CTRL-O 带您跳转回较旧的位置,CTRL-I 则带您到较新的位置。
|
||||
|
||||
3. 如果光标当前位置是括号(、)、[、]、{、},按 % 会将光标移动到配对的括号上。
|
||||
|
||||
4. 在一行内替换头一个字符串 old 为新的字符串 new,请输入 :s/old/new
|
||||
在一行内替换所有的字符串 old 为新的字符串 new,请输入 :s/old/new/g
|
||||
在两行内替换所有的字符串 old 为新的字符串 new,请输入 :#,#s/old/new/g
|
||||
在文件内替换所有的字符串 old 为新的字符串 new,请输入 :%s/old/new/g
|
||||
进行全文替换时询问用户确认每个替换需添加 c 标志 :%s/old/new/gc
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第五讲第一节:在 VIM 内执行外部命令的方法
|
||||
|
||||
|
||||
** 输入 :! 然后紧接着输入一个外部命令可以执行该外部命令。**
|
||||
|
||||
1. 按下我们所熟悉的 : 命令使光标移动到屏幕底部。这样您就可以输入一行命令了。
|
||||
|
||||
2. 接着输入感叹号 ! 这个字符,这样就允许您执行外部的 shell 命令了。
|
||||
|
||||
3. 我们以 ls 命令为例。输入 !ls <回车> 。该命令就会列举出您当前目录的
|
||||
内容,就如同您在命令行提示符下输入 ls 命令的结果一样。如果 !ls 没起
|
||||
作用,您可以试试 :!dir 看看。
|
||||
|
||||
提示:所有的外部命令都可以以这种方式执行,包括带命令行参数的那些。
|
||||
|
||||
提示:所有的 : 命令都必须以敲 <回车> 键结束。从今以后我们就不会总是提到这一点
|
||||
了。
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第五讲第二节:关于保存文件的更多信息
|
||||
|
||||
|
||||
** 要将对文件的改动保存到文件中,请输入 :w FILENAME 。**
|
||||
|
||||
1. 输入 :!dir 或者 :!ls 获知当前目录的内容。您应当已知道最后还得敲
|
||||
<回车> 吧。
|
||||
|
||||
2. 选择一个未被用到的文件名,比如 TEST。
|
||||
|
||||
3. 接着输入 :w TEST (此处 TEST 是您所选择的文件名。)
|
||||
|
||||
4. 该命令会以 TEST 为文件名保存整个文件 (Vim 教程)。为了验证这一点,
|
||||
请再次输入 :!dir 或 :!ls 查看您的目录列表内容。
|
||||
|
||||
请注意:如果您退出 Vim 然后在以命令 vim TEST 再次启动 Vim,那么该文件内
|
||||
容应该同您保存时的文件内容是完全一样的。
|
||||
|
||||
5. 现在您可以删除 TEST 文件了。在 MS-DOS 下,请输入: :!del TEST
|
||||
在 Unix 下,请输入: :!rm TEST
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第五讲第三节:一个具有选择性的保存命令
|
||||
|
||||
|
||||
** 要保存文件的部分内容,请输入 v motion :w FILENAME **
|
||||
|
||||
1. 移动光标到本行。
|
||||
|
||||
2. 接着按 v 键,将光标移动至下面第五个条目上。您会注意到之间的文本被高亮了。
|
||||
|
||||
3. 然后按 : 字符。您将看到屏幕底部会出现 :'<,'> 。
|
||||
|
||||
4. 现在请输入 w TEST,其中 TEST 是一个未被使用的文件名。确认您看到了
|
||||
:'<,'>w TEST 之后按 <回车> 键。
|
||||
|
||||
5. 这时 Vim 会把选中的行写入到以 TEST 命名的文件中去。使用 :!dir 或 :!ls
|
||||
确认文件被正确保存。这次先别删除它!我们在下一讲中会用到它。
|
||||
|
||||
提示:按 v 键使 Vim 进入可视模式进行选取。您可以四处移动光标使选取区域变大或
|
||||
变小。接着您可以使用一个操作符对选中文本进行操作。例如,按 d 键会删除
|
||||
选中的文本内容。
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第五讲第四节:提取和合并文件
|
||||
|
||||
|
||||
** 要向当前文件中插入另外的文件的内容,请输入 :r FILENAME **
|
||||
|
||||
1. 请把光标移动到本行上面一行。
|
||||
|
||||
特别提示:执行步骤2之后您将看到第五讲第三节的文字,请届时往下移动
|
||||
以再次看到本讲内容。
|
||||
|
||||
2. 接着通过命令 :r TEST 将前面创建的名为 TEST 的文件提取进来。
|
||||
您所提取进来的文件将从光标所在位置处开始置入。
|
||||
|
||||
3. 为了确认文件已经提取成功,移动光标回到原来的位置就可以注意有两份第
|
||||
五讲第三节的内容,一份是原始内容,另外一份是来自文件的副本。
|
||||
|
||||
提示:您还可以读取外部命令的输出。例如, :r !ls 可以读取 ls 命令的输出,并
|
||||
把它放置在光标下面。
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第五讲小结
|
||||
|
||||
|
||||
1. :!command 用于执行一个外部命令 command。
|
||||
|
||||
请看一些实际例子:
|
||||
(MS-DOS) (Unix)
|
||||
:!dir :!ls - 用于显示当前目录的内容。
|
||||
:!del FILENAME :!rm FILENAME - 用于删除名为 FILENAME 的文件。
|
||||
|
||||
2. :w FILENAME 可将当前 VIM 中正在编辑的文件保存到名为 FILENAME 的文
|
||||
件中。
|
||||
|
||||
3. v motion :w FILENAME 可将当前编辑文件中可视模式下选中的内容保存到文件
|
||||
FILENAME 中。
|
||||
|
||||
4. :r FILENAME 可提取磁盘文件 FILENAME 并将其插入到当前文件的光标位置
|
||||
后面。
|
||||
|
||||
5. :r !dir 可以读取 dir 命令的输出并将其放置到当前文件的光标位置后面。
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲第一节:打开类命令
|
||||
|
||||
|
||||
** 输入 o 将在光标的下方打开新的一行并进入插入模式。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的那一行。
|
||||
|
||||
2. 接着输入小写的 o 在光标 *下方* 打开新的一行,这个命令会使您
|
||||
进入插入模式。
|
||||
|
||||
3. 然后输入一些文字,之后按 <ESC> 键退出插入模式而进入正常模式。
|
||||
|
||||
---> After typing o the cursor is placed on the open line in Insert mode.
|
||||
|
||||
4. 为了在光标 *上方* 打开新的一行,只需要输入大写的 O 而不是小写的 o
|
||||
就可以了。请在下行测试一下吧。
|
||||
|
||||
---> Open up a line above this by typing O while the cursor is on this line.
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲第二节:附加类命令
|
||||
|
||||
|
||||
** 输入 a 将可在光标之后插入文本。 **
|
||||
|
||||
1. 请在正常模式下将光标移动到本节中下面标记有 ---> 的第一行的行首。
|
||||
|
||||
2. 接着输入 e 直到光标位于 li 的末尾。
|
||||
|
||||
3. 输入小写的 a 则可在光标之后插入文本了。
|
||||
|
||||
4. 将单词补充完整,就像下一行中的那样。之后按 <ESC> 键退出插入模式回到
|
||||
正常模式。
|
||||
|
||||
5. 使用 e 移动光标到下一步不完整的单词,重复步骤3和步骤4。
|
||||
|
||||
---> This li will allow you to pract appendi text to a line.
|
||||
---> This line will allow you to practice appending text to a line.
|
||||
|
||||
提示:a、i 和 A 都会带您进入插入模式,惟一的区别在于字符插入的位置。
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲第三节:另外一个置换类命令的版本
|
||||
|
||||
|
||||
** 输入大写的 R 可连续替换多个字符。**
|
||||
|
||||
1. 请将光标移动到本节中下面标记有 ---> 的第一行。移动光标到第一个 xxx 的
|
||||
起始位置。
|
||||
|
||||
2. 然后输入大写的 R 开始把第一行中的不同于第二行的剩余字符逐一输入,就
|
||||
可以全部替换掉原有的字符而使得第一行完全雷同第二行了。
|
||||
|
||||
3. 接着按 <ESC> 键退出替换模式回到正常模式。您可以注意到尚未替换的文本
|
||||
仍然保持原状。
|
||||
|
||||
4. 重复以上步骤,将剩余的 xxx 也替换掉。
|
||||
|
||||
---> Adding 123 to xxx gives you xxx.
|
||||
---> Adding 123 to 456 gives you 579.
|
||||
|
||||
提示:替换模式与插入模式相似,不过每个输入的字符都会删除一个已有的字符。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲第四节:复制粘贴文本
|
||||
|
||||
|
||||
** 使用操作符 y 复制文本,使用 p 粘贴文本 **
|
||||
|
||||
1. 定位到下面标记有 ---> 的一行,将光标移动到 "a)" 之后。
|
||||
|
||||
2. 接着使用 v 进入可视模式,移动光标到 "first" 的前面。
|
||||
|
||||
3. 现在输入 y 以抽出(复制)高亮的文本。
|
||||
|
||||
4. 然后移动光标到下一行的末尾:j$
|
||||
|
||||
5. 接着输入 p 以放置(粘贴)复制了的文本。然后输入:a second <ESC>。
|
||||
|
||||
6. 使用可视模式选中 " item.",用 y 复制,再用 j$ 将光标移动到下一行末尾,
|
||||
用 p 将文本粘贴到那里。
|
||||
|
||||
---> a) this is the first item.
|
||||
b)
|
||||
|
||||
提示:您还可以把 y 当作操作符来使用;例如 yw 可以用来复制一个单词。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲第五节:设置类命令的选项
|
||||
|
||||
|
||||
** 设置可使查找或者替换可忽略大小写的选项 **
|
||||
|
||||
1. 要查找单词 ignore 可在正常模式下输入 /ignore <回车>。
|
||||
要重复查找该词,可以重复按 n 键。
|
||||
|
||||
2. 然后设置 ic 选项(Ignore Case,忽略大小写),请输入: :set ic
|
||||
|
||||
3. 现在可以通过键入 n 键再次查找单词 ignore。注意到 Ignore 和 IGNORE 现在
|
||||
也被找到了。
|
||||
|
||||
4. 然后设置 hlsearch 和 incsearch 这两个选项,请输入: :set hls is
|
||||
|
||||
5. 现在可以再次输入查找命令,看看会有什么效果: /ignore <回车>
|
||||
|
||||
6. 要禁用忽略大小写,请输入: :set noic
|
||||
|
||||
提示:要移除匹配项的高亮显示,请输入: :nohlsearch
|
||||
提示:如果您想要仅在一次查找时忽略字母大小写,您可以使用 \c:
|
||||
/ignore\c <回车>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第六讲小结
|
||||
|
||||
1. 输入小写的 o 可以在光标下方打开新的一行并进入插入模式。
|
||||
输入大写的 O 可以在光标上方打开新的一行。
|
||||
|
||||
2. 输入小写的 a 可以在光标所在位置之后插入文本。
|
||||
输入大写的 A 可以在光标所在行的行末之后插入文本。
|
||||
|
||||
3. e 命令可以使光标移动到单词末尾。
|
||||
|
||||
4. 操作符 y 复制文本,p 粘贴先前复制的文本。
|
||||
|
||||
5. 输入大写的 R 将进入替换模式,直至按 <ESC> 键回到正常模式。
|
||||
|
||||
6. 输入 :set xxx 可以设置 xxx 选项。一些有用的选项如下:
|
||||
'ic' 'ignorecase' 查找时忽略字母大小写
|
||||
'is' 'incsearch' 查找短语时显示部分匹配
|
||||
'hls' 'hlsearch' 高亮显示所有的匹配短语
|
||||
选项名可以用完整版本,也可以用缩略版本。
|
||||
|
||||
7. 在选项前加上 no 可以关闭选项: :set noic
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第七讲第一节:获取帮助信息
|
||||
|
||||
|
||||
** 使用在线帮助系统 **
|
||||
|
||||
Vim 拥有一个细致全面的在线帮助系统。要启动该帮助系统,请选择如下三种方
|
||||
法之一:
|
||||
- 按下 <HELP> 键 (如果键盘上有的话)
|
||||
- 按下 <F1> 键 (如果键盘上有的话)
|
||||
- 输入 :help <回车>
|
||||
|
||||
请阅读帮助窗口中的文字以了解帮助是如何工作的。
|
||||
输入 CTRL-W CTRL-W 可以使您在窗口之间跳转。
|
||||
输入 :q <回车> 可以关闭帮助窗口。
|
||||
|
||||
提供一个正确的参数给":help"命令,您可以找到关于该主题的帮助。请试验以
|
||||
下参数(可别忘了按回车键哦):
|
||||
|
||||
:help w
|
||||
:help c_CTRL-D
|
||||
:help insert-index
|
||||
:help user-manual
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第七讲第二节:创建启动脚本
|
||||
|
||||
|
||||
** 启用 Vim 的特性 **
|
||||
|
||||
Vim 的功能特性要比 Vi 多得多,但其中大部分都没有缺省启用。为了使用更多的
|
||||
特性,您得创建一个 vimrc 文件。
|
||||
|
||||
1. 开始编辑 vimrc 文件,具体命令取决于您所使用的操作系统:
|
||||
:edit ~/.vimrc 这是 Unix 系统所使用的命令
|
||||
:edit $VIM/_vimrc 这是 MS-Windows 系统所使用的命令
|
||||
|
||||
2. 接着读取 vimrc 示例文件的内容:
|
||||
:r $VIMRUNTIME/vimrc_example.vim
|
||||
|
||||
3. 保存文件,命令为:
|
||||
:write
|
||||
|
||||
下次您启动 Vim 时,编辑器就会有了语法高亮的功能。
|
||||
您可以把您喜欢的各种设置添加到这个 vimrc 文件中。
|
||||
要了解更多信息请输入 :help vimrc-intro
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第七讲第三节:补全功能
|
||||
|
||||
|
||||
** 使用 CTRL-D 和 <TAB> 可以进行命令行补全 **
|
||||
|
||||
1. 请确保 Vim 不是在以兼容模式运行: :set nocp
|
||||
|
||||
2. 查看一下当前目录下已经存在哪些文件,输入: :!ls 或者 :!dir
|
||||
|
||||
3. 现在输入一个目录的起始部分,例如输入: :e
|
||||
|
||||
4. 接着按 CTRL-D 键,Vim 会显示以 e 开始的命令的列表。
|
||||
|
||||
5. 然后按 <TAB> 键,Vim 会补全命令为 :edit 。
|
||||
|
||||
6. 现在添加一个空格,以及一个已有文件的文件名的起始部分,例如: :edit FIL
|
||||
|
||||
7. 接着按 <TAB> 键,Vim 会补全文件名(如果它是惟一匹配的)。
|
||||
|
||||
提示:补全对于许多命令都有效。您只需尝试按 CTRL-D 和 <TAB>。
|
||||
它对于 :help 命令非常有用。
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
第七讲小结
|
||||
|
||||
|
||||
1. 输入 :help 或者按 <F1> 键或 <Help> 键可以打开帮助窗口。
|
||||
|
||||
2. 输入 :help cmd 可以找到关于 cmd 命令的帮助。
|
||||
|
||||
3. 输入 CTRL-W CTRL-W 可以使您在窗口之间跳转。
|
||||
|
||||
4. 输入 :q 以关闭帮助窗口
|
||||
|
||||
5. 您可以创建一个 vimrc 启动脚本文件用来保存您偏好的设置。
|
||||
|
||||
6. 当输入 : 命令时,按 CTRL-D 可以查看可能的补全结果。
|
||||
按 <TAB> 可以使用一个补全。
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
vim 教程到此就结束了。本教程只是为了简明地介绍一下 Vim 编辑器,但已足以让您
|
||||
很容易使用这个编辑器了。毋庸质疑,vim还有很多很多的命令,本教程所介
|
||||
绍的距离完整的差得很远。所以您要精通的话,还望继续努力哦。下一步您可以阅读
|
||||
Vim 的用户手册,使用的命令是: :help user-manual
|
||||
|
||||
下面这本书值得推荐用于更进一步的阅读和学习:
|
||||
Vim - Vi Improved - 作者:Steve Oualline
|
||||
出版社:New Riders
|
||||
这是第一本完全讲解 Vim 的书籍。它对于初学者特别有用。其中包含有大量实例
|
||||
和图示。
|
||||
欲知详情,请访问 http://iccf-holland.org/click5.html
|
||||
|
||||
以下这本书比较老了而且内容更多是关于 Vi 而非 Vim,但是也值得推荐:
|
||||
Learning the Vi Editor - 作者:Linda Lamb
|
||||
出版社:O'Reilly & Associates Inc.
|
||||
这是一本不错的书,通过它您几乎能够了解到任何您想要使用 Vi 做的事情。
|
||||
此书的第六个版本也包含了一些关于 Vim 的信息。
|
||||
|
||||
本教程是由来自 Calorado School of Mines 的 Michael C. Pierce 和
|
||||
Robert K. Ware 所编写的,其中很多创意由来自 Colorado State University 的
|
||||
Charles Smith 提供。编者的电子邮箱是:bware@mines.colorado.edu
|
||||
|
||||
本教程已由 Bram Moolenaar 专为 Vim 进行修订。
|
||||
|
||||
译制者附言:
|
||||
===========
|
||||
简体中文教程翻译版之译制者为梁昌泰 <beos@turbolinux.com.cn>,还有
|
||||
另外一个联系地址:linuxrat@gnuchina.org。
|
||||
|
||||
繁体中文教程是从简体中文教程翻译版使用 Debian GNU/Linux 中文项目小
|
||||
组的于广辉先生编写的中文汉字转码器 autoconvert 转换而成的,并对转
|
||||
换的结果做了一些细节的改动。
|
||||
|
||||
变更记录:
|
||||
=========
|
||||
2012年10月01日 赵涛 <alick9188@gmail.com>
|
||||
将 vimtutor 中译版从 1.5 升级到 1.7。
|
||||
|
||||
2002年08月30日 梁昌泰 <beos@turbolinux.com.cn>
|
||||
感谢 RMS@SMTH 的指正,将多处错误修正。
|
||||
|
||||
2002年04月22日 梁昌泰 <linuxrat@gnuchina.org>
|
||||
感谢 xuandong@sh163.net 的指正,将两处错别字修正。
|
||||
|
||||
2002年03月18日 梁昌泰 <linuxrat@gnuchina.org>
|
||||
根据Bram Molenaar先生在2002年03月16日的来信要求,将vimtutor1.4中译
|
||||
版升级到vimtutor1.5。
|
||||
|
||||
2001年11月15日 梁昌泰 <linuxrat@gnuchina.org>
|
||||
将vimtutor1.4中译版提交给Bram Molenaar和Sven Guckes。
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -45,6 +45,10 @@ Visual Studio
|
||||
Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, and VS 2008)
|
||||
is straightforward. (These instructions should also work for VS 4 and VS 5.)
|
||||
|
||||
Using VS C++ 2008 Express is recommended, the binaries build with that run on
|
||||
nearly all platforms. Binaries from later versions may not run on Windows 95
|
||||
or XP.
|
||||
|
||||
To build Vim from the command line with MSVC, use Make_mvc.mak.
|
||||
Visual Studio installed a batch file called vcvars32.bat, which you must
|
||||
run to set up paths for nmake and MSVC.
|
||||
@@ -172,6 +176,10 @@ This includes the IDE and the debugger.
|
||||
To set the environment execute the msvc2008.bat script. You can then build
|
||||
Vim with Make_mvc.mak.
|
||||
|
||||
For building 64 bit binaries you also need to install the SDK:
|
||||
"Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1"
|
||||
You don't need the examples and documentation.
|
||||
|
||||
|
||||
Visual C++ 2010 Express Edition *msvc-2010-express*
|
||||
-------------------------------
|
||||
@@ -296,10 +304,12 @@ Now you have created the Windows binary from your Linux box! Have fun...
|
||||
6. Building with Python support
|
||||
===============================
|
||||
|
||||
(written by Ron Aaron: <ronaharon@yahoo.com>)
|
||||
For building with MSVC 2008 the "Windows Installer" from www.python.org
|
||||
works fine.
|
||||
|
||||
This has been tested with the mingw32 compiler, and the ActiveState
|
||||
ActivePython:
|
||||
(rest written by Ron Aaron: <ronaharon@yahoo.com>)
|
||||
|
||||
Building with the mingw32 compiler, and the ActiveState ActivePython:
|
||||
http://www.ActiveState.com/Products/ActivePython/
|
||||
|
||||
After installing the ActivePython, you will have to create a 'mingw32'
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
# Makefile for VIM on Win32, using 'EGCS/mingw32 1.1.2'.
|
||||
# Makefile for VIM on Win32
|
||||
#
|
||||
# Info at http://www.mingw.org
|
||||
# Also requires 'GNU make 3.77', which you can get through a link
|
||||
# to 'JanJaap's page from the above page.
|
||||
# Alternative x86 and 64-builds: http://mingw-w64.sourceforge.net
|
||||
# Also requires GNU make, which you can download from the same sites.
|
||||
# Get missing libraries from http://gnuwin32.sf.net.
|
||||
#
|
||||
# Tested on Win32 NT 4 and Win95.
|
||||
#
|
||||
# To make everything, just 'make -f Make_ming.mak'
|
||||
# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'
|
||||
# After a run, you can 'make -f Make_ming.mak clean' to clean up
|
||||
# To make everything, just 'make -f Make_ming.mak'.
|
||||
# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'.
|
||||
# After a run, you can 'make -f Make_ming.mak clean' to clean up.
|
||||
#
|
||||
# NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think
|
||||
# it's just run out of memory or something. Run again, and it will continue
|
||||
@@ -20,8 +21,8 @@
|
||||
# "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
|
||||
# http://www.matcode.com/mpress.htm
|
||||
#
|
||||
# Maintained by Ron Aaron <ronaharon@yahoo.com>
|
||||
# updated 2003 Jan 20
|
||||
# Maintained by Ron Aaron <ronaharon@yahoo.com> et al.
|
||||
# Updated 2012 Sep 5.
|
||||
|
||||
#>>>>> choose options:
|
||||
# set to yes for a debug build
|
||||
@@ -31,32 +32,33 @@ OPTIMIZE=MAXSPEED
|
||||
# set to yes to make gvim, no for vim
|
||||
GUI=yes
|
||||
# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
|
||||
# set to TINY to make minimal version (few features)
|
||||
# Set to TINY to make minimal version (few features).
|
||||
FEATURES=BIG
|
||||
# set to one of i386, i486, i586, i686 as the minimum target processor
|
||||
# Set to one of i386, i486, i586, i686 as the minimum target processor.
|
||||
# For amd64/x64 architecture set ARCH=x86-64 .
|
||||
ARCH=i386
|
||||
# set to yes to cross-compile from unix; no=native Windows
|
||||
# Set to yes to cross-compile from unix; no=native Windows.
|
||||
CROSS=no
|
||||
# set to path to iconv.h and libiconv.a to enable using 'iconv.dll'
|
||||
# Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.
|
||||
#ICONV="."
|
||||
ICONV=yes
|
||||
GETTEXT=yes
|
||||
# set to yes to include multibyte support
|
||||
# Set to yes to include multibyte support.
|
||||
MBYTE=yes
|
||||
# set to yes to include IME support
|
||||
# Set to yes to include IME support.
|
||||
IME=yes
|
||||
DYNAMIC_IME=yes
|
||||
# set to yes to enable writing a postscript file with :hardcopy
|
||||
# Set to yes to enable writing a postscript file with :hardcopy.
|
||||
POSTSCRIPT=no
|
||||
# set to yes to enable OLE support
|
||||
# Set to yes to enable OLE support.
|
||||
OLE=no
|
||||
# Set the default $(WINVER) to make it work with pre-Win2k
|
||||
# Set the default $(WINVER) to make it work with pre-Win2k.
|
||||
ifndef WINVER
|
||||
WINVER = 0x0500
|
||||
endif
|
||||
# Set to yes to enable Cscope support
|
||||
# Set to yes to enable Cscope support.
|
||||
CSCOPE=yes
|
||||
# Set to yes to enable Netbeans support
|
||||
# Set to yes to enable Netbeans support.
|
||||
NETBEANS=$(GUI)
|
||||
|
||||
|
||||
@@ -260,7 +262,9 @@ endif
|
||||
# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
|
||||
# RUBY_VER=[Ruby version, eg 16, 17] (default is 16)
|
||||
# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.6)
|
||||
# You must set RUBY_VER_LONG when change RUBY_VER.
|
||||
# You must set RUBY_VER_LONG when changing RUBY_VER.
|
||||
# You must set RUBY_API_VER version to RUBY_VER_LONG.
|
||||
# Don't set ruby API version to RUBY_VER like 191.
|
||||
#RUBY=c:/ruby
|
||||
ifdef RUBY
|
||||
ifndef DYNAMIC_RUBY
|
||||
@@ -273,6 +277,9 @@ endif
|
||||
ifndef RUBY_VER_LONG
|
||||
RUBY_VER_LONG = 1.6
|
||||
endif
|
||||
ifndef RUBY_API_VER
|
||||
RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
|
||||
endif
|
||||
|
||||
ifndef RUBY_PLATFORM
|
||||
ifeq ($(RUBY_VER), 16)
|
||||
@@ -288,9 +295,9 @@ endif
|
||||
|
||||
ifndef RUBY_INSTALL_NAME
|
||||
ifeq ($(RUBY_VER), 16)
|
||||
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
|
||||
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
|
||||
else
|
||||
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
|
||||
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -426,11 +433,32 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef XPM
|
||||
# Only allow XPM for a GUI build.
|
||||
ifeq (yes, $(GUI))
|
||||
CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include
|
||||
|
||||
ifndef XPM
|
||||
ifeq ($(ARCH),i386)
|
||||
XPM = xpm/x86
|
||||
endif
|
||||
ifeq ($(ARCH),i486)
|
||||
XPM = xpm/x86
|
||||
endif
|
||||
ifeq ($(ARCH),i586)
|
||||
XPM = xpm/x86
|
||||
endif
|
||||
ifeq ($(ARCH),i686)
|
||||
XPM = xpm/x86
|
||||
endif
|
||||
ifeq ($(ARCH),x86-64)
|
||||
XPM = xpm/x64
|
||||
endif
|
||||
endif
|
||||
ifdef XPM
|
||||
ifneq ($(XPM),no)
|
||||
CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include -I $(XPM)/../include
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),yes)
|
||||
@@ -560,10 +588,10 @@ TARGET := gvim$(DEBUG_SUFFIX).exe
|
||||
DEFINES += $(DEF_GUI)
|
||||
OBJ += $(GUIOBJ)
|
||||
LFLAGS += -mwindows
|
||||
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
|
||||
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
|
||||
else
|
||||
TARGET := vim$(DEBUG_SUFFIX).exe
|
||||
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
|
||||
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
|
||||
endif
|
||||
|
||||
ifdef GETTEXT
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me)
|
||||
# and Win64, using the Microsoft Visual C++ compilers. Known to work with
|
||||
# VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), VC8 (VS2005),
|
||||
# VC9 (VS2008), and VC10 (VS2010).
|
||||
# VC9 (VS2008), VC10 (VS2010) and VC11 (VS2012)
|
||||
#
|
||||
# To build using other Windows compilers, see INSTALLpc.txt
|
||||
#
|
||||
@@ -15,6 +15,9 @@
|
||||
# This will build the console version of Vim with no additional interfaces.
|
||||
# To add features, define any of the following:
|
||||
#
|
||||
# For MSVC 11 you need to specify where the Win32.mak file is, e.g.:
|
||||
# SDK_INCLUDE_DIR="C:\Program Files\Microsoft SDKs\Windows\v7.1\Include"
|
||||
#
|
||||
# !!!! After changing features do "nmake clean" first !!!!
|
||||
#
|
||||
# Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is BIG)
|
||||
@@ -63,6 +66,8 @@
|
||||
# RUBY_VER=[Ruby version, eg 16, 17] (default is 18)
|
||||
# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8)
|
||||
# You must set RUBY_VER_LONG when change RUBY_VER.
|
||||
# You must set RUBY_API_VER to RUBY_VER_LONG.
|
||||
# Don't set ruby API version to RUBY_VER like 191.
|
||||
#
|
||||
# Tcl interface:
|
||||
# TCL=[Path to Tcl directory]
|
||||
@@ -87,6 +92,8 @@
|
||||
# Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
|
||||
#
|
||||
# XPM Image Support: XPM=[path to XPM directory]
|
||||
# Default is "xpm", using the files included in the distribution.
|
||||
# Use "no" to disable this feature.
|
||||
#
|
||||
# Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
|
||||
#
|
||||
@@ -209,6 +216,7 @@ CPU = i386
|
||||
# We're on Windows 95
|
||||
CPU = i386
|
||||
!endif # !PROCESSOR_ARCHITECTURE
|
||||
OBJDIR = $(OBJDIR)$(CPU)
|
||||
|
||||
# Build a retail version by default
|
||||
|
||||
@@ -222,7 +230,12 @@ MAKEFLAGS_GVIMEXT = DEBUG=yes
|
||||
|
||||
# Get all sorts of useful, standard macros from the Platform SDK.
|
||||
|
||||
!ifdef SDK_INCLUDE_DIR
|
||||
!include $(SDK_INCLUDE_DIR)\Win32.mak
|
||||
!else
|
||||
!include <Win32.mak>
|
||||
!endif
|
||||
|
||||
|
||||
# Flag to turn on Win64 compatibility warnings for VC7.x and VC8.
|
||||
WP64CHECK = /Wp64
|
||||
@@ -277,13 +290,23 @@ NBDEBUG_SRC = nbdebug.c
|
||||
NETBEANS_LIB = WSock32.lib
|
||||
!endif
|
||||
|
||||
!ifdef XPM
|
||||
!ifndef XPM
|
||||
# XPM is not set, use the included xpm files, depending on the architecture.
|
||||
!if "$(CPU)" == "AMD64"
|
||||
XPM = xpm\x64
|
||||
!elseif "$(CPU)" == "i386"
|
||||
XPM = xpm\x86
|
||||
!else
|
||||
XPM = no
|
||||
!endif
|
||||
!endif
|
||||
!if "$(XPM)" != "no"
|
||||
# XPM - Include support for XPM signs
|
||||
# you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
|
||||
# See the xpm directory for more information.
|
||||
XPM_OBJ = $(OBJDIR)/xpm_w32.obj
|
||||
XPM_DEFS = -DFEAT_XPM_W32
|
||||
XPM_LIB = $(XPM)\lib\libXpm.lib
|
||||
XPM_INC = -I $(XPM)\include
|
||||
XPM_INC = -I $(XPM)\include -I $(XPM)\..\include
|
||||
!endif
|
||||
!endif
|
||||
|
||||
@@ -380,6 +403,9 @@ MSVCVER = 10.0
|
||||
!if "$(_NMAKE_VER)" == "10.00.30319.01"
|
||||
MSVCVER = 10.0
|
||||
!endif
|
||||
!if "$(_NMAKE_VER)" == "11.00.50727.1"
|
||||
MSVCVER = 11.0
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Abort bulding VIM if version of VC is unrecognised.
|
||||
@@ -394,7 +420,7 @@ MSVCVER = 10.0
|
||||
!endif
|
||||
|
||||
# Convert processor ID to MVC-compatible number
|
||||
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0")
|
||||
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0")
|
||||
!if "$(CPUNR)" == "i386"
|
||||
CPUARG = /G3
|
||||
!elseif "$(CPUNR)" == "i486"
|
||||
@@ -428,7 +454,7 @@ OPTFLAG = /O2
|
||||
OPTFLAG = /Ox
|
||||
!endif
|
||||
|
||||
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0")
|
||||
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0")
|
||||
# Use link time code generation if not worried about size
|
||||
!if "$(OPTIMIZE)" != "SPACE"
|
||||
OPTFLAG = $(OPTFLAG) /GL
|
||||
@@ -807,28 +833,31 @@ RUBY_VER = 18
|
||||
!ifndef RUBY_VER_LONG
|
||||
RUBY_VER_LONG = 1.8
|
||||
!endif
|
||||
!ifndef RUBY_API_VER
|
||||
RUBY_API_VER = $(RUBY_VER_LONG:.=)
|
||||
!endif
|
||||
|
||||
!if $(RUBY_VER) >= 18
|
||||
!ifndef RUBY_PLATFORM
|
||||
RUBY_PLATFORM = i386-mswin32
|
||||
!endif
|
||||
!ifndef RUBY_INSTALL_NAME
|
||||
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
|
||||
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
|
||||
!endif
|
||||
!else
|
||||
!ifndef RUBY_PLATFORM
|
||||
RUBY_PLATFORM = i586-mswin32
|
||||
!endif
|
||||
!ifndef RUBY_INSTALL_NAME
|
||||
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
|
||||
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
|
||||
!endif
|
||||
!endif # $(RUBY_VER) >= 18
|
||||
|
||||
!message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
|
||||
CFLAGS = $(CFLAGS) -DFEAT_RUBY
|
||||
RUBY_OBJ = $(OUTDIR)\if_ruby.obj
|
||||
!if $(RUBY_VER) >= 190
|
||||
RUBY_INC = /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)"
|
||||
!if $(RUBY_VER) >= 19
|
||||
RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
|
||||
!else
|
||||
RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
|
||||
!endif
|
||||
@@ -890,7 +919,7 @@ LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
|
||||
|
||||
# Report link time code generation progress if used.
|
||||
!ifdef NODEBUG
|
||||
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0")
|
||||
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0")
|
||||
!if "$(OPTIMIZE)" != "SPACE"
|
||||
LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
|
||||
!endif
|
||||
|
||||
@@ -2559,19 +2559,11 @@ objects/if_perl.o: auto/if_perl.c
|
||||
objects/if_perlsfio.o: if_perlsfio.c
|
||||
$(CCC) $(PERL_CFLAGS) -o $@ if_perlsfio.c
|
||||
|
||||
objects/py_config.o: $(PYTHON_CONFDIR)/config.c
|
||||
$(CCC) $(PYTHON_CFLAGS) -o $@ $(PYTHON_CONFDIR)/config.c \
|
||||
-I$(PYTHON_CONFDIR) -DHAVE_CONFIG_H -DNO_MAIN
|
||||
|
||||
objects/py_getpath.o: $(PYTHON_CONFDIR)/getpath.c
|
||||
$(CCC) $(PYTHON_CFLAGS) -o $@ $(PYTHON_CONFDIR)/getpath.c \
|
||||
-I$(PYTHON_CONFDIR) -DHAVE_CONFIG_H -DNO_MAIN \
|
||||
$(PYTHON_GETPATH_CFLAGS)
|
||||
|
||||
objects/py3_config.o: $(PYTHON3_CONFDIR)/config.c
|
||||
$(CCC) $(PYTHON3_CFLAGS) -o $@ $(PYTHON3_CONFDIR)/config.c \
|
||||
-I$(PYTHON3_CONFDIR) -DHAVE_CONFIG_H -DNO_MAIN
|
||||
|
||||
objects/if_python.o: if_python.c if_py_both.h
|
||||
$(CCC) $(PYTHON_CFLAGS) $(PYTHON_CFLAGS_EXTRA) -o $@ if_python.c
|
||||
|
||||
|
||||
109
src/auto/configure
vendored
109
src/auto/configure
vendored
@@ -4648,15 +4648,7 @@ $as_echo "not set, default to /usr" >&6; }
|
||||
|
||||
LUA_INC=
|
||||
if test "X$vi_cv_path_lua_pfx" != "X"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
|
||||
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua.h; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
# Extract the first word of "lua", so it can be a program name with args.
|
||||
# Extract the first word of "lua", so it can be a program name with args.
|
||||
set dummy lua; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
@@ -4696,8 +4688,8 @@ $as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
if test "X$vi_cv_path_lua" != "X"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
|
||||
if test "X$vi_cv_path_lua" != "X"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
|
||||
$as_echo_n "checking Lua version... " >&6; }
|
||||
if test "${vi_cv_version_lua+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -4706,23 +4698,31 @@ else
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua" >&5
|
||||
$as_echo "$vi_cv_version_lua" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
|
||||
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
|
||||
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua.h; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
LUA_INC=/lua$vi_cv_version_lua
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
vi_cv_path_lua_pfx=
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
|
||||
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
LUA_INC=/lua$vi_cv_version_lua
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
vi_cv_path_lua_pfx=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "X$vi_cv_path_lua_pfx" != "X"; then
|
||||
if test "X$vi_cv_version_lua" != "X"; then
|
||||
if test "X$LUA_INC" != "X"; then
|
||||
LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
|
||||
else
|
||||
LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
|
||||
@@ -4734,16 +4734,21 @@ $as_echo "no" >&6; }
|
||||
$as_echo "#define FEAT_LUA 1" >>confdefs.h
|
||||
|
||||
if test "$enable_luainterp" = "dynamic"; then
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
if test -f "${vi_cv_path_lua_pfx}/lib/liblua${vi_cv_version_lua}.so.$i"; then
|
||||
LUA_SONAME=".$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
|
||||
vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
|
||||
else
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
if test -f "${vi_cv_path_lua_pfx}/lib/liblua${vi_cv_version_lua}.so.$i"; then
|
||||
LUA_SONAME=".$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
vi_cv_dll_name_lua="liblua${vi_cv_version_lua}.so$LUA_SONAME"
|
||||
fi
|
||||
$as_echo "#define DYNAMIC_LUA 1" >>confdefs.h
|
||||
|
||||
LUA_LIBS=""
|
||||
LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"liblua${vi_cv_version_lua}.so$LUA_SONAME\\\" $LUA_CFLAGS"
|
||||
LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
|
||||
fi
|
||||
fi
|
||||
if test "$fail_if_missing" = "yes" -a -z "$LUA_SRC"; then
|
||||
@@ -5330,6 +5335,7 @@ __:
|
||||
@echo "python_LIBS='$(LIBS)'"
|
||||
@echo "python_SYSLIBS='$(SYSLIBS)'"
|
||||
@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
|
||||
@echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python_INSTSONAME='$(INSTSONAME)'"
|
||||
eof
|
||||
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||
@@ -5350,6 +5356,9 @@ eof
|
||||
fi
|
||||
|
||||
|
||||
if test "X$python_DLLLIBRARY" != "X"; then
|
||||
python_INSTSONAME="$python_DLLLIBRARY"
|
||||
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} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
|
||||
@@ -5357,11 +5366,7 @@ fi
|
||||
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
|
||||
PYTHON_OBJ="objects/if_python.o"
|
||||
else
|
||||
PYTHON_OBJ="objects/if_python.o objects/py_config.o"
|
||||
fi
|
||||
PYTHON_OBJ="objects/if_python.o"
|
||||
if test "${vi_cv_var_python_version}" = "1.4"; then
|
||||
PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
|
||||
fi
|
||||
@@ -5637,6 +5642,7 @@ __:
|
||||
@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
|
||||
@echo "python3_LIBS='$(LIBS)'"
|
||||
@echo "python3_SYSLIBS='$(SYSLIBS)'"
|
||||
@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python3_INSTSONAME='$(INSTSONAME)'"
|
||||
eof
|
||||
eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||
@@ -5649,6 +5655,9 @@ eof
|
||||
fi
|
||||
|
||||
|
||||
if test "X$python3_DLLLIBRARY" != "X"; then
|
||||
python3_INSTSONAME="$python3_DLLLIBRARY"
|
||||
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}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||
@@ -5656,11 +5665,7 @@ fi
|
||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||
fi
|
||||
PYTHON3_SRC="if_python3.c"
|
||||
if test "x$MACOSX" = "xyes"; then
|
||||
PYTHON3_OBJ="objects/if_python3.o"
|
||||
else
|
||||
PYTHON3_OBJ="objects/if_python3.o objects/py3_config.o"
|
||||
fi
|
||||
PYTHON3_OBJ="objects/if_python3.o"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
|
||||
$as_echo_n "checking if -pthread should be used... " >&6; }
|
||||
@@ -6327,26 +6332,34 @@ $as_echo_n "checking Ruby version... " >&6; }
|
||||
if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
|
||||
$as_echo "OK" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
|
||||
$as_echo_n "checking Ruby rbconfig... " >&6; }
|
||||
ruby_rbconfig="RbConfig"
|
||||
if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
|
||||
ruby_rbconfig="Config"
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
|
||||
$as_echo "$ruby_rbconfig" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
|
||||
$as_echo_n "checking Ruby header files... " >&6; }
|
||||
rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null`
|
||||
rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
|
||||
if test "X$rubyhdrdir" != "X"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
|
||||
$as_echo "$rubyhdrdir" >&6; }
|
||||
RUBY_CFLAGS="-I$rubyhdrdir"
|
||||
rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["arch"]'`
|
||||
rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['arch']"`
|
||||
if test -d "$rubyhdrdir/$rubyarch"; then
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
|
||||
fi
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["ruby_version"].gsub(/\./, "")[0,2]'`
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
|
||||
rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'`
|
||||
rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
|
||||
if test "X$rubylibs" != "X"; then
|
||||
RUBY_LIBS="$rubylibs"
|
||||
fi
|
||||
librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
|
||||
librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'`
|
||||
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
|
||||
librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
|
||||
librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
|
||||
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
|
||||
if test -f "$rubylibdir/$librubya"; then
|
||||
librubyarg="$librubyarg"
|
||||
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
|
||||
@@ -6358,7 +6371,7 @@ $as_echo "$rubyhdrdir" >&6; }
|
||||
if test "X$librubyarg" != "X"; then
|
||||
RUBY_LIBS="$librubyarg $RUBY_LIBS"
|
||||
fi
|
||||
rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'`
|
||||
rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"`
|
||||
if test "X$rubyldflags" != "X"; then
|
||||
rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
|
||||
if test "X$rubyldflags" != "X"; then
|
||||
@@ -6371,7 +6384,7 @@ $as_echo "$rubyhdrdir" >&6; }
|
||||
$as_echo "#define FEAT_RUBY 1" >>confdefs.h
|
||||
|
||||
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"]'`
|
||||
libruby=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
|
||||
$as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
|
||||
|
||||
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
|
||||
@@ -10639,7 +10652,7 @@ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
|
||||
fi
|
||||
|
||||
for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
|
||||
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
|
||||
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
|
||||
sigvec strcasecmp strerror strftime stricmp strncasecmp \
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
:: command to build big Vim with OLE, Perl, Python, Ruby and Tcl
|
||||
nmake -f Make_mvc.mak GUI=yes OLE=yes PERL=E:\perl512 DYNAMIC_PERL=yes PERL_VER=512 PYTHON=e:\python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=e:\python31 DYNAMIC_PYTHON3=yes PYTHON3_VER=31 RUBY=e:\ruby191 DYNAMIC_RUBY=yes RUBY_VER=191 RUBY_VER_LONG=1.9.1 TCL=e:\tcl DYNAMIC_TCL=yes %1 IME=yes CSCOPE=yes XPM=e:\xpm
|
||||
SET VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\"
|
||||
SET TOOLDIR=E:\
|
||||
%VCDIR%nmake -f Make_mvc.mak GUI=yes OLE=yes PERL=E:\perl514 DYNAMIC_PERL=yes PERL_VER=514 PYTHON=%TOOLDIR%python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=%TOOLDIR%python32 DYNAMIC_PYTHON3=yes PYTHON3_VER=32 RUBY=%TOOLDIR%ruby192 DYNAMIC_RUBY=yes RUBY_VER=192 RUBY_VER_LONG=1.9.2 TCL=%TOOLDIR%tcl TCL_VER=85 TCL_VER_LONG=8.5 DYNAMIC_TCL=yes %1 IME=yes CSCOPE=yes
|
||||
|
||||
|
||||
6
src/bigvim64.bat
Normal file
6
src/bigvim64.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
:: command to build big Vim 64 bit with OLE, Perl, Python, Ruby and Tcl
|
||||
:: First run: %VCDIR%\vcvarsall.bat x86_amd64
|
||||
SET VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\"
|
||||
SET TOOLDIR=E:\
|
||||
%VCDIR%\bin\nmake -f Make_mvc.mak CPU=AMD64 GUI=yes OLE=yes PERL=E:\perl514 DYNAMIC_PERL=yes PERL_VER=514 PYTHON=%TOOLDIR%python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=%TOOLDIR%python32 DYNAMIC_PYTHON3=yes PYTHON3_VER=32 RUBY=%TOOLDIR%ruby192 DYNAMIC_RUBY=yes RUBY_VER=192 RUBY_VER_LONG=1.9.2 TCL=%TOOLDIR%tcl TCL_VER=85 TCL_VER_LONG=8.5 DYNAMIC_TCL=yes %1 IME=yes CSCOPE=yes
|
||||
|
||||
51
src/buffer.c
51
src/buffer.c
@@ -2635,7 +2635,7 @@ buflist_list(eap)
|
||||
continue;
|
||||
msg_putchar('\n');
|
||||
if (buf_spname(buf) != NULL)
|
||||
STRCPY(NameBuff, buf_spname(buf));
|
||||
vim_strncpy(NameBuff, buf_spname(buf), MAXPATHL - 1);
|
||||
else
|
||||
home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE);
|
||||
|
||||
@@ -3058,7 +3058,7 @@ fileinfo(fullname, shorthelp, dont_truncate)
|
||||
|
||||
*p++ = '"';
|
||||
if (buf_spname(curbuf) != NULL)
|
||||
STRCPY(p, buf_spname(curbuf));
|
||||
vim_strncpy(p, buf_spname(curbuf), IOSIZE - (p - buffer) - 1);
|
||||
else
|
||||
{
|
||||
if (!fullname && curbuf->b_fname != NULL)
|
||||
@@ -3234,12 +3234,15 @@ maketitle()
|
||||
{
|
||||
/* format: "fname + (path) (1 of 2) - VIM" */
|
||||
|
||||
#define SPACE_FOR_FNAME (IOSIZE - 100)
|
||||
#define SPACE_FOR_DIR (IOSIZE - 20)
|
||||
#define SPACE_FOR_ARGNR (IOSIZE - 10) /* at least room for " - VIM" */
|
||||
if (curbuf->b_fname == NULL)
|
||||
vim_strncpy(buf, (char_u *)_("[No Name]"), IOSIZE - 100);
|
||||
vim_strncpy(buf, (char_u *)_("[No Name]"), SPACE_FOR_FNAME);
|
||||
else
|
||||
{
|
||||
p = transstr(gettail(curbuf->b_fname));
|
||||
vim_strncpy(buf, p, IOSIZE - 100);
|
||||
vim_strncpy(buf, p, SPACE_FOR_FNAME);
|
||||
vim_free(p);
|
||||
}
|
||||
|
||||
@@ -3263,7 +3266,7 @@ maketitle()
|
||||
buf[off++] = ' ';
|
||||
buf[off++] = '(';
|
||||
home_replace(curbuf, curbuf->b_ffname,
|
||||
buf + off, IOSIZE - off, TRUE);
|
||||
buf + off, SPACE_FOR_DIR - off, TRUE);
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
/* avoid "c:/name" to be reduced to "c" */
|
||||
if (isalpha(buf[off]) && buf[off + 1] == ':')
|
||||
@@ -3274,18 +3277,28 @@ maketitle()
|
||||
if (p == buf + off)
|
||||
/* must be a help buffer */
|
||||
vim_strncpy(buf + off, (char_u *)_("help"),
|
||||
(size_t)(IOSIZE - off - 1));
|
||||
(size_t)(SPACE_FOR_DIR - off - 1));
|
||||
else
|
||||
*p = NUL;
|
||||
|
||||
/* translate unprintable chars */
|
||||
p = transstr(buf + off);
|
||||
vim_strncpy(buf + off, p, (size_t)(IOSIZE - off - 1));
|
||||
vim_free(p);
|
||||
/* Translate unprintable chars and concatenate. Keep some
|
||||
* room for the server name. When there is no room (very long
|
||||
* file name) use (...). */
|
||||
if (off < SPACE_FOR_DIR)
|
||||
{
|
||||
p = transstr(buf + off);
|
||||
vim_strncpy(buf + off, p, (size_t)(SPACE_FOR_DIR - off));
|
||||
vim_free(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
vim_strncpy(buf + off, (char_u *)"...",
|
||||
(size_t)(SPACE_FOR_ARGNR - off));
|
||||
}
|
||||
STRCAT(buf, ")");
|
||||
}
|
||||
|
||||
append_arg_number(curwin, buf, IOSIZE, FALSE);
|
||||
append_arg_number(curwin, buf, SPACE_FOR_ARGNR, FALSE);
|
||||
|
||||
#if defined(FEAT_CLIENTSERVER)
|
||||
if (serverName != NULL)
|
||||
@@ -3337,7 +3350,7 @@ maketitle()
|
||||
else
|
||||
{
|
||||
if (buf_spname(curbuf) != NULL)
|
||||
i_name = (char_u *)buf_spname(curbuf);
|
||||
i_name = buf_spname(curbuf);
|
||||
else /* use file name only in icon */
|
||||
i_name = gettail(curbuf->b_ffname);
|
||||
*i_str = NUL;
|
||||
@@ -3753,7 +3766,7 @@ build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar,
|
||||
case STL_FILENAME:
|
||||
fillable = FALSE; /* don't change ' ' to fillchar */
|
||||
if (buf_spname(wp->w_buffer) != NULL)
|
||||
STRCPY(NameBuff, buf_spname(wp->w_buffer));
|
||||
vim_strncpy(NameBuff, buf_spname(wp->w_buffer), MAXPATHL - 1);
|
||||
else
|
||||
{
|
||||
t = (opt == STL_FULLPATH) ? wp->w_buffer->b_ffname
|
||||
@@ -5231,7 +5244,7 @@ write_viminfo_bufferlist(fp)
|
||||
* Return special buffer name.
|
||||
* Returns NULL when the buffer has a normal file name.
|
||||
*/
|
||||
char *
|
||||
char_u *
|
||||
buf_spname(buf)
|
||||
buf_T *buf;
|
||||
{
|
||||
@@ -5250,9 +5263,9 @@ buf_spname(buf)
|
||||
goto win_found;
|
||||
win_found:
|
||||
if (win != NULL && win->w_llist_ref != NULL)
|
||||
return _(msg_loclist);
|
||||
return (char_u *)_(msg_loclist);
|
||||
else
|
||||
return _(msg_qflist);
|
||||
return (char_u *)_(msg_qflist);
|
||||
}
|
||||
#endif
|
||||
#ifdef FEAT_QUICKFIX
|
||||
@@ -5261,12 +5274,12 @@ win_found:
|
||||
if (bt_nofile(buf))
|
||||
{
|
||||
if (buf->b_sfname != NULL)
|
||||
return (char *)buf->b_sfname;
|
||||
return _("[Scratch]");
|
||||
return buf->b_sfname;
|
||||
return (char_u *)_("[Scratch]");
|
||||
}
|
||||
#endif
|
||||
if (buf->b_fname == NULL)
|
||||
return _("[No Name]");
|
||||
return (char_u *)_("[No Name]");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,7 @@
|
||||
#undef HAVE_FSYNC
|
||||
#undef HAVE_GETCWD
|
||||
#undef HAVE_GETPSEUDOTTY
|
||||
#undef HAVE_GETPWENT
|
||||
#undef HAVE_GETPWNAM
|
||||
#undef HAVE_GETPWUID
|
||||
#undef HAVE_GETRLIMIT
|
||||
|
||||
101
src/configure.in
101
src/configure.in
@@ -455,31 +455,31 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
|
||||
|
||||
LUA_INC=
|
||||
if test "X$vi_cv_path_lua_pfx" != "X"; then
|
||||
dnl -- try to find Lua executable
|
||||
AC_PATH_PROG(vi_cv_path_lua, lua)
|
||||
if test "X$vi_cv_path_lua" != "X"; then
|
||||
dnl -- find Lua version
|
||||
AC_CACHE_CHECK(Lua version, vi_cv_version_lua,
|
||||
[ vi_cv_version_lua=`${vi_cv_path_lua} -e "print(_VERSION)" | sed 's/.* //'` ])
|
||||
fi
|
||||
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include)
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
dnl -- try to find Lua executable
|
||||
AC_PATH_PROG(vi_cv_path_lua, lua)
|
||||
if test "X$vi_cv_path_lua" != "X"; then
|
||||
dnl -- find Lua version
|
||||
AC_CACHE_CHECK(Lua version, vi_cv_version_lua,
|
||||
[ vi_cv_version_lua=`${vi_cv_path_lua} -e "print(_VERSION)" | sed 's/.* //'` ])
|
||||
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua)
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
LUA_INC=/lua$vi_cv_version_lua
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
vi_cv_path_lua_pfx=
|
||||
fi
|
||||
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua)
|
||||
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
LUA_INC=/lua$vi_cv_version_lua
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
vi_cv_path_lua_pfx=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "X$vi_cv_path_lua_pfx" != "X"; then
|
||||
if test "X$vi_cv_version_lua" != "X"; then
|
||||
if test "X$LUA_INC" != "X"; then
|
||||
dnl Test alternate location using version
|
||||
LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
|
||||
else
|
||||
@@ -491,17 +491,22 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
|
||||
LUA_PRO="if_lua.pro"
|
||||
AC_DEFINE(FEAT_LUA)
|
||||
if test "$enable_luainterp" = "dynamic"; then
|
||||
dnl Determine the SONAME for the current version, but fallback to
|
||||
dnl liblua${vi_cv_version_lua}.so if no SONAME-versioned file is found.
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
if test -f "${vi_cv_path_lua_pfx}/lib/liblua${vi_cv_version_lua}.so.$i"; then
|
||||
LUA_SONAME=".$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
|
||||
vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
|
||||
else
|
||||
dnl Determine the SONAME for the current version, but fallback to
|
||||
dnl liblua${vi_cv_version_lua}.so if no SONAME-versioned file is found.
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
if test -f "${vi_cv_path_lua_pfx}/lib/liblua${vi_cv_version_lua}.so.$i"; then
|
||||
LUA_SONAME=".$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
vi_cv_dll_name_lua="liblua${vi_cv_version_lua}.so$LUA_SONAME"
|
||||
fi
|
||||
AC_DEFINE(DYNAMIC_LUA)
|
||||
LUA_LIBS=""
|
||||
LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"liblua${vi_cv_version_lua}.so$LUA_SONAME\\\" $LUA_CFLAGS"
|
||||
LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
|
||||
fi
|
||||
fi
|
||||
if test "$fail_if_missing" = "yes" -a -z "$LUA_SRC"; then
|
||||
@@ -889,6 +894,7 @@ __:
|
||||
@echo "python_LIBS='$(LIBS)'"
|
||||
@echo "python_SYSLIBS='$(SYSLIBS)'"
|
||||
@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
|
||||
@echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python_INSTSONAME='$(INSTSONAME)'"
|
||||
eof
|
||||
dnl -- delete the lines from make about Entering/Leaving directory
|
||||
@@ -909,6 +915,9 @@ eof
|
||||
fi
|
||||
])
|
||||
|
||||
if test "X$python_DLLLIBRARY" != "X"; then
|
||||
python_INSTSONAME="$python_DLLLIBRARY"
|
||||
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} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
|
||||
@@ -916,12 +925,7 @@ eof
|
||||
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"
|
||||
dnl For Mac OSX 10.2 config.o is included in the Python library.
|
||||
if test "x$MACOSX" = "xyes"; then
|
||||
PYTHON_OBJ="objects/if_python.o"
|
||||
else
|
||||
PYTHON_OBJ="objects/if_python.o objects/py_config.o"
|
||||
fi
|
||||
PYTHON_OBJ="objects/if_python.o"
|
||||
if test "${vi_cv_var_python_version}" = "1.4"; then
|
||||
PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
|
||||
fi
|
||||
@@ -1087,6 +1091,7 @@ __:
|
||||
@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
|
||||
@echo "python3_LIBS='$(LIBS)'"
|
||||
@echo "python3_SYSLIBS='$(SYSLIBS)'"
|
||||
@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python3_INSTSONAME='$(INSTSONAME)'"
|
||||
eof
|
||||
dnl -- delete the lines from make about Entering/Leaving directory
|
||||
@@ -1099,6 +1104,9 @@ eof
|
||||
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
|
||||
])
|
||||
|
||||
if test "X$python3_DLLLIBRARY" != "X"; then
|
||||
python3_INSTSONAME="$python3_DLLLIBRARY"
|
||||
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}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||
@@ -1106,12 +1114,7 @@ eof
|
||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||
fi
|
||||
PYTHON3_SRC="if_python3.c"
|
||||
dnl For Mac OSX 10.2 config.o is included in the Python library.
|
||||
if test "x$MACOSX" = "xyes"; then
|
||||
PYTHON3_OBJ="objects/if_python3.o"
|
||||
else
|
||||
PYTHON3_OBJ="objects/if_python3.o objects/py3_config.o"
|
||||
fi
|
||||
PYTHON3_OBJ="objects/if_python3.o"
|
||||
|
||||
dnl On FreeBSD linking with "-pthread" is required to use threads.
|
||||
dnl _THREAD_SAFE must be used for compiling then.
|
||||
@@ -1439,24 +1442,30 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
AC_MSG_CHECKING(Ruby version)
|
||||
if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
|
||||
AC_MSG_RESULT(OK)
|
||||
AC_MSG_CHECKING(Ruby rbconfig)
|
||||
ruby_rbconfig="RbConfig"
|
||||
if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
|
||||
ruby_rbconfig="Config"
|
||||
fi
|
||||
AC_MSG_RESULT($ruby_rbconfig)
|
||||
AC_MSG_CHECKING(Ruby header files)
|
||||
rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null`
|
||||
rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG[['rubyhdrdir']] || $ruby_rbconfig::CONFIG[['archdir']] || \\$hdrdir" 2>/dev/null`
|
||||
if test "X$rubyhdrdir" != "X"; then
|
||||
AC_MSG_RESULT($rubyhdrdir)
|
||||
RUBY_CFLAGS="-I$rubyhdrdir"
|
||||
rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["arch"]]'`
|
||||
rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['arch']]"`
|
||||
if test -d "$rubyhdrdir/$rubyarch"; then
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
|
||||
fi
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["ruby_version"]].gsub(/\./, "")[[0,2]]'`
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
|
||||
rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'`
|
||||
rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['LIBS']]"`
|
||||
if test "X$rubylibs" != "X"; then
|
||||
RUBY_LIBS="$rubylibs"
|
||||
fi
|
||||
librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'`
|
||||
librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBY_A"]])'`
|
||||
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
|
||||
librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBYARG']])"`
|
||||
librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBY_A']])"`
|
||||
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['libdir']])"`
|
||||
if test -f "$rubylibdir/$librubya"; then
|
||||
librubyarg="$librubyarg"
|
||||
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
|
||||
@@ -1469,7 +1478,7 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
if test "X$librubyarg" != "X"; then
|
||||
RUBY_LIBS="$librubyarg $RUBY_LIBS"
|
||||
fi
|
||||
rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'`
|
||||
rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['LDFLAGS']]"`
|
||||
if test "X$rubyldflags" != "X"; then
|
||||
dnl Ruby on Mac OS X 10.5 adds "-arch" flags but these should only
|
||||
dnl be included if requested by passing --with-mac-arch to
|
||||
@@ -1484,7 +1493,7 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
RUBY_PRO="if_ruby.pro"
|
||||
AC_DEFINE(FEAT_RUBY)
|
||||
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"]]'`
|
||||
libruby=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_SO']]"`
|
||||
AC_DEFINE(DYNAMIC_RUBY)
|
||||
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
|
||||
RUBY_LIBS=
|
||||
@@ -3004,7 +3013,7 @@ fi
|
||||
dnl Check for functions in one big call, to reduce the size of configure.
|
||||
dnl Can only be used for functions that do not require any include.
|
||||
AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
|
||||
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
|
||||
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
|
||||
sigvec strcasecmp strerror strftime stricmp strncasecmp \
|
||||
|
||||
14
src/edit.c
14
src/edit.c
@@ -3959,7 +3959,7 @@ expand_by_function(type, base)
|
||||
curbuf_save = curbuf;
|
||||
|
||||
/* Call a function, which returns a list or dict. */
|
||||
if (call_vim_function(funcname, 2, args, FALSE, &rettv) == OK)
|
||||
if (call_vim_function(funcname, 2, args, FALSE, FALSE, &rettv) == OK)
|
||||
{
|
||||
switch (rettv.v_type)
|
||||
{
|
||||
@@ -4194,8 +4194,8 @@ ins_compl_get_exp(ini)
|
||||
ins_buf->b_fname == NULL
|
||||
? buf_spname(ins_buf)
|
||||
: ins_buf->b_sfname == NULL
|
||||
? (char *)ins_buf->b_fname
|
||||
: (char *)ins_buf->b_sfname);
|
||||
? ins_buf->b_fname
|
||||
: ins_buf->b_sfname);
|
||||
(void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
||||
}
|
||||
else if (*e_cpt == NUL)
|
||||
@@ -8899,9 +8899,9 @@ ins_bs(c, mode, inserted_space_p)
|
||||
|
||||
*inserted_space_p = FALSE;
|
||||
if (p_sta && in_indent)
|
||||
ts = curbuf->b_p_sw;
|
||||
ts = (int)get_sw_value();
|
||||
else
|
||||
ts = curbuf->b_p_sts;
|
||||
ts = (int)curbuf->b_p_sts;
|
||||
/* Compute the virtual column where we want to be. Since
|
||||
* 'showbreak' may get in the way, need to get the last column of
|
||||
* the previous character. */
|
||||
@@ -9589,7 +9589,7 @@ ins_tab()
|
||||
* When nothing special, insert TAB like a normal character
|
||||
*/
|
||||
if (!curbuf->b_p_et
|
||||
&& !(p_sta && ind && curbuf->b_p_ts != curbuf->b_p_sw)
|
||||
&& !(p_sta && ind && curbuf->b_p_ts != get_sw_value())
|
||||
&& curbuf->b_p_sts == 0)
|
||||
return TRUE;
|
||||
|
||||
@@ -9605,7 +9605,7 @@ ins_tab()
|
||||
AppendToRedobuff((char_u *)"\t");
|
||||
|
||||
if (p_sta && ind) /* insert tab in indent, use 'shiftwidth' */
|
||||
temp = (int)curbuf->b_p_sw;
|
||||
temp = (int)get_sw_value();
|
||||
else if (curbuf->b_p_sts > 0) /* use 'softtabstop' when set */
|
||||
temp = (int)curbuf->b_p_sts;
|
||||
else /* otherwise use 'tabstop' */
|
||||
|
||||
21
src/eval.c
21
src/eval.c
@@ -1564,11 +1564,12 @@ eval_expr(arg, nextcmd)
|
||||
* Returns OK or FAIL.
|
||||
*/
|
||||
int
|
||||
call_vim_function(func, argc, argv, safe, rettv)
|
||||
call_vim_function(func, argc, argv, safe, str_arg_only, rettv)
|
||||
char_u *func;
|
||||
int argc;
|
||||
char_u **argv;
|
||||
int safe; /* use the sandbox */
|
||||
int str_arg_only; /* all arguments are strings */
|
||||
typval_T *rettv;
|
||||
{
|
||||
typval_T *argvars;
|
||||
@@ -1593,8 +1594,11 @@ call_vim_function(func, argc, argv, safe, rettv)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Recognize a number argument, the others must be strings. */
|
||||
vim_str2nr(argv[i], NULL, &len, TRUE, TRUE, &n, NULL);
|
||||
if (str_arg_only)
|
||||
len = 0;
|
||||
else
|
||||
/* Recognize a number argument, the others must be strings. */
|
||||
vim_str2nr(argv[i], NULL, &len, TRUE, TRUE, &n, NULL);
|
||||
if (len != 0 && len == (int)STRLEN(argv[i]))
|
||||
{
|
||||
argvars[i].v_type = VAR_NUMBER;
|
||||
@@ -1646,7 +1650,8 @@ call_func_retstr(func, argc, argv, safe)
|
||||
typval_T rettv;
|
||||
char_u *retval;
|
||||
|
||||
if (call_vim_function(func, argc, argv, safe, &rettv) == FAIL)
|
||||
/* All arguments are passed as strings, no conversion to number. */
|
||||
if (call_vim_function(func, argc, argv, safe, TRUE, &rettv) == FAIL)
|
||||
return NULL;
|
||||
|
||||
retval = vim_strsave(get_tv_string(&rettv));
|
||||
@@ -1671,7 +1676,8 @@ call_func_retnr(func, argc, argv, safe)
|
||||
typval_T rettv;
|
||||
long retval;
|
||||
|
||||
if (call_vim_function(func, argc, argv, safe, &rettv) == FAIL)
|
||||
/* All arguments are passed as strings, no conversion to number. */
|
||||
if (call_vim_function(func, argc, argv, safe, TRUE, &rettv) == FAIL)
|
||||
return -1;
|
||||
|
||||
retval = get_tv_number_chk(&rettv, NULL);
|
||||
@@ -1694,7 +1700,8 @@ call_func_retlist(func, argc, argv, safe)
|
||||
{
|
||||
typval_T rettv;
|
||||
|
||||
if (call_vim_function(func, argc, argv, safe, &rettv) == FAIL)
|
||||
/* All arguments are passed as strings, no conversion to number. */
|
||||
if (call_vim_function(func, argc, argv, safe, TRUE, &rettv) == FAIL)
|
||||
return NULL;
|
||||
|
||||
if (rettv.v_type != VAR_LIST)
|
||||
@@ -12959,7 +12966,7 @@ get_user_input(argvars, rettv, inputdialog)
|
||||
rettv->vval.v_string =
|
||||
getcmdline_prompt(inputsecret_flag ? NUL : '@', p, echo_attr,
|
||||
xp_type, xp_arg);
|
||||
if (rettv->vval.v_string == NULL
|
||||
if (inputdialog && rettv->vval.v_string == NULL
|
||||
&& argvars[1].v_type != VAR_UNKNOWN
|
||||
&& argvars[2].v_type != VAR_UNKNOWN)
|
||||
rettv->vval.v_string = vim_strsave(get_tv_string_buf(
|
||||
|
||||
@@ -4264,6 +4264,9 @@ do_sub(eap)
|
||||
int endcolumn = FALSE; /* cursor in last column when done */
|
||||
pos_T old_cursor = curwin->w_cursor;
|
||||
int start_nsubs;
|
||||
#ifdef FEAT_EVAL
|
||||
int save_ma = 0;
|
||||
#endif
|
||||
|
||||
cmd = eap->arg;
|
||||
if (!global_busy)
|
||||
@@ -4668,7 +4671,12 @@ do_sub(eap)
|
||||
}
|
||||
sub_nsubs++;
|
||||
did_sub = TRUE;
|
||||
goto skip;
|
||||
#ifdef FEAT_EVAL
|
||||
/* Skip the substitution, unless an expression is used,
|
||||
* then it is evaluated in the sandbox. */
|
||||
if (!(sub[0] == '\\' && sub[1] == '='))
|
||||
#endif
|
||||
goto skip;
|
||||
}
|
||||
|
||||
if (do_ask)
|
||||
@@ -4840,10 +4848,27 @@ do_sub(eap)
|
||||
/*
|
||||
* 3. substitute the string.
|
||||
*/
|
||||
#ifdef FEAT_EVAL
|
||||
if (do_count)
|
||||
{
|
||||
/* prevent accidentally changing the buffer by a function */
|
||||
save_ma = curbuf->b_p_ma;
|
||||
curbuf->b_p_ma = FALSE;
|
||||
sandbox++;
|
||||
}
|
||||
#endif
|
||||
/* get length of substitution part */
|
||||
sublen = vim_regsub_multi(®match,
|
||||
sub_firstlnum - regmatch.startpos[0].lnum,
|
||||
sub, sub_firstline, FALSE, p_magic, TRUE);
|
||||
#ifdef FEAT_EVAL
|
||||
if (do_count)
|
||||
{
|
||||
curbuf->b_p_ma = save_ma;
|
||||
sandbox--;
|
||||
goto skip;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* When the match included the "$" of the last line it may
|
||||
* go beyond the last line of the buffer. */
|
||||
@@ -5239,7 +5264,7 @@ do_sub_msg(count_only)
|
||||
* is assumed to be 'p' if missing.
|
||||
*
|
||||
* This is implemented in two passes: first we scan the file for the pattern and
|
||||
* set a mark for each line that (not) matches. secondly we execute the command
|
||||
* set a mark for each line that (not) matches. Secondly we execute the command
|
||||
* for each line that has a mark. This is required because after deleting
|
||||
* lines we do not know where to search for the next match.
|
||||
*/
|
||||
@@ -5871,9 +5896,14 @@ find_help_tags(arg, num_matches, matches, keep_lang)
|
||||
}
|
||||
else
|
||||
{
|
||||
/* replace "[:...:]" with "\[:...:]"; "[+...]" with "\[++...]" */
|
||||
if (arg[0] == '[' && (arg[1] == ':'
|
||||
|| (arg[1] == '+' && arg[2] == '+')))
|
||||
/* Replace:
|
||||
* "[:...:]" with "\[:...:]"
|
||||
* "[++...]" with "\[++...]"
|
||||
* "\{" with "\\{"
|
||||
*/
|
||||
if ((arg[0] == '[' && (arg[1] == ':'
|
||||
|| (arg[1] == '+' && arg[2] == '+')))
|
||||
|| (arg[0] == '\\' && arg[1] == '{'))
|
||||
*d++ = '\\';
|
||||
|
||||
for (s = arg; *s; ++s)
|
||||
|
||||
@@ -662,7 +662,7 @@ EX(CMD_nunmap, "nunmap", ex_unmap,
|
||||
EX(CMD_nunmenu, "nunmenu", ex_menu,
|
||||
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
|
||||
EX(CMD_open, "open", ex_open,
|
||||
RANGE|EXTRA),
|
||||
RANGE|BANG|EXTRA),
|
||||
EX(CMD_oldfiles, "oldfiles", ex_oldfiles,
|
||||
BANG|TRLBAR|SBOXOK|CMDWIN),
|
||||
EX(CMD_omap, "omap", ex_map,
|
||||
|
||||
@@ -1688,8 +1688,7 @@ check_changed_any(hidden)
|
||||
msg_didout = FALSE;
|
||||
}
|
||||
if (EMSG2(_("E162: No write since last change for buffer \"%s\""),
|
||||
buf_spname(buf) != NULL ? (char_u *)buf_spname(buf) :
|
||||
buf->b_fname))
|
||||
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname))
|
||||
{
|
||||
save = no_wait_return;
|
||||
no_wait_return = FALSE;
|
||||
|
||||
@@ -1295,7 +1295,14 @@ do_cmdline(cmdline, fgetline, cookie, flags)
|
||||
&& cstack.cs_trylevel == 0
|
||||
#endif
|
||||
)
|
||||
&& !(did_emsg && used_getline
|
||||
&& !(did_emsg
|
||||
#ifdef FEAT_EVAL
|
||||
/* Keep going when inside try/catch, so that the error can be
|
||||
* dealth with, except when it is a syntax error, it may cause
|
||||
* the :endtry to be missed. */
|
||||
&& (cstack.cs_trylevel == 0 || did_emsg_syntax)
|
||||
#endif
|
||||
&& used_getline
|
||||
&& (getline_equal(fgetline, cookie, getexmodeline)
|
||||
|| getline_equal(fgetline, cookie, getexline)))
|
||||
&& (next_cmdline != NULL
|
||||
@@ -1305,6 +1312,7 @@ do_cmdline(cmdline, fgetline, cookie, flags)
|
||||
|| (flags & DOCMD_REPEAT)));
|
||||
|
||||
vim_free(cmdline_copy);
|
||||
did_emsg_syntax = FALSE;
|
||||
#ifdef FEAT_EVAL
|
||||
free_cmdlines(&lines_ga);
|
||||
ga_clear(&lines_ga);
|
||||
@@ -2137,6 +2145,7 @@ do_one_cmd(cmdlinep, sourcing,
|
||||
if (!sourcing)
|
||||
append_command(*cmdlinep);
|
||||
errormsg = IObuff;
|
||||
did_emsg_syntax = TRUE;
|
||||
}
|
||||
goto doend;
|
||||
}
|
||||
@@ -3390,12 +3399,23 @@ set_one_cmd_context(xp, buff)
|
||||
return NULL;
|
||||
|
||||
/* Find start of last argument (argument just before cursor): */
|
||||
p = buff + STRLEN(buff);
|
||||
while (p != arg && *p != ' ' && *p != TAB)
|
||||
p--;
|
||||
if (*p == ' ' || *p == TAB)
|
||||
p++;
|
||||
p = buff;
|
||||
xp->xp_pattern = p;
|
||||
len = (int)STRLEN(buff);
|
||||
while (*p && p < buff + len)
|
||||
{
|
||||
if (*p == ' ' || *p == TAB)
|
||||
{
|
||||
/* argument starts after a space */
|
||||
xp->xp_pattern = ++p;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*p == '\\' && *(p + 1) != NUL)
|
||||
++p; /* skip over escaped character */
|
||||
mb_ptr_adv(p);
|
||||
}
|
||||
}
|
||||
|
||||
if (ea.argt & XFILE)
|
||||
{
|
||||
@@ -3504,6 +3524,23 @@ set_one_cmd_context(xp, buff)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if defined(FEAT_CMDL_COMPL)
|
||||
/* Check for user names */
|
||||
if (*xp->xp_pattern == '~')
|
||||
{
|
||||
for (p = xp->xp_pattern + 1; *p != NUL && *p != '/'; ++p)
|
||||
;
|
||||
/* Complete ~user only if it partially matches a user name.
|
||||
* A full match ~user<Tab> will be replaced by user's home
|
||||
* directory i.e. something like ~user<Tab> -> /home/user/ */
|
||||
if (*p == NUL && p > xp->xp_pattern + 1
|
||||
&& match_user(xp->xp_pattern + 1) == 1)
|
||||
{
|
||||
xp->xp_context = EXPAND_USER;
|
||||
++xp->xp_pattern;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3821,8 +3858,17 @@ set_one_cmd_context(xp, buff)
|
||||
if (compl == EXPAND_MAPPINGS)
|
||||
return set_context_in_map_cmd(xp, (char_u *)"map",
|
||||
arg, forceit, FALSE, FALSE, CMD_map);
|
||||
while ((xp->xp_pattern = vim_strchr(arg, ' ')) != NULL)
|
||||
arg = xp->xp_pattern + 1;
|
||||
/* Find start of last argument. */
|
||||
p = arg;
|
||||
while (*p)
|
||||
{
|
||||
if (*p == ' ')
|
||||
/* argument starts after a space */
|
||||
arg = p + 1;
|
||||
else if (*p == '\\' && *(p + 1) != NUL)
|
||||
++p; /* skip over escaped character */
|
||||
mb_ptr_adv(p);
|
||||
}
|
||||
xp->xp_pattern = arg;
|
||||
}
|
||||
xp->xp_context = compl;
|
||||
@@ -5376,6 +5422,7 @@ static struct
|
||||
#endif
|
||||
{EXPAND_TAGS, "tag"},
|
||||
{EXPAND_TAGS_LISTFILES, "tag_listfiles"},
|
||||
{EXPAND_USER, "user"},
|
||||
{EXPAND_USER_VARS, "var"},
|
||||
{0, NULL}
|
||||
};
|
||||
@@ -6419,7 +6466,7 @@ ex_colorscheme(eap)
|
||||
#endif
|
||||
}
|
||||
else if (load_colors(eap->arg) == FAIL)
|
||||
EMSG2(_("E185: Cannot find color scheme %s"), eap->arg);
|
||||
EMSG2(_("E185: Cannot find color scheme '%s'"), eap->arg);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -7555,7 +7602,7 @@ ex_tabs(eap)
|
||||
msg_putchar(bufIsChanged(wp->w_buffer) ? '+' : ' ');
|
||||
msg_putchar(' ');
|
||||
if (buf_spname(wp->w_buffer) != NULL)
|
||||
STRCPY(IObuff, buf_spname(wp->w_buffer));
|
||||
vim_strncpy(IObuff, buf_spname(wp->w_buffer), IOSIZE - 1);
|
||||
else
|
||||
home_replace(wp->w_buffer, wp->w_buffer->b_fname,
|
||||
IObuff, IOSIZE, TRUE);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user