Merge remote-tracking branch 'vim/master'

This commit is contained in:
Kazuki Sakamoto
2018-07-23 17:35:04 -07:00
87 changed files with 3228 additions and 1364 deletions
+21 -1
View File
@@ -51,4 +51,24 @@ Look in the header of the file for the name and email address.
The maintainer will take care of issues and send updates to Bram for
distribution with Vim.
If the maintainer does not react, contact the vim-dev maillist.
If the maintainer does not respond, contact the vim-dev maillist.
# Translations
Translating messages and runtime files is very much appreciated! These things can be translated:
* Messages in Vim, see [src/po/README.txt][1]
* Menus, see [runtime/lang/README.txt][2]
* Vim tutor, see [runtime/tutor/README.txt][3]
* Manual pages, see [runtime/doc/\*.1][4] for examples
* Desktop icon, see [runtime/vim.desktop][5] and [runtime/gvim.desktop][6]
The help files can be translated and made available separately.
See https://www.vim.org/translations.php for examples.
[1]: https://github.com/vim/vim/blob/master/src/po/README.txt
[2]: https://github.com/vim/vim/blob/master/runtime/lang/README.txt
[3]: https://github.com/vim/vim/blob/master/runtime/tutor/README.txt
[4]: https://github.com/vim/vim/blob/master/runtime/doc/vim.1
[5]: https://github.com/vim/vim/blob/master/runtime/vim.desktop
[6]: https://github.com/vim/vim/blob/master/runtime/gvim.desktop
+6 -5
View File
@@ -22,6 +22,7 @@ function! spellfile#LoadFile(lang)
endif
return
endif
let lang = tolower(a:lang)
" If the URL changes we try all files again.
if s:spellfile_URL != g:spellfile_URL
@@ -30,13 +31,13 @@ function! spellfile#LoadFile(lang)
endif
" I will say this only once!
if has_key(s:donedict, a:lang . &enc)
if has_key(s:donedict, lang . &enc)
if &verbose
echomsg 'spellfile#LoadFile(): Tried this language/encoding before.'
endif
return
endif
let s:donedict[a:lang . &enc] = 1
let s:donedict[lang . &enc] = 1
" Find spell directories we can write in.
let [dirlist, dirchoices] = spellfile#GetDirChoices()
@@ -57,14 +58,14 @@ function! spellfile#LoadFile(lang)
endif
endif
let msg = 'Cannot find spell file for "' . a:lang . '" in ' . &enc
let msg = 'Cannot find spell file for "' . lang . '" in ' . &enc
let msg .= "\nDo you want me to try downloading it?"
if confirm(msg, "&Yes\n&No", 2) == 1
let enc = &encoding
if enc == 'iso-8859-15'
let enc = 'latin1'
endif
let fname = a:lang . '.' . enc . '.spl'
let fname = lang . '.' . enc . '.spl'
" Split the window, read the file into a new buffer.
" Remember the buffer number, we check it below.
@@ -95,7 +96,7 @@ function! spellfile#LoadFile(lang)
let newbufnr = winbufnr(0)
endif
let fname = a:lang . '.ascii.spl'
let fname = lang . '.ascii.spl'
echo 'Could not find it, trying ' . fname . '...'
call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell'
+1 -1
View File
@@ -345,7 +345,7 @@ Name triggered by ~
when popup menu is not visible
|TextChangedP| after a change was made to the text in Insert mode
when popup menu visible
|TextYankPost| after text is yanked or deleted
|TextYankPost| after text has been yanked or deleted
|ColorSchemePre| before loading a color scheme
|ColorScheme| after loading a color scheme
+39 -34
View File
@@ -2196,7 +2196,7 @@ gettabvar({nr}, {varname} [, {def}])
any variable {varname} in tab {nr} or {def}
gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
any {name} in {winnr} in tab page {tabnr}
getwininfo([{winid}]) List list of windows
getwininfo([{winid}]) List list of info about each window
getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window
getwinposx() Number X coord in pixels of the Vim window
getwinposy() Number Y coord in pixels of the Vim window
@@ -4936,6 +4936,41 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
:let list_is_on = gettabwinvar(1, 2, '&list')
:echo "myvar = " . gettabwinvar(3, 1, 'myvar')
<
To obtain all window-local variables use: >
gettabwinvar({tabnr}, {winnr}, '&')
getwininfo([{winid}]) *getwininfo()*
Returns information about windows as a List with Dictionaries.
If {winid} is given Information about the window with that ID
is returned. If the window does not exist the result is an
empty list.
Without {winid} information about all the windows in all the
tab pages is returned.
Each List item is a Dictionary with the following entries:
bufnr number of buffer in the window
height window height (excluding winbar)
loclist 1 if showing a location list
{only with the +quickfix feature}
quickfix 1 if quickfix or location list window
{only with the +quickfix feature}
terminal 1 if a terminal window
{only with the +terminal feature}
tabnr tab page number
variables a reference to the dictionary with
window-local variables
width window width
winbar 1 if the window has a toolbar, 0
otherwise
wincol leftmost screen column of the window,
col from |win_screenpos()|
winid |window-ID|
winnr window number
winrow topmost screen column of the window,
row from |win_screenpos()|
getwinpos([{timeout}]) *getwinpos()*
The result is a list with two numbers, the result of
getwinposx() and getwinposy() combined:
@@ -4969,37 +5004,6 @@ getwinposy() The result is a Number, which is the Y coordinate in pixels of
The result will be -1 if the information is not available.
The value can be used with `:winpos`.
getwininfo([{winid}]) *getwininfo()*
Returns information about windows as a List with Dictionaries.
If {winid} is given Information about the window with that ID
is returned. If the window does not exist the result is an
empty list.
Without {winid} information about all the windows in all the
tab pages is returned.
Each List item is a Dictionary with the following entries:
bufnr number of buffer in the window
height window height (excluding winbar)
winbar 1 if the window has a toolbar, 0
otherwise
loclist 1 if showing a location list
{only with the +quickfix feature}
quickfix 1 if quickfix or location list window
{only with the +quickfix feature}
terminal 1 if a terminal window
{only with the +terminal feature}
tabnr tab page number
variables a reference to the dictionary with
window-local variables
width window width
winid |window-ID|
winnr window number
To obtain all window-local variables use: >
gettabwinvar({tabnr}, {winnr}, '&')
getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
Like |gettabwinvar()| for the current tabpage.
Examples: >
@@ -9047,7 +9051,7 @@ win_id2win({expr}) *win_id2win()*
win_screenpos({nr}) *win_screenpos()*
Return the screen position of window {nr} as a list with two
numbers: [row, col]. The first window always has position
[1, 1].
[1, 1], unless there is a tabline, then it is [2, 1].
{nr} can be the window number or the |window-ID|.
Return [0, 0] if the window cannot be found in the current
tabpage.
@@ -11580,7 +11584,7 @@ The sandbox is also used for the |:sandbox| command.
These items are not allowed in the sandbox:
- changing the buffer text
- defining or changing mapping, autocommands, functions, user commands
- defining or changing mapping, autocommands, user commands
- setting certain options (see |option-summary|)
- setting certain v: variables (see |v:var|) *E794*
- executing a shell command
@@ -11602,6 +11606,7 @@ location. Insecure in this context are:
- sourcing a .vimrc or .exrc in the current directory
- while executing in the sandbox
- value coming from a modeline
- executing a function that was defined in the sandbox
Note that when in the sandbox and saving an option value and restoring it, the
option will still be marked as it was set in the sandbox.
+3 -6
View File
@@ -25,11 +25,9 @@ MS-Windows のメモ帳のような動作です。
.PP
引数や Vim についての詳細は vim(1) を参照してください。
.PP
オプション 'insertmode' が設定され、テキストを直接、入力できるようになりま
す。
オプション 'insertmode' が設定され、テキストを直接、入力できるようになります。
.br
コピーとペーストのキー操作が MS-Windows と同じになるように、マップが設定され
ます。
コピーとペーストのキー操作が MS-Windows と同じになるように、マップが設定されます。
CTRL-X が切り取り、CTRL-C がコピー、CTRL-V がペーストです。
標準の CTRL-V の操作は CTRL-Q に割り当てられます。
.SH オプション
@@ -41,8 +39,7 @@ eVim の初期化スクリプト。
.SH 別名
evim は "gumbies のための Vim" とも呼ばれています。
evim を使っているあなたはきっと、頭にハンカチをかぶっているのです。
(訳注: gumbies は Monty Python に登場するおもしろ集団。ハンカチをかぶっ
ている。)
(訳注: gumbies は Monty Python に登場するおもしろ集団。ハンカチをかぶっている。)
.SH 関連項目
vim(1)
.SH 著者
+1 -1
View File
@@ -442,7 +442,7 @@ 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|
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: >
+9 -8
View File
@@ -1019,12 +1019,13 @@ These commands are not marks themselves, but jump to a mark:
==============================================================================
8. Jumps *jump-motions*
A "jump" is one of the following commands: "'", "`", "G", "/", "?", "n",
"N", "%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and
the commands that start editing a new file. If you make the cursor "jump"
with one of these commands, the position of the cursor before the jump is
A "jump" is a command that normally moves the cursor several lines away. If
you make the cursor "jump" the position of the cursor before the jump is
remembered. You can return to that position with the "''" and "``" command,
unless the line containing that position was changed or deleted.
unless the line containing that position was changed or deleted. The
following commands are "jump" commands: "'", "`", "G", "/", "?", "n", "N",
"%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and the
commands that start editing a new file.
*CTRL-O*
CTRL-O Go to [count] Older cursor position in jump list
@@ -1163,7 +1164,7 @@ remembered.
*:changes*
:changes Print the change list. A ">" character indicates the
current position. Just after a change it is below the
newest entry, indicating that "g;" takes you to the
newest entry, indicating that `g;` takes you to the
newest entry position. The first column indicates the
count needed to take you to this position. Example:
@@ -1173,8 +1174,8 @@ remembered.
1 14 54 the latest changed line
>
The "3g;" command takes you to line 9. Then the
output of ":changes is:
The `3g;` command takes you to line 9. Then the
output of `:changes` is:
change line col text ~
> 0 9 8 bla bla bla
+2 -2
View File
@@ -409,9 +409,9 @@ defineAnnoType typeNum typeName tooltip glyphFile fg bg
Vim will define a sign for the annotation.
When color is a number, this is the "#rrggbb" Red, Green and
Blue values of the color (see |gui-colors|) and the
highlighting is only defined for GVim.
highlighting is only defined for gVim.
When color is a name, this color is defined both for Vim
running in a color terminal and for GVim.
running in a color terminal and for gVim.
When both "fg" and "bg" are "none" no line highlighting is
used (new in version 2.1).
When "glyphFile" is empty, no text sign is used (new in
+4 -4
View File
@@ -2110,10 +2110,10 @@ A jump table for the options with a short description can be found at |Q_op|.
See also |map_bar|.
*cpo-B*
B A backslash has no special meaning in mappings,
abbreviations and the "to" part of the menu commands.
Remove this flag to be able to use a backslash like a
CTRL-V. For example, the command ":map X \<Esc>"
results in X being mapped to:
abbreviations, user commands and the "to" part of the
menu commands. Remove this flag to be able to use a
backslash like a CTRL-V. For example, the command
":map X \<Esc>" results in X being mapped to:
'B' included: "\^[" (^[ is a real <Esc>)
'B' excluded: "<Esc>" (5 characters)
('<' excluded in both cases)
+8
View File
@@ -293,6 +293,14 @@ the "#" is under your left hand middle finger (search to the left and up) and
the "*" is under your right hand middle finger (search to the right and down).
(this depends on your keyboard layout though).
*E956*
In very rare cases a regular expression is used recursively. This can happen
when executing a pattern takes a long time and when checkig for messages on
channels a callback is invoked that also uses a pattern or an autocommand is
triggered. In most cases this should be fine, but if a pattern is in use when
it's used again it fails. Usually this means there is something wrong with
the pattern.
==============================================================================
2. The definition of a pattern *search-pattern* *pattern* *[pattern]*
*regular-expression* *regexp* *Pattern*
+5 -1
View File
@@ -511,9 +511,11 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
{not in Vi}
*--clean*
--clean Equal to "-u DEFAULTS -U NONE -i NONE":
--clean Similar to "-u DEFAULTS -U NONE -i NONE":
- initializations from files and environment variables is
skipped
-'runtimepath'and 'packpath' are set to exclude home
directory entries (does not happen with -u DEFAULTS).
- the |defaults.vim| script is loaded, which implies
'nocompatible': use Vim defaults
- no |gvimrc| script is loaded
@@ -1595,6 +1597,8 @@ VIMINFO FILE NAME *viminfo-file-name*
- The "-i" Vim argument can be used to set another file name, |-i|. When the
file name given is "NONE" (all uppercase), no viminfo file is ever read or
written. Also not for the commands below!
- The 'viminfofile' option can be used like the "-i" argument. In fact, the
value form the "-i" argument is stored in the 'viminfofile' option.
- For the commands below, another file name can be given, overriding the
default and the name given with 'viminfo' or "-i" (unless it's NONE).
+1
View File
@@ -4673,6 +4673,7 @@ E952 autocmd.txt /*E952*
E953 eval.txt /*E953*
E954 options.txt /*E954*
E955 eval.txt /*E955*
E956 pattern.txt /*E956*
E96 diff.txt /*E96*
E97 diff.txt /*E97*
E98 diff.txt /*E98*
+42 -18
View File
@@ -38,8 +38,6 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
testdir: remove use of lua.vim from makefiles and test1.in
Prompt buffer:
- Add a command line history.
- delay next prompt until plugin gives OK?
@@ -79,6 +77,8 @@ Does not build with MinGW out of the box:
- _stat64 is not defined, need to use "struct stat" in vim.h
- WINVER conflict, should use 0x0600 by default?
Patches for Python: #3162, #3263 (Ozaki Kiichi)
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
13, #2910) Can't reproduce?
@@ -88,32 +88,49 @@ On Win32 when not in the console and t_Co >= 256, allow using 'tgc'.
Errors found with random data:
heap-buffer-overflow in alist_add (#2472)
Patch to fix that +packages is always in output of :version.
(thinca, #3198) reported by Takuya Fujiwara
More warnings from static analysis:
https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
Patch for Perl 5.28 on Windows. (#3196)
Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
Related to bracketed paste. I cannot reproduce it.
Patch replacing imp with importlib. (#3163)
Patch to make CTRL-S in mswin.vim work better. (#3211)
But use "gi" instead of "a".
Using ":file" in quickfix window during an autocommand doesn't work.
(Jason Franklin, 2018 May 23) Allow for using it when there is no argument.
Patch in pull request #2967: Allow white space in sign text. (Ben Jackson)
Removing flags from 'cpoptions' breaks the Winbar buttons in termdebug.
(Dominique Pelle, 2018 Jul 16)
Whenever the file name is "~" then expand('%:p') returns $HOME. (Aidan
Shafran, 2018 Jun 23, #3072) Proposed patch by Aidan, 2018 Jun 24.
Patch to set w_set_curswant when setting the cursor in language interfaces.
(David Hotham, 2018 Jun 22, #3060)
Patch for Lua 5.3. (Ken Takata, 2018 Jul 5, #3157)
Problem with two buffers with the same name a/b, if it didn't exist before and
is created outside of Vim. (dskloetg, 2018 Jul 16, #3219)
Patch to make CTRL-W <CR> work properly in a quickfix window. (Jason Franklin,
2018 May 30)
Patch to make mode() return something different for Normal mode when coming
from Insert mode with CTRL-O. (#3000)
gethostbyname() is old, use getaddrinfo() if available. (#3227)
Patches for Python: #3162, #3263 (Ozaki Kiichi)
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
19.
Patch to make mode() return something different for Normal mode when coming
from Insert mode with CTRL-O. (#3000) Useful for positioning the cursor.
Script generated by :mksession does not work well if there are windows with
modified buffers
@@ -127,6 +144,8 @@ Patch to make :help work for tags with a ?. (Hirohito Higashi, 2018 May 28)
Patch to adjust to DPI setting for GTK. (Roel van de Kraats, 2017 Nov 20,
#2357)
Patch to fix window size when using VTP. (Nobuhiro Takasaki, #3164)
Compiler warnings (geeknik, 2017 Oct 26):
- signed integer overflow in do_sub() (#2249)
- signed integer overflow in get_address() (#2248)
@@ -146,6 +165,10 @@ Patch to stack and pop the window title and icon. (IWAMOTO Kouichi, 2018 Jun
need to use X11 calls. This returns "<Esc>]l{title}<Esc>\".
Using title stack probably works better.
When a function is defined in the sandbox (with :function or as a lambda)
always execute it in the sandbox. (#3182)
Remove "safe" argument from call_vim_function(), it's always FALSE.
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
#2948. (related to #1512?)
On Win32 it stops showing, because showState is already ShS_SHOWING.
@@ -178,6 +201,8 @@ script or function.
Universal solution to detect if t_RS is working, using cursor position.
Koichi Iwamoto, #2126
Patch to fix profiling condition lines. (Ozaki Kiichi,, 2017 Dec 26, #2499)
When using a menu item while the "more" prompt is displayed doesn't work well.
E.g. after using help->version. Have a key that ends the "more" prompt and
does nothing otherwise?
@@ -218,6 +243,10 @@ Does setting 'cursorline' cause syntax highlighting to slow down? Perhaps is
mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539)
Also: 'foldtext' is evaluated too often. (Daniel Hahler, #2773)
With 'foldmethod' "indent" and appending an empty line, what follows isn't
included in the existing fold. Deleting the empty line and undo fixes it.
(Oleg Koshovetc, 2018 Jul 15, #3214)
When using :packadd files under "later" are not used, which is inconsistent
with packages under "start". (xtal8, #1994)
@@ -243,12 +272,15 @@ confusing error message. (Wang Shidong, 2018 Jan 2, #2519)
Add the debug command line history to viminfo.
Issue #686: apply 'F' in 'shortmess' to more messages. Also #3221.
Avoid that "sign unplace id" does a redraw right away, esp. when there is a
sequence of these commands. (Andy Stewart, 2018 Mar 16)
ch_sendraw() with long string does not try to read in between, which may cause
a deadlock if the reading side is waiting for the write to finish. (Nate
Bosch, 2018 Jan 13, #2548)
Perhaps just make chunks of 1024 bytes?
Patch to include a cfilter plugin to filter quickfix/location lists.
(Yegappan Lakshmanan, 2018 May 12)
@@ -406,9 +438,6 @@ Perhaps use a vimcontext / endvimcontext command block.
After using :noautocmd CursorMoved may still trigger. (Andy Stewart, 2017 Sep
13, #2084). Set old position after the command.
Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28)
Still happens (2017 Jul 9)
When bracketed paste is used, pasting at the ":append" prompt does not get the
line breaks. (Ken Takata, 2017 Aug 22)
@@ -720,8 +749,6 @@ Does this also fix #1408 ?
Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
Patch to fix profiling condition lines. (Ozaki Kiichi,, 2017 Dec 26, #2499)
Patch to be able to separately map CTRL-H and BS on Windows.
(Linwei, 2017 Jul 11, #1833)
@@ -1018,9 +1045,6 @@ Added tests (James McCoy, 2016 Aug 3). Still needs more work.
Feature request: add the "al" text object, to manipulate a screen line.
Especially useful when using 'linebreak'
Access to uninitialized memory in match_backref() regexp_nda.c:4882
(Dominique Pelle, 2015 Nov 6)
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)
@@ -1070,7 +1094,7 @@ Patch to add TagNotFound autocommand. (Anton Lindqvist, 2016 Feb 3)
Patch to add Error autocommand. (Anton Lindqvist, 2016 Feb 17)
Only remembers one error.
Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
GVim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
Unexpected delay when using CTRL-O u. It's not timeoutlen.
(Gary Johnson, 2015 Aug 28)
@@ -1854,7 +1878,7 @@ accented character. (Tony Mechelynck, 2010 Apr 15)
Don't call check_restricted() for histadd(), setbufvar(), settabvar(),
setwinvar().
Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
Patch for gVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
instead of one. (Constantin Pan, 2010 Sep 10)
@@ -2437,7 +2461,7 @@ go to Insert mode and add a few lines. Then backspacing every other time
moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25)
Windows installer could add a "open in new tab of existing Vim" menu entry.
Gvimext: patch to add "Edit with single Vim &tabbed" menu entry.
GvimExt: patch to add "Edit with single Vim &tabbed" menu entry.
Just have two choices, always using one Vim and selecting between using an
argument list or opening each file in a separate tab.
(Erik Falor, 2008 May 21, 2008 Jun 26)
@@ -2513,7 +2537,7 @@ C++ indenting wrong with "=". (James Kanze, 2007 Jan 26)
When using --remote-silent and the file name matches 'wildignore' get an E479
error. without --remote-silent it works fine. (Ben Fritz, 2008 Jun 20)
Gvim: dialog for closing Vim should check if Vim is busy writing a file. Then
GVim: dialog for closing Vim should check if Vim is busy writing a file. Then
use a different dialog: "busy saving, really quit? yes / no".
Check other interfaces for changing curbuf in a wrong way. Patch like for
+2 -1
View File
@@ -344,8 +344,9 @@ when you use Vim. There are only two steps for adding a global plugin:
GETTING A GLOBAL PLUGIN
Where can you find plugins?
- Some are always loaded, you can see them in the directory $VIMRUNTIME/plugin.
- Some come with Vim. You can find them in the directory $VIMRUNTIME/macros
and its sub-directories.
and its sub-directories and under $VIM/vimfiles/pack/dist/opt/.
- Download from the net. There is a large collection on http://www.vim.org.
- They are sometimes posted in a Vim |maillist|.
- You could write one yourself, see |write-plugin|.
+4 -3
View File
@@ -5,9 +5,10 @@
Using the GUI
Vim works in an ordinary terminal. GVim can do the same things and a few
more. The GUI offers menus, a toolbar, scrollbars and other items. This
chapter is about these extra things that the GUI offers.
Vim works in an ordinary terminal, while gVim has a Graphical User Interface
(GUI). It can do the same things and a few more. The GUI offers menus, a
toolbar, scrollbars and other items. This chapter is about these extra things
that the GUI offers.
|09.1| Parts of the GUI
|09.2| Using the mouse
+2 -2
View File
@@ -2347,7 +2347,7 @@ Added *added-5.2*
Support for mapping numeric keypad +,-,*,/ keys. (Negri)
When not mapped, they produce the normal character.
Win32 GUI: When directory dropped on Gvim, cd there and edit new buffer.
Win32 GUI: When directory dropped on gVim, cd there and edit new buffer.
(Negri)
Win32 GUI: Made CTRL-Break work as interrupt, so that CTRL-C can be
@@ -7615,7 +7615,7 @@ VMS doesn't always have lstat(), added an #ifdef around it.
Added a few corrections for the Macintosh. (Axel Kielhorn)
Win32: Gvimext could not edit more than a few files at once, the length of the
Win32: GvimExt could not edit more than a few files at once, the length of the
argument was fixed.
+1 -1
View File
@@ -2967,7 +2967,7 @@ DOS and Windows: Expanding *.vim also matched file.vimfoo. Expand path like
Unix to avoid problems with Windows dir functions. Merged the DOS and Win32
functions.
Win32: Gvimext could not edit more than a few files at once, the length of the
Win32: GvimExt could not edit more than a few files at once, the length of the
argument was fixed.
"ls -1 * | xargs vim" worked, but the input was in cooked mode. Now switch to
+555
View File
@@ -0,0 +1,555 @@
.TH VIM 1 "11. april 2006"
.SH NAVN
vim \- Vi IMproved, en programmørs teksteditor
.SH SYNOPSIS
.br
.B vim
[tilvalg] [fil ..]
.br
.B vim
[tilvalg] \-
.br
.B vim
[tilvalg] \-t tag
.br
.B vim
[tilvalg] \-q [fejlfil]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.B evim
.B eview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH BESKRIVELSE
.B Vim
er en teksteditor som er opad kompatibel med Vi.
Den kan bruges til at redigere alle slags ren tekst.
Den er særlig nyttig til at redigere programmer.
.PP
Der er mange forbedringer over Vi: multiniveau fortryd,
multivinduer og -buffere, syntaksfremhævning, redigering af kommandolinje,
fuldførelse af filnavn, onlinehjælp, visuel markering, osv.
Se ":help vi_diff.txt" for et overblik over forskellene mellem
.B Vim
og Vi.
.PP
Mens
.B Vim
kører, kan der indhentes massere af hjælp fra online-hjælpesystemet, med
":help"-kommandoen.
Se ONLINEHJÆLP-sektionen nedenfor.
.PP
Oftest startes
.B Vim
for at redigere en enkelt fil med kommandoen
.PP
vim fil
.PP
Mere generelt startes
.B Vim
med:
.PP
vim [tilvalg] [filliste]
.PP
Hvis fillisten mangler, så startes editoren med en tom buffer.
Ellers kan én af følgende fire måder bruges til at vælge en eller
flere filer som skal redigeres.
.TP 12
fil ..
En liste over filnavne.
Den første bliver den nuværende fil og læses ind i bufferen.
Markøren placeres på den første linje i bufferen.
Du kan gå til de andre filer med ":next"-kommandoen. Skriv "\-\-" foran
fillisten, for at redigere en fil som begynder med en bindestreg.
.TP
\-
Filen som skal redigeres læses fra stdin. Kommandoer læses fra stderr, hvilket
skal være en tty.
.TP
\-t {tag}
Filen som skal redigeres og den indledende markørplacering afhænger af
et "tag", en slags gå til-etiket.
{tag} opslås i tags-filen, den tilknyttede fil bliver den nuværende
fil og den tilknyttede kommando udføres.
Det bruges mest til C-programmer, hvor {tag} kunne være et
funktionsnavn.
Virkningen er at filen som indeholder funktionen bliver den nuværende fil
og markøren placeres i begyndelsen af funktionen.
Se ":help tag\-commands".
.TP
\-q [fejlfil]
Start i quickFix-tilstand.
Filen [fejlfil] læses og den første fejl vises.
Hvis [fejlfil] udelades, så indhentes filnavnet fra 'errorfile'-valgmuligheden
(standard er "AztecC.Err" på Amiga, "errors.err" på andre
systemer).
Der kan hoppes til yderligere fejl med ":cn"-kommandoen.
Se ":help quickfix".
.PP
.B Vim
opfører sig anderledes, afhængig af navnet på kommandoen (eksekverbaren kan
stadig være den samme fil).
.TP 10
vim
Den "normale" måde, alt er standard.
.TP
ex
Start i Ex-tilstand.
Gå til normal tilstand med ":vi"-kommandoen.
Det kan også gøres med "\-e"-argumentet.
.TP
view
Start i skrivebeskyttet tilstand. Du vil være beskyttet mod at skrive filerne.
Det kan også gøres med "\-R"-argumentet.
.TP
gvim gview
GUI-versionen.
Starter et nyt vindue.
Det kan også gøres med "\-g"-argumentet.
.TP
evim eview
GUI-versionen i easy-tilstand.
Starter et nyt vindue.
Det kan også gøres med "\-y"-argumentet.
.TP
rvim rview rgvim rgview
Som dem ovenfor, men med restriktioner. Det vil ikke være muligt at starte
skalkommandoer, eller at suspendere
.B Vim\c
\&.
Det kan også gøres med "\-Z"-argumentet.
.SH TILVALG
Tilvalgene kan gives i vilkårlig rækkefølge, før eller efter filnavnene.
Tilvalg uden et argument kan kombineres efter en enkelt bindestreg.
.TP 12
+[nummer]
Ved den første fil, placeres markøren på linje "nummer".
Hvis "nummer" mangler, så placeres markøren på den sidste linje.
.TP
+/{sti}
Ved den første fil, placeres markøren på linjen med den
første forekomst af {sti}.
Se ":help search\-pattern" for tilgængelige søgemønstre.
.TP
+{kommando}
.TP
\-c {kommando}
{kommando} udføres efter den første fil er blevet læst.
{kommando} fortolkes som en Ex-kommando.
Hvis {kommando} indeholder mellemrum, så skal den omsluttes af
dobbelte citationstegn (det afhænger af den skal der bruges).
Eksempel: Vim "+set si" main.c
.br
Bemærk: Du kan bruge op til 10 "+"- eller "\-c"-kommandoer.
.TP
\-S {fil}
{fil} bliver sourced efter den første fil er blevet læst.
Det svarer til \-c "source {fil}".
{fil} må ikke begynde med '\-'.
Hvis {fil} udelades, så bruges "Session.vim" (virker kun når \-S er det sidste
argument).
.TP
\-\-cmd {kommando}
Ligesom at bruge "\-c", men kommandoen udføres lige inden
behandlingen af vimrc-filer.
Du kan bruge op til 10 af disse kommandoer, uafhængigt af "\-c"-kommandoer.
.TP
\-A
Hvis
.B Vim
blev kompileret med understøttelse af ARABIC til redigering af filer som er
orienteret højre mod venstre og arabisk tastaturlayout, så starter tilvalget
.B Vim
i arabisk tilstand, dvs. 'arabic' sættes.
Ellers gives en fejlmeddelelse og
.B Vim
afbrydes.
.TP
\-b
Binær tilstand.
Der sættes nogle få valgmuligheder som gør det muligt at redigere en
binær eller eksekverbar fil.
.TP
\-C
Kompatibel. Sæt 'compatible'-valgmuligheden.
Det får
.B Vim
til at opføre sig mest som Vi, selvom der findes en .vimrc-fil.
.TP
\-d
Start i diff-tilstand.
Der skal være to, tre eller fire filnavneargumenter.
.B Vim
åbner alle filerne og viser forskellene mellem dem.
Virker ligesom vimdiff(1).
.TP
\-d {enhed}
Åbn {enhed} til brug som en terminal.
Kun på Amiga.
Eksempel:
"\-d con:20/30/600/150".
.TP
\-D
Fejlretning. Gå til fejlretningstilstand når den første kommando udføres fra
et script.
.TP
\-e
Start
.B Vim
i Ex-tilstand, ligesom hvis "ex"-eksekverbaren blev kaldt.
.TP
\-E
Start
.B Vim
i forbedret Ex-tilstand, ligesom hvis "exim"-eksekverbaren blev kaldt.
.TP
\-f
Forgrund. I GUI-versionen, vil
.B Vim
ikke fork'e og frigøre fra skallen som den blev startet i.
På Amiga, genstartes
.B Vim
ikke for at åbne et nyt vindue.
Tilvalget bør bruges når
.B Vim
udføres af et program der venter på at redigeringssession
bliver færdig (f.eks. mail).
På Amiga virker ":sh"- og ":!"-kommandoerne ikke.
.TP
\-\-nofork
Forgrund. I GUI-versionen, vil
.B Vim
ikke fork'e og frigøre fra skallen som den blev startet i.
.TP
\-F
Hvis
.B Vim
blev kompileret med understøttelse af FKMAP til redigering af filer som er
orienteret højre mod venstre og persisk tastaturlayout, så starter tilvalget
.B Vim
i persisk tilstand, dvs. 'fkmap' og 'rightleft' sættes.
Ellers gives en fejlmeddelelse og
.B Vim
afbrydes.
.TP
\-g
Hvis
.B Vim
blev kompileret med understøttelse af GUI, så aktiveres GUI'en af
denne valgmulighed. Hvis understøttelse af GUI ikke blev kompileret ind,
så gives en fejlmeddelelse og
.B Vim
afbrydes.
.TP
\-h
Giv lidt hjælp om kommandolinjeargumenterne og tilvalgene.
Herefter afsluttes
.B Vim\c
\&.
.TP
\-H
Hvis
.B Vim
blev kompileret med understøttelse af RIGHTLEFT til redigering af filer som er
orienteret højre mod venstre og hebraisk tastaturlayout, så starter tilvalget
.B Vim
i hebraisk tilstand, dvs. 'hkmap' og 'rightleft' sættes.
Ellers gives en fejlmeddelelse og
.B Vim
afbrydes.
.TP
\-i {viminfo}
Når brug af viminfo-filen er aktiveret, så sætter tilvalget det
filnavn som skal bruges, i stedet for standarden "~/.viminfo".
Det kan også bruges til at springe brugen af .viminfo-filen over,
ved at give navnet "NONE".
.TP
\-L
Samme som \-r.
.TP
\-l
Lisp-tilstand.
Sætter 'lisp'- og 'showmatch'-valgmulighederne til.
.TP
\-m
Ændring af filer er deaktiveret.
Nulstiller 'write'-valgmuligheden.
Du kan stadig ændre bufferen, men det er ikke muligt at skrive en fil.
.TP
\-M
Ændringer tillades ikke. 'modifiable'- og 'write'-valgmulighederne fjernes,
så ændringer ikke er tilladt og filer ikke kan skrives. Bemærk at
valgmulighederne kan sættes for at gøre det muligt at foretage ændringer.
.TP
\-N
No-compatible-tilstand. Nulstil 'compatible'-valgmuligheden.
Det får
.B Vim
til at opføre sig en smule bedre, men mindre Vi-kompatibel, selvom der ikke
findes en .vimrc-fil.
.TP
\-n
Der bruges ingen swap-fil.
Det er umuligt at gendanne efter programmet er holdt op med at virke.
God hvis du vil redigere en fil på et meget langsomt medie (f.eks. floppy).
Kan også gøres med ":set uc=0".
Kan fortrydes med ":set uc=200".
.TP
\-nb
Bliv en editor-server til NetBeans. Se dokumentationen for detaljer.
.TP
\-o[N]
Åbn N vinduer stablet.
Når N udelades, så åbnes ét vindue pr. fil.
.TP
\-O[N]
Åbn N vinduer side om side.
Når N udelades, så åbnes ét vindue pr. fil.
.TP
\-p[N]
Åbn N fanebladssider.
Når N udelades, så åbnes én fanebladsside pr. fil.
.TP
\-R
Skrivebeskyttet tilstand.
'readonly'-valgmuligheden sættes.
Du kan stadig redigere bufferen, men vil være forhindret i
fejlagtigt at overskrive en fil.
Hvis du vil overskrive en fil, så tilføj et
udråbstegn til Ex-kommandoen, som i ":w!".
\-R-tilvalget indebærer også \-n-tilvalget (se ovenfor).
'readonly'-valgmuligheden kan slås fra med ":set noro".
Se ":help 'readonly'".
.TP
\-r
Oplist swap-filer, med information om at bruge dem til gendannelse.
.TP
\-r {fil}
Gendannelsestilstand.
Swap-filen bruges til at gendanne en redigeringssession som holdt
op med at virke. Swap-filen er en fil med det samme filnavn som tekstfilen,
med ".swp" tilføjet i slutningen.
Se ":help recovery".
.TP
\-s
Stille tilstand. Kun når der startes som "Ex" eller
når "\-e"-tilvalget blev givet inden "\-s"-tilvalget.
.TP
\-s {scriptind}
Script-filen {scriptind} læses.
Tegnene i filen fortolkes som havde du skrevet dem.
Det samme kan gøres med kommandoen ":source! {scriptind}".
Hvis slutningen af filen nås inden editoren afslutter,
så læses yderligere tegn fra tastaturet.
.TP
\-T {terminal}
Fortæller
.B Vim
navnet på terminalen som du bruger.
Kræves kun når den automatisk måde ikke virker.
Skal være en terminal som kendes af
.B Vim
(indbygget) eller defineret i termcap- eller terminfo-filen.
.TP
\-u {vimrc}
Brug kommandoerne i {vimrc}-filen til initialiseringer.
Alle de andre initialiseringer springes over.
Brug den til at redigere en særlig slags filer.
Den kan også bruges til at springe alle initialiseringer over,
ved at give navnet "NONE". Se ":help initialization" i vim for flere detaljer.
.TP
\-U {gvimrc}
Brug kommandoerne i {gvimrc}-filen til GUI-initialiseringer.
Alle de andre GUI-initialiseringer springes over.
Den kan også bruges til at springe alle GUI-initialiseringer over,
ved at give navnet "NONE". Se ":help gui\-init" i vim for flere detaljer.
.TP
\-V[N]
Uddybende. Giv meddelelser om hvilke filer som er sourced og til læsning og
skrivning af en viminfo-fil. Det valgfrie nummer N er værdien af 'verbose'.
Standard er 10.
.TP
\-v
Start
.B Vim
i Vi-tilstand, ligesom eksekverbaren kaldet "vi". Det har kun virkning når
eksekverbaren kaldes "ex".
.TP
\-w {scriptud}
Alle tegnene som du skrev optages i filen {scriptud}, indtil du afslutter
.B Vim\c
\&.
Det er nyttigt hvis du vil oprette en script-fil som skal bruges med
"vim \-s" eller ":source!".
Hvis {scriptud}-filen findes, så tilføjes tegnene til slutningen.
.TP
\-W {scriptud}
Ligesom \-w, men en eksisterende fil overskrives.
.TP
\-x
Brug kryptering når der skrives filer. Spørger efter en krypteringsnøgle.
.TP
\-X
Opret ikke forbindelse til X-serveren. Afkorter opstartstiden i en terminal,
men vinduets titel og udklipsholder bruges ikke.
.TP
\-y
Start
.B Vim
i easy-tilstand, ligesom hvis "evim"- eller "eview"-eksekverbarene blev kaldt.
Får
.B Vim
til at opføre sig som en klik og skriv-editor.
.TP
\-Z
Restriktiv tilstand. Virker ligesom eksekverbaren som begynder med "r".
.TP
\-\-
Betegner slutningen af tilvalgene.
Argumenter efter dette håndteres som et filnavn.
Det kan bruges til at redigere et filnavn som begynder med et '\-'.
.TP
\-\-echo\-wid
Kun GTK GUI: Ekko vinduets id på stdout.
.TP
\-\-help
Giv en hjælpemeddelelse og afslut, ligesom "\-h".
.TP
\-\-literal
Tag filnavnets argumenter bogstaveligt, udvid ikke jokertegn.
Det har ingen virkning i Unix hvor skallen udvidder jokertegn.
.TP
\-\-noplugin
Spring indlæsning af plugins over. Indebæres af \-u NONE.
.TP
\-\-remote
Opret forbindelse til en Vim-server og få den til at redigere filerne
som gives i resten af argumenterne. Hvis der ikke findes nogen server,
så gives der en advarsel og filerne redigeres i den nuværende Vim.
.TP
\-\-remote\-expr {udtryk}
Opret forbindelse til en Vim-server, evaluer
{udtryk} i den og udskriv resultatet på stdout.
.TP
\-\-remote\-send {nøgler}
Opret forbindelse til en Vim-server and send {nøgler} til den.
.TP
\-\-remote\-silent
Som \-\-remote, men uden advarslen når der ikke findes nogen server.
.TP
\-\-remote\-wait
Som \-\-remote, men Vim afslutter ikke før filerne er blevet redigeret.
.TP
\-\-remote\-wait\-silent
Som \-\-remote\-wait, men uden advarslen når der ikke findes nogen server.
.TP
\-\-serverlist
Oplist navnene på alle Vim-servere som der kan findes.
.TP
\-\-servername {navn}
Brug servernavnet {navn}. Bruges til den nuværende Vim,
medmindre det bruges med et \-\-remote-argument,
så er det navnet på serveren som der skal oprettes forbindelse til.
.TP
\-\-socketid {id}
Kun GTK GUI: Brug GtkPlug-mekanismen til at køre gvim i et andet vindue.
.TP
\-\-version
Udskriv versionsinformation og afslut.
.SH ONLINEHJÆLP
Skriv ":help" i
.B Vim
for at begynde.
Skriv ":help emne" for at få hjælp til et bestemt emne.
F.eks.: ":help ZZ" for at få hjælpe til "ZZ"-kommandoen.
Brug <Tab> og CTRL-D for at fuldføre emner (":help cmdline\-completion").
Tags findes til at hoppe fra et sted til et andet (en slags hypertekst-links,
se ":help").
Alle dokumentationsfiler kan vises på denne måde, f.eks.
":help syntax.txt".
.SH FILER
.TP 15
/usr/local/lib/vim/doc/*.txt
.B Vim\c
-dokumentationsfilerne.
Brug ":help doc\-file\-list" for at få den fulde liste.
.TP
/usr/local/lib/vim/doc/tags
Tags-filen som bruges til at finde information i dokumentationsfilerne.
.TP
/usr/local/lib/vim/syntax/syntax.vim
Systembrede syntaksinitialiseringer.
.TP
/usr/local/lib/vim/syntax/*.vim
Syntaksfiler til diverse sprog.
.TP
/usr/local/lib/vim/vimrc
Systembrede
.B Vim\c
-initialiseringer.
.TP
~/.vimrc
Dine personlige
.B Vim\c
-initialiseringer.
.TP
/usr/local/lib/vim/gvimrc
Systembrede gvim-initialiseringer.
.TP
~/.gvimrc
Dine personlige gvim-initialiseringer.
.TP
/usr/local/lib/vim/optwin.vim
Script som bruges til ":options"-kommandoen,
en god måde til at vise og sætte valgmuligheder.
.TP
/usr/local/lib/vim/menu.vim
Systembrede menu-initialiseringer til gvim.
.TP
/usr/local/lib/vim/bugreport.vim
Script til at generere en fejlrapport. Se ":help bugs".
.TP
/usr/local/lib/vim/filetype.vim
Script til at registrere filtypen ud fra navnet. Se ":help 'filetype'".
.TP
/usr/local/lib/vim/scripts.vim
Script til at registrere filtypen ud fra indholdet. Se ":help 'filetype'".
.TP
/usr/local/lib/vim/print/*.ps
Filer som bruges til PostScript-udskrivning.
.PP
Læs VIM-hjemmesiden for seneste info:
.br
<URL:http://www.vim.org/>
.SH SE OGSÅ
vimtutor(1)
.SH FORFATTER
Det meste af
.B Vim
blev lavet af Bram Moolenaar, med en masse hjælp fra andre.
Se ":help credits" i
.B Vim\c
\&.
.br
.B Vim
er baseret på Stevie, arbejdet på af: Tim Thompson,
Tony Andrews og G.R. (Fred) Walter.
Selvom der næsten ikke er noget af den originale kode tilbage.
.SH FEJL
Formodentligt.
Se ":help todo" for en liste over kendte problemer.
.PP
Bemærk at flere ting som af nogle kan anses som værende fejl,
faktisk er pga. en for nær reproduktion af Vi's opførsel.
Og hvis du tænker at andre ting er fejl "fordi Vi gør det anderledes",
så kig nærmere på vi_diff.txt-filen (eller skriv :help vi_diff.txt i Vim).
Se også 'compatible'- og 'cpoptions'-valgmulighederne.
+555
View File
@@ -0,0 +1,555 @@
.TH VIM 1 "11. april 2006"
.SH NAVN
vim \- Vi IMproved, en programmørs teksteditor
.SH SYNOPSIS
.br
.B vim
[tilvalg] [fil ..]
.br
.B vim
[tilvalg] \-
.br
.B vim
[tilvalg] \-t tag
.br
.B vim
[tilvalg] \-q [fejlfil]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.B evim
.B eview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH BESKRIVELSE
.B Vim
er en teksteditor som er opad kompatibel med Vi.
Den kan bruges til at redigere alle slags ren tekst.
Den er særlig nyttig til at redigere programmer.
.PP
Der er mange forbedringer over Vi: multiniveau fortryd,
multivinduer og -buffere, syntaksfremhævning, redigering af kommandolinje,
fuldførelse af filnavn, onlinehjælp, visuel markering, osv.
Se ":help vi_diff.txt" for et overblik over forskellene mellem
.B Vim
og Vi.
.PP
Mens
.B Vim
kører, kan der indhentes massere af hjælp fra online-hjælpesystemet, med
":help"-kommandoen.
Se ONLINEHJÆLP-sektionen nedenfor.
.PP
Oftest startes
.B Vim
for at redigere en enkelt fil med kommandoen
.PP
vim fil
.PP
Mere generelt startes
.B Vim
med:
.PP
vim [tilvalg] [filliste]
.PP
Hvis fillisten mangler, så startes editoren med en tom buffer.
Ellers kan én af følgende fire måder bruges til at vælge en eller
flere filer som skal redigeres.
.TP 12
fil ..
En liste over filnavne.
Den første bliver den nuværende fil og læses ind i bufferen.
Markøren placeres på den første linje i bufferen.
Du kan gå til de andre filer med ":next"-kommandoen. Skriv "\-\-" foran
fillisten, for at redigere en fil som begynder med en bindestreg.
.TP
\-
Filen som skal redigeres læses fra stdin. Kommandoer læses fra stderr, hvilket
skal være en tty.
.TP
\-t {tag}
Filen som skal redigeres og den indledende markørplacering afhænger af
et "tag", en slags gå til-etiket.
{tag} opslås i tags-filen, den tilknyttede fil bliver den nuværende
fil og den tilknyttede kommando udføres.
Det bruges mest til C-programmer, hvor {tag} kunne være et
funktionsnavn.
Virkningen er at filen som indeholder funktionen bliver den nuværende fil
og markøren placeres i begyndelsen af funktionen.
Se ":help tag\-commands".
.TP
\-q [fejlfil]
Start i quickFix-tilstand.
Filen [fejlfil] læses og den første fejl vises.
Hvis [fejlfil] udelades, så indhentes filnavnet fra 'errorfile'-valgmuligheden
(standard er "AztecC.Err" på Amiga, "errors.err" på andre
systemer).
Der kan hoppes til yderligere fejl med ":cn"-kommandoen.
Se ":help quickfix".
.PP
.B Vim
opfører sig anderledes, afhængig af navnet på kommandoen (eksekverbaren kan
stadig være den samme fil).
.TP 10
vim
Den "normale" måde, alt er standard.
.TP
ex
Start i Ex-tilstand.
Gå til normal tilstand med ":vi"-kommandoen.
Det kan også gøres med "\-e"-argumentet.
.TP
view
Start i skrivebeskyttet tilstand. Du vil være beskyttet mod at skrive filerne.
Det kan også gøres med "\-R"-argumentet.
.TP
gvim gview
GUI-versionen.
Starter et nyt vindue.
Det kan også gøres med "\-g"-argumentet.
.TP
evim eview
GUI-versionen i easy-tilstand.
Starter et nyt vindue.
Det kan også gøres med "\-y"-argumentet.
.TP
rvim rview rgvim rgview
Som dem ovenfor, men med restriktioner. Det vil ikke være muligt at starte
skalkommandoer, eller at suspendere
.B Vim\c
\&.
Det kan også gøres med "\-Z"-argumentet.
.SH TILVALG
Tilvalgene kan gives i vilkårlig rækkefølge, før eller efter filnavnene.
Tilvalg uden et argument kan kombineres efter en enkelt bindestreg.
.TP 12
+[nummer]
Ved den første fil, placeres markøren på linje "nummer".
Hvis "nummer" mangler, så placeres markøren på den sidste linje.
.TP
+/{sti}
Ved den første fil, placeres markøren på linjen med den
første forekomst af {sti}.
Se ":help search\-pattern" for tilgængelige søgemønstre.
.TP
+{kommando}
.TP
\-c {kommando}
{kommando} udføres efter den første fil er blevet læst.
{kommando} fortolkes som en Ex-kommando.
Hvis {kommando} indeholder mellemrum, så skal den omsluttes af
dobbelte citationstegn (det afhænger af den skal der bruges).
Eksempel: Vim "+set si" main.c
.br
Bemærk: Du kan bruge op til 10 "+"- eller "\-c"-kommandoer.
.TP
\-S {fil}
{fil} bliver sourced efter den første fil er blevet læst.
Det svarer til \-c "source {fil}".
{fil} må ikke begynde med '\-'.
Hvis {fil} udelades, så bruges "Session.vim" (virker kun når \-S er det sidste
argument).
.TP
\-\-cmd {kommando}
Ligesom at bruge "\-c", men kommandoen udføres lige inden
behandlingen af vimrc-filer.
Du kan bruge op til 10 af disse kommandoer, uafhængigt af "\-c"-kommandoer.
.TP
\-A
Hvis
.B Vim
blev kompileret med understøttelse af ARABIC til redigering af filer som er
orienteret højre mod venstre og arabisk tastaturlayout, så starter tilvalget
.B Vim
i arabisk tilstand, dvs. 'arabic' sættes.
Ellers gives en fejlmeddelelse og
.B Vim
afbrydes.
.TP
\-b
Binær tilstand.
Der sættes nogle få valgmuligheder som gør det muligt at redigere en
binær eller eksekverbar fil.
.TP
\-C
Kompatibel. Sæt 'compatible'-valgmuligheden.
Det får
.B Vim
til at opføre sig mest som Vi, selvom der findes en .vimrc-fil.
.TP
\-d
Start i diff-tilstand.
Der skal være to, tre eller fire filnavneargumenter.
.B Vim
åbner alle filerne og viser forskellene mellem dem.
Virker ligesom vimdiff(1).
.TP
\-d {enhed}
Åbn {enhed} til brug som en terminal.
Kun på Amiga.
Eksempel:
"\-d con:20/30/600/150".
.TP
\-D
Fejlretning. Gå til fejlretningstilstand når den første kommando udføres fra
et script.
.TP
\-e
Start
.B Vim
i Ex-tilstand, ligesom hvis "ex"-eksekverbaren blev kaldt.
.TP
\-E
Start
.B Vim
i forbedret Ex-tilstand, ligesom hvis "exim"-eksekverbaren blev kaldt.
.TP
\-f
Forgrund. I GUI-versionen, vil
.B Vim
ikke fork'e og frigøre fra skallen som den blev startet i.
På Amiga, genstartes
.B Vim
ikke for at åbne et nyt vindue.
Tilvalget bør bruges når
.B Vim
udføres af et program der venter på at redigeringssession
bliver færdig (f.eks. mail).
På Amiga virker ":sh"- og ":!"-kommandoerne ikke.
.TP
\-\-nofork
Forgrund. I GUI-versionen, vil
.B Vim
ikke fork'e og frigøre fra skallen som den blev startet i.
.TP
\-F
Hvis
.B Vim
blev kompileret med understøttelse af FKMAP til redigering af filer som er
orienteret højre mod venstre og persisk tastaturlayout, så starter tilvalget
.B Vim
i persisk tilstand, dvs. 'fkmap' og 'rightleft' sættes.
Ellers gives en fejlmeddelelse og
.B Vim
afbrydes.
.TP
\-g
Hvis
.B Vim
blev kompileret med understøttelse af GUI, så aktiveres GUI'en af
denne valgmulighed. Hvis understøttelse af GUI ikke blev kompileret ind,
så gives en fejlmeddelelse og
.B Vim
afbrydes.
.TP
\-h
Giv lidt hjælp om kommandolinjeargumenterne og tilvalgene.
Herefter afsluttes
.B Vim\c
\&.
.TP
\-H
Hvis
.B Vim
blev kompileret med understøttelse af RIGHTLEFT til redigering af filer som er
orienteret højre mod venstre og hebraisk tastaturlayout, så starter tilvalget
.B Vim
i hebraisk tilstand, dvs. 'hkmap' og 'rightleft' sættes.
Ellers gives en fejlmeddelelse og
.B Vim
afbrydes.
.TP
\-i {viminfo}
Når brug af viminfo-filen er aktiveret, så sætter tilvalget det
filnavn som skal bruges, i stedet for standarden "~/.viminfo".
Det kan også bruges til at springe brugen af .viminfo-filen over,
ved at give navnet "NONE".
.TP
\-L
Samme som \-r.
.TP
\-l
Lisp-tilstand.
Sætter 'lisp'- og 'showmatch'-valgmulighederne til.
.TP
\-m
Ændring af filer er deaktiveret.
Nulstiller 'write'-valgmuligheden.
Du kan stadig ændre bufferen, men det er ikke muligt at skrive en fil.
.TP
\-M
Ændringer tillades ikke. 'modifiable'- og 'write'-valgmulighederne fjernes,
så ændringer ikke er tilladt og filer ikke kan skrives. Bemærk at
valgmulighederne kan sættes for at gøre det muligt at foretage ændringer.
.TP
\-N
No-compatible-tilstand. Nulstil 'compatible'-valgmuligheden.
Det får
.B Vim
til at opføre sig en smule bedre, men mindre Vi-kompatibel, selvom der ikke
findes en .vimrc-fil.
.TP
\-n
Der bruges ingen swap-fil.
Det er umuligt at gendanne efter programmet er holdt op med at virke.
God hvis du vil redigere en fil på et meget langsomt medie (f.eks. floppy).
Kan også gøres med ":set uc=0".
Kan fortrydes med ":set uc=200".
.TP
\-nb
Bliv en editor-server til NetBeans. Se dokumentationen for detaljer.
.TP
\-o[N]
Åbn N vinduer stablet.
Når N udelades, så åbnes ét vindue pr. fil.
.TP
\-O[N]
Åbn N vinduer side om side.
Når N udelades, så åbnes ét vindue pr. fil.
.TP
\-p[N]
Åbn N fanebladssider.
Når N udelades, så åbnes én fanebladsside pr. fil.
.TP
\-R
Skrivebeskyttet tilstand.
'readonly'-valgmuligheden sættes.
Du kan stadig redigere bufferen, men vil være forhindret i
fejlagtigt at overskrive en fil.
Hvis du vil overskrive en fil, så tilføj et
udråbstegn til Ex-kommandoen, som i ":w!".
\-R-tilvalget indebærer også \-n-tilvalget (se ovenfor).
'readonly'-valgmuligheden kan slås fra med ":set noro".
Se ":help 'readonly'".
.TP
\-r
Oplist swap-filer, med information om at bruge dem til gendannelse.
.TP
\-r {fil}
Gendannelsestilstand.
Swap-filen bruges til at gendanne en redigeringssession som holdt
op med at virke. Swap-filen er en fil med det samme filnavn som tekstfilen,
med ".swp" tilføjet i slutningen.
Se ":help recovery".
.TP
\-s
Stille tilstand. Kun når der startes som "Ex" eller
når "\-e"-tilvalget blev givet inden "\-s"-tilvalget.
.TP
\-s {scriptind}
Script-filen {scriptind} læses.
Tegnene i filen fortolkes som havde du skrevet dem.
Det samme kan gøres med kommandoen ":source! {scriptind}".
Hvis slutningen af filen nås inden editoren afslutter,
så læses yderligere tegn fra tastaturet.
.TP
\-T {terminal}
Fortæller
.B Vim
navnet på terminalen som du bruger.
Kræves kun når den automatisk måde ikke virker.
Skal være en terminal som kendes af
.B Vim
(indbygget) eller defineret i termcap- eller terminfo-filen.
.TP
\-u {vimrc}
Brug kommandoerne i {vimrc}-filen til initialiseringer.
Alle de andre initialiseringer springes over.
Brug den til at redigere en særlig slags filer.
Den kan også bruges til at springe alle initialiseringer over,
ved at give navnet "NONE". Se ":help initialization" i vim for flere detaljer.
.TP
\-U {gvimrc}
Brug kommandoerne i {gvimrc}-filen til GUI-initialiseringer.
Alle de andre GUI-initialiseringer springes over.
Den kan også bruges til at springe alle GUI-initialiseringer over,
ved at give navnet "NONE". Se ":help gui\-init" i vim for flere detaljer.
.TP
\-V[N]
Uddybende. Giv meddelelser om hvilke filer som er sourced og til læsning og
skrivning af en viminfo-fil. Det valgfrie nummer N er værdien af 'verbose'.
Standard er 10.
.TP
\-v
Start
.B Vim
i Vi-tilstand, ligesom eksekverbaren kaldet "vi". Det har kun virkning når
eksekverbaren kaldes "ex".
.TP
\-w {scriptud}
Alle tegnene som du skrev optages i filen {scriptud}, indtil du afslutter
.B Vim\c
\&.
Det er nyttigt hvis du vil oprette en script-fil som skal bruges med
"vim \-s" eller ":source!".
Hvis {scriptud}-filen findes, så tilføjes tegnene til slutningen.
.TP
\-W {scriptud}
Ligesom \-w, men en eksisterende fil overskrives.
.TP
\-x
Brug kryptering når der skrives filer. Spørger efter en krypteringsnøgle.
.TP
\-X
Opret ikke forbindelse til X-serveren. Afkorter opstartstiden i en terminal,
men vinduets titel og udklipsholder bruges ikke.
.TP
\-y
Start
.B Vim
i easy-tilstand, ligesom hvis "evim"- eller "eview"-eksekverbarene blev kaldt.
Får
.B Vim
til at opføre sig som en klik og skriv-editor.
.TP
\-Z
Restriktiv tilstand. Virker ligesom eksekverbaren som begynder med "r".
.TP
\-\-
Betegner slutningen af tilvalgene.
Argumenter efter dette håndteres som et filnavn.
Det kan bruges til at redigere et filnavn som begynder med et '\-'.
.TP
\-\-echo\-wid
Kun GTK GUI: Ekko vinduets id på stdout.
.TP
\-\-help
Giv en hjælpemeddelelse og afslut, ligesom "\-h".
.TP
\-\-literal
Tag filnavnets argumenter bogstaveligt, udvid ikke jokertegn.
Det har ingen virkning i Unix hvor skallen udvidder jokertegn.
.TP
\-\-noplugin
Spring indlæsning af plugins over. Indebæres af \-u NONE.
.TP
\-\-remote
Opret forbindelse til en Vim-server og få den til at redigere filerne
som gives i resten af argumenterne. Hvis der ikke findes nogen server,
så gives der en advarsel og filerne redigeres i den nuværende Vim.
.TP
\-\-remote\-expr {udtryk}
Opret forbindelse til en Vim-server, evaluer
{udtryk} i den og udskriv resultatet på stdout.
.TP
\-\-remote\-send {nøgler}
Opret forbindelse til en Vim-server and send {nøgler} til den.
.TP
\-\-remote\-silent
Som \-\-remote, men uden advarslen når der ikke findes nogen server.
.TP
\-\-remote\-wait
Som \-\-remote, men Vim afslutter ikke før filerne er blevet redigeret.
.TP
\-\-remote\-wait\-silent
Som \-\-remote\-wait, men uden advarslen når der ikke findes nogen server.
.TP
\-\-serverlist
Oplist navnene på alle Vim-servere som der kan findes.
.TP
\-\-servername {navn}
Brug servernavnet {navn}. Bruges til den nuværende Vim,
medmindre det bruges med et \-\-remote-argument,
så er det navnet på serveren som der skal oprettes forbindelse til.
.TP
\-\-socketid {id}
Kun GTK GUI: Brug GtkPlug-mekanismen til at køre gvim i et andet vindue.
.TP
\-\-version
Udskriv versionsinformation og afslut.
.SH ONLINEHJÆLP
Skriv ":help" i
.B Vim
for at begynde.
Skriv ":help emne" for at få hjælp til et bestemt emne.
F.eks.: ":help ZZ" for at få hjælpe til "ZZ"-kommandoen.
Brug <Tab> og CTRL-D for at fuldføre emner (":help cmdline\-completion").
Tags findes til at hoppe fra et sted til et andet (en slags hypertekst-links,
se ":help").
Alle dokumentationsfiler kan vises på denne måde, f.eks.
":help syntax.txt".
.SH FILER
.TP 15
/usr/local/lib/vim/doc/*.txt
.B Vim\c
-dokumentationsfilerne.
Brug ":help doc\-file\-list" for at få den fulde liste.
.TP
/usr/local/lib/vim/doc/tags
Tags-filen som bruges til at finde information i dokumentationsfilerne.
.TP
/usr/local/lib/vim/syntax/syntax.vim
Systembrede syntaksinitialiseringer.
.TP
/usr/local/lib/vim/syntax/*.vim
Syntaksfiler til diverse sprog.
.TP
/usr/local/lib/vim/vimrc
Systembrede
.B Vim\c
-initialiseringer.
.TP
~/.vimrc
Dine personlige
.B Vim\c
-initialiseringer.
.TP
/usr/local/lib/vim/gvimrc
Systembrede gvim-initialiseringer.
.TP
~/.gvimrc
Dine personlige gvim-initialiseringer.
.TP
/usr/local/lib/vim/optwin.vim
Script som bruges til ":options"-kommandoen,
en god måde til at vise og sætte valgmuligheder.
.TP
/usr/local/lib/vim/menu.vim
Systembrede menu-initialiseringer til gvim.
.TP
/usr/local/lib/vim/bugreport.vim
Script til at generere en fejlrapport. Se ":help bugs".
.TP
/usr/local/lib/vim/filetype.vim
Script til at registrere filtypen ud fra navnet. Se ":help 'filetype'".
.TP
/usr/local/lib/vim/scripts.vim
Script til at registrere filtypen ud fra indholdet. Se ":help 'filetype'".
.TP
/usr/local/lib/vim/print/*.ps
Filer som bruges til PostScript-udskrivning.
.PP
Læs VIM-hjemmesiden for seneste info:
.br
<URL:http://www.vim.org/>
.SH SE OGSÅ
vimtutor(1)
.SH FORFATTER
Det meste af
.B Vim
blev lavet af Bram Moolenaar, med en masse hjælp fra andre.
Se ":help credits" i
.B Vim\c
\&.
.br
.B Vim
er baseret på Stevie, arbejdet på af: Tim Thompson,
Tony Andrews og G.R. (Fred) Walter.
Selvom der næsten ikke er noget af den originale kode tilbage.
.SH FEJL
Formodentligt.
Se ":help todo" for en liste over kendte problemer.
.PP
Bemærk at flere ting som af nogle kan anses som værende fejl,
faktisk er pga. en for nær reproduktion af Vi's opførsel.
Og hvis du tænker at andre ting er fejl "fordi Vi gør det anderledes",
så kig nærmere på vi_diff.txt-filen (eller skriv :help vi_diff.txt i Vim).
Se også 'compatible'- og 'cpoptions'-valgmulighederne.
+45 -60
View File
@@ -36,8 +36,7 @@ vim \- Vi IMproved, プログラマのテキストエディタ
特に、プログラムの編集に力を発揮します。
.PP
Vi に多くの改良が加えられています:
多段アンドゥ、マルチウィンドウ、マルチバッファ、構文強調表示、
コマンドライン編集、ファイル名補完、ヘルプ、ビジュアル選択、などなど。
多段アンドゥ、マルチウィンドウ、マルチバッファ、構文強調表示、コマンドライン編集、ファイル名補完、ヘルプ、ビジュアル選択、などなど。
.B Vim
と Vi の違いについての要約は ":help vi_diff.txt" を参照してください。
.PP
@@ -66,24 +65,23 @@ file ..
filelist の前に "\-\-" を指定してください。
.TP
\-
ファイルは標準入力から読み込まれます。コマンドは標準エラー (ttyからの入
力になっているはず) から読み込まれます。
ファイルは標準入力から読み込まれます。コマンドは標準エラー
(ttyからの入力になっているはず) から読み込まれます。
.TP
\-t {tag}
開くファイルとカーソルの初期位置は "tag" に依存します。goto label の一種です。
tags ファイルから {tag} が検索され、関連したファイルがカレントファイルになり
ます。そして、関連したコマンドが実行されます。
これは主に C 言語のファイルを開くときに使われます。その場合 {tag} に関数など
を指定して使います。
関数を含んでいるファイルが開かれ、その関数の先頭にカーソルが移動する、
という動作になります。
tags ファイルから {tag} が検索され、関連したファイルがカレントファイルになります。
そして、関連したコマンドが実行されます。
これは主に C 言語のファイルを開くときに使われます。
その場合 {tag} に関数などを指定して使います。
関数を含んでいるファイルが開かれ、その関数の先頭にカーソルが移動する、という動作になります。
詳しくは ":help tag\-commands" を参照してください。
.TP
\-q [errorfile]
クイックフィックスモードで起動します。
[errorfile] に指定したファイルが読み込まれ、最初のエラーが表示されます。
[errorfile] を省略した場合は、オプション 'errorfile' が使われます (初期設定
は、Amiga では "AztecC.Err"、その他のシステムでは "errors.err" です)。
[errorfile] を省略した場合は、オプション 'errorfile' が使われます
(初期設定は、Amiga では "AztecC.Err"、その他のシステムでは "errors.err" です)。
":cn" コマンドで次のエラーにジャンプできます。
詳しくは ":help quickfix" を参照してください。
.PP
@@ -144,16 +142,15 @@ Note: "+" と "\-c" は合わせて 10 個まで指定できます。
一番目のファイルが読み込まれた後に {file} が実行されます。
これは \-c "source {file}" と同じ動作です。
{file} の先頭が '\-' の場合は使えません。
{file} が省略された場合は、"Session.vim" が使われます (ただし \-S が最後の引
数だった場合のみ)。
{file} が省略された場合は、"Session.vim" が使われます
(ただし \-S が最後の引数だった場合のみ)。
.TP
\-\-cmd {command}
"\-c" と同じですが、vimrc を処理する前にコマンドが実行されます。
これらのコマンドは "\-c" コマンドとは別に、10 個まで指定できます。
.TP
\-A
アラビア語がサポートされていて、アラビア語キーマップがある場合は、
アラビア語モードで起動します ('arabic' がオンになります)。
アラビア語がサポートされていて、アラビア語キーマップがある場合は、アラビア語モードで起動します ('arabic' がオンになります)。
右横書きのファイルを編集できます。
サポートされていない場合はエラーメッセージを表示して終了します。
.TP
@@ -180,8 +177,8 @@ Amiga でのみ使います。
"\-d con:20/30/600/150".
.TP
\-D
デバッグ。スクリプトの最初のコマンドが実行されるところからデバッグモードを開
始します。
デバッグ。
スクリプトの最初のコマンドが実行されるところからデバッグモードを開始します。
.TP
\-e
Ex モードで起動します。
@@ -203,8 +200,7 @@ Amiga では、":sh" と "!" コマンドは機能しなくなります。
フォアグラウンド。GUI バージョンで、プロセスをフォークしなくなります。
.TP
\-F
ペルシア語がサポートされていて、ペルシア語キーマップがある場合は、
ペルシア語モードで起動します ('fkmap' と 'rightleft' がオンになります)。
ペルシア語がサポートされていて、ペルシア語キーマップがある場合は、ペルシア語モードで起動します ('fkmap' と 'rightleft' がオンになります)。
右横書きのファイルを編集できます。
サポートされていない場合はエラーメッセージを表示して終了します。
.TP
@@ -216,14 +212,13 @@ GUI がサポートされている場合は、GUI で起動します。
コマンドライン引数やオプションのヘルプを表示して終了します。
.TP
\-H
ヘブライ語がサポートされていて、ヘブライ語キーマップがある場合は、
ヘブライ語モードで起動します ('hkmap' と 'rightleft' がオンになります)。
ヘブライ語がサポートされていて、ヘブライ語キーマップがある場合は、ヘブライ語モードで起動します ('hkmap' と 'rightleft' がオンになります)。
右横書きのファイルを編集できます。
サポートされていない場合はエラーメッセージを表示して終了します。
.TP
\-i {viminfo}
viminfo ファイルを使う設定になっている場合は、初期設定の "~/.viminfo" の代わ
りに、指定されたファイルを設定します。
viminfo ファイルを使う設定になっている場合は、初期設定の "~/.viminfo"
の代わりに、指定されたファイルを設定します。
"NONE" を指定すると、.viminfo ファイルを使わないように設定できます。
.TP
\-L
@@ -239,8 +234,8 @@ lisp モード。
バッファを変更することはできますが、ファイルを保存することはできません。
.TP
\-M
変更を不可能にします。オプションの 'modifiable' と 'write' がオフになり、
ファイルの変更と保存ができなくなります。
変更を不可能にします。
オプションの 'modifiable' と 'write' がオフになり、ファイルの変更と保存ができなくなります。
Note: それらのオプションを設定すれば変更できるようになります。
.TP
\-N
@@ -252,8 +247,7 @@ Note: それらのオプションを設定すれば変更できるようにな
\-n
スワップファイルを使用しません。
クラッシュしてもリカバリできなくなります。
フロッピーディスクのような非常に低速なメディアのファイルを読み書きするときに
便利です。
フロッピーディスクのような非常に低速なメディアのファイルを読み書きするときに便利です。
":set uc=0" と設定しても同じです。
戻すには ":set uc=200" と設定してください。
.TP
@@ -276,10 +270,8 @@ N を省略した場合は、引数のファイルを個別のタブページで
\-R
読み込み専用モード。
オプション 'readonly' がオンになります。
バッファを変更することはできますが、間違ってファイルを上書きしてしまうのを防
ぐことができます
ファイルを保存したい場合は、":w!" のように、Ex コマンドに感嘆符を付けてくだ
さい。
バッファを変更することはできますが、間違ってファイルを上書きしてしまうのを防ぐことができます。
ファイルを保存したい場合は、":w!" のように、Ex コマンドに感嘆符を付けてください
\-R オプションは \-n オプションの効果も含んでいます (上記参照)。
オプション 'readonly' は ":set noro" でオフにできます。
詳しくは ":help 'readonly'" を参照してください。
@@ -301,13 +293,13 @@ N を省略した場合は、引数のファイルを個別のタブページで
{scriptin} をスクリプトファイルとして読み込まれます。
ファイル中の文字列は、手で入力したときと同じように処理されます。
これは ":source! {scriptin}" と同じ動作です。
エディタが終了する前にファイルの終わりまで読み込んだ場合、
それ以降はキーボードから入力を読み込みます。
エディタが終了する前にファイルの終わりまで読み込んだ場合、それ以降はキーボードから入力を読み込みます。
.TP
\-T {terminal}
端末の名前を指定します。
端末が自動的に認識されない場合に使ってください。
Vim が組み込みでサポートしている名前か、
.B Vim
が組み込みでサポートしている名前か、
termcap または terminfo ファイルで定義されている名前を指定してください。
.TP
\-u {vimrc}
@@ -324,8 +316,9 @@ termcap または terminfo ファイルで定義されている名前を指定
詳しくは ":help gui\-init" を参照してください。
.TP
\-V[N]
冗長モード。スクリプトファイルを実行したり viminfo ファイルを読み書きするた
びにメッセージを表示します。N に指定した数値が 'verbose' に設定されます。
冗長モード。
スクリプトファイルを実行したり viminfo ファイルを読み書きするたびにメッセージを表示します。
N に指定した数値が 'verbose' に設定されます。
省略した場合は 10 になります。
.TP
\-v
@@ -335,8 +328,7 @@ Vi モードで起動します。
.TP
\-w {scriptout}
入力した文字を {scriptout} に記録します。
"vim \-s" や "source!" で実行するためのスクリプトファイルを作成するのに便利
です。
"vim \-s" や "source!" で実行するためのスクリプトファイルを作成するのに便利です。
{scriptout} ファイルがすでに存在した場合は追加保存されます。
.TP
\-W {scriptout}
@@ -371,46 +363,40 @@ GTK GUI のみ: Window ID を標準出力に出力します。
ヘルプを表示して終了します。"\-h" と同じです。
.TP
\-\-literal
引数のファイル名をリテラル文字列として扱います。ワイルドカードを展開しませ
ん。Unix のように、シェルがワイルドカードを展開する場合は機能しません。
引数のファイル名をリテラル文字列として扱います。ワイルドカードを展開しません。
Unix のように、シェルがワイルドカードを展開する場合は機能しません。
.TP
\-\-noplugin
プラグインをロードしません。\-u NONE はこの動作を含んでいます。
.TP
\-\-remote
Vim サーバーと通信し、引数に指定されたファイルを Vim サーバーで開きます。
サーバーが存在しない場合は、エラーメッセージを表示され、起動中の Vim でファ
イルが開かれます。
サーバーが存在しない場合は、エラーメッセージを表示され、起動中の Vim でファイルが開かれます。
.TP
\-\-remote\-expr {expr}
Vim サーバーと通信し、{expr} に与えられた式を Vim サーバーで実行し、結果を標
準出力に出力します。
Vim サーバーと通信し、{expr} に与えられた式を Vim サーバーで実行し、結果を標準出力に出力します。
.TP
\-\-remote\-send {keys}
Vim サーバーと通信し、{keys} に与えられたキーを Vim サーバーに送信します。
.TP
\-\-remote\-silent
\-\-remote と同じですが、サーバーが存在しなくてもエラーメッセージを表示しま
せん。
\-\-remote と同じですが、サーバーが存在しなくてもエラーメッセージを表示しません。
.TP
\-\-remote\-wait
\-\-remote と同じですが、ファイルが開かれるのを確認できるまで待機します。
.TP
\-\-remote\-wait\-silent
\-\-remote\-wait と同じですが、サーバーが存在しなくてもエラーメッセージを表
示しません。
\-\-remote\-wait と同じですが、サーバーが存在しなくてもエラーメッセージを表示しません。
.TP
\-\-serverlist
Vim サーバーの一覧を表示します。
.TP
\-\-servername {name}
サーバーの名前を {name} に設定します。\-\-remote 引数を指定しなかった場合
は、起動中の Vim の名前として使われるので、後からその名前を使ってサーバー通
信できます。
サーバーの名前を {name} に設定します。
\-\-remote 引数を指定しなかった場合は、起動中の Vim の名前として使われるので、後からその名前を使ってサーバー通信できます。
.TP
\-\-socketid {id}
GTK GUI のみ: GtkPlug メカニズムを使って gvim を別のウィンドウの中で実行しま
す。
GTK GUI のみ: GtkPlug メカニズムを使って gvim を別のウィンドウの中で実行します。
.TP
\-\-version
バージョン情報を表示して終了します。
@@ -459,8 +445,8 @@ GTK GUI のみ: GtkPlug メカニズムを使って gvim を別のウィンド
ユーザーの gvim 初期化ファイル。
.TP
/usr/local/lib/vim/optwin.vim
":options" コマンドで使われるファイル。オプションを表示したり設定したりでき
ます。
":options" コマンドで使われるファイル。
オプションを表示したり設定したりできます。
.TP
/usr/local/lib/vim/menu.vim
システムのメニュー初期化ファイル。gvim で使います。
@@ -494,8 +480,7 @@ G.R. (Fred) Walter によって開発されました。
.SH バグ
既知のバグは ":help todo" に記載されています。
.PP
Vi の動作を忠実に再現した結果、多くの人がバグだと思うような機能もいくつかあ
ります。
"この動作は Vi と違う" からバグだと思った場合は、vi_diff.txtを確認してみてく
ださい (ファイルを開くか、Vim から ":help vi_diff.txt" と入力)。
Vi の動作を忠実に再現した結果、多くの人がバグだと思うような機能もいくつかあります。
"この動作は Vi と違う" からバグだと思った場合は、 vi_diff.txt を確認してみてください
(ファイルを開くか、 Vim から ":help vi_diff.txt" と入力)。
オプションの 'compatible' と 'cpoptions' も確認してください。
+13 -9
View File
@@ -1,6 +1,7 @@
.TH VIMDIFF 1 "30. marts 2001"
.SH NAVN
vimdiff \- rediger to, tre eller fire version af en fil med Vim, og vis forskellene
vimdiff \- rediger to, tre eller fire version af en fil med Vim,
og vis forskellene
.SH SYNOPSIS
.br
.B vimdiff
@@ -14,8 +15,8 @@ starter
på to (eller tre eller fire) filer.
Hver fil får sit eget vindue.
Forskellene mellem filerne fremhæves.
Det er en fin måde til at inspicere ændringer og til at flytte ændringer fra en version
til en anden version af den samme fil.
Det er en fin måde til at inspicere ændringer og til at flytte ændringer fra
en version til en anden version af den samme fil.
.PP
Se vim(1) for detaljer om selve Vim.
.PP
@@ -26,13 +27,15 @@ N
I hvert vindue sættes 'diff'-valgmuligheden, som får forskellene
til at blive fremhævet.
.br
\'wrap'- og 'scrollbind'-valgmulighederne sættes for at få teksten til at se godt ud.
\'wrap'- og 'scrollbind'-valgmulighederne sættes for at få teksten til
at se godt ud.
.br
\'foldmethod'-valgmuligheden sættes til "diff", hvilket lægger områder af linjer uden
ændringer i en sammenfoldning. 'foldcolumn' sættes til to, for at gøre det lettere at se
sammenfoldningerne og åbne eller lukke dem.
\'foldmethod'-valgmuligheden sættes til "diff", hvilket lægger områder af
linjer uden ændringer i en sammenfoldning. 'foldcolumn' sættes til to,
for at gøre det lettere at se sammenfoldningerne og åbne eller lukke dem.
.SH TILVALG
Lodrette opdelinger bruges til at opstille linjerne, som hvis "\-O"-argumentet blev brugt.
Lodrette opdelinger bruges til at opstille linjerne, som hvis "\-O"-argumentet
blev brugt.
Brug "\-o"-argumentet, for i stedet at bruge vandrette opdelinger.
.PP
Se vim(1) for alle andre argumenter.
@@ -43,4 +46,5 @@ Det meste af
.B Vim
blev lavet af Bram Moolenaar, med en masse hjælp fra andre.
Se ":help credits" i
.B Vim.
.B Vim\c
\&.
+13 -9
View File
@@ -1,6 +1,7 @@
.TH VIMDIFF 1 "30. marts 2001"
.SH NAVN
vimdiff \- rediger to, tre eller fire version af en fil med Vim, og vis forskellene
vimdiff \- rediger to, tre eller fire version af en fil med Vim,
og vis forskellene
.SH SYNOPSIS
.br
.B vimdiff
@@ -14,8 +15,8 @@ starter
på to (eller tre eller fire) filer.
Hver fil får sit eget vindue.
Forskellene mellem filerne fremhæves.
Det er en fin måde til at inspicere ændringer og til at flytte ændringer fra en version
til en anden version af den samme fil.
Det er en fin måde til at inspicere ændringer og til at flytte ændringer fra
en version til en anden version af den samme fil.
.PP
Se vim(1) for detaljer om selve Vim.
.PP
@@ -26,13 +27,15 @@ Når den startes som
I hvert vindue sættes 'diff'-valgmuligheden, som får forskellene
til at blive fremhævet.
.br
\'wrap'- og 'scrollbind'-valgmulighederne sættes for at få teksten til at se godt ud.
\'wrap'- og 'scrollbind'-valgmulighederne sættes for at få teksten til
at se godt ud.
.br
\'foldmethod'-valgmuligheden sættes til "diff", hvilket lægger områder af linjer uden
ændringer i en sammenfoldning. 'foldcolumn' sættes til to, for at gøre det lettere at se
sammenfoldningerne og åbne eller lukke dem.
\'foldmethod'-valgmuligheden sættes til "diff", hvilket lægger områder af
linjer uden ændringer i en sammenfoldning. 'foldcolumn' sættes til to,
for at gøre det lettere at se sammenfoldningerne og åbne eller lukke dem.
.SH TILVALG
Lodrette opdelinger bruges til at opstille linjerne, som hvis "\-O"-argumentet blev brugt.
Lodrette opdelinger bruges til at opstille linjerne, som hvis "\-O"-argumentet
blev brugt.
Brug "\-o"-argumentet, for i stedet at bruge vandrette opdelinger.
.PP
Se vim(1) for alle andre argumenter.
@@ -43,4 +46,5 @@ Det meste af
.B Vim
blev lavet af Bram Moolenaar, med en masse hjælp fra andre.
Se ":help credits" i
.B Vim.
.B Vim\c
\&.
+5 -10
View File
@@ -13,26 +13,21 @@ vimdiff \- 二つか三つか四つのファイルを Vim で開いて、その
.B Vim
で開きます。
ファイルは個別のウィンドウで開かれ、差分が強調表示されます。
同じファイルの別のバージョン間で、変更を確認したり、変更を移動したりするのが
簡単になります。
同じファイルの別のバージョン間で、変更を確認したり、変更を移動したりするのが簡単になります。
.PP
Vim についての詳細は vim(1) を参照してください。
.PP
.B gvimdiff
という名前で起動された場合は GUI で起動します。
.PP
差分を強調表示するために、
それぞれのウィンドウの 'diff' オプションがオンに設定されます。
差分を強調表示するために、それぞれのウィンドウの 'diff' オプションがオンに設定されます。
.br
テキストを見やすくするために、オプションの 'wrap' と 'scrollbind' もオンに設
定されます。
テキストを見やすくするために、オプションの 'wrap' と 'scrollbind' もオンに設定されます。
.br
'foldmethod' オプションは "diff" に設定され、変更されていない行は折り畳まれ
ます。
'foldmethod' オプションは "diff" に設定され、変更されていない行は折り畳まれます。
折り畳みの確認と開閉が簡単にできるように、'foldcolumn' は 2 に設定されます。
.SH オプション
行を並べて表示するために、"\-O" 引数を使ったときのように、ウィンドウは垂直分
割されます。
行を並べて表示するために、"\-O" 引数を使ったときのように、ウィンドウは垂直分割されます。
ウィンドウを水平分割したい場合は "\-o" 引数を使ってください。
.PP
その他の引数については vim(1) を参照してください。
+1 -2
View File
@@ -32,8 +32,7 @@ startes altid i Vi-kompatibel tilstand.
.TP 15
/usr/local/lib/vim/tutor/tutor[.sprog]
.B Vimtutor\c
-tekstfilerne
.
-tekstfilerne.
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
Vim-scriptet som bruges til at kopiere
+1 -2
View File
@@ -32,8 +32,7 @@ startes altid i Vi-kompatibel tilstand.
.TP 15
/usr/local/lib/vim/tutor/tutor[.sprog]
.B Vimtutor\c
-tekstfilerne
.
-tekstfilerne.
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
Vim-scriptet som bruges til at kopiere
+5 -6
View File
@@ -7,14 +7,13 @@ vimtutor \- Vim チュートリアル
.SH 説明
.B Vim
のチュートリアルを起動します。
演習ファイルのコピーを使って実施するので、オリジナルの演習ファイルを壊してし
まう心配はありません。
演習ファイルのコピーを使って実施するので、オリジナルの演習ファイルを壊してしまう心配はありません。
.PP
.B Vim
を初めて学ぶ人向けのチュートリアルです。
.PP
引数に \-g を指定すると GUI 版の vim が利用可能であれば vim ではなく gvim
使って vimtutor が開始します。gvim が見つからないときは Vim が使用されます。
引数に \-g を指定すると GUI 版の vim が利用可能であれば vim ではなく gvim
使って vimtutor が開始します。gvim が見つからないときは Vim が使用されます。
.PP
[language] 引数は "ja" や "es" などの二文字の言語名です。
[language] 引数を省略した場合はロケールの言語が使われます。
@@ -34,8 +33,8 @@ vimtutor \- Vim チュートリアル
.SH 著者
.B Vimtutor
は、Colorado State University の Charles Smith のアイデアを基に、
Colorado School of Mines の Michael C. Pierce と Robert K. Ware の両名
によって Vi 向けに作成されたものを基にしています。
Colorado School of Mines の Michael C. Pierce と Robert K. Ware
の両名によって Vi 向けに作成されたものを基にしています。
E-mail: bware@mines.colorado.edu.
.br
.B Vim
+32 -41
View File
@@ -22,8 +22,7 @@
.BR uuencode (1)
.BR uudecode (1)
のように、バイナリデータを、メールに貼り付け可能な ASCII 形式に変換できた
り、標準出力に出力することもできます。
のように、バイナリデータを、メールに貼り付け可能な ASCII 形式に変換できたり、標準出力に出力することもできます。
さらに、バイナリファイルにパッチを当てるという使い方もできます。
.SH オプション
.I infile
@@ -37,8 +36,8 @@
.RB \` \- '
を指定した) 場合は、標準出力に出力されます。
.PP
引数の解釈処理は適当なので注意してください。パラメータを取らない引数は
最初の一文字だけチェックされます。
引数の解釈処理は適当なので注意してください。
パラメータを取らない引数は最初の一文字だけチェックされます。
引数の文字とパラメータの間のスペースは省略可能です。
パラメータは 10 進数、16 進数、8 進数で指定できます。
.BR \-c8
@@ -63,12 +62,12 @@
.TP
.IR \-e
リトルエンディアンの 16 進ダンプに切り替える。
このオプションは、バイトのグループをリトルエンディアンのバイト順のワードとして
扱います。標準のグルーピングは 4 バイトですが、
このオプションは、バイトのグループをリトルエンディアンのバイト順のワードとして扱います。
標準のグルーピングは 4 バイトですが、
.RI "" \-g
を使うことで変更可能です。
このオプションは 16 進ダンプのみに適用され、ASCII (あるいは EBCDIC) 表示は
変更されません。
このオプションは 16 進ダンプのみに適用され、ASCII (あるいは EBCDIC)
表示は変更されません。
このモードでは \-r、\-p、\-i は機能しません。
.TP
.IR "\-c cols " | " \-cols cols"
@@ -87,23 +86,22 @@
.IR "\-g bytes " | " \-groupsize bytes"
出力を
.RI < bytes >
バイト (2 文字の 16 進数、または 8 文字の 2 進数) ごとにスペースで区切りま
す。
バイト (2 文字の 16 進数、または 8 文字の 2 進数) ごとにスペースで区切ります。
区切らずに出力するには
.I \-g 0
を指定してください。
.RI < Bytes >
の標準設定は \fI2\fP で、リトルエンディアンモードの場合は \fI4\fP
2 進ダンプの場合は \fI1\fP です。
ポストスクリプト形式やインクルード形式で出力するときは、このオプションは使わ
れません。
ポストスクリプト形式やインクルード形式で出力するときは、このオプションは使われません。
.TP
.IR \-h " | " \-help
コマンドの説明を出力して終了する。変換は実行されません。
.TP
.IR \-i " | " \-include
C インクルードファイル形式で出力します。入力ファイルの名前が付けられた静的配
列の定義が出力されます。標準入力の場合は定義の中身だけ出力されます。
C インクルードファイル形式で出力します。
入力ファイルの名前が付けられた静的配列の定義が出力されます。
標準入力の場合は定義の中身だけ出力されます。
.TP
.IR "\-l len " | " \-len len"
.RI < len >
@@ -135,9 +133,9 @@ infile の
.RI < seek >
バイト目 (絶対位置、または相対位置) から開始する。
\fI+ \fRは、現在の標準入力の位置から相対的な位置を示します
(標準入力から読み込むときのみ意味があります)。\fI\- \fRは、入力の終わりから
の文字数を示します (\fI+\fR と同時に指定した場合は、現在の標準入力の位置から
手前の位置を示します)。
(標準入力から読み込むときのみ意味があります)。
\fI\- \fRは、入力の終わりからの文字数を示します
(\fI+\fR と同時に指定した場合は、現在の標準入力の位置から手前の位置を示します)。
\-s 引数を指定しなかった場合は、現在のファイル位置から開始されます。
.TP
.I \-u
@@ -149,21 +147,20 @@ infile の
.PP
.I xxd \-r
では行番号の評価に関しての暗黙のルールがいくつかあります。
出力ファイルがシーク可能なら、各行の行番号が順番通りに並んでなくても構いませ
ん。位置が飛んでいても重なっていても大丈夫です。その場合、次の位置に移動する
ために lseek(2) が使われます。
出力ファイルがシーク不可なら、「隙間」だけが処理可能です。隙間は null バイト
で埋められます。
出力ファイルがシーク可能なら、各行の行番号が順番通りに並んでなくても構いません。
位置が飛んでいても重なっていても大丈夫です。
その場合、次の位置に移動するために lseek(2) が使われます。
出力ファイルがシーク不可なら、「隙間」だけが処理可能です。
隙間は null バイトで埋められます。
.PP
.I xxd \-r
は不正な入力をエラーにしません。ゴミは静かに読み飛ばされます。
.PP
16 進ダンプを編集するときは注意が必要です。
.I xxd \-r
は必要な桁 (\-c 引数参照) だけ 16 進データを読み込んで、行の残りを無視しま
す。つまり、ascii (または ebcdic) を示している列への変更は無視されます。
xxd \-r \-p でプレーン形式 (ポストスクリプト形式) の 16 進ダンプを元に戻す場
合は、列の数は影響しません。
は必要な桁 (\-c 引数参照) だけ 16 進データを読み込んで、行の残りを無視します。
つまり、ascii (または ebcdic) を示している列への変更は無視されます。
xxd \-r \-p でプレーン形式 (ポストスクリプト形式) の 16 進ダンプを元に戻す場合は、列の数は影響しません。
2 桁の 16 進数と認識できるものはすべて変換されます。
.PP
\fI% xxd \-i file\fR
@@ -177,19 +174,16 @@ xxd \-r \-p でプレーン形式 (ポストスクリプト形式) の 16 進ダ
.I xxd \-s +seek
.IR "xxd \-s seek" ,
の違いは、lseek(2) を使って入力を "巻き戻す" かどうかです。'+' が意味を持つ
のは、入力が標準入力で、xxd が起動されたときに標準入力のファイル位置がファイ
ルの先頭ではなかった場合です。
の違いは、lseek(2) を使って入力を "巻き戻す" かどうかです。'+' が意味を持つのは、入力が標準入力で、xxd
が起動されたときに標準入力のファイル位置がファイルの先頭ではなかった場合です。
以下の例が分かりやすいかもしれません (もっと混乱するかも!)...
.PP
`cat' が既に標準入力を終わりまで読んでいるので、読む前に標準入力を巻き戻す必
要がある。
`cat' が既に標準入力を終わりまで読んでいるので、読む前に標準入力を巻き戻す必要がある。
.br
\fI% sh \-c "cat > plain_copy; xxd \-s 0 > hex_copy" < file\fR
.PP
ファイル位置 0x480 (=1024+128) 前方から 16 進ダンプする。
`+' は 「現在地からの相対位置」を意味するので、dd が 1k 処理した後から、さら
に `128' 進めます。
`+' は 「現在地からの相対位置」を意味するので、dd が 1k 処理した後から、さらに `128' 進めます。
.br
\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet" < file\fR
.PP
@@ -198,8 +192,7 @@ xxd \-r \-p でプレーン形式 (ポストスクリプト形式) の 16 進ダ
\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR
.PP
このような使い方はあまりしませんし、`+' を使うこともほとんどないでしょう。
\-s を使うときはいつでも、strace(1) や truss(1) を使って、xxd の働きをチェッ
クすることをお勧めします。
\-s を使うときはいつでも、strace(1) や truss(1) を使って、xxd の働きをチェックすることをお勧めします。
.SH
.PP
.br
@@ -233,8 +226,7 @@ xxd \-r \-p でプレーン形式 (ポストスクリプト形式) の 16 進ダ
.br
.br
この man ページの先頭から 120 バイトを一行に 12 オクテットずつ 16 進ダンプす
る。
この man ページの先頭から 120 バイトを一行に 12 オクテットずつ 16 進ダンプする。
.br
\fI% xxd \-l 120 \-c 12 xxd.1\fR
.br
@@ -301,8 +293,7 @@ xxd.1 の日付を修正する。
000fffc: 0000 0000 40 ....A
.PP
一文字の 'A' からなる 1 バイトのファイルを作成する。
'\-r \-s' の後に指定した数値がファイル中の行番号に加算され、結果、余計なバ
イトが飛ばされる。
'\-r \-s' の後に指定した数値がファイル中の行番号に加算され、結果、余計なバイトが飛ばされる。
.br
\fI% echo "010000: 41" | xxd \-r \-s \-0x10000 > file\fR
.PP
@@ -319,8 +310,8 @@ xxd.1 の日付を修正する。
\fI:'a,'z!xxd \-r\fR
.PP
.B vim(1)
の中から xxd をフィルタとして実行し、
16 進ダンプされた行を元に戻す。戻したい行にカーソルを移動して:
の中から xxd をフィルタとして実行し、16 進ダンプされた行を元に戻す。
戻したい行にカーソルを移動して:
.br
\fI!!xxd \-r\fR
.PP
+2 -2
View File
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=GVim
Name=gVim
GenericName=Text Editor
GenericName[da]=Tekstredigering
GenericName[da]=Teksteditor
GenericName[de]=Texteditor
GenericName[eo]=Tekstoredaktilo
GenericName[fr]=Éditeur de texte
+1 -12
View File
@@ -1,7 +1,4 @@
Language files for Vim
Translated menus
----------------
Language files for Vim: Translated menus
The contents of each menu file is a sequence of lines with "menutrans"
commands. Read one of the existing files to get an idea of how this works.
@@ -54,11 +51,3 @@ doing the conversion. Let the UTF-8 menu file source the latin1 menu file,
and put "scriptencoding latin1" in that one.
Other conversions may not always be available (e.g., between iso-8859-# and
MS-Windows codepages), thus the converted menu file must be available.
Translated messages
-------------------
This requires doing "make install" in the "src" directory. It will compile
the portable files "src/po/*.po" into binary ".mo" files and place them in the
right directory.
+6 -3
View File
@@ -5,7 +5,7 @@
" Last Change: 28-Jan-2016.
"
" Copyright (C) 2001-2016 MURAOKA Taro <koron.kaoriya@gmail.com>,
" vim-jp (http://vim-jp.org/)
" vim-jp <http://vim-jp.org/>
"
" THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
@@ -174,6 +174,10 @@ menutrans Set\ language\ to\ "en_nz"
menutrans Set\ language\ to\ "en_us" 言語を\ "en_us"\ に設定する
menutrans &Find\ More\ Languages 他の言語を検索する(&F)
let g:menutrans_spell_change_ARG_to = '"%s"\ を変更'
let g:menutrans_spell_add_ARG_to_word_list = '"%s"\ を単語リストに追加'
let g:menutrans_spell_ignore_ARG = '"%s"\ を無視'
" Tools.Fold Menu
menutrans &Folding 折畳み(&F)
" open close folds
@@ -210,8 +214,7 @@ menutrans &Delete
menutrans &Alternate 裏へ切替(&A)
menutrans &Next 次のバッファ(&N)
menutrans &Previous 前のバッファ(&P)
menutrans [No\ File] [無題]
let g:menutrans_no_file = "[無題]"
let g:menutrans_no_file = "[無名]"
" Window menu
menutrans &Window ウィンドウ(&W)
+6 -3
View File
@@ -5,7 +5,7 @@
" Last Change: 28-Jan-2016.
"
" Copyright (C) 2001-2016 MURAOKA Taro <koron.kaoriya@gmail.com>,
" vim-jp (http://vim-jp.org/)
" vim-jp <http://vim-jp.org/>
"
" THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
@@ -174,6 +174,10 @@ menutrans Set\ language\ to\ "en_nz" 言語を\ "en_nz"\ に設定する
menutrans Set\ language\ to\ "en_us" 言語を\ "en_us"\ に設定する
menutrans &Find\ More\ Languages 他の言語を検索する(&F)
let g:menutrans_spell_change_ARG_to = '"%s"\ を変更'
let g:menutrans_spell_add_ARG_to_word_list = '"%s"\ を単語リストに追加'
let g:menutrans_spell_ignore_ARG = '"%s"\ を無視'
" Tools.Fold Menu
menutrans &Folding 折畳み(&F)
" open close folds
@@ -210,8 +214,7 @@ menutrans &Delete 削除(&D)
menutrans &Alternate 裏へ切替(&A)
menutrans &Next 次のバッファ(&N)
menutrans &Previous 前のバッファ(&P)
menutrans [No\ File] [無題]
let g:menutrans_no_file = "[無題]"
let g:menutrans_no_file = "[無名]"
" Window menu
menutrans &Window ウィンドウ(&W)
+6 -3
View File
@@ -5,7 +5,7 @@
" Last Change: 28-Jan-2016.
"
" Copyright (C) 2001-2016 MURAOKA Taro <koron.kaoriya@gmail.com>,
" vim-jp (http://vim-jp.org/)
" vim-jp <http://vim-jp.org/>
"
" THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
@@ -174,6 +174,10 @@ menutrans Set\ language\ to\ "en_nz"
menutrans Set\ language\ to\ "en_us" 言語を\ "en_us"\ に設定する
menutrans &Find\ More\ Languages 他の言語を検索する(&F)
let g:menutrans_spell_change_ARG_to = '"%s"\ を変更'
let g:menutrans_spell_add_ARG_to_word_list = '"%s"\ を単語リストに追加'
let g:menutrans_spell_ignore_ARG = '"%s"\ を無視'
" Tools.Fold Menu
menutrans &Folding 折畳み(&F)
" open close folds
@@ -210,8 +214,7 @@ menutrans &Delete
menutrans &Alternate 裏へ切替(&A)
menutrans &Next 次のバッファ(&N)
menutrans &Previous 前のバッファ(&P)
menutrans [No\ File] [無題]
let g:menutrans_no_file = "[無題]"
let g:menutrans_no_file = "[無名]"
" Window menu
menutrans &Window ウィンドウ(&W)
+7
View File
@@ -56,6 +56,13 @@ if exists("v:lang") || &langmenu != ""
let s:lang = substitute(s:lang, '\.[^.]*', "", "")
exe "runtime! lang/menu_" . s:lang . "[^a-z]*vim"
if !exists("did_menu_trans") && s:lang =~ '_'
" If the language includes a region try matching without that region.
" (e.g. find menu_de.vim if s:lang == de_DE).
let langonly = substitute(s:lang, '_.*', "", "")
exe "runtime! lang/menu_" . langonly . "[^a-z]*vim"
endif
if !exists("did_menu_trans") && strlen($LANG) > 1 && s:lang !~ '^en_us'
" On windows locale names are complicated, try using $LANG, it might
" have been set by set_init_1(). But don't do this for "en" or "en_us".
+3 -2
View File
@@ -57,10 +57,11 @@ vmap <S-Insert> <C-V>
" Use CTRL-Q to do what CTRL-V used to do
noremap <C-Q> <C-V>
" Use CTRL-S for saving, also in Insert mode
" Use CTRL-S for saving, also in Insert mode (<C-O> doesn't work well when
" using completions).
noremap <C-S> :update<CR>
vnoremap <C-S> <C-C>:update<CR>
inoremap <C-S> <C-O>:update<CR>
inoremap <C-S> <Esc>:update<CR>gi
" For CTRL-V to work autoselect must be off.
" On Unix we have two selections, autoselect can be used.
+13 -1
View File
@@ -56,6 +56,9 @@ else
finish
endif
let s:keepcpo = &cpo
set cpo&vim
" The command that starts debugging, e.g. ":Termdebug vim".
" To end type "quit" in the gdb window.
command -nargs=* -complete=file -bang Termdebug call s:StartDebug(<bang>0, <f-args>)
@@ -197,7 +200,8 @@ func s:StartDebug_term(dict)
let response = ''
for lnum in range(1,200)
if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi '
let response = term_getline(s:gdbbuf, lnum + 1)
" response can be in the same line or the next line
let response = term_getline(s:gdbbuf, lnum) . term_getline(s:gdbbuf, lnum + 1)
if response =~ 'Undefined command'
echoerr 'Sorry, your gdb is too old, gdb 7.12 is required'
exe 'bwipe! ' . s:ptybuf
@@ -563,6 +567,9 @@ endfunc
" Install commands in the current window to control the debugger.
func s:InstallCommands()
let save_cpo = &cpo
set cpo&vim
command Break call s:SetBreakpoint()
command Clear call s:ClearBreakpoint()
command Step call s:SendCommand('-exec-step')
@@ -600,6 +607,8 @@ func s:InstallCommands()
an 1.230 PopUp.Evaluate :Evaluate<CR>
endif
endif
let &cpo = save_cpo
endfunc
let s:winbar_winids = []
@@ -943,3 +952,6 @@ func s:BufUnloaded()
endif
endfor
endfunc
let &cpo = s:keepcpo
unlet s:keepcpo
+1
View File
@@ -6,6 +6,7 @@ Look in the file for hints on how it can be disabled without deleting it.
getscriptPlugin.vim get latest version of Vim scripts
gzip.vim edit compressed files
logiPat.vim logical operators on patterns
manpager.vim using Vim as manpager
matchparen.vim highlight paren matching the one under the cursor
netrwPlugin.vim edit files over a network and browse (remote) directories
rrhelper.vim used for --remote-wait editing
+162 -118
View File
@@ -1,12 +1,12 @@
" Vim syntax file
" Language: C#
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainer: Anduin Withers <awithers@anduin.com>
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: 2018-05-02
" Filenames: *.cs
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
" Language: C#
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainers: Anduin Withers <awithers@anduin.com>
" Johannes Zellner <johannes@zellner.org>
" Last Change: 2018-06-29
" Filenames: *.cs
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
"
" REFERENCES:
" [1] ECMA TC39: C# Language Specification (WD13Oct01.doc)
@@ -19,146 +19,190 @@ let s:cs_cpo_save = &cpo
set cpo&vim
syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic
syn keyword csStorage delegate enum interface namespace struct
syn keyword csRepeat break continue do for foreach goto return while
syn keyword csConditional else if switch
syn keyword csLabel case default
" there's no :: operator in C#
syn match csOperatorError display +::+
syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic
syn keyword csStorage delegate enum interface namespace struct
syn keyword csRepeat break continue do for foreach goto return while
syn keyword csConditional else if switch
syn keyword csLabel case default
syn match csOperatorError display +::+
syn match csGlobal display +global::+
" user labels (see [1] 8.6 Statements)
syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+
syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile
syn keyword csConstant false null true
syn keyword csException try catch finally throw when
syn keyword csLinq ascending by descending equals from group in into join let on orderby select where
syn keyword csAsync async await
syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+
syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile
syn keyword csConstant false null true
syn keyword csException try catch finally throw when
syn keyword csLinq ascending by descending equals from group in into join let on orderby select where
syn keyword csAsync async await
syn keyword csUnspecifiedStatement as base checked event fixed get in is lock nameof operator out params ref set sizeof stackalloc this typeof unchecked unsafe using
syn keyword csUnsupportedStatement add remove value
syn keyword csUnspecifiedKeyword explicit implicit
syn keyword csUnspecifiedStatement as base checked event fixed in is lock nameof operator out params ref sizeof stackalloc this typeof unchecked unsafe using
syn keyword csUnsupportedStatement add remove value
syn keyword csUnspecifiedKeyword explicit implicit
" Contextual Keywords
syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5
syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7
syn match csContextualStatement /\<\(get\|set\)[[:space:]\n]*{/me=s+3
syn match csContextualStatement /\<where\>[^:]\+:/me=s+5
syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5
syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7
syn match csContextualStatement /\<\(get\|set\)\(;\|[[:space:]\n]*{\)/me=s+3
syn match csContextualStatement /\<where\>[^:]\+:/me=s+5
" Punctuation
syn match csBraces "[{}\[\]]" display
syn match csParens "[()]" display
syn match csOpSymbols "[+\-><=]\{1,2}" display
syn match csOpSymbols "[!><+\-*/]=" display
syn match csOpSymbols "[!*/^]" display
syn match csOpSymbols "=>" display
syn match csEndColon ";" display
syn match csLogicSymbols "&&" display
syn match csLogicSymbols "||" display
syn match csLogicSymbols "?" display
syn match csLogicSymbols ":" display
" Comments
"
" PROVIDES: @csCommentHook
"
" TODO: include strings ?
"
syn keyword csTodo contained TODO FIXME XXX NOTE HACK
syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell
syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell
syn keyword csTodo contained TODO FIXME XXX NOTE HACK TBD
syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell
syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell
" xml markup inside '///' comments
syn cluster xmlRegionHook add=csXmlCommentLeader
syn cluster xmlCdataHook add=csXmlCommentLeader
syn cluster xmlStartTagHook add=csXmlCommentLeader
syn keyword csXmlTag contained Libraries Packages Types Excluded ExcludedTypeName ExcludedLibraryName
syn keyword csXmlTag contained ExcludedBucketName TypeExcluded Type TypeKind TypeSignature AssemblyInfo
syn keyword csXmlTag contained AssemblyName AssemblyPublicKey AssemblyVersion AssemblyCulture Base
syn keyword csXmlTag contained BaseTypeName Interfaces Interface InterfaceName Attributes Attribute
syn keyword csXmlTag contained AttributeName Members Member MemberSignature MemberType MemberValue
syn keyword csXmlTag contained ReturnValue ReturnType Parameters Parameter MemberOfPackage
syn keyword csXmlTag contained ThreadingSafetyStatement Docs devdoc example overload remarks returns summary
syn keyword csXmlTag contained threadsafe value internalonly nodoc exception param permission platnote
syn keyword csXmlTag contained seealso b c i pre sub sup block code note paramref see subscript superscript
syn keyword csXmlTag contained list listheader item term description altcompliant altmember
syn cluster xmlRegionHook add=csXmlCommentLeader
syn cluster xmlCdataHook add=csXmlCommentLeader
syn cluster xmlStartTagHook add=csXmlCommentLeader
syn keyword csXmlTag contained Libraries Packages Types Excluded ExcludedTypeName ExcludedLibraryName
syn keyword csXmlTag contained ExcludedBucketName TypeExcluded Type TypeKind TypeSignature AssemblyInfo
syn keyword csXmlTag contained AssemblyName AssemblyPublicKey AssemblyVersion AssemblyCulture Base
syn keyword csXmlTag contained BaseTypeName Interfaces Interface InterfaceName Attributes Attribute
syn keyword csXmlTag contained AttributeName Members Member MemberSignature MemberType MemberValue
syn keyword csXmlTag contained ReturnValue ReturnType Parameters Parameter MemberOfPackage
syn keyword csXmlTag contained ThreadingSafetyStatement Docs devdoc example overload remarks returns summary
syn keyword csXmlTag contained threadsafe value internalonly nodoc exception param permission platnote
syn keyword csXmlTag contained seealso b c i pre sub sup block code note paramref see subscript superscript
syn keyword csXmlTag contained list listheader item term description altcompliant altmember
syn cluster xmlTagHook add=csXmlTag
syn match csXmlCommentLeader +\/\/\/+ contained
syn match csXmlComment +\/\/\/.*$+ contains=csXmlCommentLeader,@csXml,@Spell
syntax include @csXml syntax/xml.vim
hi def link xmlRegion Comment
syn match csXmlCommentLeader +\/\/\/+ contained
syn match csXmlComment +\/\/\/.*$+ contains=csXmlCommentLeader,@csXml,@Spell
syn include @csXml syntax/xml.vim
hi def link xmlRegion Comment
" [1] 9.5 Pre-processing directives
syn region csPreCondit
\ start="^\s*#\s*\(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\)"
\ skip="\\$" end="$" contains=csComment keepend
syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$"
\ end="^\s*#\s*endregion" transparent fold contains=TOP
syn region csSummary start="^\s*/// <summary" end="^\(\s*///\)\@!" transparent fold keepend
syn region csPreCondit start="^\s*#\s*\(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\)" skip="\\$" end="$" contains=csComment keepend
syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$" end="^\s*#\s*endregion" transparent fold contains=TOP
syn region csSummary start="^\s*/// <summary" end="^\%\(\s*///\)\@!" transparent fold keepend
syn region csClassType start="\(@\)\@<!class\>"hs=s+6 end="[:\n{]"he=e-1 contains=csClass
syn region csNewType start="\(@\)\@<!new\>"hs=s+4 end="[\(\<{\[]"he=e-1 contains=csNew contains=csNewType
syn region csIsType start="\v (is|as) "hs=s+4 end="\v[A-Za-z0-9]+" oneline contains=csIsAs
syn keyword csNew new contained
syn keyword csClass class contained
syn keyword csIsAs is as
syn region csClassType start="@\@1<!\<class\>"hs=s+6 end="[:\n{]"me=e-1 contains=csClass
syn region csNewType start="@\@1<!\<new\>"hs=s+4 end="[;\n{(<\[]"me=e-1 contains=csNew contains=csNewType
syn region csIsType start=" is "hs=s+4 end="[A-Za-z0-9]\+" oneline contains=csIsAs
syn region csIsType start=" as "hs=s+4 end="[A-Za-z0-9]\+" oneline contains=csIsAs
syn keyword csNew new contained
syn keyword csClass class contained
syn keyword csIsAs is as
" Strings and constants
syn match csSpecialError contained "\\."
syn match csSpecialCharError contained "[^']"
syn match csSpecialError "\\." contained
syn match csSpecialCharError "[^']" contained
" [1] 9.4.4.4 Character literals
syn match csSpecialChar contained +\\["\\'0abfnrtvx]+
" unicode characters
syn match csUnicodeNumber +\\\(u\x\{4}\|U\x\{8}\)+ contained contains=csUnicodeSpecifier
syn match csUnicodeSpecifier +\\[uU]+ contained
syn region csVerbatimString start=+@"+ end=+"+ skip=+""+ contains=csVerbatimSpec,@Spell
syn match csVerbatimSpec +@"+he=s+1 contained
syn region csString start=+"+ end=+"+ end=+$+ contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError
syn match csCharacter "'\\''" contains=csSpecialChar
syn match csCharacter "'[^\\]'"
syn match csNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
syn match csNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="
syn match csNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
syn match csNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
syn match csSpecialChar +\\["\\'0abfnrtvx]+ contained display
syn match csUnicodeNumber +\\u\x\{4}+ contained contains=csUnicodeSpecifier display
syn match csUnicodeNumber +\\U\x\{8}+ contained contains=csUnicodeSpecifier display
syn match csUnicodeSpecifier +\\[uU]+ contained display
syn region csString matchgroup=csQuote start=+"+ end=+"+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError display
syn match csCharacter "'\\''" contains=csSpecialChar display
syn match csCharacter "'[^\\]'" display
syn match csNumber "\<0[0-7]*[lL]\=\>" display
syn match csNumber "\<0[xX]\x\+[lL]\=\>" display
syn match csNumber "\<\d\+[lL]\=\>" display
syn match csNumber "\<\d\+\.\d*\%\([eE][-+]\=\d\+\)\=[fFdD]\=" display
syn match csNumber "\.\d\+\%\([eE][-+]\=\d\+\)\=[fFdD]\=" display
syn match csNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" display
syn match csNumber "\<\d\+\%\([eE][-+]\=\d\+\)\=[fFdD]\>" display
syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"+ end=+$+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
syn region csInterpolation matchgroup=csInterpolationDelimiter start=+{+ end=+}+ keepend contained contains=@csAll,csBracketed,csInterpolationAlign,csInterpolationFormat
syn match csEscapedInterpolation "{{" transparent contains=NONE display
syn match csEscapedInterpolation "}}" transparent contains=NONE display
syn region csInterpolationAlign matchgroup=csInterpolationAlignDel start=+,+ end=+}+ end=+:+me=e-1 contained contains=csNumber,csConstant,csCharacter,csParens,csOpSymbols,csString,csBracketed display
syn match csInterpolationFormat +:[^}]\+}+ contained contains=csInterpolationFormatDel display
syn match csInterpolationAlignDel +,+ contained display
syn match csInterpolationFormatDel +:+ contained display
syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"+ skip=+""+ extend contains=csVerbatimQuote,@Spell
syn match csVerbatimQuote +""+ contained
syn match csQuoteError +@$"+he=s+2,me=s+2
syn region csInterVerbString matchgroup=csQuote start=+\$@"+ end=+"+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell
syn region csBracketed matchgroup=csParens start=+(+ end=+)+ contained transparent contains=@csAll,csBracketed
syn cluster csAll contains=csCharacter,csClassType,csComment,csContextualStatement,csEndColon,csInterpolatedString,csIsType,csLabel,csLogicSymbols,csNewType,csConstant,csNumber,csOpSymbols,csOperatorError,csParens,csPreCondit,csRegion,csString,csSummary,csUnicodeNumber,csUnicodeSpecifier,csVerbatimString
" The default highlighting.
hi def link csType Type
hi def link csNewType Type
hi def link csClassType Type
hi def link csIsType Type
hi def link csStorage StorageClass
hi def link csClass StorageClass
hi def link csRepeat Repeat
hi def link csConditional Conditional
hi def link csLabel Label
hi def link csModifier StorageClass
hi def link csConstant Constant
hi def link csException Exception
hi def link csUnspecifiedStatement Statement
hi def link csUnsupportedStatement Statement
hi def link csUnspecifiedKeyword Keyword
hi def link csNew Statement
hi def link csLinq Statement
hi def link csIsAs Keyword
hi def link csAsync Keyword
hi def link csContextualStatement Statement
hi def link csOperatorError Error
hi def link csInterfaceDeclaration Include
hi def link csType Type
hi def link csNewType Type
hi def link csClassType Type
hi def link csIsType Type
hi def link csStorage StorageClass
hi def link csClass StorageClass
hi def link csRepeat Repeat
hi def link csConditional Conditional
hi def link csLabel Label
hi def link csModifier StorageClass
hi def link csConstant Constant
hi def link csException Exception
hi def link csUnspecifiedStatement Statement
hi def link csUnsupportedStatement Statement
hi def link csUnspecifiedKeyword Keyword
hi def link csNew Statement
hi def link csLinq Statement
hi def link csIsAs Keyword
hi def link csAsync Keyword
hi def link csContextualStatement Statement
hi def link csOperatorError Error
hi def link csInterfaceDeclaration Include
hi def link csTodo Todo
hi def link csComment Comment
hi def link csTodo Todo
hi def link csComment Comment
hi def link csSpecialError Error
hi def link csSpecialCharError Error
hi def link csString String
hi def link csVerbatimString String
hi def link csVerbatimSpec SpecialChar
hi def link csPreCondit PreCondit
hi def link csCharacter Character
hi def link csSpecialChar SpecialChar
hi def link csNumber Number
hi def link csUnicodeNumber SpecialChar
hi def link csUnicodeSpecifier SpecialChar
hi def link csEndColon Statement
hi def link csOpSymbols Operator
hi def link csLogicSymbols Boolean
hi def link csBraces Function
hi def link csParens Operator
hi def link csSpecialError Error
hi def link csSpecialCharError Error
hi def link csString String
hi def link csQuote String
hi def link csQuoteError Error
hi def link csInterpolatedString String
hi def link csVerbatimString String
hi def link csInterVerbString String
hi def link csVerbatimQuote SpecialChar
hi def link csPreCondit PreCondit
hi def link csCharacter Character
hi def link csSpecialChar SpecialChar
hi def link csNumber Number
hi def link csUnicodeNumber SpecialChar
hi def link csUnicodeSpecifier SpecialChar
hi def link csInterpolationDelimiter Delimiter
hi def link csInterpolationAlignDel csInterpolationDelimiter
hi def link csInterpolationFormat csInterpolationDelimiter
hi def link csInterpolationFormatDel csInterpolationDelimiter
" xml markup
hi def link csXmlCommentLeader Comment
hi def link csXmlComment Comment
hi def link csXmlTag Statement
hi def link csXmlCommentLeader Comment
hi def link csXmlComment Comment
hi def link csXmlTag Statement
let b:current_syntax = "cs"
let &cpo = s:cs_cpo_save
unlet s:cs_cpo_save
" vim: ts=8
" vim: vts=16,28
+281 -54
View File
@@ -2,12 +2,13 @@
" Language: OpenBSD packet filter configuration (pf.conf)
" Original Author: Camiel Dobbelaar <cd@sentia.nl>
" Maintainer: Lauri Tirkkonen <lotheac@iki.fi>
" Last Change: 2016 Jul 06
" Last Change: 2018 Jul 16
if exists("b:current_syntax")
finish
endif
let b:current_syntax = "pf"
setlocal foldmethod=syntax
syn iskeyword @,48-57,_,-,+
syn sync fromstart
@@ -17,7 +18,7 @@ syn keyword pfCmd anchor antispoof block include match pass queue
syn keyword pfCmd queue set table
syn match pfCmd /^\s*load\sanchor\>/
syn keyword pfTodo TODO XXX contained
syn keyword pfWildAddr all any
syn keyword pfWildAddr any no-route urpf-failed self
syn match pfComment /#.*$/ contains=pfTodo
syn match pfCont /\\$/
syn match pfErrClose /}/
@@ -36,57 +37,6 @@ syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfN
syn region pfString start=/"/ skip=/\\"/ end=/"/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar
syn region pfString start=/'/ skip=/\\'/ end=/'/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar
syn keyword pfService 802-11-iapp Microsoft-SQL-Monitor
syn keyword pfService Microsoft-SQL-Server NeXTStep NextStep
syn keyword pfService afpovertcp afs3-bos afs3-callback afs3-errors
syn keyword pfService afs3-fileserver afs3-kaserver afs3-prserver
syn keyword pfService afs3-rmtsys afs3-update afs3-vlserver
syn keyword pfService afs3-volser amt-redir-tcp amt-redir-tls
syn keyword pfService amt-soap-http amt-soap-https asf-rmcp at-echo
syn keyword pfService at-nbp at-rtmp at-zis auth authentication
syn keyword pfService bfd-control bfd-echo bftp bgp bgpd biff bootpc
syn keyword pfService bootps canna cddb cddbp chargen chat cmd
syn keyword pfService cmip-agent cmip-man comsat conference
syn keyword pfService conserver courier csnet-ns cso-ns cvspserver
syn keyword pfService daap datametrics daytime dhcpd-sync
syn keyword pfService dhcpv6-client dhcpv6-server discard domain
syn keyword pfService echo efs eklogin ekshell ekshell2 epmap eppc
syn keyword pfService exec finger ftp ftp-data git gopher hostname
syn keyword pfService hostnames hprop http https hunt hylafax iapp
syn keyword pfService icb ident imap imap2 imap3 imaps ingreslock
syn keyword pfService ipp iprop ipsec-msft ipsec-nat-t ipx irc
syn keyword pfService isakmp iscsi isisd iso-tsap kauth kdc kerberos
syn keyword pfService kerberos-adm kerberos-iv kerberos-sec
syn keyword pfService kerberos_master kf kip klogin kpasswd kpop
syn keyword pfService krb524 krb_prop krbupdate krcmd kreg kshell kx
syn keyword pfService l2tp ldap ldaps ldp link login mail mdns
syn keyword pfService mdnsresponder microsoft-ds ms-sql-m ms-sql-s
syn keyword pfService msa msp mtp mysql name nameserver netbios-dgm
syn keyword pfService netbios-ns netbios-ssn netnews netplan netrjs
syn keyword pfService netstat netwall newdate nextstep nfs nfsd
syn keyword pfService nicname nnsp nntp ntalk ntp null openwebnet
syn keyword pfService ospf6d ospfapi ospfd photuris pop2 pop3 pop3pw
syn keyword pfService pop3s poppassd portmap postgresql postoffice
syn keyword pfService pptp presence printer prospero prospero-np
syn keyword pfService puppet pwdgen qotd quote radacct radius
syn keyword pfService radius-acct rdp readnews remotefs resource rfb
syn keyword pfService rfe rfs rfs_server ripd ripng rje rkinit rlp
syn keyword pfService routed router rpc rpcbind rsync rtelnet rtsp
syn keyword pfService sa-msg-port sane-port sftp shell sieve silc
syn keyword pfService sink sip smtp smtps smux snmp snmp-trap
syn keyword pfService snmptrap snpp socks source spamd spamd-cfg
syn keyword pfService spamd-sync spooler spop3 ssdp ssh submission
syn keyword pfService sunrpc supdup supfiledbg supfilesrv support
syn keyword pfService svn svrloc swat syslog syslog-tls systat
syn keyword pfService tacacs tacas+ talk tap tcpmux telnet tempo
syn keyword pfService tftp time timed timeserver timserver tsap
syn keyword pfService ttylink ttytst ub-dns-control ulistserv untp
syn keyword pfService usenet users uucp uucp-path uucpd vnc vxlan
syn keyword pfService wais webster who whod whois www x400 x400-snd
syn keyword pfService xcept xdmcp xmpp-bosh xmpp-client xmpp-server
syn keyword pfService z3950 zabbix-agent zabbix-trapper zebra
syn keyword pfService zebrasrv
hi def link pfCmd Statement
hi def link pfComment Comment
hi def link pfCont Statement
@@ -103,4 +53,281 @@ hi def link pfVar Identifier
hi def link pfVarAssign Identifier
hi def link pfWildAddr Type
let b:current_syntax = "pf"
" from OpenBSD src/etc/services r1.95
syn keyword pfService 802-11-iapp
syn keyword pfService Microsoft-SQL-Monitor
syn keyword pfService Microsoft-SQL-Server
syn keyword pfService NeXTStep
syn keyword pfService NextStep
syn keyword pfService afpovertcp
syn keyword pfService afs3-bos
syn keyword pfService afs3-callback
syn keyword pfService afs3-errors
syn keyword pfService afs3-fileserver
syn keyword pfService afs3-kaserver
syn keyword pfService afs3-prserver
syn keyword pfService afs3-rmtsys
syn keyword pfService afs3-update
syn keyword pfService afs3-vlserver
syn keyword pfService afs3-volser
syn keyword pfService amt-redir-tcp
syn keyword pfService amt-redir-tls
syn keyword pfService amt-soap-http
syn keyword pfService amt-soap-https
syn keyword pfService asf-rmcp
syn keyword pfService at-echo
syn keyword pfService at-nbp
syn keyword pfService at-rtmp
syn keyword pfService at-zis
syn keyword pfService auth
syn keyword pfService authentication
syn keyword pfService bfd-control
syn keyword pfService bfd-echo
syn keyword pfService bftp
syn keyword pfService bgp
syn keyword pfService bgpd
syn keyword pfService biff
syn keyword pfService bootpc
syn keyword pfService bootps
syn keyword pfService canna
syn keyword pfService cddb
syn keyword pfService cddbp
syn keyword pfService chargen
syn keyword pfService chat
syn keyword pfService cmd
syn keyword pfService cmip-agent
syn keyword pfService cmip-man
syn keyword pfService comsat
syn keyword pfService conference
syn keyword pfService conserver
syn keyword pfService courier
syn keyword pfService csnet-ns
syn keyword pfService cso-ns
syn keyword pfService cvspserver
syn keyword pfService daap
syn keyword pfService datametrics
syn keyword pfService daytime
syn keyword pfService dhcpd-sync
syn keyword pfService dhcpv6-client
syn keyword pfService dhcpv6-server
syn keyword pfService discard
syn keyword pfService domain
syn keyword pfService echo
syn keyword pfService efs
syn keyword pfService eklogin
syn keyword pfService ekshell
syn keyword pfService ekshell2
syn keyword pfService epmap
syn keyword pfService eppc
syn keyword pfService exec
syn keyword pfService finger
syn keyword pfService ftp
syn keyword pfService ftp-data
syn keyword pfService git
syn keyword pfService gopher
syn keyword pfService gre-in-udp
syn keyword pfService gre-udp-dtls
syn keyword pfService hostname
syn keyword pfService hostnames
syn keyword pfService hprop
syn keyword pfService http
syn keyword pfService https
syn keyword pfService hunt
syn keyword pfService hylafax
syn keyword pfService iapp
syn keyword pfService icb
syn keyword pfService ident
syn keyword pfService imap
syn keyword pfService imap2
syn keyword pfService imap3
syn keyword pfService imaps
syn keyword pfService ingreslock
syn keyword pfService ipp
syn keyword pfService iprop
syn keyword pfService ipsec-msft
syn keyword pfService ipsec-nat-t
syn keyword pfService ipx
syn keyword pfService irc
syn keyword pfService isakmp
syn keyword pfService iscsi
syn keyword pfService isisd
syn keyword pfService iso-tsap
syn keyword pfService kauth
syn keyword pfService kdc
syn keyword pfService kerberos
syn keyword pfService kerberos-adm
syn keyword pfService kerberos-iv
syn keyword pfService kerberos-sec
syn keyword pfService kerberos_master
syn keyword pfService kf
syn keyword pfService kip
syn keyword pfService klogin
syn keyword pfService kpasswd
syn keyword pfService kpop
syn keyword pfService krb524
syn keyword pfService krb_prop
syn keyword pfService krbupdate
syn keyword pfService krcmd
syn keyword pfService kreg
syn keyword pfService kshell
syn keyword pfService kx
syn keyword pfService l2tp
syn keyword pfService ldap
syn keyword pfService ldaps
syn keyword pfService ldp
syn keyword pfService link
syn keyword pfService login
syn keyword pfService mail
syn keyword pfService mdns
syn keyword pfService mdnsresponder
syn keyword pfService microsoft-ds
syn keyword pfService ms-sql-m
syn keyword pfService ms-sql-s
syn keyword pfService msa
syn keyword pfService msp
syn keyword pfService mtp
syn keyword pfService mysql
syn keyword pfService name
syn keyword pfService nameserver
syn keyword pfService netbios-dgm
syn keyword pfService netbios-ns
syn keyword pfService netbios-ssn
syn keyword pfService netnews
syn keyword pfService netplan
syn keyword pfService netrjs
syn keyword pfService netstat
syn keyword pfService netwall
syn keyword pfService newdate
syn keyword pfService nextstep
syn keyword pfService nfs
syn keyword pfService nfsd
syn keyword pfService nicname
syn keyword pfService nnsp
syn keyword pfService nntp
syn keyword pfService ntalk
syn keyword pfService ntp
syn keyword pfService null
syn keyword pfService openwebnet
syn keyword pfService ospf6d
syn keyword pfService ospfapi
syn keyword pfService ospfd
syn keyword pfService photuris
syn keyword pfService pop2
syn keyword pfService pop3
syn keyword pfService pop3pw
syn keyword pfService pop3s
syn keyword pfService poppassd
syn keyword pfService portmap
syn keyword pfService postgresql
syn keyword pfService postoffice
syn keyword pfService pptp
syn keyword pfService presence
syn keyword pfService printer
syn keyword pfService prospero
syn keyword pfService prospero-np
syn keyword pfService puppet
syn keyword pfService pwdgen
syn keyword pfService qotd
syn keyword pfService quote
syn keyword pfService radacct
syn keyword pfService radius
syn keyword pfService radius-acct
syn keyword pfService rdp
syn keyword pfService readnews
syn keyword pfService remotefs
syn keyword pfService resource
syn keyword pfService rfb
syn keyword pfService rfe
syn keyword pfService rfs
syn keyword pfService rfs_server
syn keyword pfService ripd
syn keyword pfService ripng
syn keyword pfService rje
syn keyword pfService rkinit
syn keyword pfService rlp
syn keyword pfService routed
syn keyword pfService router
syn keyword pfService rpc
syn keyword pfService rpcbind
syn keyword pfService rsync
syn keyword pfService rtelnet
syn keyword pfService rtsp
syn keyword pfService sa-msg-port
syn keyword pfService sane-port
syn keyword pfService sftp
syn keyword pfService shell
syn keyword pfService sieve
syn keyword pfService silc
syn keyword pfService sink
syn keyword pfService sip
syn keyword pfService smtp
syn keyword pfService smtps
syn keyword pfService smux
syn keyword pfService snmp
syn keyword pfService snmp-trap
syn keyword pfService snmptrap
syn keyword pfService snpp
syn keyword pfService socks
syn keyword pfService source
syn keyword pfService spamd
syn keyword pfService spamd-cfg
syn keyword pfService spamd-sync
syn keyword pfService spooler
syn keyword pfService spop3
syn keyword pfService ssdp
syn keyword pfService ssh
syn keyword pfService submission
syn keyword pfService sunrpc
syn keyword pfService supdup
syn keyword pfService supfiledbg
syn keyword pfService supfilesrv
syn keyword pfService support
syn keyword pfService svn
syn keyword pfService svrloc
syn keyword pfService swat
syn keyword pfService syslog
syn keyword pfService syslog-tls
syn keyword pfService systat
syn keyword pfService tacacs
syn keyword pfService tacas+
syn keyword pfService talk
syn keyword pfService tap
syn keyword pfService tcpmux
syn keyword pfService telnet
syn keyword pfService tempo
syn keyword pfService tftp
syn keyword pfService time
syn keyword pfService timed
syn keyword pfService timeserver
syn keyword pfService timserver
syn keyword pfService tsap
syn keyword pfService ttylink
syn keyword pfService ttytst
syn keyword pfService ub-dns-control
syn keyword pfService ulistserv
syn keyword pfService untp
syn keyword pfService usenet
syn keyword pfService users
syn keyword pfService uucp
syn keyword pfService uucp-path
syn keyword pfService uucpd
syn keyword pfService vnc
syn keyword pfService vxlan
syn keyword pfService wais
syn keyword pfService webster
syn keyword pfService who
syn keyword pfService whod
syn keyword pfService whois
syn keyword pfService www
syn keyword pfService x400
syn keyword pfService x400-snd
syn keyword pfService xcept
syn keyword pfService xdmcp
syn keyword pfService xmpp-bosh
syn keyword pfService xmpp-client
syn keyword pfService xmpp-server
syn keyword pfService z3950
syn keyword pfService zabbix-agent
syn keyword pfService zabbix-trapper
syn keyword pfService zebra
syn keyword pfService zebrasrv
+4 -1
View File
@@ -1,7 +1,8 @@
" Vim syntax file
" Language: sudoers(5) configuration files
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2011-02-24
" Latest Revision: 2018-07-19
" Recent Changes: Support for #include and #includedir.
if exists("b:current_syntax")
finish
@@ -24,6 +25,7 @@ syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersPASS
syn keyword sudoersTodo contained TODO FIXME XXX NOTE
syn region sudoersComment display oneline start='#' end='$' contains=sudoersTodo
syn region sudoersInclude display oneline start='#\(include\|includedir\)' end='$'
syn keyword sudoersAlias User_Alias Runas_Alias nextgroup=sudoersUserAlias skipwhite skipnl
syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skipwhite skipnl
@@ -335,6 +337,7 @@ hi def link sudoersIntegerValue Number
hi def link sudoersStringValue String
hi def link sudoersListValue String
hi def link sudoersPASSWD Special
hi def link sudoersInclude Statement
let b:current_syntax = "sudoers"
+1 -1
View File
@@ -383,7 +383,7 @@ let s:ambitable = []
call BuildWidthTable('A', 'ambiguous')
" Edit the emoji text file. Requires the netrw plugin.
edit http://unicode.org/Public/emoji/5.0/emoji-data.txt
edit https://www.unicode.org/Public/emoji/11.0/emoji-data.txt
"edit http://www.unicode.org/Public/emoji/latest/emoji-data.txt
" Build the emoji table. Ver. 1.0 - 6.0
+2 -2
View File
@@ -66,10 +66,10 @@ tutor.hr.cp1250: tutor.hr.utf-8
iconv -f UTF-8 -t cp1250 tutor.hr.utf-8 > tutor.hr.cp1250
tutor.ja.sjis: tutor.ja.utf-8
nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis
iconv -f UTF-8 -t cp932 tutor.ja.utf-8 > tutor.ja.sjis
tutor.ja.euc: tutor.ja.utf-8
nkf -WXe tutor.ja.utf-8 > tutor.ja.euc
iconv -f UTF-8 -t EUC-JP tutor.ja.utf-8 > tutor.ja.euc
tutor.ko.euc: tutor.ko.utf-8
iconv -f UTF-8 -t EUC-KR tutor.ko.utf-8 > tutor.ko.euc
+16 -1
View File
@@ -19,4 +19,19 @@ Bob Ware, Colorado School of Mines, Golden, Co 80401, USA
(303) 273-3987
bware@mines.colorado.edu bware@slate.mines.colorado.edu bware@mines.bitnet
[This file was modified for Vim by Bram Moolenaar]
Translation
-----------
The tutor.xx and tutor.xx.utf-8 files are translated files (where xx is the
langage code). The encoding of tutor.xx might be latin1 or other traditional
encoding. If you don't need a translation with such traditional encoding,
you just need to prepare the tutor.xx.utf-8 file.
If you need another encoding, you can also prepare a file named tutor.xx.enc
(replace enc with the actual encoding name). You might also need to adjust the
tutor.vim file.
The "make" command can be used for creating tutor.xx from tutor.xx.utf-8.
See the Makefile for detail. (For some languages, tutor.xx.utf-8 is created
from tutor.xx for historical reasons.)
[This file was modified for Vim by Bram Moolenaar et al.]
+3 -3
View File
@@ -372,7 +372,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
** Type p to put previously deleted text after the cursor. **
1. Move the cursor to the first ---> line below.
1. Move the cursor to the first line below marked --->.
2. Type dd to delete the line and store it in a Vim register.
@@ -447,7 +447,7 @@ Notice that ce deletes the word and places you in Insert mode.
2. The motions are the same, such as w (word) and $ (end of line).
3. Move to the first line below marked --->.
3. Move the cursor to the first line below marked --->.
4. Move the cursor to the first error.
@@ -740,7 +740,7 @@ NOTE: You can also read the output of an external command. For example,
** Type a to insert text AFTER the cursor. **
1. Move the cursor to the start of the line below marked --->.
1. Move the cursor to the start of the first line below marked --->.
2. Press e until the cursor is on the end of li .
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -41,7 +41,7 @@ Anmerkung: Immer, wenn Du Dir unsicher bist
drücke <ESC> , um Dich in den Normalmodus zu begeben.
Dann gib das gewünschte Kommando noch einmal ein.
Anmerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
Anmerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
hjkl benutzt, wirst Du in der Lage sein, Dich sehr viel schneller
umherzubewegen, wenn Du Dich einmal daran gewöhnt hast. Wirklich!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1 -1
View File
@@ -41,7 +41,7 @@ Anmerkung: Immer, wenn Du Dir unsicher bist über das, was Du getippt hast,
drücke <ESC> , um Dich in den Normalmodus zu begeben.
Dann gib das gewünschte Kommando noch einmal ein.
Anmerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
Anmerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
hjkl benutzt, wirst Du in der Lage sein, Dich sehr viel schneller
umherzubewegen, wenn Du Dich einmal daran gewöhnt hast. Wirklich!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1 -1
View File
@@ -542,7 +542,7 @@ Nota: ¡Esto es muy útil en la detección de errores en un programa con
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lección 5.3: UN MANDATO DE ESCRITURA SELECTIVO
** Para guardar parte del fuchero escriba :#,# NOMBRE_DEL_FICHERO **
** Para guardar parte del fichero escriba :#,# NOMBRE_DEL_FICHERO **
1. Escriba de nuevo, una vez más, :!dir o :!ls para obtener una lista
+2 -2
View File
@@ -88,7 +88,7 @@ NOTE : :q! <Entr
4. Répétez les étapes 2 à 4 jusqu'à ce que la phrase soit correcte.
---> La vvache à sautéé au-ddessus dde la luune.
---> La vvache a sautéé au-ddessus dde la luune.
5. Maintenant que la ligne est correcte, passez à la Leçon 1.4.
@@ -1034,5 +1034,5 @@ NOTE : Le compl
Dernières mises à jour par Dominique Pellé.
E-mail : dominique.pelle@gmail.com
Last Change : 2017 Jan 16
Last Change : 2017 Jun 30
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+25 -24
View File
@@ -147,18 +147,18 @@ NOTE:
ません。
2. シェルプロンプトでこのコマンドをタイプします: vim tutor <ENTER>
'vim'が Vim エディタを起動するコマンド、'tutor' は編集したいファイルの
'vim' が Vim エディタを起動するコマンド、'tutor' は編集したいファイルの
名前です。変更してもよいファイルを使いましょう。
3. 前のレッスンで学んだように、テキストを挿入、削除します。
4. 変更をファイルに保存します: :wq <ENTER>
4. 変更をファイルに保存します: :wq <ENTER>
5. ステップ 1 で vimtutor を終了した場合は vimtutor を再度起動し、以下の
要約へ進みましょう。
6. 以上のステップを読んで理解した上でこれを実行しましょう。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 1 要約
@@ -558,11 +558,12 @@ NOTE:
1. 以下の ---> と示された行にカーソルを移動しましょう。
2. :s/thee/the <ENTER> とタイプしましょう。このコマンドはその行で最初に見
かったものにだけ行われることに気をつけましょう。
2. :s/thee/the <ENTER> とタイプしましょう。このコマンドはその行で最初に見
かったものにだけ行われることに気をつけましょう。
3. では :s/thee/the/g とタイプしましょう。行全体を置換することを意味します。
この変更はその行で見つかった全ての箇所に対して行われます。
3. では :s/thee/the/g とタイプしましょう。追加した g フラグは行全体を置換す
ることを意味します。この変更はその行で見つかった全ての箇所に対して行われ
ます。
---> thee best time to see thee flowers is in thee spring.
@@ -638,8 +639,8 @@ NOTE:
NOTE: ここで Vim を終了し、ファイル名 TEST と共に起動すると、保存した時の
チュートリアルの複製ができ上がるはずです。
5. さらに、次のようにタイプしてファイルを消しましょう(MS-DOS): :!del TEST
もしくは(Unix): :!rm TEST
5. さらに、次のようにタイプしてファイルを消しましょう(Windows): :!del TEST
もしくは(Unix): :!rm TEST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -696,7 +697,7 @@ NOTE:
1. :!command によって 外部コマンドを実行します。
よく使う例:
(MS-DOS) (Unix)
(Windows) (Unix)
:!dir :!ls - ディレクトリ内の一覧を見る。
:!del FILENAME :!rm FILENAME - ファイルを削除する。
@@ -718,7 +719,7 @@ NOTE:
** o をタイプすると、カーソルの下の行が開き、挿入モードに入ります **
1. 以下の ---> と示された行にカーソルを移動しましょう。
1. 以下の ---> と示された最初の行にカーソルを移動しましょう。
2. o (小文字) をタイプして、カーソルの下の行を開き、挿入モードに入ります。
@@ -741,7 +742,7 @@ NOTE:
** カーソルの次の位置からテキストを追加するには a とタイプします **
1. カーソルを ---> で示された行へ移動しましょう。
1. カーソルを ---> で示された最初の行へ移動しましょう。
2. e を押して li の終端部までカーソルを移動します。
@@ -751,7 +752,7 @@ NOTE:
します。
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.
@@ -788,9 +789,9 @@ NOTE:
** テキストのコピーにはオペレータ y を、ペーストには p を使います **
1. ---> と示された行へ移動し、カーソルを "a)" の後に置いておきます。
2. v でビジュアルモードを開始し、"first" の手前までカーソルを移動します。
3. y をタイプして強調表示されたテキストを yank (コピー)します。
4. 次の行の行末までカーソルを移動します: j$
@@ -810,7 +811,7 @@ NOTE:
** 検索や置換の際に大文字/小文字を無視するには、オプションを設定します **
1. 次の様に入力して 'ignore' を検索しましょう: /ignore <ENTER>
1. 次の様に入力して 'ignore' を検索しましょう: /ignore <ENTER>
n を押して何度か検索を繰り返します。
2. 次の様に入力して 'ic' (Ignore Case の略) オプションを設定します: :set ic
@@ -820,13 +821,13 @@ NOTE:
4. 'hlsearch' と 'incsearch' オプションを設定しましょう: :set hls is
5. 検索コマンドを再入力して、何が起こるか見てみましょう: /ignore <ENTER>
5. 検索コマンドを再入力して、何が起こるか見てみましょう: /ignore <ENTER>
6. 大文字小文字の区別を無効にするには次の様に入力します: :set noic
NOTE: マッチの強調表示をやめるには次の様に入力します: :nohlsearch
NOTE: マッチの強調表示をやめるには次の様に入力します: :nohlsearch
NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたいならば、フレーズに \c
を使用します: /ignore\c <ENTER>
を使用します: /ignore\c <ENTER>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 6 要約
@@ -843,12 +844,12 @@ NOTE: 1
5. 大文字の R をタイプすると置換モードに入り、<ESC>を押すと抜ける。
6. ":set xxx" とタイプするとオプション "xxx" が設定される。
'ic' 'ignorecase' 検索時に大文字小文字の区別しない
'ic' 'ignorecase' 検索時に大文字小文字の区別しない
'is' 'incsearch' 検索フレーズに部分マッチしている部分を表示する
'hls' 'hlsearch' マッチするすべを強調表示する
長い方、短い方、どちらのオプション名でも使用できます。
7. "no" を付与し、オプションを無効にします: :set noic
7. オプションを無効にするには "no" を付与します: :set noic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 7.1: オンラインヘルプコマンド
@@ -884,7 +885,7 @@ NOTE: 1
1. "vimrc" ファイルの編集を開始する。これはシステムに依存します。
:edit ~/.vimrc UNIX 向け
:edit $VIM/_vimrc MS-Windows 向け
:edit $VIM/_vimrc Windows 向け
2. ここでサンプルの "vimrc" を読み込みます。
:read $VIMRUNTIME/vimrc_example.vim
@@ -910,7 +911,7 @@ NOTE: 1
4. CTRL-D を押すと Vim は "e" から始まるコマンドの一覧を表示します。
5. <TAB> を押すと Vim は ":edit" というコマンド名を補完します。
5. d<TAB> とタイプすると Vim は ":edit" というコマンド名を補完します。
6. さらに空白と、既存のファイル名の始まりを加えます: :edit FIL
@@ -923,7 +924,7 @@ NOTE:
レッスン 7 要約
1. ヘルプウィンドウを開くには :help とするか <F1> もしくは <Help> を押す。
1. ヘルプウィンドウを開くには :help とするか <F1> もしくは <HELP> を押す。
2. コマンド(cmd)のヘルプを検索するには :help cmd とタイプする。
+25 -24
View File
@@ -147,18 +147,18 @@ NOTE:
ません。
2. シェルプロンプトでこのコマンドをタイプします: vim tutor <ENTER>
'vim'が Vim エディタを起動するコマンド、'tutor' は編集したいファイルの
'vim' が Vim エディタを起動するコマンド、'tutor' は編集したいファイルの
名前です。変更してもよいファイルを使いましょう。
3. 前のレッスンで学んだように、テキストを挿入、削除します。
4. 変更をファイルに保存します: :wq <ENTER>
4. 変更をファイルに保存します: :wq <ENTER>
5. ステップ 1 で vimtutor を終了した場合は vimtutor を再度起動し、以下の
要約へ進みましょう。
6. 以上のステップを読んで理解した上でこれを実行しましょう。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 1 要約
@@ -558,11 +558,12 @@ NOTE:
1. 以下の ---> と示された行にカーソルを移動しましょう。
2. :s/thee/the <ENTER> とタイプしましょう。このコマンドはその行で最初に見
かったものにだけ行われることに気をつけましょう。
2. :s/thee/the <ENTER> とタイプしましょう。このコマンドはその行で最初に見
かったものにだけ行われることに気をつけましょう。
3. では :s/thee/the/g とタイプしましょう。行全体を置換することを意味します。
この変更はその行で見つかった全ての箇所に対して行われます。
3. では :s/thee/the/g とタイプしましょう。追加した g フラグは行全体を置換す
ることを意味します。この変更はその行で見つかった全ての箇所に対して行われ
ます。
---> thee best time to see thee flowers is in thee spring.
@@ -638,8 +639,8 @@ NOTE:
NOTE: ここで Vim を終了し、ファイル名 TEST と共に起動すると、保存した時の
チュートリアルの複製ができ上がるはずです。
5. さらに、次のようにタイプしてファイルを消しましょう(MS-DOS): :!del TEST
もしくは(Unix): :!rm TEST
5. さらに、次のようにタイプしてファイルを消しましょう(Windows): :!del TEST
もしくは(Unix): :!rm TEST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -696,7 +697,7 @@ NOTE:
1. :!command によって 外部コマンドを実行します。
よく使う例:
(MS-DOS) (Unix)
(Windows) (Unix)
:!dir :!ls - ディレクトリ内の一覧を見る。
:!del FILENAME :!rm FILENAME - ファイルを削除する。
@@ -718,7 +719,7 @@ NOTE:
** o をタイプすると、カーソルの下の行が開き、挿入モードに入ります **
1. 以下の ---> と示された行にカーソルを移動しましょう。
1. 以下の ---> と示された最初の行にカーソルを移動しましょう。
2. o (小文字) をタイプして、カーソルの下の行を開き、挿入モードに入ります。
@@ -741,7 +742,7 @@ NOTE:
** カーソルの次の位置からテキストを追加するには a とタイプします **
1. カーソルを ---> で示された行へ移動しましょう。
1. カーソルを ---> で示された最初の行へ移動しましょう。
2. e を押して li の終端部までカーソルを移動します。
@@ -751,7 +752,7 @@ NOTE:
します。
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.
@@ -788,9 +789,9 @@ NOTE:
** テキストのコピーにはオペレータ y を、ペーストには p を使います **
1. ---> と示された行へ移動し、カーソルを "a)" の後に置いておきます。
2. v でビジュアルモードを開始し、"first" の手前までカーソルを移動します。
3. y をタイプして強調表示されたテキストを yank (コピー)します。
4. 次の行の行末までカーソルを移動します: j$
@@ -810,7 +811,7 @@ NOTE:
** 検索や置換の際に大文字/小文字を無視するには、オプションを設定します **
1. 次の様に入力して 'ignore' を検索しましょう: /ignore <ENTER>
1. 次の様に入力して 'ignore' を検索しましょう: /ignore <ENTER>
n を押して何度か検索を繰り返します。
2. 次の様に入力して 'ic' (Ignore Case の略) オプションを設定します: :set ic
@@ -820,13 +821,13 @@ NOTE:
4. 'hlsearch' と 'incsearch' オプションを設定しましょう: :set hls is
5. 検索コマンドを再入力して、何が起こるか見てみましょう: /ignore <ENTER>
5. 検索コマンドを再入力して、何が起こるか見てみましょう: /ignore <ENTER>
6. 大文字小文字の区別を無効にするには次の様に入力します: :set noic
NOTE: マッチの強調表示をやめるには次の様に入力します: :nohlsearch
NOTE: マッチの強調表示をやめるには次の様に入力します: :nohlsearch
NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたいならば、フレーズに \c
を使用します: /ignore\c <ENTER>
を使用します: /ignore\c <ENTER>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 6 要約
@@ -843,12 +844,12 @@ NOTE: 1
5. 大文字の R をタイプすると置換モードに入り、<ESC>を押すと抜ける。
6. ":set xxx" とタイプするとオプション "xxx" が設定される。
'ic' 'ignorecase' 検索時に大文字小文字の区別しない
'ic' 'ignorecase' 検索時に大文字小文字の区別しない
'is' 'incsearch' 検索フレーズに部分マッチしている部分を表示する
'hls' 'hlsearch' マッチするすべを強調表示する
長い方、短い方、どちらのオプション名でも使用できます。
7. "no" を付与し、オプションを無効にします: :set noic
7. オプションを無効にするには "no" を付与します: :set noic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 7.1: オンラインヘルプコマンド
@@ -884,7 +885,7 @@ NOTE: 1
1. "vimrc" ファイルの編集を開始する。これはシステムに依存します。
:edit ~/.vimrc UNIX 向け
:edit $VIM/_vimrc MS-Windows 向け
:edit $VIM/_vimrc Windows 向け
2. ここでサンプルの "vimrc" を読み込みます。
:read $VIMRUNTIME/vimrc_example.vim
@@ -910,7 +911,7 @@ NOTE: 1
4. CTRL-D を押すと Vim は "e" から始まるコマンドの一覧を表示します。
5. <TAB> を押すと Vim は ":edit" というコマンド名を補完します。
5. d<TAB> とタイプすると Vim は ":edit" というコマンド名を補完します。
6. さらに空白と、既存のファイル名の始まりを加えます: :edit FIL
@@ -923,7 +924,7 @@ NOTE:
レッスン 7 要約
1. ヘルプウィンドウを開くには :help とするか <F1> もしくは <Help> を押す。
1. ヘルプウィンドウを開くには :help とするか <F1> もしくは <HELP> を押す。
2. コマンド(cmd)のヘルプを検索するには :help cmd とタイプする。
+25 -24
View File
@@ -147,18 +147,18 @@ NOTE: 全てのレッスンを通じて、覚えようとするのではなく
ません。
2. シェルプロンプトでこのコマンドをタイプします: vim tutor <ENTER>
'vim'が Vim エディタを起動するコマンド、'tutor' は編集したいファイルの
'vim' が Vim エディタを起動するコマンド、'tutor' は編集したいファイルの
名前です。変更してもよいファイルを使いましょう。
3. 前のレッスンで学んだように、テキストを挿入、削除します。
4. 変更をファイルに保存します: :wq <ENTER>
4. 変更をファイルに保存します: :wq <ENTER>
5. ステップ 1 で vimtutor を終了した場合は vimtutor を再度起動し、以下の
要約へ進みましょう。
6. 以上のステップを読んで理解した上でこれを実行しましょう。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 1 要約
@@ -558,11 +558,12 @@ NOTE: この機能は括弧が一致していないプログラムをデバッ
1. 以下の ---> と示された行にカーソルを移動しましょう。
2. :s/thee/the <ENTER> とタイプしましょう。このコマンドはその行で最初に見
かったものにだけ行われることに気をつけましょう。
2. :s/thee/the <ENTER> とタイプしましょう。このコマンドはその行で最初に見
かったものにだけ行われることに気をつけましょう。
3. では :s/thee/the/g とタイプしましょう。行全体を置換することを意味します。
この変更はその行で見つかった全ての箇所に対して行われます。
3. では :s/thee/the/g とタイプしましょう。追加した g フラグは行全体を置換す
ることを意味します。この変更はその行で見つかった全ての箇所に対して行われ
ます。
---> thee best time to see thee flowers is in thee spring.
@@ -638,8 +639,8 @@ NOTE: 全ての : コマンドは <ENTER> を押して終了しなければな
NOTE: ここで Vim を終了し、ファイル名 TEST と共に起動すると、保存した時の
チュートリアルの複製ができ上がるはずです。
5. さらに、次のようにタイプしてファイルを消しましょう(MS-DOS): :!del TEST
もしくは(Unix): :!rm TEST
5. さらに、次のようにタイプしてファイルを消しましょう(Windows): :!del TEST
もしくは(Unix): :!rm TEST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -696,7 +697,7 @@ NOTE: 外部コマンドの出力を読み込むことも出来ます。例え
1. :!command によって 外部コマンドを実行します。
よく使う例:
(MS-DOS) (Unix)
(Windows) (Unix)
:!dir :!ls - ディレクトリ内の一覧を見る。
:!del FILENAME :!rm FILENAME - ファイルを削除する。
@@ -718,7 +719,7 @@ NOTE: 外部コマンドの出力を読み込むことも出来ます。例え
** o をタイプすると、カーソルの下の行が開き、挿入モードに入ります **
1. 以下の ---> と示された行にカーソルを移動しましょう。
1. 以下の ---> と示された最初の行にカーソルを移動しましょう。
2. o (小文字) をタイプして、カーソルの下の行を開き、挿入モードに入ります。
@@ -741,7 +742,7 @@ NOTE: 外部コマンドの出力を読み込むことも出来ます。例え
** カーソルの次の位置からテキストを追加するには a とタイプします **
1. カーソルを ---> で示された行へ移動しましょう。
1. カーソルを ---> で示された最初の行へ移動しましょう。
2. e を押して li の終端部までカーソルを移動します。
@@ -751,7 +752,7 @@ NOTE: 外部コマンドの出力を読み込むことも出来ます。例え
します。
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.
@@ -788,9 +789,9 @@ NOTE: 置換モードは挿入モードに似ていますが、全てのタイ
** テキストのコピーにはオペレータ y を、ペーストには p を使います **
1. ---> と示された行へ移動し、カーソルを "a)" の後に置いておきます。
2. v でビジュアルモードを開始し、"first" の手前までカーソルを移動します。
3. y をタイプして強調表示されたテキストを yank (コピー)します。
4. 次の行の行末までカーソルを移動します: j$
@@ -810,7 +811,7 @@ NOTE: 置換モードは挿入モードに似ていますが、全てのタイ
** 検索や置換の際に大文字/小文字を無視するには、オプションを設定します **
1. 次の様に入力して 'ignore' を検索しましょう: /ignore <ENTER>
1. 次の様に入力して 'ignore' を検索しましょう: /ignore <ENTER>
n を押して何度か検索を繰り返します。
2. 次の様に入力して 'ic' (Ignore Case の略) オプションを設定します: :set ic
@@ -820,13 +821,13 @@ NOTE: 置換モードは挿入モードに似ていますが、全てのタイ
4. 'hlsearch' と 'incsearch' オプションを設定しましょう: :set hls is
5. 検索コマンドを再入力して、何が起こるか見てみましょう: /ignore <ENTER>
5. 検索コマンドを再入力して、何が起こるか見てみましょう: /ignore <ENTER>
6. 大文字小文字の区別を無効にするには次の様に入力します: :set noic
NOTE: マッチの強調表示をやめるには次の様に入力します: :nohlsearch
NOTE: マッチの強調表示をやめるには次の様に入力します: :nohlsearch
NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたいならば、フレーズに \c
を使用します: /ignore\c <ENTER>
を使用します: /ignore\c <ENTER>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 6 要約
@@ -843,12 +844,12 @@ NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたい
5. 大文字の R をタイプすると置換モードに入り、<ESC>を押すと抜ける。
6. ":set xxx" とタイプするとオプション "xxx" が設定される。
'ic' 'ignorecase' 検索時に大文字小文字の区別しない
'ic' 'ignorecase' 検索時に大文字小文字の区別しない
'is' 'incsearch' 検索フレーズに部分マッチしている部分を表示する
'hls' 'hlsearch' マッチするすべを強調表示する
長い方、短い方、どちらのオプション名でも使用できます。
7. "no" を付与し、オプションを無効にします: :set noic
7. オプションを無効にするには "no" を付与します: :set noic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 7.1: オンラインヘルプコマンド
@@ -884,7 +885,7 @@ NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたい
1. "vimrc" ファイルの編集を開始する。これはシステムに依存します。
:edit ~/.vimrc UNIX 向け
:edit $VIM/_vimrc MS-Windows 向け
:edit $VIM/_vimrc Windows 向け
2. ここでサンプルの "vimrc" を読み込みます。
:read $VIMRUNTIME/vimrc_example.vim
@@ -910,7 +911,7 @@ NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたい
4. CTRL-D を押すと Vim は "e" から始まるコマンドの一覧を表示します。
5. <TAB> を押すと Vim は ":edit" というコマンド名を補完します。
5. d<TAB> とタイプすると Vim は ":edit" というコマンド名を補完します。
6. さらに空白と、既存のファイル名の始まりを加えます: :edit FIL
@@ -923,7 +924,7 @@ NOTE: 補完は多くのコマンドで動作します。そして CTRL-D と <T
レッスン 7 要約
1. ヘルプウィンドウを開くには :help とするか <F1> もしくは <Help> を押す。
1. ヘルプウィンドウを開くには :help とするか <F1> もしくは <HELP> を押す。
2. コマンド(cmd)のヘルプを検索するには :help cmd とタイプする。
+40 -40
View File
@@ -19,7 +19,7 @@
properly. If you only read the text, you will forget the commands!
Now, make sure that your Caps-Lock key is NOT depressed and press
the j key enough times to move the cursor so that Lesson 1.1
the j key enough times to move the cursor so that lesson 1.1
completely fills the screen.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.1: MOVING THE CURSOR
@@ -36,7 +36,7 @@
2. Hold down the down key (j) until it repeats.
Now you know how to move to the next lesson.
3. Using the down key, move to Lesson 1.2.
3. Using the down key, move to lesson 1.2.
NOTE: If you are ever unsure about something you typed, press <ESC> to place
you in Normal mode. Then retype the command you wanted.
@@ -64,7 +64,7 @@ NOTE: The cursor keys should also work. But using hjkl you will be able to
NOTE: :q! <ENTER> discards any changes you made. In a few lessons you
will learn how to save the changes to a file.
5. Move the cursor down to Lesson 1.3.
5. Move the cursor down to lesson 1.3.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -84,7 +84,7 @@ NOTE: :q! <ENTER> discards any changes you made. In a few lessons you
---> The ccow jumpedd ovverr thhe mooon.
5. Now that the line is correct, go on to Lesson 1.4.
5. Now that the line is correct, go on to lesson 1.4.
NOTE: As you go through this tutor, do not try to memorize, learn by usage.
@@ -126,7 +126,7 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage.
3. As the text has been appended press <ESC> to return to Normal mode.
4. Move the cursor to the second line marked ---> and repeat
4. Move the cursor to the second line marked ---> and repeat
steps 2 and 3 to correct this sentence.
---> There is some text missing from th
@@ -152,13 +152,13 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage.
3. Insert and delete text as you learned in the previous lessons.
4. Save the file with changes and exit Vim with: :wq <ENTER>
4. Save the file with changes and exit Vim with: :wq <ENTER>
5. If you have quit vimtutor in step 1 restart the vimtutor and move down to
the following summary.
6. After reading the above steps and understanding them: do it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1 SUMMARY
@@ -180,7 +180,7 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage.
NOTE: Pressing <ESC> will place you in Normal mode or will cancel
an unwanted and partially completed command.
Now continue with Lesson 2.
Now continue with lesson 2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.1: DELETION COMMANDS
@@ -202,7 +202,7 @@ Now continue with Lesson 2.
---> There are a some words fun that don't belong paper in this sentence.
5. Repeat steps 3 and 4 until the sentence is correct and go to Lesson 2.2.
5. Repeat steps 3 and 4 until the sentence is correct and go to lesson 2.2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -222,7 +222,7 @@ Now continue with Lesson 2.
---> Somebody typed the end of this line twice. end of this line twice.
5. Move on to Lesson 2.3 to understand what is happening.
5. Move on to lesson 2.3 to understand what is happening.
@@ -257,7 +257,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
** Typing a number before a motion repeats it that many times. **
1. Move the cursor to the start of the line marked ---> below.
1. Move the cursor to the start of the line below marked --->.
2. Type 2w to move the cursor two words forward.
@@ -269,7 +269,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
---> This is just a line with words you can move around in.
6. Move on to Lesson 2.5.
6. Move on to lesson 2.5.
@@ -286,10 +286,10 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
1. Move the cursor to the first UPPER CASE word in the line marked --->.
2. Type d2w to delete the two UPPER CASE words
2. Type d2w to delete the two UPPER CASE words.
3. Repeat steps 1 and 2 with a different count to delete the consecutive
UPPER CASE words with one command
UPPER CASE words with one command.
---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up.
@@ -338,7 +338,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
---> Fiix the errors oon thhis line and reeplace them witth undo.
8. These are very useful commands. Now move on to the Lesson 2 Summary.
8. These are very useful commands. Now move on to the lesson 2 Summary.
@@ -372,7 +372,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
** Type p to put previously deleted text after the cursor. **
1. Move the cursor to the first ---> line below.
1. Move the cursor to the first line below marked --->.
2. Type dd to delete the line and store it in a Vim register.
@@ -406,7 +406,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will
---> Whan this lime was tuoed in, someone presswd some wrojg keys!
---> When this line was typed in, someone pressed some wrong keys!
5. Now move on to Lesson 3.3.
5. Now move on to lesson 3.3.
NOTE: Remember that you should be learning by doing, not memorization.
@@ -447,7 +447,7 @@ Notice that ce deletes the word and places you in Insert mode.
2. The motions are the same, such as w (word) and $ (end of line).
3. Move to the first line below marked --->.
3. Move the cursor to the first line below marked --->.
4. Move the cursor to the first error.
@@ -558,7 +558,7 @@ NOTE: This is very useful in debugging a program with unmatched parentheses!
1. Move the cursor to the line below marked --->.
2. Type :s/thee/the <ENTER> . Note that this command only changes the
2. Type :s/thee/the <ENTER> . Note that this command only changes the
first occurrence of "thee" in the line.
3. Now type :s/thee/the/g . Adding the g flag means to substitute
@@ -623,7 +623,7 @@ NOTE: All : commands must be finished by hitting <ENTER>
Lesson 5.2: MORE ON WRITING FILES
** To save the changes made to the text, type :w FILENAME. **
** To save the changes made to the text, type :w FILENAME **
1. Type :!dir or :!ls to get a listing of your directory.
You already know you must hit <ENTER> after this.
@@ -638,7 +638,7 @@ NOTE: All : commands must be finished by hitting <ENTER>
NOTE: If you were to exit Vim and start it again with vim TEST , the file
would be an exact copy of the tutor when you saved it.
5. Now remove the file by typing (MS-DOS): :!del TEST
5. Now remove the file by typing (Windows): :!del TEST
or (Unix): :!rm TEST
@@ -673,7 +673,7 @@ NOTE: Pressing v starts Visual selection. You can move the cursor around
1. Place the cursor just above this line.
NOTE: After executing Step 2 you will see text from Lesson 5.3. Then move
NOTE: After executing Step 2 you will see text from lesson 5.3. Then move
DOWN to see this lesson again.
2. Now retrieve your TEST file using the command :r TEST where TEST is
@@ -681,7 +681,7 @@ NOTE: After executing Step 2 you will see text from Lesson 5.3. Then move
The file you retrieve is placed below the cursor line.
3. To verify that a file was retrieved, cursor back and notice that there
are now two copies of Lesson 5.3, the original and the file version.
are now two copies of lesson 5.3, the original and the file version.
NOTE: You can also read the output of an external command. For example,
:r !ls reads the output of the ls command and puts it below the
@@ -695,7 +695,7 @@ NOTE: You can also read the output of an external command. For example,
1. :!command executes an external command.
Some useful examples are:
(MS-DOS) (Unix)
(Windows) (Unix)
:!dir :!ls - shows a directory listing.
:!del FILENAME :!rm FILENAME - removes file FILENAME.
@@ -717,7 +717,7 @@ NOTE: You can also read the output of an external command. For example,
** Type o to open a line below the cursor and place you in Insert mode. **
1. Move the cursor to the line below marked --->.
1. Move the cursor to the first line below marked --->.
2. Type the lowercase letter o to open up a line BELOW the cursor and place
you in Insert mode.
@@ -740,8 +740,8 @@ NOTE: You can also read the output of an external command. For example,
** Type a to insert text AFTER the cursor. **
1. Move the cursor to the start of the line below marked --->.
1. Move the cursor to the start of the first line below marked --->.
2. Press e until the cursor is on the end of li .
3. Type an a (lowercase) to append text AFTER the cursor.
@@ -750,7 +750,7 @@ NOTE: You can also read the output of an external command. For example,
mode.
5. Use e to move to the next incomplete word and repeat steps 3 and 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.
@@ -786,10 +786,10 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an
** Use the y operator to copy text and p to paste it **
1. Go to the line marked with ---> below and place the cursor after "a)".
1. Move to the line below marked ---> and place the cursor after "a)".
2. Start Visual mode with v and move the cursor to just before "first".
3. Type y to yank (copy) the highlighted text.
4. Move the cursor to the end of the next line: j$
@@ -802,14 +802,14 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an
---> a) this is the first item.
b)
NOTE: you can also use y as an operator; yw yanks one word.
NOTE: You can also use y as an operator; yw yanks one word.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.5: SET OPTION
** Set an option so a search or substitute ignores case **
1. Search for 'ignore' by entering: /ignore <ENTER>
1. Search for 'ignore' by entering: /ignore <ENTER>
Repeat several times by pressing n .
2. Set the 'ic' (Ignore case) option by entering: :set ic
@@ -823,9 +823,9 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an
6. To disable ignoring case enter: :set noic
NOTE: To remove the highlighting of matches enter: :nohlsearch
NOTE: To remove the highlighting of matches enter: :nohlsearch
NOTE: If you want to ignore case for just one search command, use \c
in the phrase: /ignore\c <ENTER>
in the phrase: /ignore\c <ENTER>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6 SUMMARY
@@ -883,7 +883,7 @@ NOTE: If you want to ignore case for just one search command, use \c
1. Start editing the "vimrc" file. This depends on your system:
:e ~/.vimrc for Unix
:e $VIM/_vimrc for MS-Windows
:e $VIM/_vimrc for Windows
2. Now read the example "vimrc" file contents:
:r $VIMRUNTIME/vimrc_example.vim
@@ -909,7 +909,7 @@ NOTE: If you want to ignore case for just one search command, use \c
4. Press CTRL-D and Vim will show a list of commands that start with "e".
5. Press <TAB> and Vim will complete the command name to ":edit".
5. Type d<TAB> and Vim will complete the command name to ":edit".
6. Now add a space and the start of an existing file name: :edit FIL
@@ -922,13 +922,13 @@ NOTE: Completion works for many commands. Just try pressing CTRL-D and
Lesson 7 SUMMARY
1. Type :help or press <F1> or <Help> to open a help window.
1. Type :help or press <F1> or <HELP> to open a help window.
2. Type :help cmd to find help on cmd .
3. Type CTRL-W CTRL-W to jump to another window
3. Type CTRL-W CTRL-W to jump to another window.
4. Type :q to close the help window
4. Type :q to close the help window.
5. Create a vimrc startup script to keep your preferred settings.
+5 -11
View File
@@ -59,7 +59,7 @@ if s:ext =~? '\.en'
let s:ext = ""
endif
" The japanese tutor is available in two encodings, guess which one to use
" The Japanese tutor is available in three encodings, guess which one to use
" The "sjis" one is actually "cp932", it doesn't matter for this text.
if s:ext =~? '\.ja'
if &enc =~ "euc"
@@ -69,7 +69,7 @@ if s:ext =~? '\.ja'
endif
endif
" The korean tutor is available in two encodings, guess which one to use
" The Korean tutor is available in two encodings, guess which one to use
if s:ext =~? '\.ko'
if &enc != "utf-8"
let s:ext = ".ko.euc"
@@ -169,15 +169,6 @@ if s:ext =~? '\.hr'
endif
endif
" Esperanto is only available in utf-8
if s:ext =~? '\.eo'
let s:ext = ".eo.utf-8"
endif
" Vietnamese is only available in utf-8
if s:ext =~? '\.vi'
let s:ext = ".vi.utf-8"
endif
" If 'encoding' is utf-8 s:ext must end in utf-8.
if &enc == 'utf-8' && s:ext !~ '\.utf-8'
let s:ext .= '.utf-8'
@@ -190,6 +181,9 @@ let s:tutorxx = $VIMRUNTIME . s:tutorfile . s:ext
" 3. Finding the file:
if filereadable(s:tutorxx)
let $TUTOR = s:tutorxx
elseif s:ext !~ '\.utf-8' && filereadable(s:tutorxx . ".utf-8")
" Fallback to utf-8 if available.
let $TUTOR = s:tutorxx . ".utf-8"
else
let $TUTOR = $VIMRUNTIME . s:tutorfile
echo "The file " . s:tutorxx . " does not exist.\n"
+1 -1
View File
@@ -35,7 +35,7 @@
---> 現在您應該已經學會如何移動到下一講吧。
3. 現在請使用下行鍵,將光標移動到第二講
3. 現在請使用下行鍵,將光標移動到第一講第二節
提示︰如果您不敢確定您所按下的字母,請按下<ESC>鍵回到正常(Normal)模式。
然後再次從鍵盤輸入您想要的命令。
+2 -2
View File
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Vim
GenericName=Text Editor
GenericName[da]=Tekstredigering
GenericName[da]=Teksteditor
GenericName[de]=Texteditor
GenericName[pl]=Edytor tekstu
Comment=Edit text files
@@ -16,7 +16,7 @@ Comment[bs]=Izmijeni tekstualne datoteke
Comment[ca]=Edita fitxers de text
Comment[cs]=Úprava textových souborů
Comment[cy]=Golygu ffeiliau testun
Comment[da]=Redigér tekstfiler
Comment[da]=Rediger tekstfiler
Comment[de]=Textdateien bearbeiten
Comment[el]=Επεξεργασία αρχείων κειμένου
Comment[en_CA]=Edit text files
+1
View File
@@ -118,6 +118,7 @@ NEW_TESTS = \
test_messages \
test_mksession \
test_mksession_utf8 \
test_modeline \
test_nested_function \
test_netbeans \
test_normal \
+1
View File
@@ -729,6 +729,7 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
return FAIL;
if (*s != NUL) /* check for trailing chars after expr */
{
clear_tv(rettv);
EMSG2(_(e_invexpr2), s);
return FAIL;
}
+5
View File
@@ -5655,10 +5655,12 @@ get_win_info(win_T *wp, short tpnr, short winnr)
dict_add_number(dict, "winnr", winnr);
dict_add_number(dict, "winid", wp->w_id);
dict_add_number(dict, "height", wp->w_height);
dict_add_number(dict, "winrow", wp->w_winrow + 1);
#ifdef FEAT_MENU
dict_add_number(dict, "winbar", wp->w_winbar_height);
#endif
dict_add_number(dict, "width", wp->w_width);
dict_add_number(dict, "wincol", wp->w_wincol + 1);
dict_add_number(dict, "bufnr", wp->w_buffer->b_fnum);
#ifdef FEAT_TERMINAL
@@ -6313,7 +6315,9 @@ f_has(typval_T *argvars, typval_T *rettv)
#ifdef FEAT_OLE
"ole",
#endif
#ifdef FEAT_EVAL
"packages",
#endif
#ifdef FEAT_PATH_EXTRA
"path_extra",
#endif
@@ -11664,6 +11668,7 @@ f_spellbadword(typval_T *argvars UNUSED, typval_T *rettv)
break;
}
str += len;
capcol -= len;
}
}
}
+2 -4
View File
@@ -2820,8 +2820,7 @@ gui_mch_find_dialog(exarg_T *eap)
s_findrep_hwnd = FindText((LPFINDREPLACE) &s_findrep_struct);
}
set_window_title(s_findrep_hwnd,
_("Find string (use '\\\\' to find a '\\')"));
set_window_title(s_findrep_hwnd, _("Find string"));
(void)SetFocus(s_findrep_hwnd);
s_findrep_is_find = TRUE;
@@ -2855,8 +2854,7 @@ gui_mch_replace_dialog(exarg_T *eap)
(LPFINDREPLACE) &s_findrep_struct);
}
set_window_title(s_findrep_hwnd,
_("Find & Replace (use '\\\\' to find a '\\')"));
set_window_title(s_findrep_hwnd, _("Find & Replace"));
(void)SetFocus(s_findrep_hwnd);
s_findrep_is_find = FALSE;
+50 -19
View File
@@ -253,14 +253,23 @@ void (*dll_lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n);
void (*dll_lua_pushboolean) (lua_State *L, int b);
void (*dll_lua_pushlightuserdata) (lua_State *L, void *p);
void (*dll_lua_getfield) (lua_State *L, int idx, const char *k);
#if LUA_VERSION_NUM <= 502
void (*dll_lua_rawget) (lua_State *L, int idx);
void (*dll_lua_rawgeti) (lua_State *L, int idx, int n);
#else
int (*dll_lua_rawget) (lua_State *L, int idx);
int (*dll_lua_rawgeti) (lua_State *L, int idx, lua_Integer n);
#endif
void (*dll_lua_createtable) (lua_State *L, int narr, int nrec);
void *(*dll_lua_newuserdata) (lua_State *L, size_t sz);
int (*dll_lua_getmetatable) (lua_State *L, int objindex);
void (*dll_lua_setfield) (lua_State *L, int idx, const char *k);
void (*dll_lua_rawset) (lua_State *L, int idx);
#if LUA_VERSION_NUM <= 502
void (*dll_lua_rawseti) (lua_State *L, int idx, int n);
#else
void (*dll_lua_rawseti) (lua_State *L, int idx, lua_Integer n);
#endif
int (*dll_lua_setmetatable) (lua_State *L, int objindex);
int (*dll_lua_next) (lua_State *L, int idx);
/* libs */
@@ -958,9 +967,12 @@ luaV_dict_newindex(lua_State *L)
typval_T v;
if (d->dv_lock)
luaL_error(L, "dict is locked");
if (key != NULL && *key == NUL)
if (key == NULL)
return 0;
if (*key == NUL)
luaL_error(L, "empty key");
if (!lua_isnil(L, 3)) { /* read value? */
if (!lua_isnil(L, 3)) /* read value? */
{
luaV_checktypval(L, 3, &v, "setting dict item");
if (d->dv_scope == VAR_DEF_SCOPE && v.v_type == VAR_FUNC)
luaL_error(L, "cannot assign funcref to builtin scope");
@@ -968,13 +980,15 @@ luaV_dict_newindex(lua_State *L)
di = dict_find(d, key, -1);
if (di == NULL) /* non-existing key? */
{
if (lua_isnil(L, 3)) return 0;
if (lua_isnil(L, 3))
return 0;
di = dictitem_alloc(key);
if (di == NULL) return 0;
if (di == NULL)
return 0;
if (dict_add(d, di) == FAIL)
{
vim_free(di);
return 0;
vim_free(di);
return 0;
}
}
else
@@ -1066,15 +1080,22 @@ luaV_funcref_call(lua_State *L)
f->args.vval.v_list = list_alloc();
rettv.v_type = VAR_UNKNOWN; /* as in clear_tv */
for (i = 0; i < n; i++) {
luaV_checktypval(L, i + 2, &v, "calling funcref");
list_append_tv(f->args.vval.v_list, &v);
if (f->args.vval.v_list == NULL)
status = FAIL;
else
{
for (i = 0; i < n; i++)
{
luaV_checktypval(L, i + 2, &v, "calling funcref");
list_append_tv(f->args.vval.v_list, &v);
}
status = func_call(f->tv.vval.v_string, &f->args,
NULL, f->self, &rettv);
if (status == OK)
luaV_pushtypval(L, &rettv);
clear_tv(&f->args);
clear_tv(&rettv);
}
status = func_call(f->tv.vval.v_string, &f->args, NULL, f->self, &rettv);
if (status == OK)
luaV_pushtypval(L, &rettv);
clear_tv(&f->args);
clear_tv(&rettv);
if (status != OK)
luaL_error(L, "cannot call funcref");
return 1;
@@ -1521,13 +1542,16 @@ luaV_list(lua_State *L)
else
{
luaV_newlist(L, l);
if (initarg) { /* traverse table to init dict */
if (initarg) /* traverse table to init list */
{
int notnil, i = 0;
typval_T v;
do {
do
{
lua_rawgeti(L, 1, ++i);
notnil = !lua_isnil(L, -1);
if (notnil) {
if (notnil)
{
luaV_checktypval(L, -1, &v, "vim.list");
list_append_tv(l, &v);
}
@@ -1560,13 +1584,20 @@ luaV_dict(lua_State *L)
char_u *key;
dictitem_T *di;
typval_T v;
lua_pushvalue(L, -2); /* dup key in case it's a number */
key = (char_u *) lua_tostring(L, -1);
if (key != NULL && *key == NUL)
if (key == NULL)
{
lua_pushnil(L);
return 1;
}
if (*key == NUL)
luaL_error(L, "table has empty key");
luaV_checktypval(L, -2, &v, "vim.dict"); /* value */
di = dictitem_alloc(key);
if (di == NULL || dict_add(d, di) == FAIL) {
if (di == NULL || dict_add(d, di) == FAIL)
{
vim_free(di);
lua_pushnil(L);
return 1;
+45 -12
View File
@@ -199,6 +199,9 @@ typedef int perl_key;
# define Perl_gv_stashpv dll_Perl_gv_stashpv
# define Perl_markstack_grow dll_Perl_markstack_grow
# define Perl_mg_find dll_Perl_mg_find
# if (PERL_REVISION == 5) && (PERL_VERSION >= 28)
# define Perl_mg_get dll_Perl_mg_get
# endif
# define Perl_newXS dll_Perl_newXS
# define Perl_newSV dll_Perl_newSV
# define Perl_newSViv dll_Perl_newSViv
@@ -342,6 +345,9 @@ static I32* (*Perl_markstack_grow)(pTHX);
static void (*Perl_markstack_grow)(pTHX);
# endif
static MAGIC* (*Perl_mg_find)(pTHX_ SV*, int);
# if (PERL_REVISION == 5) && (PERL_VERSION >= 28)
static int (*Perl_mg_get)(pTHX_ SV*);
# endif
static CV* (*Perl_newXS)(pTHX_ char*, XSUBADDR_t, char*);
static SV* (*Perl_newSV)(pTHX_ STRLEN);
static SV* (*Perl_newSViv)(pTHX_ IV);
@@ -494,6 +500,9 @@ static struct {
{"Perl_gv_stashpv", (PERL_PROC*)&Perl_gv_stashpv},
{"Perl_markstack_grow", (PERL_PROC*)&Perl_markstack_grow},
{"Perl_mg_find", (PERL_PROC*)&Perl_mg_find},
# if (PERL_REVISION == 5) && (PERL_VERSION >= 28)
{"Perl_mg_get", (PERL_PROC*)&Perl_mg_get},
# endif
{"Perl_newXS", (PERL_PROC*)&Perl_newXS},
{"Perl_newSV", (PERL_PROC*)&Perl_newSV},
{"Perl_newSViv", (PERL_PROC*)&Perl_newSViv},
@@ -845,6 +854,14 @@ newBUFrv(SV *rv, buf_T *ptr)
return sv_bless(rv, gv_stashpv("VIBUF", TRUE));
}
#if 0
SV *__sv_save[1024];
int __sv_save_ix;
# define D_Save_Sv(sv) do { if (__sv_save_ix < 1024) __sv_save[__sv_save_ix++] = (sv); } while (0)
#else
# define D_Save_Sv(sv) NOOP
#endif
/*
* perl_win_free
* Remove all references to the window to be destroyed
@@ -852,17 +869,27 @@ newBUFrv(SV *rv, buf_T *ptr)
void
perl_win_free(win_T *wp)
{
if (wp->w_perl_private)
sv_setiv((SV *)wp->w_perl_private, 0);
return;
if (wp->w_perl_private && perl_interp != NULL)
{
SV *sv = (SV*)wp->w_perl_private;
D_Save_Sv(sv);
sv_setiv(sv, 0);
SvREFCNT_dec(sv);
}
wp->w_perl_private = NULL;
}
void
perl_buf_free(buf_T *bp)
{
if (bp->b_perl_private)
sv_setiv((SV *)bp->b_perl_private, 0);
return;
if (bp->b_perl_private && perl_interp != NULL)
{
SV *sv = (SV *)bp->b_perl_private;
D_Save_Sv(sv);
sv_setiv(sv, 0);
SvREFCNT_dec(sv);
}
bp->b_perl_private = NULL;
}
#ifndef PROTO
@@ -885,12 +912,18 @@ I32 cur_val(IV iv, SV *sv)
# endif
{
SV *rv;
if (iv == 0)
rv = newWINrv(newSV(0), curwin);
else
rv = newBUFrv(newSV(0), curbuf);
sv_setsv(sv, rv);
SvREFCNT_dec(SvRV(rv));
if (SvRV(sv) == SvRV(rv))
SvREFCNT_dec(SvRV(rv));
else // XXX: Not sure if the `else` condition are right
// Test_SvREFCNT() pass in all case.
sv_setsv(sv, rv);
return 0;
}
#endif /* !PROTO */
@@ -1539,7 +1572,7 @@ Buffers(...)
else
{
FOR_ALL_BUFFERS(vimbuf)
XPUSHs(newBUFrv(newSV(0), vimbuf));
XPUSHs(sv_2mortal(newBUFrv(newSV(0), vimbuf)));
}
}
else
@@ -1564,7 +1597,7 @@ Buffers(...)
{
vimbuf = buflist_findnr(b);
if (vimbuf)
XPUSHs(newBUFrv(newSV(0), vimbuf));
XPUSHs(sv_2mortal(newBUFrv(newSV(0), vimbuf)));
}
}
}
@@ -1584,7 +1617,7 @@ Windows(...)
else
{
FOR_ALL_WINDOWS(vimwin)
XPUSHs(newWINrv(newSV(0), vimwin));
XPUSHs(sv_2mortal(newWINrv(newSV(0), vimwin)));
}
}
else
@@ -1594,7 +1627,7 @@ Windows(...)
w = (int) SvIV(ST(i));
vimwin = win_find_nr(w);
if (vimwin)
XPUSHs(newWINrv(newSV(0), vimwin));
XPUSHs(sv_2mortal(newWINrv(newSV(0), vimwin)));
}
}
+75
View File
@@ -88,8 +88,12 @@ static PyObject *py_getcwd;
static PyObject *vim_module;
static PyObject *vim_special_path_object;
#if PY_VERSION_HEX >= 0x030700f0
static PyObject *py_find_spec;
#else
static PyObject *py_find_module;
static PyObject *py_load_module;
#endif
static PyObject *VimError;
@@ -539,6 +543,7 @@ PythonIO_Init_io(void)
return 0;
}
#if PY_VERSION_HEX < 0x030700f0
typedef struct
{
PyObject_HEAD
@@ -567,6 +572,7 @@ static struct PyMethodDef LoaderMethods[] = {
{"load_module", (PyCFunction)LoaderLoadModule, METH_VARARGS, ""},
{ NULL, NULL, 0, NULL}
};
#endif
/* Check to see whether a Vim error has been reported, or a keyboard
* interrupt has been detected.
@@ -1163,6 +1169,37 @@ Vim_GetPaths(PyObject *self UNUSED)
return ret;
}
#if PY_VERSION_HEX >= 0x030700f0
static PyObject *
FinderFindSpec(PyObject *self, PyObject *args)
{
char *fullname;
PyObject *paths;
PyObject *target = Py_None;
PyObject *spec;
if (!PyArg_ParseTuple(args, "s|O", &fullname, &target))
return NULL;
if (!(paths = Vim_GetPaths(self)))
return NULL;
spec = PyObject_CallFunction(py_find_spec, "sNN", fullname, paths, target);
Py_DECREF(paths);
if (!spec)
{
if (PyErr_Occurred())
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
return spec;
}
#else
static PyObject *
call_load_module(char *name, int len, PyObject *find_module_result)
{
@@ -1305,6 +1342,7 @@ FinderFindModule(PyObject *self, PyObject *args)
return (PyObject *) loader;
}
#endif
static PyObject *
VimPathHook(PyObject *self UNUSED, PyObject *args)
@@ -1336,7 +1374,11 @@ static struct PyMethodDef VimMethods[] = {
{"chdir", (PyCFunction)VimChdir, METH_VARARGS|METH_KEYWORDS, "Change directory"},
{"fchdir", (PyCFunction)VimFchdir, METH_VARARGS|METH_KEYWORDS, "Change directory"},
{"foreach_rtp", VimForeachRTP, METH_O, "Call given callable for each path in &rtp"},
#if PY_VERSION_HEX >= 0x030700f0
{"find_spec", FinderFindSpec, METH_VARARGS, "Internal use only, returns spec object for any input it receives"},
#else
{"find_module", FinderFindModule, METH_VARARGS, "Internal use only, returns loader object for any input it receives"},
#endif
{"path_hook", VimPathHook, METH_VARARGS, "Hook function to install in sys.path_hooks"},
{"_get_paths", (PyCFunction)Vim_GetPaths, METH_NOARGS, "Get &rtp-based additions to sys.path"},
{ NULL, NULL, 0, NULL}
@@ -6545,6 +6587,7 @@ init_structs(void)
OptionsType.tp_traverse = (traverseproc)OptionsTraverse;
OptionsType.tp_clear = (inquiry)OptionsClear;
#if PY_VERSION_HEX < 0x030700f0
vim_memset(&LoaderType, 0, sizeof(LoaderType));
LoaderType.tp_name = "vim.Loader";
LoaderType.tp_basicsize = sizeof(LoaderObject);
@@ -6552,6 +6595,7 @@ init_structs(void)
LoaderType.tp_doc = "vim message object";
LoaderType.tp_methods = LoaderMethods;
LoaderType.tp_dealloc = (destructor)LoaderDestructor;
#endif
#if PY_MAJOR_VERSION >= 3
vim_memset(&vimmodule, 0, sizeof(vimmodule));
@@ -6583,7 +6627,9 @@ init_types(void)
PYTYPE_READY(FunctionType);
PYTYPE_READY(OptionsType);
PYTYPE_READY(OutputType);
#if PY_VERSION_HEX < 0x030700f0
PYTYPE_READY(LoaderType);
#endif
return 0;
}
@@ -6707,7 +6753,9 @@ static struct object_constant {
{"List", (PyObject *)&ListType},
{"Function", (PyObject *)&FunctionType},
{"Options", (PyObject *)&OptionsType},
#if PY_VERSION_HEX < 0x030700f0
{"_Loader", (PyObject *)&LoaderType},
#endif
};
#define ADD_OBJECT(m, name, obj) \
@@ -6729,6 +6777,10 @@ populate_module(PyObject *m)
PyObject *other_module;
PyObject *attr;
PyObject *imp;
#if PY_VERSION_HEX >= 0x030700f0
PyObject *dict;
PyObject *cls;
#endif
for (i = 0; i < (int)(sizeof(numeric_constants)
/ sizeof(struct numeric_constant));
@@ -6801,6 +6853,28 @@ populate_module(PyObject *m)
ADD_OBJECT(m, "VIM_SPECIAL_PATH", vim_special_path_object);
#if PY_VERSION_HEX >= 0x030700f0
if (!(imp = PyImport_ImportModule("importlib.machinery")))
return -1;
dict = PyModule_GetDict(imp);
if (!(cls = PyDict_GetItemString(dict, "PathFinder")))
{
Py_DECREF(imp);
return -1;
}
if (!(py_find_spec = PyObject_GetAttrString(cls, "find_spec")))
{
Py_DECREF(imp);
return -1;
}
Py_DECREF(imp);
ADD_OBJECT(m, "_find_spec", py_find_spec);
#else
if (!(imp = PyImport_ImportModule("imp")))
return -1;
@@ -6821,6 +6895,7 @@ populate_module(PyObject *m)
ADD_OBJECT(m, "_find_module", py_find_module);
ADD_OBJECT(m, "_load_module", py_load_module);
#endif
return 0;
}
+48 -23
View File
@@ -1462,7 +1462,7 @@ utf_char2cells(int c)
{0x3000, 0x303e},
{0x3041, 0x3096},
{0x3099, 0x30ff},
{0x3105, 0x312e},
{0x3105, 0x312f},
{0x3131, 0x318e},
{0x3190, 0x31ba},
{0x31c0, 0x31e3},
@@ -1482,7 +1482,7 @@ utf_char2cells(int c)
{0xff01, 0xff60},
{0xffe0, 0xffe6},
{0x16fe0, 0x16fe1},
{0x17000, 0x187ec},
{0x17000, 0x187f1},
{0x18800, 0x18af2},
{0x1b000, 0x1b11e},
{0x1b170, 0x1b2fb},
@@ -1517,13 +1517,15 @@ utf_char2cells(int c)
{0x1f6cc, 0x1f6cc},
{0x1f6d0, 0x1f6d2},
{0x1f6eb, 0x1f6ec},
{0x1f6f4, 0x1f6f8},
{0x1f6f4, 0x1f6f9},
{0x1f910, 0x1f93e},
{0x1f940, 0x1f94c},
{0x1f950, 0x1f96b},
{0x1f980, 0x1f997},
{0x1f9c0, 0x1f9c0},
{0x1f9d0, 0x1f9e6},
{0x1f940, 0x1f970},
{0x1f973, 0x1f976},
{0x1f97a, 0x1f97a},
{0x1f97c, 0x1f9a2},
{0x1f9b0, 0x1f9b9},
{0x1f9c0, 0x1f9c2},
{0x1f9d0, 0x1f9ff},
{0x20000, 0x2fffd},
{0x30000, 0x3fffd}
};
@@ -2348,12 +2350,13 @@ utf_iscomposing(int c)
{0x0730, 0x074a},
{0x07a6, 0x07b0},
{0x07eb, 0x07f3},
{0x07fd, 0x07fd},
{0x0816, 0x0819},
{0x081b, 0x0823},
{0x0825, 0x0827},
{0x0829, 0x082d},
{0x0859, 0x085b},
{0x08d4, 0x08e1},
{0x08d3, 0x08e1},
{0x08e3, 0x0903},
{0x093a, 0x093c},
{0x093e, 0x094f},
@@ -2366,6 +2369,7 @@ utf_iscomposing(int c)
{0x09cb, 0x09cd},
{0x09d7, 0x09d7},
{0x09e2, 0x09e3},
{0x09fe, 0x09fe},
{0x0a01, 0x0a03},
{0x0a3c, 0x0a3c},
{0x0a3e, 0x0a42},
@@ -2393,7 +2397,7 @@ utf_iscomposing(int c)
{0x0bc6, 0x0bc8},
{0x0bca, 0x0bcd},
{0x0bd7, 0x0bd7},
{0x0c00, 0x0c03},
{0x0c00, 0x0c04},
{0x0c3e, 0x0c44},
{0x0c46, 0x0c48},
{0x0c4a, 0x0c4d},
@@ -2493,6 +2497,7 @@ utf_iscomposing(int c)
{0xa880, 0xa881},
{0xa8b4, 0xa8c5},
{0xa8e0, 0xa8f1},
{0xa8ff, 0xa8ff},
{0xa926, 0xa92d},
{0xa947, 0xa953},
{0xa980, 0xa983},
@@ -2523,21 +2528,24 @@ utf_iscomposing(int c)
{0x10a38, 0x10a3a},
{0x10a3f, 0x10a3f},
{0x10ae5, 0x10ae6},
{0x10d24, 0x10d27},
{0x10f46, 0x10f50},
{0x11000, 0x11002},
{0x11038, 0x11046},
{0x1107f, 0x11082},
{0x110b0, 0x110ba},
{0x11100, 0x11102},
{0x11127, 0x11134},
{0x11145, 0x11146},
{0x11173, 0x11173},
{0x11180, 0x11182},
{0x111b3, 0x111c0},
{0x111ca, 0x111cc},
{0x111c9, 0x111cc},
{0x1122c, 0x11237},
{0x1123e, 0x1123e},
{0x112df, 0x112ea},
{0x11300, 0x11303},
{0x1133c, 0x1133c},
{0x1133b, 0x1133c},
{0x1133e, 0x11344},
{0x11347, 0x11348},
{0x1134b, 0x1134d},
@@ -2546,6 +2554,7 @@ utf_iscomposing(int c)
{0x11366, 0x1136c},
{0x11370, 0x11374},
{0x11435, 0x11446},
{0x1145e, 0x1145e},
{0x114b0, 0x114c3},
{0x115af, 0x115b5},
{0x115b8, 0x115c0},
@@ -2553,6 +2562,7 @@ utf_iscomposing(int c)
{0x11630, 0x11640},
{0x116ab, 0x116b7},
{0x1171d, 0x1172b},
{0x1182c, 0x1183a},
{0x11a01, 0x11a0a},
{0x11a33, 0x11a39},
{0x11a3b, 0x11a3e},
@@ -2568,6 +2578,10 @@ utf_iscomposing(int c)
{0x11d3c, 0x11d3d},
{0x11d3f, 0x11d45},
{0x11d47, 0x11d47},
{0x11d8a, 0x11d8e},
{0x11d90, 0x11d91},
{0x11d93, 0x11d97},
{0x11ef3, 0x11ef6},
{0x16af0, 0x16af4},
{0x16b30, 0x16b36},
{0x16f51, 0x16f7e},
@@ -2659,12 +2673,12 @@ static struct interval emoji_all[] =
{0x2640, 0x2640},
{0x2642, 0x2642},
{0x2648, 0x2653},
{0x2660, 0x2660},
{0x265f, 0x2660},
{0x2663, 0x2663},
{0x2665, 0x2666},
{0x2668, 0x2668},
{0x267b, 0x267b},
{0x267f, 0x267f},
{0x267e, 0x267f},
{0x2692, 0x2697},
{0x2699, 0x2699},
{0x269b, 0x269c},
@@ -2759,15 +2773,17 @@ static struct interval emoji_all[] =
{0x1f6e9, 0x1f6e9},
{0x1f6eb, 0x1f6ec},
{0x1f6f0, 0x1f6f0},
{0x1f6f3, 0x1f6f8},
{0x1f6f3, 0x1f6f9},
{0x1f910, 0x1f93a},
{0x1f93c, 0x1f93e},
{0x1f940, 0x1f945},
{0x1f947, 0x1f94c},
{0x1f950, 0x1f96b},
{0x1f980, 0x1f997},
{0x1f9c0, 0x1f9c0},
{0x1f9d0, 0x1f9e6}
{0x1f947, 0x1f970},
{0x1f973, 0x1f976},
{0x1f97a, 0x1f97a},
{0x1f97c, 0x1f9a2},
{0x1f9b0, 0x1f9b9},
{0x1f9c0, 0x1f9c2},
{0x1f9d0, 0x1f9ff}
};
/*
@@ -3034,6 +3050,8 @@ static convertStruct foldCase[] =
{0x1c86,0x1c86,-1,-6204},
{0x1c87,0x1c87,-1,-6180},
{0x1c88,0x1c88,-1,35267},
{0x1c90,0x1cba,1,-3008},
{0x1cbd,0x1cbf,1,-3008},
{0x1e00,0x1e94,2,1},
{0x1e9b,0x1e9b,-1,-58},
{0x1e9e,0x1e9e,-1,-7615},
@@ -3104,13 +3122,14 @@ static convertStruct foldCase[] =
{0xa7b1,0xa7b1,-1,-42282},
{0xa7b2,0xa7b2,-1,-42261},
{0xa7b3,0xa7b3,-1,928},
{0xa7b4,0xa7b6,2,1},
{0xa7b4,0xa7b8,2,1},
{0xab70,0xabbf,1,-38864},
{0xff21,0xff3a,1,32},
{0x10400,0x10427,1,40},
{0x104b0,0x104d3,1,40},
{0x10c80,0x10cb2,1,64},
{0x118a0,0x118bf,1,32},
{0x16e40,0x16e5f,1,32},
{0x1e900,0x1e921,1,34}
};
@@ -3256,6 +3275,8 @@ static convertStruct toLower[] =
{0x10c7,0x10cd,6,7264},
{0x13a0,0x13ef,1,38864},
{0x13f0,0x13f5,1,8},
{0x1c90,0x1cba,1,-3008},
{0x1cbd,0x1cbf,1,-3008},
{0x1e00,0x1e94,2,1},
{0x1e9e,0x1e9e,-1,-7615},
{0x1ea0,0x1efe,2,1},
@@ -3324,12 +3345,13 @@ static convertStruct toLower[] =
{0xa7b1,0xa7b1,-1,-42282},
{0xa7b2,0xa7b2,-1,-42261},
{0xa7b3,0xa7b3,-1,928},
{0xa7b4,0xa7b6,2,1},
{0xa7b4,0xa7b8,2,1},
{0xff21,0xff3a,1,32},
{0x10400,0x10427,1,40},
{0x104b0,0x104d3,1,40},
{0x10c80,0x10cb2,1,64},
{0x118a0,0x118bf,1,32},
{0x16e40,0x16e5f,1,32},
{0x1e900,0x1e921,1,34}
};
@@ -3443,6 +3465,8 @@ static convertStruct toUpper[] =
{0x4cf,0x4cf,-1,-15},
{0x4d1,0x52f,2,-1},
{0x561,0x586,1,-48},
{0x10d0,0x10fa,1,3008},
{0x10fd,0x10ff,1,3008},
{0x13f8,0x13fd,1,-8},
{0x1c80,0x1c80,-1,-6254},
{0x1c81,0x1c81,-1,-6253},
@@ -3505,7 +3529,7 @@ static convertStruct toUpper[] =
{0xa78c,0xa791,5,-1},
{0xa793,0xa797,4,-1},
{0xa799,0xa7a9,2,-1},
{0xa7b5,0xa7b7,2,-1},
{0xa7b5,0xa7b9,2,-1},
{0xab53,0xab53,-1,-928},
{0xab70,0xabbf,1,-38864},
{0xff41,0xff5a,1,-32},
@@ -3513,6 +3537,7 @@ static convertStruct toUpper[] =
{0x104d8,0x104fb,1,-40},
{0x10cc0,0x10cf2,1,-64},
{0x118c0,0x118df,1,-32},
{0x16e60,0x16e7f,1,-32},
{0x1e922,0x1e943,1,-34}
};
+12 -9
View File
@@ -3399,7 +3399,7 @@ static char_u *set_bool_option(int opt_idx, char_u *varp, int value, int opt_fla
static char_u *set_num_option(int opt_idx, char_u *varp, long value, char_u *errbuf, size_t errbuflen, int opt_flags);
static void check_redraw(long_u flags);
static int findoption(char_u *);
static int find_key_option(char_u *);
static int find_key_option(char_u *arg_arg, int has_lt);
static void showoptions(int all, int opt_flags);
static int optval_default(struct vimoption *, char_u *varp);
static void showoneopt(struct vimoption *, int opt_flags);
@@ -4596,7 +4596,7 @@ do_set(
opt_idx = findoption(arg + 1);
arg[len++] = '>'; /* restore '>' */
if (opt_idx == -1)
key = find_key_option(arg + 1);
key = find_key_option(arg + 1, TRUE);
}
else
{
@@ -4614,7 +4614,7 @@ do_set(
opt_idx = findoption(arg);
arg[len] = nextchar; /* restore nextchar */
if (opt_idx == -1)
key = find_key_option(arg);
key = find_key_option(arg, FALSE);
}
/* remember character after option name */
@@ -5466,7 +5466,7 @@ illegal_char(char_u *errbuf, int c)
string_to_key(char_u *arg, int multi_byte)
{
if (*arg == '<')
return find_key_option(arg + 1);
return find_key_option(arg + 1, TRUE);
if (*arg == '^')
return Ctrl_chr(arg[1]);
if (multi_byte)
@@ -9751,7 +9751,7 @@ get_option_value(
int key;
if (STRLEN(name) == 4 && name[0] == 't' && name[1] == '_'
&& (key = find_key_option(name)) != 0)
&& (key = find_key_option(name, FALSE)) != 0)
{
char_u key_name[2];
char_u *p;
@@ -10041,7 +10041,7 @@ set_option_value(
int key;
if (STRLEN(name) == 4 && name[0] == 't' && name[1] == '_'
&& (key = find_key_option(name)) != 0)
&& (key = find_key_option(name, FALSE)) != 0)
{
char_u key_name[2];
@@ -10162,12 +10162,15 @@ get_encoding_default(void)
/*
* Translate a string like "t_xx", "<t_xx>" or "<S-Tab>" to a key number.
* When "has_lt" is true there is a '<' before "*arg_arg".
* Returns 0 when the key is not recognized.
*/
static int
find_key_option(char_u *arg)
find_key_option(char_u *arg_arg, int has_lt)
{
int key;
int key = 0;
int modifiers;
char_u *arg = arg_arg;
/*
* Don't use get_special_key_code() for t_xx, we don't want it to call
@@ -10175,7 +10178,7 @@ find_key_option(char_u *arg)
*/
if (arg[0] == 't' && arg[1] == '_' && arg[2] && arg[3])
key = TERMCAP2KEY(arg[2], arg[3]);
else
else if (has_lt)
{
--arg; /* put arg at the '<' */
modifiers = 0;
+9 -8
View File
@@ -1,4 +1,4 @@
# Serbian Cyrillic Translation for Vim
# Serbian Cyrillic translation for Vim
#
# Do ":help uganda" in Vim to read copying and usage conditions.
# Do ":help credits" in Vim to see a list of people who contributed.
@@ -13,7 +13,8 @@ msgstr ""
"POT-Creation-Date: 2018-05-15 11:55+0400\n"
"PO-Revision-Date: 2018-05-15 10:50+0400\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: Serbian <LL@li.org>\n"
"Language-Team: Serbian\n"
"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -2027,7 +2028,7 @@ msgid ""
"--- Autocommands ---"
msgstr ""
"\n"
"--- Ауто-Команде ---"
"--- Аутокоманде ---"
#, c-format
msgid "E680: <buffer=%d>: invalid buffer number "
@@ -2040,11 +2041,11 @@ msgid "No matching autocommands"
msgstr "Нема подударајућих аутокоманди"
msgid "E218: autocommand nesting too deep"
msgstr "E218: Угњшждавање аутокоманде је сувише дубоко"
msgstr "E218: Угњеждавање аутокоманде је сувише дубоко"
#, c-format
msgid "%s Autocommands for \"%s\""
msgstr "%s Ауто команде за \"%s\""
msgstr "%s Аутокоманде за \"%s\""
#, c-format
msgid "Executing %s"
@@ -2962,7 +2963,7 @@ msgid ""
msgstr ""
"\n"
"\n"
"употреба:"
"Употреба:"
msgid " vim [arguments] "
msgstr " vim [аргументи] "
@@ -4765,7 +4766,7 @@ msgid "E66: \\z( not allowed here"
msgstr "E66: \\z( овде није дозвољено"
msgid "E67: \\z1 - \\z9 not allowed here"
msgstr "E67: \\z1 и остали онвде нису дозвољени"
msgstr "E67: \\z1 - \\z9 овде нису дозвољени"
#, c-format
msgid "E69: Missing ] after %s%%["
@@ -4891,7 +4892,7 @@ msgid "E873: (NFA regexp) proper termination error"
msgstr "E873: (NFA regexp) грешка правилне терминације"
msgid "E874: (NFA) Could not pop the stack!"
msgstr "E874: (NFA) Скидање са стека није успело !"
msgstr "E874: (NFA) Скидање са стека није успело!"
msgid ""
"E875: (NFA regexp) (While converting from postfix to NFA), too many states "
+222 -191
View File
File diff suppressed because it is too large Load Diff
+7 -4
View File
@@ -50,8 +50,9 @@ typedef struct regprog
{
regengine_T *engine;
unsigned regflags;
unsigned re_engine; /* automatic, backtracking or nfa engine */
unsigned re_flags; /* second argument for vim_regcomp() */
unsigned re_engine; // automatic, backtracking or nfa engine
unsigned re_flags; // second argument for vim_regcomp()
int re_in_use; // prog is being executed
} regprog_T;
/*
@@ -65,7 +66,8 @@ typedef struct
regengine_T *engine;
unsigned regflags;
unsigned re_engine;
unsigned re_flags; /* second argument for vim_regcomp() */
unsigned re_flags;
int re_in_use;
int regstart;
char_u reganch;
@@ -101,7 +103,8 @@ typedef struct
regengine_T *engine;
unsigned regflags;
unsigned re_engine;
unsigned re_flags; /* second argument for vim_regcomp() */
unsigned re_flags;
int re_in_use;
nfa_state_T *start; /* points into state[] */
+211 -218
View File
File diff suppressed because it is too large Load Diff
+8 -3
View File
@@ -3355,8 +3355,11 @@ syn_regexec(
}
#endif
#ifdef FEAT_RELTIME
if (timed_out)
if (timed_out && !syn_win->w_s->b_syn_slow)
{
syn_win->w_s->b_syn_slow = TRUE;
MSG(_("'redrawtime' exceeded, syntax highlighting disabled"));
}
#endif
if (r > 0)
@@ -3575,11 +3578,13 @@ syn_cmd_iskeyword(exarg_T *eap, int syncing UNUSED)
if (*arg == NUL)
{
MSG_PUTS("\n");
MSG_PUTS(_("syntax iskeyword "));
if (curwin->w_s->b_syn_isk != empty_option)
{
MSG_PUTS(_("syntax iskeyword "));
msg_outtrans(curwin->w_s->b_syn_isk);
}
else
msg_outtrans((char_u *)"not set");
msg_outtrans((char_u *)_("syntax iskeyword not set"));
}
else
{
-1
View File
@@ -85,7 +85,6 @@ clean:
-if exist tiny.vim del tiny.vim
-if exist mbyte.vim del mbyte.vim
-if exist mzscheme.vim del mzscheme.vim
-if exist lua.vim del lua.vim
-if exist Xdir1 rd /s /q Xdir1
-if exist Xfind rd /s /q Xfind
-if exist XfakeHOME rd /s /q XfakeHOME
-1
View File
@@ -75,7 +75,6 @@ clean:
-@if exist tiny.vim $(DEL) tiny.vim
-@if exist mbyte.vim $(DEL) mbyte.vim
-@if exist mzscheme.vim $(DEL) mzscheme.vim
-@if exist lua.vim $(DEL) lua.vim
-@if exist Xdir1 $(DELDIR) Xdir1
-@if exist Xfind $(DELDIR) Xfind
-@if exist XfakeHOME $(DELDIR) XfakeHOME
-1
View File
@@ -208,6 +208,5 @@ clean :
-@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.*
-@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.*
-@ if "''F$SEARCH("mzscheme.vim")'" .NES. "" then delete/noconfirm/nolog mzscheme.vim.*
-@ if "''F$SEARCH("lua.vim")'" .NES. "" then delete/noconfirm/nolog lua.vim.*
-@ if "''F$SEARCH("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.*
+1 -1
View File
@@ -51,7 +51,7 @@ $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(VIMPROG)
$(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(SCRIPTS_FIRST)
RM_ON_RUN = test.out X* viminfo
RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok benchmark.out
RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim test.ok benchmark.out
RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u unix.vim $(NO_INITS) -s dotest.in
clean:
-5
View File
@@ -15,7 +15,6 @@ If Vim was not compiled with the +multi_byte feature, the mbyte.vim script will
be set like small.vim above. mbyte.vim is sourced by tests that require the
+multi_byte feature.
Similar logic is applied to the +mzscheme feature, using mzscheme.vim.
Similar logic is applied to the +lua feature, using lua.vim.
STARTTEST
:" If columns or lines are too small, create wrongtermsize.
@@ -33,7 +32,6 @@ w! test.out
qa!
:w! mbyte.vim
:w! mzscheme.vim
:w! lua.vim
:"
:" If +multi_byte feature supported, make mbyte.vim empty.
:if has("multi_byte") | sp another | w! mbyte.vim | q | endif
@@ -41,9 +39,6 @@ qa!
:" If +mzscheme feature supported, make mzscheme.vim empty.
:if has("mzscheme") | sp another | w! mzscheme.vim | q | endif
:"
:" If +lua feature supported, make lua.vim empty.
:if has("lua") | sp another | w! lua.vim | q | endif
:"
:" If +eval feature supported quit here, leaving tiny.vim and small.vim empty.
:" Otherwise write small.vim to skip the test.
:if 1 | q! | endif
+13 -8
View File
@@ -219,6 +219,7 @@ import sys
import re
py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
py37_exception_repr = re.compile(r'([^\(\),])(\)+)$')
def ee(expr, g=globals(), l=locals()):
cb = vim.current.buffer
@@ -227,17 +228,17 @@ def ee(expr, g=globals(), l=locals()):
exec(expr, g, l)
except Exception as e:
if sys.version_info >= (3, 3) and e.__class__ is AttributeError and str(e).find('has no attribute')>=0 and not str(e).startswith("'vim."):
cb.append(expr + ':' + repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1]))))
msg = repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1])))
elif sys.version_info >= (3, 3) and e.__class__ is ImportError and str(e).find('No module named \'') >= 0:
cb.append(expr + ':' + repr((e.__class__, ImportError(str(e).replace("'", '')))))
msg = repr((e.__class__, ImportError(str(e).replace("'", ''))))
elif sys.version_info >= (3, 6) and e.__class__ is ModuleNotFoundError:
# Python 3.6 gives ModuleNotFoundError, change it to an ImportError
cb.append(expr + ':' + repr((ImportError, ImportError(str(e).replace("'", '')))))
msg = repr((ImportError, ImportError(str(e).replace("'", ''))))
elif sys.version_info >= (3, 3) and e.__class__ is TypeError:
m = py33_type_error_pattern.search(str(e))
if m:
msg = '__call__() takes exactly {0} positional argument ({1} given)'.format(m.group(1), m.group(2))
cb.append(expr + ':' + repr((e.__class__, TypeError(msg))))
msg = repr((e.__class__, TypeError(msg)))
else:
msg = repr((e.__class__, e))
# Messages changed with Python 3.6, change new to old.
@@ -249,9 +250,8 @@ def ee(expr, g=globals(), l=locals()):
oldmsg2 = '''"Can't convert 'int' object to str implicitly"'''
if msg.find(newmsg2) > -1:
msg = msg.replace(newmsg2, oldmsg2)
cb.append(expr + ':' + msg)
elif sys.version_info >= (3, 5) and e.__class__ is ValueError and str(e) == 'embedded null byte':
cb.append(expr + ':' + repr((TypeError, TypeError('expected bytes with no null'))))
msg = repr((TypeError, TypeError('expected bytes with no null')))
else:
msg = repr((e.__class__, e))
# Some Python versions say can't, others cannot.
@@ -262,11 +262,16 @@ def ee(expr, g=globals(), l=locals()):
msg = msg.replace('"cannot ', '\'cannot ')
if msg.find(' attributes"') > -1:
msg = msg.replace(' attributes"', ' attributes\'')
cb.append(expr + ':' + msg)
if sys.version_info >= (3, 7):
msg = py37_exception_repr.sub(r'\1,\2', msg)
cb.append(expr + ':' + msg)
else:
cb.append(expr + ':NOT FAILED')
except Exception as e:
cb.append(expr + '::' + repr((e.__class__, e)))
msg = repr((e.__class__, e))
if sys.version_info >= (3, 7):
msg = py37_exception_repr.sub(r'\1,\2', msg)
cb.append(expr + '::' + msg)
EOF
:fun New(...)
: return ['NewStart']+a:000+['NewEnd']
+1
View File
@@ -37,6 +37,7 @@ source test_mapping.vim
source test_match.vim
source test_menu.vim
source test_messages.vim
source test_modeline.vim
source test_partial.vim
source test_popup.vim
source test_put.vim
+21 -2
View File
@@ -46,17 +46,36 @@ function Test_getbufwintabinfo()
let w2_id = win_getid()
tabnew | let w3_id = win_getid()
new | let w4_id = win_getid()
new | let w5_id = win_getid()
vert new | let w5_id = win_getid()
call setwinvar(0, 'signal', 'green')
tabfirst
let winlist = getwininfo()
call assert_equal(5, len(winlist))
call assert_equal(winwidth(1), winlist[0].width)
call assert_equal(1, winlist[0].wincol)
" tabline adds one row in terminal, not in GUI
let tablineheight = winlist[0].winrow == 2 ? 1 : 0
call assert_equal(tablineheight + 1, winlist[0].winrow)
call assert_equal(winbufnr(2), winlist[1].bufnr)
call assert_equal(winheight(2), winlist[1].height)
call assert_equal(1, winlist[1].wincol)
call assert_equal(tablineheight + winheight(1) + 2, winlist[1].winrow)
call assert_equal(1, winlist[2].winnr)
call assert_equal(tablineheight + 1, winlist[2].winrow)
call assert_equal(1, winlist[2].wincol)
call assert_equal(winlist[2].width + 2, winlist[3].wincol)
call assert_equal(1, winlist[4].wincol)
call assert_equal(1, winlist[0].tabnr)
call assert_equal(1, winlist[1].tabnr)
call assert_equal(2, winlist[2].tabnr)
call assert_equal(2, winlist[3].tabnr)
call assert_equal(2, winlist[4].tabnr)
call assert_equal('green', winlist[2].variables.signal)
call assert_equal(winwidth(1), winlist[0].width)
call assert_equal(w4_id, winlist[3].winid)
let winfo = getwininfo(w5_id)[0]
call assert_equal(2, winfo.tabnr)
+18
View File
@@ -254,7 +254,25 @@ func Test_cscopeWithCscopeConnections()
" CleanUp
call CscopeSetupOrClean(0)
endfunc
" Test ":cs add {dir}" (add the {dir}/cscope.out database)
func Test_cscope_add_dir()
call mkdir('Xcscopedir', 'p')
call system('cscope -bk -fXcscopedir/cscope.out ../memfile_test.c')
cs add Xcscopedir
let a = execute('cscope show')
let lines = split(a, "\n", 1)
call assert_equal(3, len(lines))
call assert_equal(' # pid database name prepend path', lines[0])
call assert_equal('', lines[1])
call assert_match('^ 0 \d\+.*Xcscopedir/cscope.out\s\+<none>$', lines[2])
cs kill -1
call delete('Xcscopedir/cscope.out')
call assert_fails('cs add Xcscopedir', 'E563:')
call delete('Xcscopedir', 'd')
endfunc
func Test_cscopequickfix()
+27
View File
@@ -810,6 +810,17 @@ func Test_col()
bw!
endfunc
func Test_inputlist()
call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\<cr>1\<cr>", 'tx')
call assert_equal(1, c)
call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\<cr>2\<cr>", 'tx')
call assert_equal(2, c)
call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\<cr>3\<cr>", 'tx')
call assert_equal(3, c)
call assert_fails('call inputlist("")', 'E686:')
endfunc
func Test_balloon_show()
if has('balloon_eval')
" This won't do anything but must not crash either.
@@ -984,3 +995,19 @@ func Test_libcall_libcallnr()
call assert_fails("call libcall('Xdoesnotexist_', 'getenv', 'HOME')", 'E364:')
call assert_fails("call libcallnr('Xdoesnotexist_', 'strlen', 'abcd')", 'E364:')
endfunc
sandbox function Fsandbox()
normal ix
endfunc
func Test_func_sandbox()
sandbox let F = {-> 'hello'}
call assert_equal('hello', F())
sandbox let F = {-> execute("normal ix\<Esc>")}
call assert_fails('call F()', 'E48:')
unlet F
call assert_fails('call Fsandbox()', 'E48:')
delfunc Fsandbox
endfunc
+2 -2
View File
@@ -1,12 +1,12 @@
" Test glob2regpat()
func Test_invalid()
func Test_glob2regpat_invalid()
call assert_fails('call glob2regpat(1.33)', 'E806:')
call assert_fails('call glob2regpat("}")', 'E219:')
call assert_fails('call glob2regpat("{")', 'E220:')
endfunc
func Test_valid()
func Test_glob2regpat_valid()
call assert_equal('^foo\.', glob2regpat('foo.*'))
call assert_equal('^foo.$', glob2regpat('foo?'))
call assert_equal('\.vim$', glob2regpat('*.vim'))
+8
View File
@@ -0,0 +1,8 @@
" Tests for parsing the modeline.
func Test_modeline_invalid()
" This was reading before allocated memory.
call writefile(['vi:0', 'nothing'], 'Xmodeline')
call assert_fails('split Xmodeline', 'E518:')
bwipe!
endfunc
+27 -5
View File
@@ -219,20 +219,42 @@ EOF
call assert_equal(['&VIM::Msg', 'STDOUT', 'STDERR'], split(l:out, "\n"))
endfunc
func Test_SvREFCNT()
" Run first to get a clean namespace
func Test_000_SvREFCNT()
for i in range(8)
exec 'new X'.i
endfor
new t
perl <<--perl
#line 5 "Test_000_SvREFCNT()"
my ($b, $w);
$b = $curbuf for 0 .. 10;
$w = $curwin for 0 .. 10;
$b = $curbuf for 0 .. 100;
$w = $curwin for 0 .. 100;
() = VIM::Buffers for 0 .. 100;
() = VIM::Windows for 0 .. 100;
VIM::DoCommand('bw! t');
if (exists &Internals::SvREFCNT) {
my $cb = Internals::SvREFCNT($$b);
my $cw = Internals::SvREFCNT($$w);
VIM::Eval("assert_equal(2, $cb)");
VIM::Eval("assert_equal(2, $cw)");
VIM::Eval("assert_equal(2, $cb, 'T1')");
VIM::Eval("assert_equal(2, $cw, 'T2')");
foreach ( VIM::Buffers, VIM::Windows ) {
my $c = Internals::SvREFCNT($_);
VIM::Eval("assert_equal(2, $c, 'T3')");
$c = Internals::SvREFCNT($$_);
# Why only one ref?
# Look wrong but work. Maybe not portable...
VIM::Eval("assert_equal(1, $c, 'T4')");
}
$cb = Internals::SvREFCNT($$curbuf);
$cw = Internals::SvREFCNT($$curwin);
VIM::Eval("assert_equal(3, $cb, 'T5')");
VIM::Eval("assert_equal(3, $cw, 'T6')");
}
VIM::Eval("assert_false($$b)");
VIM::Eval("assert_false($$w)");
--perl
%bw!
endfunc
+10
View File
@@ -324,6 +324,16 @@ func Test_searchpair_skip()
bw!
endfunc
func Test_searchpair_leak()
new
call setline(1, 'if one else another endif')
" The error in the skip expression caused memory to leak.
call assert_fails("call searchpair('\\<if\\>', '\\<else\\>', '\\<endif\\>', '', '\"foo\" 2')", 'E15:')
bwipe!
endfunc
func Test_searchc()
" These commands used to cause memory overflow in searchc().
new
+41
View File
@@ -68,6 +68,47 @@ func Test_z_equal_on_invalid_utf8_word()
bwipe!
endfunc
" Test spellbadword() with argument
func Test_spellbadword()
set spell
call assert_equal(['bycycle', 'bad'], spellbadword('My bycycle.'))
call assert_equal(['another', 'caps'], spellbadword('A sentence. another sentence'))
set spelllang=en
call assert_equal(['', ''], spellbadword('centre'))
call assert_equal(['', ''], spellbadword('center'))
set spelllang=en_us
call assert_equal(['centre', 'local'], spellbadword('centre'))
call assert_equal(['', ''], spellbadword('center'))
set spelllang=en_gb
call assert_equal(['', ''], spellbadword('centre'))
call assert_equal(['center', 'local'], spellbadword('center'))
" Create a small word list to test that spellbadword('...')
" can return ['...', 'rare'].
e Xwords
insert
foo
foobar/?
.
w!
mkspell! Xwords.spl Xwords
set spelllang=Xwords.spl
call assert_equal(['foobar', 'rare'], spellbadword('foo foobar'))
" Typo should not be detected without the 'spell' option.
set spelllang=en_gb nospell
call assert_equal(['', ''], spellbadword('centre'))
call assert_equal(['', ''], spellbadword('My bycycle.'))
call assert_equal(['', ''], spellbadword('A sentence. another sentence'))
call delete('Xwords.spl')
call delete('Xwords')
set spelllang&
set spell&
endfunc
func Test_spellreall()
new
set spell
+2 -4
View File
@@ -266,10 +266,8 @@ u_save(linenr_T top, linenr_T bot)
if (undo_off)
return OK;
if (top > curbuf->b_ml.ml_line_count
|| top >= bot
|| bot > curbuf->b_ml.ml_line_count + 1)
return FALSE; /* rely on caller to do error messages */
if (top >= bot || bot > curbuf->b_ml.ml_line_count + 1)
return FAIL; // rely on caller to give an error message
if (top + 2 == bot)
u_saveline((linenr_T)(top + 1));
+62
View File
@@ -503,7 +503,11 @@ static char *(features[]) =
"-ole",
# endif
#endif
#ifdef FEAT_EVAL
"+packages",
#else
"-packages",
#endif
#ifdef FEAT_PATH_EXTRA
"+path_extra",
#else
@@ -804,6 +808,64 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
207,
/**/
206,
/**/
205,
/**/
204,
/**/
203,
/**/
202,
/**/
201,
/**/
200,
/**/
199,
/**/
198,
/**/
197,
/**/
196,
/**/
195,
/**/
194,
/**/
193,
/**/
192,
/**/
191,
/**/
190,
/**/
189,
/**/
188,
/**/
187,
/**/
186,
/**/
185,
/**/
184,
/**/
183,
/**/
182,
/**/
181,
/**/
180,
/**/
179,
/**/
178,
/**/