mirror of
https://github.com/zoriya/vim.git
synced 2025-12-25 00:25:21 +00:00
Compare commits
172 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
310e2dbaee | ||
|
|
b4d2135518 | ||
|
|
db6ea06335 | ||
|
|
3ed8b1332f | ||
|
|
455009122a | ||
|
|
1e1aca3784 | ||
|
|
c804515003 | ||
|
|
ff65ac84fd | ||
|
|
0d1e8c1203 | ||
|
|
6bf5548df2 | ||
|
|
0bed10a813 | ||
|
|
cc57bb2f85 | ||
|
|
8bb1c3e53e | ||
|
|
9f4fe7c4c3 | ||
|
|
b8b57460f0 | ||
|
|
86b17e914f | ||
|
|
ee739b42c0 | ||
|
|
c35e3de8cc | ||
|
|
81439a6d1b | ||
|
|
dab70c63e1 | ||
|
|
e7eb789ef0 | ||
|
|
b7d929a86f | ||
|
|
9d7a592c80 | ||
|
|
a40aa760a1 | ||
|
|
946e27ab65 | ||
|
|
b6da44ae82 | ||
|
|
41d7523986 | ||
|
|
db5ffaab5a | ||
|
|
e8a3492548 | ||
|
|
72e8f0bcc1 | ||
|
|
8dc907d7d3 | ||
|
|
597a422416 | ||
|
|
15a35c4f4a | ||
|
|
78159bbf9e | ||
|
|
e8d1f20cbd | ||
|
|
deae0f2566 | ||
|
|
de993ea629 | ||
|
|
58cbc914ea | ||
|
|
7ec83432b7 | ||
|
|
b3414595c7 | ||
|
|
ec1561cac5 | ||
|
|
7a54a90744 | ||
|
|
8502c704ba | ||
|
|
f0224c9f08 | ||
|
|
0ae36a5c85 | ||
|
|
822ff866bd | ||
|
|
2d54ec92d4 | ||
|
|
8e7048ca4b | ||
|
|
e639eb44e9 | ||
|
|
0e6c5ef7ef | ||
|
|
3be8585661 | ||
|
|
980e58f7b3 | ||
|
|
e3a8bab630 | ||
|
|
06e4a6df0a | ||
|
|
7116aa0f7d | ||
|
|
c35b0fb181 | ||
|
|
ea389e9103 | ||
|
|
6f6c0f8085 | ||
|
|
2d1fe05fc0 | ||
|
|
82c2585eb8 | ||
|
|
493c178a28 | ||
|
|
dd0402a759 | ||
|
|
846a2ff5f3 | ||
|
|
cbc17d66be | ||
|
|
9a665ba296 | ||
|
|
13600303c5 | ||
|
|
90013c6a75 | ||
|
|
b777618d11 | ||
|
|
e4c21e6899 | ||
|
|
bc6cf6c511 | ||
|
|
b42970535c | ||
|
|
7b129a5ac4 | ||
|
|
cf1b057939 | ||
|
|
cbc67723bd | ||
|
|
050fe7ebad | ||
|
|
1c5a2134db | ||
|
|
e968e36a00 | ||
|
|
715c286355 | ||
|
|
24dc230871 | ||
|
|
caca646bf0 | ||
|
|
8df5acfda9 | ||
|
|
6082bea6ac | ||
|
|
6e13207d82 | ||
|
|
9c235069b2 | ||
|
|
ee4825331a | ||
|
|
be578edae3 | ||
|
|
46ae3cedeb | ||
|
|
59838520c7 | ||
|
|
fd859c9878 | ||
|
|
ed7547da43 | ||
|
|
d442ec7fe2 | ||
|
|
b7547420a4 | ||
|
|
04ad7fe05c | ||
|
|
56b3bf89aa | ||
|
|
1b1063af58 | ||
|
|
3ec7f4e402 | ||
|
|
0d3d5e0483 | ||
|
|
75a8d74cc2 | ||
|
|
f4d7f167f3 | ||
|
|
a7611f60cd | ||
|
|
bcb9898eba | ||
|
|
b96c69d80e | ||
|
|
e512c8c049 | ||
|
|
121f9bdde4 | ||
|
|
1ff32c5c2c | ||
|
|
3d1956bcc9 | ||
|
|
355a95a079 | ||
|
|
d69bd9af3c | ||
|
|
33e87789a7 | ||
|
|
a4f317df89 | ||
|
|
eccb7fc315 | ||
|
|
163d0da508 | ||
|
|
2af78a1408 | ||
|
|
93fc481b57 | ||
|
|
9bdfb0025c | ||
|
|
62f167f716 | ||
|
|
c8836f7025 | ||
|
|
0eac828ab0 | ||
|
|
b21a29be56 | ||
|
|
e29b1feead | ||
|
|
c09551ab79 | ||
|
|
5a4e160ce4 | ||
|
|
7bcdb7d166 | ||
|
|
4c7ab1bb57 | ||
|
|
75b8156a44 | ||
|
|
7e38ea2fb6 | ||
|
|
e9a54227f9 | ||
|
|
7d647820ed | ||
|
|
39c29ed511 | ||
|
|
57ebe6e2f9 | ||
|
|
4ed89cdf41 | ||
|
|
21e854e5ce | ||
|
|
57a728d1df | ||
|
|
5a50c2255c | ||
|
|
b7cb42bc38 | ||
|
|
41571769c9 | ||
|
|
fe5aab63fe | ||
|
|
3e45159ceb | ||
|
|
5bd32f47ec | ||
|
|
6716d9af11 | ||
|
|
7f3be402ce | ||
|
|
c7f025536e | ||
|
|
a1706c958e | ||
|
|
31b7d38611 | ||
|
|
fd3fe98b78 | ||
|
|
efa304d760 | ||
|
|
e7a88a8d4e | ||
|
|
a392038db5 | ||
|
|
922a4664fe | ||
|
|
498af70e06 | ||
|
|
3d6db1467b | ||
|
|
76f3b1ad77 | ||
|
|
73b044dca9 | ||
|
|
2bcaec320a | ||
|
|
7db7784103 | ||
|
|
a6fd37be4f | ||
|
|
158864120d | ||
|
|
c666b5b467 | ||
|
|
b679875b29 | ||
|
|
327aa02dda | ||
|
|
1a3eb8e1b5 | ||
|
|
c410530637 | ||
|
|
7b44934037 | ||
|
|
03305f396f | ||
|
|
5803ae6c07 | ||
|
|
f7ff6e85e8 | ||
|
|
a687837516 | ||
|
|
ed287f9a4e | ||
|
|
4c9a949d00 | ||
|
|
529d2d6369 | ||
|
|
2fb9fa19e2 | ||
|
|
9c8c8c5d30 |
17
.gitignore
vendored
17
.gitignore
vendored
@@ -45,6 +45,9 @@ bcc.cfg
|
||||
*.map
|
||||
*.tds
|
||||
|
||||
# NetBeans
|
||||
nbproject/*
|
||||
|
||||
# Mac OSX
|
||||
src/xxd/xxd.dSYM
|
||||
|
||||
@@ -55,14 +58,16 @@ src/xxd/xxd.dSYM
|
||||
*.swp
|
||||
*~
|
||||
*.pyc
|
||||
*.log
|
||||
src/po/vim.pot
|
||||
|
||||
# Generated by "make test"
|
||||
src/po/*.ck
|
||||
src/testdir/mbyte.vim
|
||||
src/testdir/mzscheme.vim
|
||||
src/testdir/lua.vim
|
||||
src/testdir/small.vim
|
||||
src/testdir/tiny.vim
|
||||
src/po/*.ck
|
||||
src/testdir/mbyte.vim
|
||||
src/testdir/mzscheme.vim
|
||||
src/testdir/lua.vim
|
||||
src/testdir/small.vim
|
||||
src/testdir/tiny.vim
|
||||
src/testdir/test*.out
|
||||
src/testdir/test.log
|
||||
src/memfile_test
|
||||
|
||||
5
Filelist
5
Filelist
@@ -3,6 +3,7 @@
|
||||
|
||||
# source files for all source archives
|
||||
SRC_ALL = \
|
||||
.hgignore \
|
||||
src/README.txt \
|
||||
src/arabic.c \
|
||||
src/arabic.h \
|
||||
@@ -82,9 +83,13 @@ SRC_ALL = \
|
||||
src/testdir/*.in \
|
||||
src/testdir/sautest/autoload/*.vim \
|
||||
src/testdir/test[0-9]*.ok \
|
||||
src/testdir/test[0-9]*a.ok \
|
||||
src/testdir/test_[a-z]*.ok \
|
||||
src/testdir/test49.vim \
|
||||
src/testdir/test60.vim \
|
||||
src/testdir/test83-tags? \
|
||||
src/testdir/test77a.com \
|
||||
src/testdir/test_*.vim \
|
||||
src/testdir/python2/*.py \
|
||||
src/testdir/python3/*.py \
|
||||
src/testdir/pythonx/*.py \
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,49 @@
|
||||
" Vim completion script
|
||||
" Language: HTML and XHTML
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2011 Apr 28
|
||||
" Last Change: 2014 Jun 20
|
||||
|
||||
" Distinguish between HTML versions.
|
||||
" To use with other HTML versions add another "elseif" condition to match
|
||||
" proper DOCTYPE.
|
||||
function! htmlcomplete#DetectOmniFlavor()
|
||||
if &filetype == 'xhtml'
|
||||
let b:html_omni_flavor = 'xhtml10s'
|
||||
else
|
||||
let b:html_omni_flavor = 'html401t'
|
||||
endif
|
||||
let i = 1
|
||||
let line = ""
|
||||
while i < 10 && i < line("$")
|
||||
let line = getline(i)
|
||||
if line =~ '<!DOCTYPE.*\<DTD '
|
||||
break
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above
|
||||
if line =~ ' HTML 3\.2'
|
||||
let b:html_omni_flavor = 'html32'
|
||||
elseif line =~ ' XHTML 1\.1'
|
||||
let b:html_omni_flavor = 'xhtml11'
|
||||
else " two-step detection with strict/frameset/transitional
|
||||
if line =~ ' XHTML 1\.0'
|
||||
let b:html_omni_flavor = 'xhtml10'
|
||||
elseif line =~ ' HTML 4\.01'
|
||||
let b:html_omni_flavor = 'html401'
|
||||
elseif line =~ ' HTML 4.0\>'
|
||||
let b:html_omni_flavor = 'html40'
|
||||
endif
|
||||
if line =~ '\<Transitional\>'
|
||||
let b:html_omni_flavor .= 't'
|
||||
elseif line =~ '\<Frameset\>'
|
||||
let b:html_omni_flavor .= 'f'
|
||||
else
|
||||
let b:html_omni_flavor .= 's'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! htmlcomplete#CompleteTags(findstart, base)
|
||||
if a:findstart
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,10 +1,10 @@
|
||||
" Vim color file
|
||||
" Maintainer: David Schweikert <dws@ee.ethz.ch>
|
||||
" Last Change: 2006 Apr 30
|
||||
" Maintainer: David Schweikert <david@schweikert.ch>
|
||||
" Last Change: 2014 Mar 19
|
||||
|
||||
hi clear
|
||||
|
||||
let colors_name = "delek"
|
||||
let g:colors_name = "delek"
|
||||
|
||||
" Normal should come first
|
||||
hi Normal guifg=Black guibg=White
|
||||
@@ -28,7 +28,11 @@ hi NonText ctermfg=Blue gui=bold guifg=gray guibg=white
|
||||
hi Pmenu guibg=LightBlue
|
||||
hi PmenuSel ctermfg=White ctermbg=DarkBlue guifg=White guibg=DarkBlue
|
||||
hi Question ctermfg=DarkGreen gui=bold guifg=SeaGreen
|
||||
hi Search ctermfg=NONE ctermbg=Yellow guibg=Yellow guifg=NONE
|
||||
if &background == "light"
|
||||
hi Search ctermfg=NONE ctermbg=Yellow guibg=Yellow guifg=NONE
|
||||
else
|
||||
hi Search ctermfg=Black ctermbg=Yellow guibg=Yellow guifg=Black
|
||||
endif
|
||||
hi SpecialKey ctermfg=DarkBlue guifg=Blue
|
||||
hi StatusLine cterm=bold ctermbg=blue ctermfg=yellow guibg=gold guifg=blue
|
||||
hi StatusLineNC cterm=bold ctermbg=blue ctermfg=black guibg=gold guifg=blue
|
||||
|
||||
40
runtime/colors/industry.vim
Normal file
40
runtime/colors/industry.vim
Normal file
@@ -0,0 +1,40 @@
|
||||
" Vim color file
|
||||
" Maintainer: Shian Lee
|
||||
" Last Change: 2014 Mar 6 (for vim 7.4)
|
||||
" Remark: "industry" stands for 'industrial' color scheme. In industrial
|
||||
" HMI (Human-Machine-Interface) programming, using a standard color
|
||||
" scheme is mandatory in many cases (in traffic-lights for example):
|
||||
" LIGHT_RED is 'Warning'
|
||||
" LIGHT_YELLOW is 'Attention'
|
||||
" LIGHT_GREEN is 'Normal'
|
||||
" LIGHT_MAGENTA is 'Warning-Attention' (light RED-YELLOW)
|
||||
" LIGHT_CYAN is 'Attention-Normal' (light YELLOW-GREEN).
|
||||
" BLACK is Dark-High-Contrast Background for maximum safety.
|
||||
" BLUE is Shade of BLACK (not supposed to get attention).
|
||||
"
|
||||
" Industrial color scheme is by nature clear, safe and productive.
|
||||
" Yet, depends on the file type's syntax, it might appear incorrect.
|
||||
|
||||
" Reset to dark background, then reset everything to defaults:
|
||||
set background=dark
|
||||
highlight clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let colors_name = "industry"
|
||||
|
||||
" First set Normal to regular white on black text colors:
|
||||
hi Normal ctermfg=LightGray ctermbg=Black guifg=#dddddd guibg=Black
|
||||
|
||||
" Syntax highlighting (other color-groups using default, see :help group-name):
|
||||
hi Comment cterm=NONE ctermfg=DarkCyan gui=NONE guifg=#00aaaa
|
||||
hi Constant cterm=NONE ctermfg=LightCyan gui=NONE guifg=#00ffff
|
||||
hi Identifier cterm=NONE ctermfg=LightMagenta gui=NONE guifg=#ff00ff
|
||||
hi Function cterm=NONE ctermfg=LightGreen gui=NONE guifg=#00ff00
|
||||
hi Statement cterm=NONE ctermfg=White gui=bold guifg=#ffffff
|
||||
hi PreProc cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00
|
||||
hi Type cterm=NONE ctermfg=LightGreen gui=bold guifg=#00ff00
|
||||
hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=#ff0000
|
||||
hi Delimiter cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.4. Last change: 2014 Jan 23
|
||||
*autocmd.txt* For Vim version 7.4. Last change: 2014 May 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -569,7 +569,8 @@ FileChangedRO Before making the first change to a read-only
|
||||
FileChangedShell When Vim notices that the modification time of
|
||||
a file has changed since editing started.
|
||||
Also when the file attributes of the file
|
||||
change. |timestamp|
|
||||
change or when the size of the file changes.
|
||||
|timestamp|
|
||||
Mostly triggered after executing a shell
|
||||
command, but also with a |:checktime| command
|
||||
or when Gvim regains input focus.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.4. Last change: 2014 Feb 11
|
||||
*change.txt* For Vim version 7.4. Last change: 2014 Jun 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1650,7 +1650,7 @@ And a few warnings:
|
||||
7. Sorting text *sorting*
|
||||
|
||||
Vim has a sorting function and a sorting command. The sorting function can be
|
||||
found here: |sort()|.
|
||||
found here: |sort()|, |uniq()|.
|
||||
|
||||
*:sor* *:sort*
|
||||
:[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/]
|
||||
@@ -1717,8 +1717,8 @@ Note that using `:sort` with `:global` doesn't sort the matching lines, it's
|
||||
quite useless.
|
||||
|
||||
The details about sorting depend on the library function used. There is no
|
||||
guarantee that sorting is "stable" or obeys the current locale. You will have
|
||||
to try it out.
|
||||
guarantee that sorting obeys the current locale. You will have to try it out.
|
||||
Vim does do a "stable" sort.
|
||||
|
||||
The sorting can be interrupted, but if you interrupt it too late in the
|
||||
process you may end up with duplicated lines. This also depends on the system
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*develop.txt* For Vim version 7.4. Last change: 2013 Apr 27
|
||||
*develop.txt* For Vim version 7.4. Last change: 2014 Mar 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -19,7 +19,6 @@ code.
|
||||
|
||||
Vim is open source software. Everybody is encouraged to contribute to help
|
||||
improving Vim. For sending patches a context diff "diff -c" is preferred.
|
||||
Also see http://www.vim.org/tips/tip.php?tip_id=618.
|
||||
Also see http://vim.wikia.com/wiki/How_to_make_and_submit_a_patch.
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.4. Last change: 2013 Sep 20
|
||||
*diff.txt* For Vim version 7.4. Last change: 2014 May 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -95,7 +95,7 @@ While already in Vim you can start diff mode in three ways.
|
||||
:difft[his] Make the current window part of the diff windows. This sets
|
||||
the options like for "vimdiff".
|
||||
|
||||
:diffp[atch] {patchfile} *E816* *:diffp* *:diffpatch*
|
||||
:diffp[atch] {patchfile} *E816* *:diffp* *:diffpatch*
|
||||
Use the current buffer, patch it with the diff found in
|
||||
{patchfile} and open a buffer on the result. The options are
|
||||
set as for "vimdiff".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*digraph.txt* For Vim version 7.4. Last change: 2013 Dec 12
|
||||
*digraph.txt* For Vim version 7.4. Last change: 2014 Jun 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -170,6 +170,11 @@ used for the currency sign, and latin9 (iso-8859-15), where the digraph =e is
|
||||
used for the euro sign, while both of them are the character 164, 0xa4. For
|
||||
compatibility with zsh Eu can also be used for the euro sign.
|
||||
|
||||
ROUBLE
|
||||
|
||||
The rouble sign was added in 2014 as 0x20bd. Vim supports the digraphs =R and
|
||||
=P for this. Note that R= and P= are other characters.
|
||||
|
||||
*digraph-table*
|
||||
char digraph hex dec official name ~
|
||||
^@ NU 0x00 0 NULL (NUL)
|
||||
@@ -966,6 +971,8 @@ char digraph hex dec official name ~
|
||||
₧ Pt 20A7 8359 PESETA SIGN
|
||||
₩ W= 20A9 8361 WON SIGN
|
||||
€ Eu 20AC 8364 EURO SIGN
|
||||
₽ =R 20BD 8381 ROUBLE SIGN
|
||||
₽ =P 20BD 8381 ROUBLE SIGN
|
||||
℃ oC 2103 8451 DEGREE CELSIUS
|
||||
℅ co 2105 8453 CARE OF
|
||||
℉ oF 2109 8457 DEGREE FAHRENHEIT
|
||||
@@ -1077,7 +1084,7 @@ char digraph hex dec official name ~
|
||||
⊥ -T 22A5 8869 UP TACK
|
||||
⋅ .P 22C5 8901 DOT OPERATOR
|
||||
⋮ :3 22EE 8942 VERTICAL ELLIPSIS
|
||||
⋯ .3 22EF 8943 MIDLINE HORIZONTAL ELLIPSIS
|
||||
⋯ .3 22EF 8943 MIDLINE HORIZONTAL ELLIPSIS
|
||||
⌂ Eh 2302 8962 HOUSE
|
||||
⌈ <7 2308 8968 LEFT CEILING
|
||||
⌉ >7 2309 8969 RIGHT CEILING
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.4. Last change: 2013 Nov 25
|
||||
*editing.txt* For Vim version 7.4. Last change: 2014 May 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1469,14 +1469,15 @@ Notes:
|
||||
==============================================================================
|
||||
10. Timestamps *timestamp* *timestamps*
|
||||
|
||||
Vim remembers the modification timestamp of a file when you begin editing it.
|
||||
This is used to avoid that you have two different versions of the same file
|
||||
(without you knowing this).
|
||||
Vim remembers the modification timestamp, mode and size of a file when you
|
||||
begin editing it. This is used to avoid that you have two different versions
|
||||
of the same file (without you knowing this).
|
||||
|
||||
After a shell command is run (|:!cmd| |suspend| |:read!| |K|) timestamps are
|
||||
compared for all buffers in a window. Vim will run any associated
|
||||
|FileChangedShell| autocommands or display a warning for any files that have
|
||||
changed. In the GUI this happens when Vim regains input focus.
|
||||
After a shell command is run (|:!cmd| |suspend| |:read!| |K|) timestamps,
|
||||
file modes and file sizes are compared for all buffers in a window. Vim will
|
||||
run any associated |FileChangedShell| autocommands or display a warning for
|
||||
any files that have changed. In the GUI this happens when Vim regains input
|
||||
focus.
|
||||
|
||||
*E321* *E462*
|
||||
If you want to automatically reload a file when it has been changed outside of
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.4. Last change: 2014 Feb 11
|
||||
*eval.txt* For Vim version 7.4. Last change: 2014 Jul 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -148,7 +148,7 @@ arguments: >
|
||||
|
||||
|
||||
1.3 Lists ~
|
||||
*List* *Lists* *E686*
|
||||
*list* *List* *Lists* *E686*
|
||||
A List is an ordered sequence of items. An item can be of any type. Items
|
||||
can be accessed by their index number. Items can be added and removed at any
|
||||
position in the sequence.
|
||||
@@ -327,6 +327,7 @@ examples: >
|
||||
Changing the order of items in a list: >
|
||||
:call sort(list) " sort a list alphabetically
|
||||
:call reverse(list) " reverse the order of items
|
||||
:call uniq(sort(list)) " sort and remove duplicates
|
||||
|
||||
|
||||
For loop ~
|
||||
@@ -393,7 +394,7 @@ example, to add up all the numbers in a list: >
|
||||
|
||||
|
||||
1.4 Dictionaries ~
|
||||
*Dictionaries* *Dictionary*
|
||||
*dict* *Dictionaries* *Dictionary*
|
||||
A Dictionary is an associative array: Each entry has a key and a value. The
|
||||
entry can be located with the key. The entries are stored without a specific
|
||||
ordering.
|
||||
@@ -1004,7 +1005,7 @@ function. Example: >
|
||||
|
||||
|
||||
|
||||
string *expr-string* *E114*
|
||||
string *string* *expr-string* *E114*
|
||||
------
|
||||
"string" string constant *expr-quote*
|
||||
|
||||
@@ -1143,7 +1144,7 @@ specified by what is prepended:
|
||||
|local-variable| l: Local to a function.
|
||||
|script-variable| s: Local to a |:source|'ed Vim script.
|
||||
|function-argument| a: Function argument (only inside a function).
|
||||
|vim-variable| v: Global, predefined by Vim.
|
||||
|vim-variable| v: Global, predefined by Vim.
|
||||
|
||||
The scope name by itself can be used as a |Dictionary|. For example, to
|
||||
delete all script-local variables: >
|
||||
@@ -1555,6 +1556,16 @@ v:profiling Normally zero. Set to one after using ":profile start".
|
||||
v:progname Contains the name (with path removed) with which Vim was
|
||||
invoked. Allows you to do special initialisations for |view|,
|
||||
|evim| etc., or any other name you might symlink to Vim.
|
||||
Read-only.
|
||||
|
||||
*v:progpath* *progpath-variable*
|
||||
v:progpath Contains the command with which Vim was invoked, including the
|
||||
path. Useful if you want to message a Vim server using a
|
||||
|--remote-expr|.
|
||||
To get the full path use: >
|
||||
echo exepath(v:progpath)
|
||||
< NOTE: This does not work when the command is a relative path
|
||||
and the current directory has changed.
|
||||
Read-only.
|
||||
|
||||
*v:register* *register-variable*
|
||||
@@ -1671,7 +1682,7 @@ v:version Version number of Vim: Major version number times 100 plus
|
||||
is 501. Read-only. "version" also works, for backwards
|
||||
compatibility.
|
||||
Use |has()| to check if a certain patch was included, e.g.: >
|
||||
if has("patch123")
|
||||
if has("patch-7.4.123")
|
||||
< Note that patch numbers are specific to the version, thus both
|
||||
version 5.0 and 5.1 may have a patch 123, but these are
|
||||
completely different.
|
||||
@@ -1705,6 +1716,8 @@ append( {lnum}, {string}) Number append {string} below line {lnum}
|
||||
append( {lnum}, {list}) Number append lines {list} below line {lnum}
|
||||
argc() Number number of files in the argument list
|
||||
argidx() Number current index in the argument list
|
||||
arglistid( [{winnr}, [ {tabnr}]])
|
||||
Number argument list id
|
||||
argv( {nr}) String {nr} entry of the argument list
|
||||
argv( ) List the argument list
|
||||
asin( {expr}) Float arc sine of {expr}
|
||||
@@ -1755,6 +1768,7 @@ escape( {string}, {chars}) String escape {chars} in {string} with '\'
|
||||
eval( {string}) any evaluate {string} into its value
|
||||
eventhandler( ) Number TRUE if inside an event handler
|
||||
executable( {expr}) Number 1 if executable {expr} exists
|
||||
exepath( {expr}) String full path of the command {expr}
|
||||
exists( {expr}) Number TRUE if {expr} exists
|
||||
extend( {expr1}, {expr2} [, {expr3}])
|
||||
List/Dict insert items of {expr2} into {expr1}
|
||||
@@ -1794,10 +1808,11 @@ getcharmod( ) Number modifiers for the last typed character
|
||||
getcmdline() String return the current command-line
|
||||
getcmdpos() Number return cursor position in command-line
|
||||
getcmdtype() String return the current command-line type
|
||||
getcurpos() List position of the cursor
|
||||
getcwd() String the current working directory
|
||||
getfontname( [{name}]) String name of font being used
|
||||
getfperm( {fname}) String file permissions of file {fname}
|
||||
getfsize( {fname}) Number size in bytes of file {fname}
|
||||
getfontname( [{name}]) String name of font being used
|
||||
getftime( {fname}) Number last modification time of file
|
||||
getftype( {fname}) String description of type of file {fname}
|
||||
getline( {lnum}) String line {lnum} of current buffer
|
||||
@@ -1807,7 +1822,8 @@ getmatches() List list of current matches
|
||||
getpid() Number process ID of Vim
|
||||
getpos( {expr}) List position of cursor, mark, etc.
|
||||
getqflist() List list of quickfix items
|
||||
getreg( [{regname} [, 1]]) String contents of register
|
||||
getreg( [{regname} [, 1 [, {list}]]])
|
||||
String or List contents of register
|
||||
getregtype( [{regname}]) String type of register
|
||||
gettabvar( {nr}, {varname} [, {def}])
|
||||
any variable {varname} in tab {nr} or {def}
|
||||
@@ -1819,7 +1835,7 @@ getwinvar( {nr}, {varname} [, {def}])
|
||||
any variable {varname} in window {nr}
|
||||
glob( {expr} [, {nosuf} [, {list}]])
|
||||
any expand file wildcards in {expr}
|
||||
globpath( {path}, {expr} [, {flag}])
|
||||
globpath( {path}, {expr} [, {nosuf} [, {list}]])
|
||||
String do glob({expr}) for all dirs in {path}
|
||||
has( {feature}) Number TRUE if feature {feature} supported
|
||||
has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
|
||||
@@ -1871,6 +1887,8 @@ match( {expr}, {pat}[, {start}[, {count}]])
|
||||
Number position where {pat} matches in {expr}
|
||||
matchadd( {group}, {pattern}[, {priority}[, {id}]])
|
||||
Number highlight {pattern} with {group}
|
||||
matchaddpos( {group}, {list}[, {priority}[, {id}]])
|
||||
Number highlight positions with {group}
|
||||
matcharg( {nr}) List arguments of |:match|
|
||||
matchdelete( {id}) Number delete match identified by {id}
|
||||
matchend( {expr}, {pat}[, {start}[, {count}]])
|
||||
@@ -1978,7 +1996,8 @@ strridx( {haystack}, {needle} [, {start}])
|
||||
Number last index of {needle} in {haystack}
|
||||
strtrans( {expr}) String translate string to make it printable
|
||||
strwidth( {expr}) Number display cell length of the String {expr}
|
||||
submatch( {nr}) String specific match in ":s" or substitute()
|
||||
submatch( {nr}[, {list}]) String or List
|
||||
specific match in ":s" or substitute()
|
||||
substitute( {expr}, {pat}, {sub}, {flags})
|
||||
String all {pat} in {expr} replaced with {sub}
|
||||
synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
|
||||
@@ -1988,6 +2007,7 @@ synIDtrans( {synID}) Number translated syntax ID of {synID}
|
||||
synconcealed( {lnum}, {col}) List info about concealing
|
||||
synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
|
||||
system( {expr} [, {input}]) String output of shell command/filter {expr}
|
||||
systemlist( {expr} [, {input}]) List output of shell command/filter {expr}
|
||||
tabpagebuflist( [{arg}]) List list of buffer numbers in tab page
|
||||
tabpagenr( [{arg}]) Number number of current or last tab page
|
||||
tabpagewinnr( {tabarg}[, {arg}])
|
||||
@@ -2005,6 +2025,8 @@ trunc( {expr}) Float truncate Float {expr}
|
||||
type( {name}) Number type of variable {name}
|
||||
undofile( {name}) String undo file name for {name}
|
||||
undotree() List undo file tree
|
||||
uniq( {list} [, {func} [, {dict}]])
|
||||
List remove adjacent duplicates from a list
|
||||
values( {dict}) List values in {dict}
|
||||
virtcol( {expr}) Number screen column of cursor or mark
|
||||
visualmode( [expr]) String last visual mode used
|
||||
@@ -2086,6 +2108,18 @@ argc() The result is the number of files in the argument list of the
|
||||
argidx() The result is the current index in the argument list. 0 is
|
||||
the first file. argc() - 1 is the last one. See |arglist|.
|
||||
|
||||
*arglistid()*
|
||||
arglistid([{winnr}, [ {tabnr} ]])
|
||||
Return the argument list ID. This is a number which
|
||||
identifies the argument list being used. Zero is used for the
|
||||
global argument list.
|
||||
Return zero if the arguments are invalid.
|
||||
|
||||
Without arguments use the current window.
|
||||
With {winnr} only use this window in the current tab page.
|
||||
With {winnr} and {tabnr} use the window in the specified tab
|
||||
page.
|
||||
|
||||
*argv()*
|
||||
argv([{nr}]) The result is the {nr}th file in the argument list of the
|
||||
current window. See |arglist|. "argv(0)" is the first one.
|
||||
@@ -2570,9 +2604,14 @@ cursor({lnum}, {col} [, {off}]) *cursor()*
|
||||
cursor({list})
|
||||
Positions the cursor at the column (byte count) {col} in the
|
||||
line {lnum}. The first column is one.
|
||||
|
||||
When there is one argument {list} this is used as a |List|
|
||||
with two or three items {lnum}, {col} and {off}. This is like
|
||||
the return value of |getpos()|, but without the first item.
|
||||
with two, three or four item:
|
||||
[{lnum}, {col}, {off}]
|
||||
[{lnum}, {col}, {off}, {curswant}]
|
||||
This is like the return value of |getpos()| or |getcurpos()|,
|
||||
but without the first item.
|
||||
|
||||
Does not change the jumplist.
|
||||
If {lnum} is greater than the number of lines in the buffer,
|
||||
the cursor will be positioned at the last line in the buffer.
|
||||
@@ -2581,6 +2620,8 @@ cursor({list})
|
||||
the cursor will be positioned at the last character in the
|
||||
line.
|
||||
If {col} is zero, the cursor will stay in the current column.
|
||||
If {curswant} is given it is used to set the preferred column
|
||||
for vertical movment. Otherwise {col} is used.
|
||||
When 'virtualedit' is used {off} specifies the offset in
|
||||
screen columns from the start of the character. E.g., a
|
||||
position within a <Tab> or after the last character.
|
||||
@@ -2697,6 +2738,15 @@ executable({expr}) *executable()*
|
||||
0 does not exist
|
||||
-1 not implemented on this system
|
||||
|
||||
exepath({expr}) *exepath()*
|
||||
If {expr} is an executable and is either an absolute path, a
|
||||
relative path or found in $PATH, return the full path.
|
||||
Note that the current directory is used when {expr} starts
|
||||
with "./", which may be a problem for Vim: >
|
||||
echo exepath(v:progpath)
|
||||
< If {expr} cannot be found in $PATH or is not executable then
|
||||
an empty string is returned.
|
||||
|
||||
*exists()*
|
||||
exists({expr}) The result is a Number, which is non-zero if {expr} is
|
||||
defined, zero otherwise. The {expr} argument is a string,
|
||||
@@ -2709,7 +2759,8 @@ exists({expr}) The result is a Number, which is non-zero if {expr} is
|
||||
string)
|
||||
*funcname built-in function (see |functions|)
|
||||
or user defined function (see
|
||||
|user-functions|).
|
||||
|user-functions|). Also works for a
|
||||
variable that is a Funcref.
|
||||
varname internal variable (see
|
||||
|internal-variables|). Also works
|
||||
for |curly-braces-names|, |Dictionary|
|
||||
@@ -2815,7 +2866,7 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
|
||||
<afile> autocmd file name
|
||||
<abuf> autocmd buffer number (as a String!)
|
||||
<amatch> autocmd matched name
|
||||
<sfile> sourced script file name
|
||||
<sfile> sourced script file or function name
|
||||
<slnum> sourced script file line number
|
||||
<cword> word under the cursor
|
||||
<cWORD> WORD under the cursor
|
||||
@@ -3211,6 +3262,10 @@ getchar([expr]) *getchar()*
|
||||
String when a modifier (shift, control, alt) was used that is
|
||||
not included in the character.
|
||||
|
||||
When [expr] is 0 and Esc is typed, there will be a short delay
|
||||
while Vim waits to see if this is the start of an escape
|
||||
sequence.
|
||||
|
||||
When [expr] is 1 only the first byte is returned. For a
|
||||
one-byte character it is the character itself as a number.
|
||||
Use nr2char() to convert it to a String.
|
||||
@@ -3294,6 +3349,17 @@ getcmdtype() *getcmdtype()*
|
||||
Returns an empty string otherwise.
|
||||
Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|.
|
||||
|
||||
*getcurpos()*
|
||||
getcurpos() Get the position of the cursor. This is like getpos('.'), but
|
||||
includes an extra item in the list:
|
||||
[bufnum, lnum, col, off, curswant]
|
||||
The "curswant" number is the preferred column when moving the
|
||||
cursor vertically.
|
||||
This can be used to save and restore the cursor position: >
|
||||
let save_cursor = getcurpos()
|
||||
MoveTheCursorAround
|
||||
call setpos('.', save_cursor)
|
||||
|
||||
*getcwd()*
|
||||
getcwd() The result is a String, which is the name of the current
|
||||
working directory.
|
||||
@@ -3415,6 +3481,34 @@ getmatches() *getmatches()*
|
||||
'pattern': 'FIXME', 'priority': 10, 'id': 2}] >
|
||||
:unlet m
|
||||
<
|
||||
*getpid()*
|
||||
getpid() Return a Number which is the process ID of the Vim process.
|
||||
On Unix and MS-Windows this is a unique number, until Vim
|
||||
exits. On MS-DOS it's always zero.
|
||||
|
||||
*getpos()*
|
||||
getpos({expr}) Get the position for {expr}. For possible values of {expr}
|
||||
see |line()|. For getting the cursor position see
|
||||
|getcurpos()|.
|
||||
The result is a |List| with four numbers:
|
||||
[bufnum, lnum, col, off]
|
||||
"bufnum" is zero, unless a mark like '0 or 'A is used, then it
|
||||
is the buffer number of the mark.
|
||||
"lnum" and "col" are the position in the buffer. The first
|
||||
column is 1.
|
||||
The "off" number is zero, unless 'virtualedit' is used. Then
|
||||
it is the offset in screen columns from the start of the
|
||||
character. E.g., a position within a <Tab> or after the last
|
||||
character.
|
||||
Note that for '< and '> Visual mode matters: when it is "V"
|
||||
(visual line mode) the column of '< is zero and the column of
|
||||
'> is a large number.
|
||||
This can be used to save and restore the position of a mark: >
|
||||
let save_a_mark = getpos("'a")
|
||||
...
|
||||
call setpos(''a', save_a_mark
|
||||
< Also see |getcurpos()| and |setpos()|.
|
||||
|
||||
|
||||
getqflist() *getqflist()*
|
||||
Returns a list with all the current quickfix errors. Each
|
||||
@@ -3443,7 +3537,7 @@ getqflist() *getqflist()*
|
||||
:endfor
|
||||
|
||||
|
||||
getreg([{regname} [, 1]]) *getreg()*
|
||||
getreg([{regname} [, 1 [, {list}]]]) *getreg()*
|
||||
The result is a String, which is the contents of register
|
||||
{regname}. Example: >
|
||||
:let cliptext = getreg('*')
|
||||
@@ -3452,6 +3546,11 @@ getreg([{regname} [, 1]]) *getreg()*
|
||||
getreg('=', 1) returns the expression itself, so that it can
|
||||
be restored with |setreg()|. For other registers the extra
|
||||
argument is ignored, thus you can always give it.
|
||||
If {list} is present and non-zero result type is changed to
|
||||
|List|. Each list item is one text line. Use it if you care
|
||||
about zero bytes possibly present inside register: without
|
||||
third argument both NLs and zero bytes are represented as NLs
|
||||
(see |NL-used-for-Nul|).
|
||||
If {regname} is not specified, |v:register| is used.
|
||||
|
||||
|
||||
@@ -3539,11 +3638,12 @@ glob({expr} [, {nosuf} [, {list}]]) *glob()*
|
||||
See |expand()| for expanding special Vim variables. See
|
||||
|system()| for getting the raw output of an external command.
|
||||
|
||||
globpath({path}, {expr} [, {flag}]) *globpath()*
|
||||
globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
|
||||
Perform glob() on all directories in {path} and concatenate
|
||||
the results. Example: >
|
||||
:echo globpath(&rtp, "syntax/c.vim")
|
||||
< {path} is a comma-separated list of directory names. Each
|
||||
<
|
||||
{path} is a comma-separated list of directory names. Each
|
||||
directory name is prepended to {expr} and expanded like with
|
||||
|glob()|. A path separator is inserted when needed.
|
||||
To add a comma inside a directory name escape it with a
|
||||
@@ -3551,11 +3651,19 @@ globpath({path}, {expr} [, {flag}]) *globpath()*
|
||||
trailing backslash, remove it if you put a comma after it.
|
||||
If the expansion fails for one of the directories, there is no
|
||||
error message.
|
||||
Unless the optional {flag} argument is given and is non-zero,
|
||||
|
||||
Unless the optional {nosuf} argument is given and is non-zero,
|
||||
the 'suffixes' and 'wildignore' options apply: Names matching
|
||||
one of the patterns in 'wildignore' will be skipped and
|
||||
'suffixes' affect the ordering of matches.
|
||||
|
||||
When {list} is present and it is non-zero the result is a List
|
||||
with all matching files. The advantage of using a List is, you
|
||||
also get filenames containing newlines correctly. Otherwise
|
||||
the result is a String and when there are several matches,
|
||||
they are separated by <NL> characters. Example: >
|
||||
:echo globpath(&rtp, "syntax/c.vim", 0, 1)
|
||||
<
|
||||
The "**" item can be used to search in a directory tree.
|
||||
For example, to find all "README.txt" files in the directories
|
||||
in 'runtimepath' and below: >
|
||||
@@ -4274,6 +4382,41 @@ matchadd({group}, {pattern}[, {priority}[, {id}]])
|
||||
available from |getmatches()|. All matches can be deleted in
|
||||
one operation by |clearmatches()|.
|
||||
|
||||
matchaddpos({group}, {pos}[, {priority}[, {id}]]) *matchaddpos()*
|
||||
Same as |matchadd()|, but requires a list of positions {pos}
|
||||
instead of a pattern. This command is faster than |matchadd()|
|
||||
because it does not require to handle regular expressions and
|
||||
sets buffer line boundaries to redraw screen. It is supposed
|
||||
to be used when fast match additions and deletions are
|
||||
required, for example to highlight matching parentheses.
|
||||
|
||||
The list {pos} can contain one of these items:
|
||||
- A number. This whole line will be highlighted. The first
|
||||
line has number 1.
|
||||
- A list with one number, e.g., [23]. The whole line with this
|
||||
number will be highlighted.
|
||||
- A list with two numbers, e.g., [23, 11]. The first number is
|
||||
the line number, the second one is the column number (first
|
||||
column is 1, the value must correspond to the byte index as
|
||||
|col()| would return). The character at this position will
|
||||
be highlighted.
|
||||
- A list with three numbers, e.g., [23, 11, 3]. As above, but
|
||||
the third number gives the length of the highlight in bytes.
|
||||
|
||||
The maximum number of positions is 8.
|
||||
|
||||
Example: >
|
||||
:highlight MyGroup ctermbg=green guibg=green
|
||||
:let m = matchaddpos("MyGroup", [[23, 24], 34])
|
||||
< Deletion of the pattern: >
|
||||
:call matchdelete(m)
|
||||
|
||||
< Matches added by |matchaddpos()| are returned by
|
||||
|getmatches()| with an entry "pos1", "pos2", etc., with the
|
||||
value a list like the {pos} item.
|
||||
These matches cannot be set via |setmatches()|, however they
|
||||
can still be deleted by |clearmatches()|.
|
||||
|
||||
matcharg({nr}) *matcharg()*
|
||||
Selects the {nr} match item, as set with a |:match|,
|
||||
|:2match| or |:3match| command.
|
||||
@@ -4432,33 +4575,6 @@ nr2char({expr}[, {utf8}]) *nr2char()*
|
||||
characters. nr2char(0) is a real NUL and terminates the
|
||||
string, thus results in an empty string.
|
||||
|
||||
*getpid()*
|
||||
getpid() Return a Number which is the process ID of the Vim process.
|
||||
On Unix and MS-Windows this is a unique number, until Vim
|
||||
exits. On MS-DOS it's always zero.
|
||||
|
||||
*getpos()*
|
||||
getpos({expr}) Get the position for {expr}. For possible values of {expr}
|
||||
see |line()|.
|
||||
The result is a |List| with four numbers:
|
||||
[bufnum, lnum, col, off]
|
||||
"bufnum" is zero, unless a mark like '0 or 'A is used, then it
|
||||
is the buffer number of the mark.
|
||||
"lnum" and "col" are the position in the buffer. The first
|
||||
column is 1.
|
||||
The "off" number is zero, unless 'virtualedit' is used. Then
|
||||
it is the offset in screen columns from the start of the
|
||||
character. E.g., a position within a <Tab> or after the last
|
||||
character.
|
||||
Note that for '< and '> Visual mode matters: when it is "V"
|
||||
(visual line mode) the column of '< is zero and the column of
|
||||
'> is a large number.
|
||||
This can be used to save and restore the cursor position: >
|
||||
let save_cursor = getpos(".")
|
||||
MoveTheCursorAround
|
||||
call setpos('.', save_cursor)
|
||||
< Also see |setpos()|.
|
||||
|
||||
or({expr}, {expr}) *or()*
|
||||
Bitwise OR on the two arguments. The arguments are converted
|
||||
to a number. A List, Dict or Float argument causes an error.
|
||||
@@ -5257,8 +5373,9 @@ setpos({expr}, {list})
|
||||
. the cursor
|
||||
'x mark x
|
||||
|
||||
{list} must be a |List| with four numbers:
|
||||
{list} must be a |List| with four or five numbers:
|
||||
[bufnum, lnum, col, off]
|
||||
[bufnum, lnum, col, off, curswant]
|
||||
|
||||
"bufnum" is the buffer number. Zero can be used for the
|
||||
current buffer. Setting the cursor is only possible for
|
||||
@@ -5276,6 +5393,12 @@ setpos({expr}, {list})
|
||||
character. E.g., a position within a <Tab> or after the last
|
||||
character.
|
||||
|
||||
The "curswant" number is only used when setting the cursor
|
||||
position. It sets the preferred column for when moving the
|
||||
cursor vertically. When the "curswant" number is missing the
|
||||
preferred column is not set. When it is present and setting a
|
||||
mark position it is not used.
|
||||
|
||||
Note that for '< and '> changing the line number may result in
|
||||
the marks to be effectively be swapped, so that '< is always
|
||||
before '>.
|
||||
@@ -5283,10 +5406,13 @@ setpos({expr}, {list})
|
||||
Returns 0 when the position could be set, -1 otherwise.
|
||||
An error message is given if {expr} is invalid.
|
||||
|
||||
Also see |getpos()|
|
||||
Also see |getpos()| and |getcurpos()|.
|
||||
|
||||
This does not restore the preferred column for moving
|
||||
vertically. See |winrestview()| for that.
|
||||
vertically; if you set the cursor position with this, |j| and
|
||||
|k| motions will jump to previous columns! Use |cursor()| to
|
||||
also set the preferred column. Also see the "curswant" key in
|
||||
|winrestview()|.
|
||||
|
||||
|
||||
setqflist({list} [, {action}]) *setqflist()*
|
||||
@@ -5338,6 +5464,8 @@ setqflist({list} [, {action}]) *setqflist()*
|
||||
*setreg()*
|
||||
setreg({regname}, {value} [,{options}])
|
||||
Set the register {regname} to {value}.
|
||||
{value} may be any value returned by |getreg()|, including
|
||||
a |List|.
|
||||
If {options} contains "a" or {regname} is upper case,
|
||||
then the value is appended.
|
||||
{options} can also contain a register type specification:
|
||||
@@ -5350,10 +5478,15 @@ setreg({regname}, {value} [,{options}])
|
||||
in the longest line (counting a <Tab> as 1 character).
|
||||
|
||||
If {options} contains no register settings, then the default
|
||||
is to use character mode unless {value} ends in a <NL>.
|
||||
Setting the '=' register is not possible, but you can use >
|
||||
:let @= = var_expr
|
||||
< Returns zero for success, non-zero for failure.
|
||||
is to use character mode unless {value} ends in a <NL> for
|
||||
string {value} and linewise mode for list {value}. Blockwise
|
||||
mode is never selected automatically.
|
||||
Returns zero for success, non-zero for failure.
|
||||
|
||||
*E883*
|
||||
Note: you may not use |List| containing more then one item to
|
||||
set search and expression registers. Lists containing no
|
||||
items act like empty strings.
|
||||
|
||||
Examples: >
|
||||
:call setreg(v:register, @*)
|
||||
@@ -5361,8 +5494,11 @@ setreg({regname}, {value} [,{options}])
|
||||
:call setreg('a', "1\n2\n3", 'b5')
|
||||
|
||||
< This example shows using the functions to save and restore a
|
||||
register. >
|
||||
:let var_a = getreg('a', 1)
|
||||
register (note: you may not reliably restore register value
|
||||
without using the third argument to |getreg()| as without it
|
||||
newlines are represented as newlines AND Nul bytes are
|
||||
represented as newlines as well, see |NL-used-for-Nul|). >
|
||||
:let var_a = getreg('a', 1, 1)
|
||||
:let var_amode = getregtype('a')
|
||||
....
|
||||
:call setreg('a', var_a, var_amode)
|
||||
@@ -5488,20 +5624,40 @@ sinh({expr}) *sinh()*
|
||||
|
||||
|
||||
sort({list} [, {func} [, {dict}]]) *sort()* *E702*
|
||||
Sort the items in {list} in-place. Returns {list}. If you
|
||||
want a list to remain unmodified make a copy first: >
|
||||
Sort the items in {list} in-place. Returns {list}.
|
||||
|
||||
If you want a list to remain unmodified make a copy first: >
|
||||
:let sortedlist = sort(copy(mylist))
|
||||
< Uses the string representation of each item to sort on.
|
||||
Numbers sort after Strings, |Lists| after Numbers.
|
||||
For sorting text in the current buffer use |:sort|.
|
||||
When {func} is given and it is one then case is ignored.
|
||||
{dict} is for functions with the "dict" attribute. It will be
|
||||
used to set the local variable "self". |Dictionary-function|
|
||||
|
||||
< When {func} is omitted, is empty or zero, then sort() uses the
|
||||
string representation of each item to sort on. Numbers sort
|
||||
after Strings, |Lists| after Numbers. For sorting text in the
|
||||
current buffer use |:sort|.
|
||||
|
||||
When {func} is given and it is is '1' or 'i' then case is
|
||||
ignored.
|
||||
|
||||
When {func} is given and it is 'n' then all items will be
|
||||
sorted numerical (Implementation detail: This uses the
|
||||
strtod() function to parse numbers, Strings, Lists, Dicts and
|
||||
Funcrefs will be considered as being 0).
|
||||
|
||||
When {func} is a |Funcref| or a function name, this function
|
||||
is called to compare items. The function is invoked with two
|
||||
items as argument and must return zero if they are equal, 1 or
|
||||
bigger if the first one sorts after the second one, -1 or
|
||||
smaller if the first one sorts before the second one.
|
||||
|
||||
{dict} is for functions with the "dict" attribute. It will be
|
||||
used to set the local variable "self". |Dictionary-function|
|
||||
|
||||
The sort is stable, items which compare equal (as number or as
|
||||
string) will keep their relative position. E.g., when sorting
|
||||
on numbers, text strings will sort next to each other, in the
|
||||
same order as they were originally.
|
||||
|
||||
Also see |uniq()|.
|
||||
|
||||
Example: >
|
||||
func MyCompare(i1, i2)
|
||||
return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1
|
||||
@@ -5768,12 +5924,23 @@ strwidth({expr}) *strwidth()*
|
||||
Ambiguous, this function's return value depends on 'ambiwidth'.
|
||||
Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
|
||||
|
||||
submatch({nr}) *submatch()*
|
||||
submatch({nr}[, {list}]) *submatch()*
|
||||
Only for an expression in a |:substitute| command or
|
||||
substitute() function.
|
||||
Returns the {nr}'th submatch of the matched text. When {nr}
|
||||
is 0 the whole matched text is returned.
|
||||
Note that a NL in the string can stand for a line break of a
|
||||
multi-line match or a NUL character in the text.
|
||||
Also see |sub-replace-expression|.
|
||||
|
||||
If {list} is present and non-zero then submatch() returns
|
||||
a list of strings, similar to |getline()| with two arguments.
|
||||
NL characters in the text represent NUL characters in the
|
||||
text.
|
||||
Only returns more than one item for |:substitute|, inside
|
||||
|substitute()| this list will always contain one or zero
|
||||
items, since there are no real line breaks.
|
||||
|
||||
Example: >
|
||||
:s/\d\+/\=submatch(0) + 1/
|
||||
< This finds the first number in the line and adds one to it.
|
||||
@@ -5906,11 +6073,19 @@ synstack({lnum}, {col}) *synstack()*
|
||||
valid positions.
|
||||
|
||||
system({expr} [, {input}]) *system()* *E677*
|
||||
Get the output of the shell command {expr}.
|
||||
When {input} is given, this string is written to a file and
|
||||
passed as stdin to the command. The string is written as-is,
|
||||
you need to take care of using the correct line separators
|
||||
yourself. Pipes are not used.
|
||||
Get the output of the shell command {expr} as a string. See
|
||||
|systemlist()| to get the output as a List.
|
||||
|
||||
When {input} is given and is a string this string is written
|
||||
to a file and passed as stdin to the command. The string is
|
||||
written as-is, you need to take care of using the correct line
|
||||
separators yourself.
|
||||
If {input} is given and is a |List| it is written to the file
|
||||
in a way |writefile()| does with {binary} set to "b" (i.e.
|
||||
with a newline between each list item with newlines inside
|
||||
list items converted to NULs).
|
||||
Pipes are not used.
|
||||
|
||||
Note: Use |shellescape()| or |::S| with |expand()| or
|
||||
|fnamemodify()| to escape special characters in a command
|
||||
argument. Newlines in {expr} may cause the command to fail.
|
||||
@@ -5947,6 +6122,16 @@ system({expr} [, {input}]) *system()* *E677*
|
||||
Use |:checktime| to force a check.
|
||||
|
||||
|
||||
systemlist({expr} [, {input}]) *systemlist()*
|
||||
Same as |system()|, but returns a |List| with lines (parts of
|
||||
output separated by NL) with NULs transformed into NLs. Output
|
||||
is the same as |readfile()| will output with {binary} argument
|
||||
set to "b".
|
||||
|
||||
Returns an empty string on error, so be careful not to run
|
||||
into |E706|.
|
||||
|
||||
|
||||
tabpagebuflist([{arg}]) *tabpagebuflist()*
|
||||
The result is a |List|, where each item is the number of the
|
||||
buffer associated with each window in the current tab page.
|
||||
@@ -5969,7 +6154,7 @@ tabpagenr([{arg}]) *tabpagenr()*
|
||||
The number can be used with the |:tab| command.
|
||||
|
||||
|
||||
tabpagewinnr({tabarg}, [{arg}]) *tabpagewinnr()*
|
||||
tabpagewinnr({tabarg} [, {arg}]) *tabpagewinnr()*
|
||||
Like |winnr()| but for tab page {tabarg}.
|
||||
{tabarg} specifies the number of tab page to be used.
|
||||
{arg} is used like with |winnr()|:
|
||||
@@ -6169,6 +6354,14 @@ undotree() *undotree()*
|
||||
blocks. Each item may again have an "alt"
|
||||
item.
|
||||
|
||||
uniq({list} [, {func} [, {dict}]]) *uniq()* *E882*
|
||||
Remove second and succeeding copies of repeated adjacent
|
||||
{list} items in-place. Returns {list}. If you want a list
|
||||
to remain unmodified make a copy first: >
|
||||
:let newlist = uniq(copy(mylist))
|
||||
< The default compare function uses the string representation of
|
||||
each item. For the use of {func} and {dict} see |sort()|.
|
||||
|
||||
values({dict}) *values()*
|
||||
Return a |List| with all the values of {dict}. The |List| is
|
||||
in arbitrary order.
|
||||
@@ -6298,6 +6491,16 @@ winrestcmd() Returns a sequence of |:resize| commands that should restore
|
||||
winrestview({dict})
|
||||
Uses the |Dictionary| returned by |winsaveview()| to restore
|
||||
the view of the current window.
|
||||
Note: The {dict} does not have to contain all values, that are
|
||||
returned by |winsaveview()|. If values are missing, those
|
||||
settings won't be restored. So you can use: >
|
||||
:call winrestview({'curswant': 4})
|
||||
<
|
||||
This will only set the curswant value (the column the cursor
|
||||
wants to move on vertical movements) of the cursor to column 5
|
||||
(yes, that is 5), while all other settings will remain the
|
||||
same. This is useful, if you set the cursor position manually.
|
||||
|
||||
If you have changed the values the result is unpredictable.
|
||||
If the window size changed the result won't be the same.
|
||||
|
||||
@@ -6312,7 +6515,9 @@ winsaveview() Returns a |Dictionary| that contains information to restore
|
||||
not opened when moving around.
|
||||
The return value includes:
|
||||
lnum cursor line number
|
||||
col cursor column
|
||||
col cursor column (Note: the first column
|
||||
zero, as opposed to what getpos()
|
||||
returns)
|
||||
coladd cursor column offset for 'virtualedit'
|
||||
curswant column for vertical movement
|
||||
topline first line in the window
|
||||
@@ -6363,7 +6568,7 @@ xor({expr}, {expr}) *xor()*
|
||||
|
||||
|
||||
*feature-list*
|
||||
There are three types of features:
|
||||
There are four types of features:
|
||||
1. Features that are only supported when they have been enabled when Vim
|
||||
was compiled |+feature-list|. Example: >
|
||||
:if has("cindent")
|
||||
@@ -6371,11 +6576,21 @@ There are three types of features:
|
||||
Example: >
|
||||
:if has("gui_running")
|
||||
< *has-patch*
|
||||
3. Included patches. First check |v:version| for the version of Vim.
|
||||
Then the "patch123" feature means that patch 123 has been included for
|
||||
this version. Example (checking version 6.2.148 or later): >
|
||||
3. Included patches. The "patch123" feature means that patch 123 has been
|
||||
included. Note that this form does not check the version of Vim, you need
|
||||
to inspect |v:version| for that.
|
||||
Example (checking version 6.2.148 or later): >
|
||||
:if v:version > 602 || v:version == 602 && has("patch148")
|
||||
< Note that it's possible for patch 147 to be omitted even though 148 is
|
||||
< Note that it's possible for patch 147 to be omitted even though 148 is
|
||||
included.
|
||||
|
||||
4. Beyond a certain version or at a certain version and including a specific
|
||||
patch. The "patch-7.4.237" feature means that the Vim version is 7.5 or
|
||||
later, or it is version 7.4 and patch 237 was included.
|
||||
Note that this only works for patch 7.4.237 and later, before that you
|
||||
need to use the example above that checks v:version. Example: >
|
||||
:if has("patch-7.4.248")
|
||||
< Note that it's possible for patch 147 to be omitted even though 148 is
|
||||
included.
|
||||
|
||||
acl Compiled with |ACL| support.
|
||||
@@ -6449,8 +6664,8 @@ jumplist Compiled with |jumplist| support.
|
||||
keymap Compiled with 'keymap' support.
|
||||
langmap Compiled with 'langmap' support.
|
||||
libcall Compiled with |libcall()| support.
|
||||
linebreak Compiled with 'linebreak', 'breakat' and 'showbreak'
|
||||
support.
|
||||
linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and
|
||||
'breakindent' support.
|
||||
lispindent Compiled with support for lisp indenting.
|
||||
listcmds Compiled with commands for the buffer list |:files|
|
||||
and the argument list |arglist|.
|
||||
@@ -6597,6 +6812,8 @@ can only be called from within the script and from functions, user commands
|
||||
and autocommands defined in the script. It is also possible to call the
|
||||
function from a mapping defined in the script, but then |<SID>| must be used
|
||||
instead of "s:" when the mapping is expanded outside of the script.
|
||||
There are only script-local functions, no buffer-local or window-local
|
||||
functions.
|
||||
|
||||
*:fu* *:function* *E128* *E129* *E123*
|
||||
:fu[nction] List all functions and their arguments.
|
||||
@@ -6620,11 +6837,15 @@ last defined. Example: >
|
||||
<
|
||||
See |:verbose-cmd| for more information.
|
||||
|
||||
*E124* *E125* *E853*
|
||||
*E124* *E125* *E853* *E884*
|
||||
:fu[nction][!] {name}([arguments]) [range] [abort] [dict]
|
||||
Define a new function by the name {name}. The name
|
||||
must be made of alphanumeric characters and '_', and
|
||||
must start with a capital or "s:" (see above).
|
||||
must start with a capital or "s:" (see above). Note
|
||||
that using "b:" or "g:" is not allowed. (since patch
|
||||
7.4.260 E884 is given if the function name has a colon
|
||||
in the name, e.g. for "foo:bar()". Before that patch
|
||||
no error was given).
|
||||
|
||||
{name} can also be a |Dictionary| entry that is a
|
||||
|Funcref|: >
|
||||
@@ -7317,6 +7538,8 @@ This does NOT work: >
|
||||
{pattern}, so long as it does not have a special
|
||||
meaning (e.g., '|' or '"') and doesn't occur inside
|
||||
{pattern}.
|
||||
Information about the exception is available in
|
||||
|v:exception|. Also see |throw-variables|.
|
||||
NOTE: It is not reliable to ":catch" the TEXT of
|
||||
an error message because it may vary in different
|
||||
locales.
|
||||
@@ -7463,10 +7686,19 @@ This does NOT work: >
|
||||
:execute "!ls " . shellescape(filename, 1)
|
||||
<
|
||||
Note: The executed string may be any command-line, but
|
||||
you cannot start or end a "while", "for" or "if"
|
||||
command. Thus this is illegal: >
|
||||
:execute 'while i > 5'
|
||||
:execute 'echo "test" | break'
|
||||
starting or ending "if", "while" and "for" does not
|
||||
always work, because when commands are skipped the
|
||||
":execute" is not evaluated and Vim loses track of
|
||||
where blocks start and end. Also "break" and
|
||||
"continue" should not be inside ":execute".
|
||||
This example does not work, because the ":execute" is
|
||||
not evaluated and Vim does not see the "while", and
|
||||
gives an error for finding an ":endwhile": >
|
||||
:if 0
|
||||
: execute 'while i > 5'
|
||||
: echo "test"
|
||||
: endwhile
|
||||
:endif
|
||||
<
|
||||
It is allowed to have a "while" or "if" command
|
||||
completely in the executed string: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 7.4. Last change: 2013 Nov 05
|
||||
*indent.txt* For Vim version 7.4. Last change: 2014 Apr 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -686,7 +686,7 @@ two spaces relative to the opening paren:
|
||||
baz)
|
||||
<
|
||||
Setting this option changes this behavior so that all subforms are aligned to
|
||||
the same column:
|
||||
the same column, emulating the default behavior of clojure-mode.el:
|
||||
>
|
||||
(foo
|
||||
bar
|
||||
@@ -698,7 +698,6 @@ This option is off by default.
|
||||
let g:clojure_align_subforms = 0
|
||||
<
|
||||
|
||||
|
||||
FORTRAN *ft-fortran-indent*
|
||||
|
||||
Block if, select case, where, and forall constructs are indented. So are
|
||||
@@ -813,7 +812,7 @@ OPTIONS: ~
|
||||
PHP indenting can be altered in several ways by modifying the values of some
|
||||
global variables:
|
||||
|
||||
*php-comment*
|
||||
*php-comment* *PHP_autoformatcomment*
|
||||
To not enable auto-formating of comments by default (if you want to use your
|
||||
own 'formatoptions'): >
|
||||
:let g:PHP_autoformatcomment = 0
|
||||
@@ -822,6 +821,7 @@ Else, 't' will be removed from the 'formatoptions' string and "qrowcb" will be
|
||||
added, see |fo-table| for more information.
|
||||
-------------
|
||||
|
||||
*PHP_outdentSLComments*
|
||||
To add extra indentation to single-line comments: >
|
||||
:let g:PHP_outdentSLComments = N
|
||||
|
||||
@@ -833,6 +833,7 @@ Only single-line comments will be affected such as: >
|
||||
/* Comment */
|
||||
-------------
|
||||
|
||||
*PHP_default_indenting*
|
||||
To add extra indentation to every PHP lines with N being the number of
|
||||
'shiftwidth' to add: >
|
||||
:let g:PHP_default_indenting = N
|
||||
@@ -852,14 +853,18 @@ For example, with N = 1, this will give:
|
||||
(Notice the extra indentation between the PHP container markers and the code)
|
||||
-------------
|
||||
|
||||
To indent PHP tags as the surrounding code: >
|
||||
:let g:PHP_outdentphpescape = 0
|
||||
*PHP_outdentphpescape*
|
||||
To indent PHP escape tags as the surrounding non-PHP code (only affects the
|
||||
PHP escape tags): >
|
||||
:let g:PHP_outdentphpescape = 0
|
||||
-------------
|
||||
|
||||
*PHP_removeCRwhenUnix*
|
||||
To automatically remove '\r' characters when the 'fileformat' is set to Unix: >
|
||||
:let g:PHP_removeCRwhenUnix = 1
|
||||
-------------
|
||||
|
||||
*PHP_BracesAtCodeLevel*
|
||||
To indent braces at the same level than the code they contain: >
|
||||
:let g:PHP_BracesAtCodeLevel = 1
|
||||
|
||||
@@ -878,6 +883,7 @@ NOTE: Indenting will be a bit slower if this option is used because some
|
||||
optimizations won't be available.
|
||||
-------------
|
||||
|
||||
*PHP_vintage_case_default_indent*
|
||||
To indent 'case:' and 'default:' statements in switch() blocks: >
|
||||
:let g:PHP_vintage_case_default_indent = 1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.4. Last change: 2013 Nov 14
|
||||
*index.txt* For Vim version 7.4. Last change: 2014 Mar 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1124,8 +1124,8 @@ tag command action ~
|
||||
|:cNfile| :cNf[ile] go to last error in previous file
|
||||
|:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode
|
||||
|:cabclear| :cabc[lear] clear all abbreviations for Command-line mode
|
||||
|:caddbuffer| :caddb[uffer] add errors from buffer
|
||||
|:caddexpr| :cad[dexpr] add errors from expr
|
||||
|:caddbuffer| :cad[dbuffer] add errors from buffer
|
||||
|:caddexpr| :cadde[xpr] add errors from expr
|
||||
|:caddfile| :caddf[ile] add error message to current quickfix list
|
||||
|:call| :cal[l] call a function
|
||||
|:catch| :cat[ch] part of a :try command
|
||||
@@ -1361,13 +1361,14 @@ tag command action ~
|
||||
|:nmenu| :nme[nu] add menu for Normal mode
|
||||
|:nnoremap| :nn[oremap] like ":noremap" but for Normal mode
|
||||
|:nnoremenu| :nnoreme[nu] like ":noremenu" but for Normal mode
|
||||
|:noautocmd| :noa[utocmd] following command don't trigger autocommands
|
||||
|:noautocmd| :noa[utocmd] following commands don't trigger autocommands
|
||||
|:noremap| :no[remap] enter a mapping that will not be remapped
|
||||
|:nohlsearch| :noh[lsearch] suspend 'hlsearch' highlighting
|
||||
|:noreabbrev| :norea[bbrev] enter an abbreviation that will not be
|
||||
remapped
|
||||
|:noremenu| :noreme[nu] enter a menu that will not be remapped
|
||||
|:normal| :norm[al] execute Normal mode commands
|
||||
|:noswapfile| :nos[wapfile] following commands don't create a swap file
|
||||
|:number| :nu[mber] print lines with line number
|
||||
|:nunmap| :nun[map] like ":unmap" but for Normal mode
|
||||
|:nunmenu| :nunme[nu] remove menu for Normal mode
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.4. Last change: 2013 Jul 12
|
||||
*insert.txt* For Vim version 7.4. Last change: 2014 Jul 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1302,7 +1302,7 @@ HTML *ft-html-omni*
|
||||
XHTML *ft-xhtml-omni*
|
||||
|
||||
CTRL-X CTRL-O provides completion of various elements of (X)HTML files. It is
|
||||
designed to support writing of XHTML 1.0 Strict files but will also works for
|
||||
designed to support writing of XHTML 1.0 Strict files but will also work for
|
||||
other versions of HTML. Features:
|
||||
|
||||
- after "<" complete tag name depending on context (no div suggestion inside
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.4. Last change: 2013 Jun 17
|
||||
*intro.txt* For Vim version 7.4. Last change: 2014 May 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -136,9 +136,10 @@ http://www.vim.org/maillist.php
|
||||
Bug reports: *bugs* *bug-reports* *bugreport.vim*
|
||||
|
||||
Send bug reports to: Vim Developers <vim_dev@vim.org>
|
||||
This is a maillist, many people will see the message. If you don't want that,
|
||||
e.g. because it is a security issue, send it to <bugs@vim.org>, this only goes
|
||||
to the Vim maintainer (that's Bram).
|
||||
This is a maillist, you need to become a member first and many people will see
|
||||
the message. If you don't want that, e.g. because it is a security issue,
|
||||
send it to <bugs@vim.org>, this only goes to the Vim maintainer (that's Bram).
|
||||
|
||||
Please be brief; all the time that is spent on answering mail is subtracted
|
||||
from the time that is spent on improving Vim! Always give a reproducible
|
||||
example and try to find out which settings or other things influence the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.4. Last change: 2013 Aug 22
|
||||
*map.txt* For Vim version 7.4. Last change: 2014 Jun 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -60,17 +60,17 @@ modes.
|
||||
{rhs}, is then further scanned for mappings. This
|
||||
allows for nested and recursive use of mappings.
|
||||
|
||||
|
||||
:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap*
|
||||
:nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap*
|
||||
:vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap*
|
||||
:xn[oremap] {lhs} {rhs} |mapmode-x| *:xn* *:xnoremap*
|
||||
:snor[emap] {lhs} {rhs} |mapmode-s| *:snor* *:snoremap*
|
||||
:ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap*
|
||||
:no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!*
|
||||
:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap*
|
||||
:ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap*
|
||||
:cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnoremap*
|
||||
*:nore* *:norem*
|
||||
:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap* *:nor*
|
||||
:nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap*
|
||||
:vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap*
|
||||
:xn[oremap] {lhs} {rhs} |mapmode-x| *:xn* *:xnoremap*
|
||||
:snor[emap] {lhs} {rhs} |mapmode-s| *:snor* *:snoremap*
|
||||
:ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap*
|
||||
:no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!*
|
||||
:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap*
|
||||
:ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap*
|
||||
:cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnoremap*
|
||||
Map the key sequence {lhs} to {rhs} for the modes
|
||||
where the map command applies. Disallow mapping of
|
||||
{rhs}, to avoid nested and recursive mappings. Often
|
||||
@@ -306,9 +306,21 @@ is disabled. This makes it possible to map zero without making it impossible
|
||||
to type a count with a zero.
|
||||
|
||||
*map-overview* *map-modes*
|
||||
Overview of which map command works in which mode:
|
||||
Overview of which map command works in which mode. More details below.
|
||||
COMMANDS MODES ~
|
||||
:map :noremap :unmap Normal, Visual, Select, Operator-pending
|
||||
:nmap :nnoremap :nunmap Normal
|
||||
:vmap :vnoremap :vunmap Visual and Select
|
||||
:smap :snoremap :sunmap Select
|
||||
:xmap :xnoremap :xunmap Visual
|
||||
:omap :onoremap :ounmap Operator-pending
|
||||
:map! :noremap! :unmap! Insert and Command-line
|
||||
:imap :inoremap :iunmap Insert
|
||||
:lmap :lnoremap :lunmap Insert, Command-line, Lang-Arg
|
||||
:cmap :cnoremap :cunmap Command-line
|
||||
|
||||
commands: modes: ~
|
||||
|
||||
COMMANDS MODES ~
|
||||
Normal Visual+Select Operator-pending ~
|
||||
:map :noremap :unmap :mapclear yes yes yes
|
||||
:nmap :nnoremap :nunmap :nmapclear yes - -
|
||||
@@ -324,7 +336,7 @@ NOTE: Mapping a printable character in Select mode may confuse the user. It's
|
||||
better to explicitly use :xmap and :smap for printable characters. Or use
|
||||
:sunmap after defining the mapping.
|
||||
|
||||
commands: modes: ~
|
||||
COMMANDS MODES ~
|
||||
Visual Select ~
|
||||
:vmap :vnoremap :vunmap :vmapclear yes yes
|
||||
:xmap :xnoremap :xunmap :xmapclear yes -
|
||||
@@ -333,7 +345,7 @@ better to explicitly use :xmap and :smap for printable characters. Or use
|
||||
*mapmode-ic* *mapmode-i* *mapmode-c* *mapmode-l*
|
||||
Some commands work both in Insert mode and Command-line mode, some not:
|
||||
|
||||
commands: modes: ~
|
||||
COMMANDS MODES ~
|
||||
Insert Command-line Lang-Arg ~
|
||||
:map! :noremap! :unmap! :mapclear! yes yes -
|
||||
:imap :inoremap :iunmap :imapclear yes - -
|
||||
@@ -816,12 +828,10 @@ Here is an example that counts the number of spaces with <F4>: >
|
||||
let &selection = "inclusive"
|
||||
let reg_save = @@
|
||||
|
||||
if a:0 " Invoked from Visual mode, use '< and '> marks.
|
||||
silent exe "normal! `<" . a:type . "`>y"
|
||||
if a:0 " Invoked from Visual mode, use gv command.
|
||||
silent exe "normal! gvy"
|
||||
elseif a:type == 'line'
|
||||
silent exe "normal! '[V']y"
|
||||
elseif a:type == 'block'
|
||||
silent exe "normal! `[\<C-V>`]y"
|
||||
else
|
||||
silent exe "normal! `[v`]y"
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.4. Last change: 2013 Dec 04
|
||||
*options.txt* For Vim version 7.4. Last change: 2014 Jun 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1200,6 +1200,38 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
break if 'linebreak' is on. Only works for ASCII and also for 8-bit
|
||||
characters when 'encoding' is an 8-bit encoding.
|
||||
|
||||
*'breakindent'* *'bri'*
|
||||
'breakindent' 'bri' boolean (default off)
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+linebreak|
|
||||
feature}
|
||||
Every wrapped line will continue visually indented (same amount of
|
||||
space as the beginning of that line), thus preserving horizontal blocks
|
||||
of text.
|
||||
|
||||
*'breakindentopt'* *'briopt'*
|
||||
'breakindentopt' 'briopt' string (default empty)
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+linebreak|
|
||||
feature}
|
||||
Settings for 'breakindent'. It can consist of the following optional
|
||||
items and must be separated by a comma:
|
||||
min:{n} Minimum text width that will be kept after
|
||||
applying 'breakindent', even if the resulting
|
||||
text should normally be narrower. This prevents
|
||||
text indented almost to the right window border
|
||||
occupying lot of vertical space when broken.
|
||||
shift:{n} After applying 'breakindent', the wrapped line's
|
||||
beginning will be shifted by the given number of
|
||||
characters. It permits dynamic French paragraph
|
||||
indentation (negative) or emphasizing the line
|
||||
continuation (positive).
|
||||
sbr Display the 'showbreak' value before applying the
|
||||
additional indent.
|
||||
The default value for min is 20 and shift is 0.
|
||||
|
||||
*'browsedir'* *'bsdir'*
|
||||
'browsedir' 'bsdir' string (default: "last")
|
||||
global
|
||||
@@ -3920,12 +3952,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
|
||||
*'history'* *'hi'*
|
||||
'history' 'hi' number (Vim default: 20, Vi default: 0)
|
||||
'history' 'hi' number (Vim default: 50, Vi default: 0)
|
||||
global
|
||||
{not in Vi}
|
||||
A history of ":" commands, and a history of previous search patterns
|
||||
are remembered. This option decides how many entries may be stored in
|
||||
is remembered. This option decides how many entries may be stored in
|
||||
each of these histories (see |cmdline-editing|).
|
||||
The maximum value is 10000.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
@@ -4492,6 +4525,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
be able to execute Normal mode commands.
|
||||
This is the opposite of the 'keymap' option, where characters are
|
||||
mapped in Insert mode.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
Example (for Greek, in UTF-8): *greek* >
|
||||
:set langmap=ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz
|
||||
@@ -4572,12 +4607,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+linebreak|
|
||||
feature}
|
||||
If on Vim will wrap long lines at a character in 'breakat' rather
|
||||
If on, Vim will wrap long lines at a character in 'breakat' rather
|
||||
than at the last character that fits on the screen. Unlike
|
||||
'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file,
|
||||
it only affects the way the file is displayed, not its contents. The
|
||||
value of 'showbreak' is used to put in front of wrapped lines.
|
||||
This option is not used when the 'wrap' option is off or 'list' is on.
|
||||
it only affects the way the file is displayed, not its contents.
|
||||
If 'breakindent' is set, line is visually indented. Then, the value
|
||||
of 'showbreak' is used to put in front of wrapped lines. This option
|
||||
is not used when the 'wrap' option is off.
|
||||
Note that <Tab> characters after an <EOL> are mostly not displayed
|
||||
with the right amount of white space.
|
||||
|
||||
@@ -6252,6 +6288,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
A don't give the "ATTENTION" message when an existing swap file
|
||||
is found.
|
||||
I don't give the intro message when starting Vim |:intro|.
|
||||
c don't give |ins-completion-menu| messages. For example,
|
||||
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
|
||||
"Pattern not found", "Back at original", etc.
|
||||
|
||||
This gives you the opportunity to avoid that a change between buffers
|
||||
requires you to hit <Enter>, but still gives as useful a message as
|
||||
@@ -6619,6 +6658,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
top of the suggestion list with the internal methods.
|
||||
Lines without a slash are ignored, use this for
|
||||
comments.
|
||||
The word in the second column must be correct,
|
||||
otherwise it will not be used. Add the word to an
|
||||
".add" file if it is currently flagged as a spelling
|
||||
mistake.
|
||||
The file is used for all languages.
|
||||
|
||||
expr:{expr} Evaluate expression {expr}. Use a function to avoid
|
||||
@@ -6882,6 +6925,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
immediately deleted. When 'swapfile' is set, and 'updatecount' is
|
||||
non-zero, a swap file is immediately created.
|
||||
Also see |swap-file| and |'swapsync'|.
|
||||
If you want to open a new buffer without creating a swap file for it,
|
||||
use the |:noswapfile| modifier.
|
||||
|
||||
This option is used together with 'bufhidden' and 'buftype' to
|
||||
specify special kinds of buffers. See |special-buffers|.
|
||||
@@ -7502,8 +7547,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"s" = button state
|
||||
"c" = column plus 33
|
||||
"r" = row plus 33
|
||||
This only works up to 223 columns! See "dec" for a
|
||||
solution.
|
||||
This only works up to 223 columns! See "dec",
|
||||
"urxvt", and "sgr" for solutions.
|
||||
xterm2 Works like "xterm", but with the xterm reporting the
|
||||
mouse position while the mouse is dragged. This works
|
||||
much faster and more precise. Your xterm must at
|
||||
@@ -7525,29 +7570,35 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
pterm QNX pterm mouse handling.
|
||||
*urxvt-mouse*
|
||||
urxvt Mouse handling for the urxvt (rxvt-unicode) terminal.
|
||||
The mouse works only if the terminal supports this
|
||||
encoding style, but it does not have 223 columns limit
|
||||
unlike "xterm" or "xterm2".
|
||||
*sgr-mouse*
|
||||
sgr Mouse handling for the terminal that emits SGR-styled
|
||||
mouse reporting. Works with xterm version 277 or
|
||||
later.
|
||||
mouse reporting. The mouse works even in columns
|
||||
beyond 223. This option is backward compatible with
|
||||
"xterm2" because it can also decode "xterm2" style
|
||||
mouse codes.
|
||||
|
||||
The mouse handling must be enabled at compile time |+mouse_xterm|
|
||||
|+mouse_dec| |+mouse_netterm|.
|
||||
|+mouse_dec| |+mouse_netterm| |+mouse_jsbterm| |+mouse_urxvt|
|
||||
|+mouse_sgr|.
|
||||
Only "xterm"(2) is really recognized. NetTerm mouse codes are always
|
||||
recognized, if enabled at compile time. DEC terminal mouse codes
|
||||
are recognized if enabled at compile time, and 'ttymouse' is not
|
||||
"xterm" (because the xterm and dec mouse codes conflict).
|
||||
"xterm", "xterm2", "urxvt" or "sgr" (because dec mouse codes conflict
|
||||
with them).
|
||||
This option is automatically set to "xterm", when the 'term' option is
|
||||
set to a name that starts with "xterm", and 'ttymouse' is not "xterm"
|
||||
or "xterm2" already. The main use of this option is to set it to
|
||||
"xterm", when the terminal name doesn't start with "xterm", but it can
|
||||
handle xterm mouse codes.
|
||||
The "sgr" value will be set if the xterm version is 277 or later.
|
||||
set to a name that starts with "xterm", "mlterm", or "screen", and
|
||||
'ttymouse' is not set already.
|
||||
Additionally, if vim is compiled with the |+termresponse| feature and
|
||||
|t_RV| is set to the escape sequence to request the xterm version
|
||||
number, more intelligent detection process runs.
|
||||
The "xterm2" value will be set if the xterm version is reported to be
|
||||
95 or higher. This only works when compiled with the |+termresponse|
|
||||
feature and if |t_RV| is set to the escape sequence to request the
|
||||
xterm version number. Otherwise "xterm2" must be set explicitly.
|
||||
If you do not want 'ttymouse' to be set to "xterm2" automatically, set
|
||||
t_RV to an empty string: >
|
||||
from 95 to 276. The "sgr" value will be set if the xterm version is
|
||||
277 or highter.
|
||||
If you do not want 'ttymouse' to be set to "xterm2" or "sgr"
|
||||
automatically, set t_RV to an empty string: >
|
||||
:set t_RV=
|
||||
<
|
||||
*'ttyscroll'* *'tsl'*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 7.4. Last change: 2013 Aug 22
|
||||
*os_vms.txt* For Vim version 7.4. Last change: 2014 Feb 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 7.4. Last change: 2014 Feb 08
|
||||
*pattern.txt* For Vim version 7.4. Last change: 2014 May 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -545,6 +545,7 @@ Character classes {not in Vi}: */character-classes*
|
||||
|/\%u| \%u \%u match specified multibyte character (eg \%u20ac)
|
||||
|/\%U| \%U \%U match specified large multibyte character (eg
|
||||
\%U12345678)
|
||||
|/\%C| \%C \%C match any composing characters
|
||||
|
||||
Example matches ~
|
||||
\<\I\i* or
|
||||
@@ -1207,12 +1208,18 @@ will probably never match.
|
||||
8. Composing characters *patterns-composing*
|
||||
|
||||
*/\Z*
|
||||
When "\Z" appears anywhere in the pattern, composing characters are ignored.
|
||||
Thus only the base characters need to match, the composing characters may be
|
||||
different and the number of composing characters may differ. Only relevant
|
||||
when 'encoding' is "utf-8".
|
||||
When "\Z" appears anywhere in the pattern, all composing characters are
|
||||
ignored. Thus only the base characters need to match, the composing
|
||||
characters may be different and the number of composing characters may differ.
|
||||
Only relevant when 'encoding' is "utf-8".
|
||||
Exception: If the pattern starts with one or more composing characters, these
|
||||
must match.
|
||||
*/\%C*
|
||||
Use "\%C" to skip any composing characters. For example, the pattern "a" does
|
||||
not match in "càt" (where the a has the composing character 0x0300), but
|
||||
"a\%C" does. Note that this does not match "cát" (where the á is character
|
||||
0xe1, it does not have a compositing character). It does match "cat" (where
|
||||
the a is just an a).
|
||||
|
||||
When a composing character appears at the start of the pattern of after an
|
||||
item that doesn't include the composing character, a match is found at any
|
||||
@@ -1325,7 +1332,7 @@ Finally, these constructs are unique to Perl:
|
||||
patterns defined by both |matchadd()| and |:match|.
|
||||
|
||||
Highlighting matches using |:match| are limited to three
|
||||
matches (aside from |:match|, |:2match| and |:3match|are
|
||||
matches (aside from |:match|, |:2match| and |:3match| are
|
||||
available). |matchadd()| does not have this limitation and in
|
||||
addition makes it possible to prioritize matches.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_netrw.txt* For Vim version 7.4. Last change: 2014 Jan 21
|
||||
*pi_netrw.txt* For Vim version 7.4. Last change: 2014 May 13
|
||||
|
||||
------------------------------------------------
|
||||
NETRW REFERENCE MANUAL by Charles E. Campbell
|
||||
@@ -49,6 +49,7 @@ Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright*
|
||||
Quick Reference: Commands...........................|netrw-browse-cmds|
|
||||
Bookmarking A Directory.............................|netrw-mb|
|
||||
Browsing............................................|netrw-cr|
|
||||
Squeezing the Current Tree-Listing Directory......|:netrw-s-cr|
|
||||
Browsing With A Horizontally Split Window...........|netrw-o|
|
||||
Browsing With A New Tab.............................|netrw-t|
|
||||
Browsing With A Vertically Split Window.............|netrw-v|
|
||||
@@ -172,7 +173,7 @@ There are more protocols supported by netrw than just scp and ftp, too: see the
|
||||
next section, |netrw-externapp|, on how to use these external applications with
|
||||
netrw and vim.
|
||||
|
||||
PREVENTING LOADING *netrw-noload*
|
||||
PREVENTING LOADING *netrw-noload*
|
||||
|
||||
If you want to use plugins, but for some reason don't wish to use netrw, then
|
||||
you need to avoid loading both the plugin and the autoload portions of netrw.
|
||||
@@ -183,7 +184,7 @@ You may do so by placing the following two lines in your <.vimrc>: >
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
3. Netrw Reference *netrw-ref* {{{1
|
||||
3. Netrw Reference *netrw-ref* {{{1
|
||||
|
||||
Netrw supports several protocols in addition to scp and ftp as mentioned
|
||||
in |netrw-start|. These include dav, fetch, http,... well, just look
|
||||
@@ -290,7 +291,7 @@ SOURCING *netrw-source* {{{2
|
||||
:Nsource "scp://[user@]machine[[:#]port]/path" uses scp
|
||||
:Nsource "sftp://[user@]machine/path" uses sftp
|
||||
|
||||
DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2
|
||||
DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2
|
||||
|
||||
One may browse a directory to get a listing by simply attempting to
|
||||
edit the directory: >
|
||||
@@ -347,9 +348,9 @@ settings are described below, in |netrw-browser-options|, and in
|
||||
*g:netrw_bufsettings* the settings that netrw buffers have
|
||||
(default) noma nomod nonu nowrap ro nobl
|
||||
|
||||
*g:netrw_chgwin* specifies a window number where file edits will take
|
||||
place. (also see |netrw-C|)
|
||||
(default) not defined
|
||||
*g:netrw_chgwin* specifies a window number where subsequent file edits
|
||||
will take place. (also see |netrw-C|)
|
||||
(default) -1
|
||||
|
||||
*g:Netrw_funcref* specifies a function (or functions) to be called when
|
||||
netrw edits a file. The file is first edited, and
|
||||
@@ -370,9 +371,9 @@ settings are described below, in |netrw-browser-options|, and in
|
||||
value of this variable to see if the alternate ftp
|
||||
method works for your setup.
|
||||
|
||||
*g:netrw_ftp_options* Chosen by default, these options are supposed to turn
|
||||
interactive prompting off and to restrain ftp from
|
||||
attempting auto-login upon initial connection.
|
||||
*g:netrw_ftp_options* Chosen by default, these options are supposed to
|
||||
turn interactive prompting off and to restrain ftp
|
||||
from attempting auto-login upon initial connection.
|
||||
However, it appears that not all ftp implementations
|
||||
support this (ex. ncftp).
|
||||
="-i -n"
|
||||
@@ -403,8 +404,8 @@ settings are described below, in |netrw-browser-options|, and in
|
||||
*g:netrw_preview* =0 (default) preview window shown in a horizontally
|
||||
split window
|
||||
=1 preview window shown in a vertically split window.
|
||||
Also affects the "previous window" (see |netrw-P|) in
|
||||
the same way.
|
||||
Also affects the "previous window" (see |netrw-P|)
|
||||
in the same way.
|
||||
|
||||
*g:netrw_scpport* = "-P" : option to use to set port for scp
|
||||
*g:netrw_sshport* = "-p" : option to use to set port for ssh
|
||||
@@ -542,15 +543,17 @@ which contains ftp commands which will be automatically run whenever ftp
|
||||
starts. You may use this feature to enter a user and password for one site: >
|
||||
userid
|
||||
password
|
||||
< *netrw-windows-netrc* *netrw-windows-s*
|
||||
If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines only)
|
||||
netrw will substitute the current machine name requested for ftp connections
|
||||
for MACHINE. Hence one can have multiple machine.ftp files containing login
|
||||
and password for ftp. Example: >
|
||||
< *netrw-windows-netrc* *netrw-windows-s*
|
||||
If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines
|
||||
only) netrw will substitute the current machine name requested for ftp
|
||||
connections for MACHINE. Hence one can have multiple machine.ftp files
|
||||
containing login and password for ftp. Example: >
|
||||
|
||||
let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
|
||||
vim ftp://myhost.somewhere.net/
|
||||
|
||||
will use a file >
|
||||
|
||||
C:\Users\Myself\myhost.ftp
|
||||
<
|
||||
Often, ftp will need to query the user for the userid and password.
|
||||
@@ -680,7 +683,7 @@ your <.vimrc> customization file: >
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
6. Transparent Remote File Editing *netrw-transparent* {{{1
|
||||
6. Transparent Remote File Editing *netrw-transparent* {{{1
|
||||
|
||||
Transparent file transfers occur whenever a regular file read or write
|
||||
(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
|
||||
@@ -754,7 +757,7 @@ below, a {netfile} is an url to a remote file.
|
||||
|
||||
|
||||
==============================================================================
|
||||
8. Variables and Options *netrw-var* *netrw-settings* {{{1
|
||||
8. Variables and Options *netrw-var* *netrw-settings* {{{1
|
||||
|
||||
(also see: |netrw-options| |netrw-variables| |netrw-protocol|
|
||||
|netrw-browser-settings| |netrw-browser-options| )
|
||||
@@ -794,7 +797,7 @@ set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
|
||||
=1 use default method to do ftp >
|
||||
-----------------------------------------------------------------------
|
||||
<
|
||||
*netrw-internal-variables*
|
||||
*netrw-internal-variables*
|
||||
The script will also make use of the following variables internally, albeit
|
||||
temporarily.
|
||||
>
|
||||
@@ -1041,8 +1044,8 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
<del> Netrw will attempt to remove the file/directory |netrw-del|
|
||||
- Makes Netrw go up one directory |netrw--|
|
||||
a Toggles between normal display, |netrw-a|
|
||||
hiding (suppress display of files matching g:netrw_list_hide)
|
||||
showing (display only files which match g:netrw_list_hide)
|
||||
hiding (suppress display of files matching g:netrw_list_hide)
|
||||
showing (display only files which match g:netrw_list_hide)
|
||||
c Make browsing directory the current directory |netrw-c|
|
||||
C Setting the editing window |netrw-C|
|
||||
d Make a directory |netrw-d|
|
||||
@@ -1067,7 +1070,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
mx Apply arbitrary shell command to marked files |netrw-mx|
|
||||
mz Compress/decompress marked files |netrw-mz|
|
||||
o Enter the file/directory under the cursor in a new |netrw-o|
|
||||
browser window. A horizontal split is used.
|
||||
browser window. A horizontal split is used.
|
||||
O Obtain a file specified by cursor |netrw-O|
|
||||
p Preview the file |netrw-p|
|
||||
P Browse in the previously used window |netrw-P|
|
||||
@@ -1081,7 +1084,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
u Change to recently-visited directory |netrw-u|
|
||||
U Change to subsequently-visited directory |netrw-U|
|
||||
v Enter the file/directory under the cursor in a new |netrw-v|
|
||||
browser window. A vertical split is used.
|
||||
browser window. A vertical split is used.
|
||||
x View file with an associated program |netrw-x|
|
||||
X Execute filename under cursor via |system()| |netrw-X|
|
||||
|
||||
@@ -1095,9 +1098,9 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
<rightmouse> (gvim only) delete file/directory using word under
|
||||
mouse
|
||||
<2-leftmouse> (gvim only) when:
|
||||
* in a netrw-selected file, AND
|
||||
* |g:netrw_retmap| == 1 AND
|
||||
* the user doesn't already have a <2-leftmouse>
|
||||
* in a netrw-selected file, AND
|
||||
* |g:netrw_retmap| == 1 AND
|
||||
* the user doesn't already have a <2-leftmouse>
|
||||
mapping defined before netrw is autoloaded,
|
||||
then a double clicked leftmouse button will return
|
||||
to the netrw browser window. See |g:netrw_retmap|.
|
||||
@@ -1179,6 +1182,12 @@ are introduced into a directory), the listing may become out-of-date. One may
|
||||
always refresh directory listing buffers by pressing ctrl-L (see
|
||||
|netrw-ctrl-l|).
|
||||
|
||||
*:netrw-s-cr*
|
||||
Squeezing the Current Tree-Listing Directory~
|
||||
When the tree listing style is enabled (see |netrw-i|) and one is using
|
||||
gvim, then the <s-cr> mapping may be used to squeeze (close) the
|
||||
directory currently containing the cursor.
|
||||
|
||||
|
||||
Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
|
||||
Associated setting variables: |g:netrw_browse_split| |g:netrw_fastbrowse|
|
||||
@@ -1227,9 +1236,7 @@ cursor at the left.
|
||||
There is only one tree listing buffer; using "v" on a displayed subdirectory
|
||||
will split the screen, but the same buffer will be shown twice.
|
||||
|
||||
Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
|
||||
|
||||
Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
|
||||
Related Actions: |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
|
||||
Associated setting variables:
|
||||
|g:netrw_altv| control right/left splitting
|
||||
|g:netrw_winsize| control initial sizing
|
||||
@@ -1251,11 +1258,12 @@ The wide listing format uses two or more contiguous spaces to delineate
|
||||
filenames; when using that format, netrw won't be able to recognize or use
|
||||
filenames which have two or more contiguous spaces embedded in the name or any
|
||||
trailing spaces. The thin listing format will, however, work with such files.
|
||||
This listing format is the most compact.
|
||||
The wide listing format is the most compact.
|
||||
|
||||
The tree listing format has a top directory followed by files and directories
|
||||
preceded by a "|". One may open and close directories by pressing the <cr>
|
||||
key while atop the directory name.
|
||||
preceded by one or more "|"s, which indicate the directory depth. One may
|
||||
open and close directories by pressing the <cr> key while atop the directory
|
||||
name.
|
||||
|
||||
One may make a preferred listing style your default; see |g:netrw_liststyle|.
|
||||
As an example, by putting the following line in your .vimrc, >
|
||||
@@ -1455,8 +1463,16 @@ If files have been marked with |netrw-mf|: (local marked file list)
|
||||
Marked files (and empty directories) will be deleted; again, you'll be
|
||||
asked to confirm the deletion before it actually takes place.
|
||||
|
||||
A further approach is to delete files which match a pattern.
|
||||
|
||||
* use :MF pattern (see |netrw-:MF|); then press "D".
|
||||
|
||||
* use mr (see |netrw-mr|) which will prompt you for pattern.
|
||||
This will cause the matching files to be marked. Then,
|
||||
press "D".
|
||||
|
||||
The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
|
||||
used to control the attempts to remove files and directories. The
|
||||
used to control the attempts to remove remote files and directories. The
|
||||
g:netrw_rm_cmd is used with files, and its default value is:
|
||||
|
||||
g:netrw_rm_cmd: ssh HOSTNAME rm
|
||||
@@ -1464,12 +1480,12 @@ g:netrw_rm_cmd is used with files, and its default value is:
|
||||
The g:netrw_rmdir_cmd variable is used to support the removal of directories.
|
||||
Its default value is:
|
||||
|
||||
g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
|
||||
|g:netrw_rmdir_cmd|: ssh HOSTNAME rmdir
|
||||
|
||||
If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
|
||||
to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
|
||||
|
||||
g:netrw_rmf_cmd: ssh HOSTNAME rm -f
|
||||
|g:netrw_rmf_cmd|: ssh HOSTNAME rm -f
|
||||
|
||||
Related topics: |netrw-d|
|
||||
Associated setting variable: |g:netrw_localrmdir| |g:netrw_rm_cmd|
|
||||
@@ -1482,7 +1498,7 @@ DIRECTORY EXPLORATION COMMANDS {{{2
|
||||
|
||||
:[N]Explore[!] [dir]... Explore directory of current file *:Explore*
|
||||
:[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
|
||||
:Rexplore ... Return to Explorer *:Rexplore*
|
||||
:Rexplore ... Return to/from Explorer *:Rexplore*
|
||||
:[N]Sexplore[!] [dir]... Split&Explore current file's directory *:Sexplore*
|
||||
:Texplore [dir]... Tab & Explore *:Texplore*
|
||||
:[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
|
||||
@@ -1492,23 +1508,36 @@ DIRECTORY EXPLORATION COMMANDS {{{2
|
||||
:Nexplore............. go to next matching file *:Nexplore*
|
||||
:Pexplore............. go to previous matching file *:Pexplore*
|
||||
|
||||
*netrw-:Explore*
|
||||
:Explore will open the local-directory browser on the current file's
|
||||
directory (or on directory [dir] if specified). The window will be
|
||||
split only if the file has been modified, otherwise the browsing
|
||||
window will take over that window. Normally the splitting is taken
|
||||
horizontally.
|
||||
Also see: |netrw-:Rexplore|
|
||||
:Explore! is like :Explore, but will use vertical splitting.
|
||||
*netrw-:Lexplore*
|
||||
:Lexplore [dir] toggles an Explorer window on the left hand side
|
||||
of the current tab It will open a netrw window on the current
|
||||
directory if [dir] is omitted.
|
||||
directory if [dir] is omitted; a :Lexplore [dir] will show
|
||||
the specified directory in the left-hand side browser display
|
||||
no matter from which window the command is issued. By default,
|
||||
:Lexplore will change an uninitialized |g:netrw_chgwin| to 2;
|
||||
edits will thus be preferentially made in window#2.
|
||||
Also see: |netrw-C|| |g:netrw_chgwin| |g:netrw_winsize|
|
||||
|netrw-p| |netrw-P|| |g:netrw_browse_split|
|
||||
*netrw-:Sexplore*
|
||||
:Sexplore will always split the window before invoking the local-directory
|
||||
browser. As with Explore, the splitting is normally done
|
||||
horizontally.
|
||||
:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
|
||||
*netrw-:Hexplore*
|
||||
:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
|
||||
:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
|
||||
*netrw-:Vexplore*
|
||||
:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
|
||||
:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
|
||||
*netrw-:Texplore*
|
||||
:Texplore [dir] does a |:tabnew| before generating the browser window
|
||||
|
||||
By default, these commands use the current file's directory. However, one may
|
||||
@@ -1521,12 +1550,23 @@ Otherwise, the |g:netrw_winsize| variable, if it has been specified by the
|
||||
user, is used to control the quantity of rows and/or columns new explorer
|
||||
windows should have.
|
||||
|
||||
:Rexplore This command is a little different from the others. When one
|
||||
edits a file, for example by pressing <cr> when atop a file in
|
||||
a netrw browser window, :Rexplore will return the display to
|
||||
that of the last netrw browser window. It is a command version
|
||||
of the <2-leftmouse> map (which is only available under gvim and
|
||||
cooperative terms).
|
||||
*netrw-:Rexplore*
|
||||
:Rexplore This command is a little different from the others as it doesn't
|
||||
necessarily open an Explorer window.
|
||||
|
||||
Return to Explorer~
|
||||
When one edits a file, for example by pressing <cr> when the
|
||||
cursor is atop a file in a netrw browser window, :Rexplore will
|
||||
return the display to that of the last netrw browser display
|
||||
in that window.
|
||||
|
||||
Return from Explorer~
|
||||
Conversely, when one is editing a directory, issuing a :Rexplore
|
||||
will return to editing the file that was last edited in that
|
||||
window.
|
||||
|
||||
The <2-leftmouse> map (which is only available under gvim and
|
||||
cooperative terms) does the same as :Rexplore.
|
||||
|
||||
Also see: |g:netrw_alto| |g:netrw_altv| |g:netrw_winsize|
|
||||
|
||||
@@ -1572,11 +1612,12 @@ As an example, consider
|
||||
The status line will show, on the right hand side of the status line, a
|
||||
message like "Match 3 of 20".
|
||||
|
||||
Associated setting variables: |g:netrw_keepdir| |g:netrw_browse_split|
|
||||
|g:netrw_fastbrowse| |g:netrw_ftp_browse_reject|
|
||||
|g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
|
||||
|g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd|
|
||||
|g:netrw_liststyle|
|
||||
Associated setting variables:
|
||||
|g:netrw_keepdir| |g:netrw_browse_split|
|
||||
|g:netrw_fastbrowse| |g:netrw_ftp_browse_reject|
|
||||
|g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
|
||||
|g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd|
|
||||
|g:netrw_liststyle|
|
||||
|
||||
|
||||
DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2
|
||||
@@ -1666,10 +1707,10 @@ entry in the listing.
|
||||
|
||||
Netrw will use the command in |g:netrw_list_cmd| to perform the directory
|
||||
listing operation after changing HOSTNAME to the host specified by the
|
||||
user-provided url. By default netrw provides the command as:
|
||||
user-prpvided url. By default netrw provides the command as: >
|
||||
|
||||
ssh HOSTNAME ls -FLa
|
||||
|
||||
<
|
||||
where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
|
||||
read. Naturally, the user may override this command with whatever is
|
||||
preferred. The NetList function which implements remote browsing
|
||||
@@ -1882,12 +1923,29 @@ directory.
|
||||
|
||||
Associated setting variable: |g:netrw_keepdir|
|
||||
|
||||
MARKING FILES *netrw-mf* {{{2
|
||||
MARKING FILES *netrw-:MF* *netrw-mf* {{{2
|
||||
(also see |netrw-mr|)
|
||||
|
||||
One may mark files with the cursor atop a filename and then pressing "mf".
|
||||
With gvim, one may also mark files with <s-leftmouse>. The following netrw
|
||||
maps make use of marked files:
|
||||
Netrw has several ways of marking files:
|
||||
|
||||
* One may mark files with the cursor atop a filename and
|
||||
then pressing "mf".
|
||||
|
||||
* With gvim, in addition one may mark files with
|
||||
<s-leftmouse>. (see |netrw-mouse|)
|
||||
|
||||
* One may use the :MF command, which takes a list of
|
||||
files (for local directories, the list may include
|
||||
wildcards -- see |glob()|) >
|
||||
|
||||
:MF *.c
|
||||
<
|
||||
* Note that :MF uses |<f-args>| to break the line
|
||||
at spaces.
|
||||
|
||||
* Mark files based upon the quickfix list (|netrw-qF|)
|
||||
|
||||
The following netrw maps make use of marked files:
|
||||
|
||||
|netrw-a| Hide marked files/directories
|
||||
|netrw-D| Delete marked files/directories
|
||||
@@ -1896,13 +1954,12 @@ maps make use of marked files:
|
||||
|netrw-me| Edit marked files
|
||||
|netrw-mF| Unmark marked files
|
||||
|netrw-mg| Apply vimgrep to marked files
|
||||
|netrw-mm| Move marked files
|
||||
|netrw-mm| Move marked files to target
|
||||
|netrw-mp| Print marked files
|
||||
|netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|
||||
|netrw-mT| Generate tags using marked files
|
||||
|netrw-mx| Apply shell command to marked files
|
||||
|netrw-mz| Compress/Decompress marked files
|
||||
|netrw-qF| Mark files using quickfix list
|
||||
|netrw-O| Obtain marked files
|
||||
|netrw-R| Rename marked files
|
||||
|
||||
@@ -1933,6 +1990,12 @@ means that each directory has its own local marked file list. The various
|
||||
commands which operate on marked files use one or the other of the marked file
|
||||
lists.
|
||||
|
||||
Known Problem: if one is using tree mode (|g:netrw_liststyle|) and several
|
||||
directories have files with the same name, then marking such a file will
|
||||
result in all such files being highlighted as if they were all marked. The
|
||||
|markfilelist|, however, will only have the selected file in it. This problem
|
||||
is unlikely to be fixed.
|
||||
|
||||
|
||||
UNMARKING FILES *netrw-mF* {{{2
|
||||
(also see |netrw-mf|)
|
||||
@@ -2090,6 +2153,10 @@ Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
|
||||
* However, if the cursor is atop a directory name, then that directory is
|
||||
used for the copy/move-to target
|
||||
|
||||
* One may use the :MT [directory] command to set the target *netrw-:MT*
|
||||
This command uses |<q-args>|, so spaces in the directory name are
|
||||
permitted without escaping.
|
||||
|
||||
There is only one copy/move-to target per vim session; ie. the target is a
|
||||
script variable (see |s:var|) and is shared between all netrw windows (in an
|
||||
instance of vim).
|
||||
@@ -2120,9 +2187,9 @@ http://www.drchip.org/astronaut/src/index.html , and have >
|
||||
in my <.vimrc>.
|
||||
|
||||
When a remote set of files are tagged, the resulting tags file is "obtained";
|
||||
ie. a copy is transferred to the local system's directory. The local tags
|
||||
ie. a copy is transferred to the local system's directory. The now local tags
|
||||
file is then modified so that one may use it through the network. The
|
||||
modification is concerns the names of the files in the tags; each filename is
|
||||
modification made concerns the names of the files in the tags; each filename is
|
||||
preceded by the netrw-compatible url used to obtain it. When one subsequently
|
||||
uses one of the go to tag actions (|tags|), the url will be used by netrw to
|
||||
edit the desired file and go to the tag.
|
||||
@@ -2131,34 +2198,38 @@ Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
|
||||
|
||||
MARKED FILES: TARGET DIRECTORY USING BOOKMARKS *netrw-Tb* {{{2
|
||||
|
||||
Sets the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|).
|
||||
Sets the marked file copy/move-to target.
|
||||
|
||||
The |netrw-qb| map will give you a list of bookmarks (and history).
|
||||
One may choose one of the bookmarks to become your marked file
|
||||
target by using [count]Tb (default count: 1).
|
||||
|
||||
Related topics:
|
||||
Copying files to target............................|netrw-mc|
|
||||
Listing Bookmarks and History......................|netrw-qb|
|
||||
Marked Files: Setting The Target Directory.........|netrw-mt|
|
||||
Marked Files: Target Directory Using History.......|netrw-Th|
|
||||
Marking Files......................................|netrw-mf|
|
||||
Marking Files by Regular Expression................|netrw-mr|
|
||||
Moving files to target.............................|netrw-mm|
|
||||
|
||||
|
||||
MARKED FILES: TARGET DIRECTORY USING HISTORY *netrw-Th* {{{2
|
||||
|
||||
Sets the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|).
|
||||
Sets the marked file copy/move-to target.
|
||||
|
||||
The |netrw-qb| map will give you a list of history (and bookmarks).
|
||||
One may choose one of the history entries to become your marked file
|
||||
target by using [count]Th (default count: 0; ie. the current directory).
|
||||
|
||||
Related topics:
|
||||
Copying files to target............................|netrw-mc|
|
||||
Listing Bookmarks and History......................|netrw-qb|
|
||||
Marked Files: Setting The Target Directory.........|netrw-mt|
|
||||
Marked Files: Target Directory Using Bookmarks.....|netrw-Tb|
|
||||
Marking Files......................................|netrw-mf|
|
||||
Marking Files by Regular Expression................|netrw-mr|
|
||||
Moving files to target.............................|netrw-mm|
|
||||
|
||||
|
||||
MARKED FILES: UNMARKING *netrw-mu* {{{2
|
||||
@@ -2282,6 +2353,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
*g:netrw_dynamic_maxfilenamelen* =32: enables dynamic determination of
|
||||
|g:netrw_maxfilenamelen|, which affects
|
||||
local file long listing.
|
||||
|
||||
*g:netrw_errorlvl* =0: error levels greater than or equal to
|
||||
this are permitted to be displayed
|
||||
0: notes
|
||||
@@ -2289,7 +2361,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
2: errors
|
||||
|
||||
*g:netrw_fastbrowse* =0: slow speed directory browsing;
|
||||
never re-uses directory listings,
|
||||
never re-uses directory listings;
|
||||
always obtains directory listings.
|
||||
=1: medium speed directory browsing;
|
||||
re-use directory listings only
|
||||
@@ -2312,6 +2384,11 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
trading off accuracy (ie. up-to-date listing)
|
||||
versus speed.
|
||||
|
||||
*g:netrw_ffkeep* (default: doesn't exist)
|
||||
If this variable exists and is zero, then
|
||||
netrw will not do a save and restore for
|
||||
|'fileformat'|.
|
||||
|
||||
*g:netrw_fname_escape* =' ?&;%'
|
||||
Used on filenames before remote reading/writing
|
||||
|
||||
@@ -2434,7 +2511,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
evaluation will be suppressed
|
||||
(see |'ballooneval'|)
|
||||
|
||||
*g:netrw_remote_mkdir* command for making a local directory
|
||||
*g:netrw_remote_mkdir* command for making a remote directory
|
||||
via ftp (also see |g:netrw_mkdir_cmd|)
|
||||
default: "mkdir"
|
||||
|
||||
@@ -2457,13 +2534,13 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
|
||||
default: =0
|
||||
|
||||
*g:netrw_rm_cmd* command for removing files
|
||||
*g:netrw_rm_cmd* command for removing remote files
|
||||
default: "ssh USEPORT HOSTNAME rm"
|
||||
|
||||
*g:netrw_rmdir_cmd* command for removing directories
|
||||
*g:netrw_rmdir_cmd* command for removing remote directories
|
||||
default: "ssh USEPORT HOSTNAME rmdir"
|
||||
|
||||
*g:netrw_rmf_cmd* command for removing softlinks
|
||||
*g:netrw_rmf_cmd* command for removing remote softlinks
|
||||
default: "ssh USEPORT HOSTNAME rm -f"
|
||||
|
||||
*g:netrw_sort_by* sort by "name", "time", or "size"
|
||||
@@ -2482,7 +2559,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
|
||||
*g:netrw_sort_sequence* when sorting by name, first sort by the
|
||||
comma-separated pattern sequence. Note that
|
||||
the filigree added to indicate filetypes
|
||||
any filigree added to indicate filetypes
|
||||
should be accounted for in your pattern.
|
||||
default: '[\/]$,*,\.bak$,\.o$,\.h$,
|
||||
\.info$,\.swp$,\.obj$'
|
||||
@@ -2498,7 +2575,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
netrwMakefile: [mM]akefile *.mak
|
||||
netrwObj : *.o *.obj
|
||||
netrwTags : tags ANmenu ANtags
|
||||
netrwTilde : *~
|
||||
netrwTilde : *
|
||||
netrwTmp : tmp* *tmp
|
||||
|
||||
These syntax highlighting groups are linked
|
||||
@@ -2507,8 +2584,27 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
one may put lines like >
|
||||
hi link netrwCompress Visual
|
||||
< into one's <.vimrc> to use one's own
|
||||
preferences.
|
||||
preferences. Alternatively, one may
|
||||
put such specifications into
|
||||
.vim/after/syntax/netrw.vim.
|
||||
|
||||
As an example, I myself use a dark-background
|
||||
colorscheme with the following in
|
||||
.vim/after/syntax/netrw.vim: >
|
||||
|
||||
hi netrwCompress term=NONE cterm=NONE gui=NONE ctermfg=10 guifg=green ctermbg=0 guibg=black
|
||||
hi netrwData term=NONE cterm=NONE gui=NONE ctermfg=9 guifg=blue ctermbg=0 guibg=black
|
||||
hi netrwHdr term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1
|
||||
hi netrwLex term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1
|
||||
hi netrwYacc term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1
|
||||
hi netrwLib term=NONE cterm=NONE gui=NONE ctermfg=14 guifg=yellow
|
||||
hi netrwObj term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red
|
||||
hi netrwTilde term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red
|
||||
hi netrwTmp term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red
|
||||
hi netrwTags term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red
|
||||
hi netrwDoc term=NONE cterm=NONE gui=NONE ctermfg=220 ctermbg=27 guifg=yellow2 guibg=Blue3
|
||||
hi netrwSymLink term=NONE cterm=NONE gui=NONE ctermfg=220 ctermbg=27 guifg=grey60
|
||||
<
|
||||
*g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
|
||||
messages, banners, and whatnot that one doesn't
|
||||
want masquerading as "directories" and "files".
|
||||
@@ -2543,6 +2639,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
ml_get errors, try putting
|
||||
let g:netrw_use_noswf= 0
|
||||
in your .vimrc.
|
||||
default: 1
|
||||
|
||||
*g:netrw_winsize* specify initial size of new windows made with
|
||||
"o" (see |netrw-o|), "v" (see |netrw-v|),
|
||||
@@ -2553,6 +2650,9 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
If g:netrw_winsize is less than zero, then
|
||||
the absolute value of g:netrw_winsize lines
|
||||
or columns will be used for the new window.
|
||||
If g:netrw_winsize is zero, then a normal
|
||||
split will be made (ie. |'equalalways'| will
|
||||
take effect, for example).
|
||||
default: 50 (for 50%)
|
||||
|
||||
*g:netrw_xstrlen* Controls how netrw computes string lengths,
|
||||
@@ -2582,7 +2682,7 @@ Netrw has been designed to handle user options by saving them, setting the
|
||||
options to something that's compatible with netrw's needs, and then restoring
|
||||
them. However, the autochdir option: >
|
||||
:set acd
|
||||
is problematical. Autochdir sets the current directory to that containing the
|
||||
is problematic. Autochdir sets the current directory to that containing the
|
||||
file you edit; this apparently also applies to directories. In other words,
|
||||
autochdir sets the current directory to that containing the "file" (even if
|
||||
that "file" is itself a directory).
|
||||
@@ -2633,9 +2733,9 @@ Related topics:
|
||||
*netrw-createfile*
|
||||
OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%*
|
||||
|
||||
To open a file in netrw's current directory, press "%". This map will
|
||||
query the user for a new filename; an empty file by that name will be
|
||||
placed in the netrw's current directory (ie. b:netrw_curdir).
|
||||
To open a new file in netrw's current directory, press "%". This map
|
||||
will query the user for a new filename; an empty file by that name will
|
||||
be placed in the netrw's current directory (ie. b:netrw_curdir).
|
||||
|
||||
Related topics: |netrw-d|
|
||||
|
||||
@@ -2661,6 +2761,9 @@ These will:
|
||||
will use only 30% of the columns available; the rest of the window
|
||||
is used for the preview window.
|
||||
|
||||
Also see: |g:netrw_chgwin| |netrw-P|
|
||||
|
||||
|
||||
PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
|
||||
|
||||
To edit a file or directory in the previously used (last accessed) window (see
|
||||
@@ -2680,6 +2783,8 @@ Associated setting variables:
|
||||
|g:netrw_preview| control horizontal vs vertical splitting
|
||||
|g:netrw_winsize| control initial sizing
|
||||
|
||||
Also see: |g:netrw_chgwin| |netrw-p|
|
||||
|
||||
|
||||
REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2
|
||||
|
||||
@@ -2717,6 +2822,7 @@ If there are marked files: (see |netrw-mf|)
|
||||
Note that moving files is a dangerous operation; copies are safer. That's
|
||||
because a "move" for remote files is actually a copy + delete -- and if
|
||||
the copy fails and the delete does not, you may lose the file.
|
||||
Use at your own risk.
|
||||
|
||||
The g:netrw_rename_cmd variable is used to implement renaming. By default its
|
||||
value is:
|
||||
@@ -2743,6 +2849,15 @@ One may select a netrw window for editing with the "C" mapping, or by setting
|
||||
g:netrw_chgwin to the selected window number. Subsequent selection of a file
|
||||
to edit (|netrw-cr|) will use that window.
|
||||
|
||||
* C by itself, will select the current window for editing via
|
||||
|netrw-cr|
|
||||
|
||||
* [count]C the count will be used as the window number to be used
|
||||
for editing via |netrw-cr|.
|
||||
Using >
|
||||
let g:netrw_chgwin= -1
|
||||
will restore the default editing behavior (ie. use the current window).
|
||||
|
||||
Related topics: |netrw-cr| |g:netrw_browse_split|
|
||||
Associated setting variables: |g:netrw_chgwin|
|
||||
|
||||
@@ -2830,7 +2945,7 @@ Associated setting variables: |g:netrw_chgwin|
|
||||
|
||||
(taken from an answer provided by Wu Yongwei on the vim
|
||||
mailing list)
|
||||
I now see the problem. You code page is not 936, right? Vim
|
||||
I now see the problem. Your code page is not 936, right? Vim
|
||||
seems only able to open files with names that are valid in the
|
||||
current code page, as are many other applications that do not
|
||||
use the Unicode version of Windows APIs. This is an OS-related
|
||||
@@ -3031,6 +3146,15 @@ Associated setting variables: |g:netrw_chgwin|
|
||||
all netrw's mouse mappings, not just the <leftmouse> one.
|
||||
(see |g:netrw_mousemaps|)
|
||||
|
||||
*netrw-p16*
|
||||
P16. When editing remote files (ex. :e ftp://hostname/path/file),
|
||||
under Windows I get an |E303| message complaining that its unable
|
||||
to open a swap file.
|
||||
|
||||
(romainl) It looks like you are starting Vim from a protected
|
||||
directory. Start if from your $HOME or another writable
|
||||
directory.
|
||||
|
||||
==============================================================================
|
||||
11. Debugging Netrw Itself *netrw-debug* {{{1
|
||||
|
||||
@@ -3038,9 +3162,6 @@ The <netrw.vim> script is typically available as something like:
|
||||
>
|
||||
/usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
|
||||
/usr/local/share/vim/vim7x/autoload/netrw.vim
|
||||
< -or- >
|
||||
/usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
|
||||
/usr/local/share/vim/vim6x/autoload/netrw.vim
|
||||
<
|
||||
which is loaded automatically at startup (assuming :set nocp).
|
||||
|
||||
@@ -3050,9 +3171,7 @@ which is loaded automatically at startup (assuming :set nocp).
|
||||
or
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=120
|
||||
|
||||
It now comes as a "vimball"; if you're using vim 7.0 or earlier,
|
||||
you'll need to update vimball, too. See
|
||||
http://www.drchip.org/astronaut/vim/index.html#VIMBALL
|
||||
Decho.vim is provided as a "vimball"; see |vimball-intro|.
|
||||
|
||||
2. Edit the <netrw.vim> file by typing: >
|
||||
|
||||
@@ -3082,24 +3201,99 @@ which is loaded automatically at startup (assuming :set nocp).
|
||||
:w! DBG
|
||||
|
||||
< Furthermore, it'd be helpful if you would type >
|
||||
:Dsep
|
||||
< after each command you issue, thereby making it easier to
|
||||
associate which part of the debugging trace is due to which
|
||||
command.
|
||||
:Dsep <command>
|
||||
< where <command> is the command you're about to type next,
|
||||
thereby making it easier to associate which part of the
|
||||
debugging trace is due to which command.
|
||||
|
||||
Please send that information to <netrw.vim>'s maintainer, >
|
||||
Please send that information to <netrw.vim>'s maintainer along
|
||||
with the o/s you're using and vim version you're using
|
||||
(see |:version|) >
|
||||
NdrOchip at ScampbellPfamily.AbizM - NOSPAM
|
||||
<
|
||||
==============================================================================
|
||||
12. History *netrw-history* {{{1
|
||||
|
||||
v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires
|
||||
vim 7.4 with patch 213)
|
||||
* (Enno Nagel) turn |'rnu'| off in netrw
|
||||
buffers.
|
||||
* (Quinn Strahl) suggested that netrw
|
||||
allow regular window splitting to occur,
|
||||
thereby allowing |'equalalways'| to take
|
||||
effect.
|
||||
* (qingtian zhao) normally, netrw will
|
||||
save and restore the |'fileformat'|;
|
||||
however, sometimes that isn't wanted
|
||||
Apr 14, 2014 * whenever netrw marks a buffer as ro,
|
||||
it will also mark it as nomod.
|
||||
Apr 16, 2014 * sftp protocol now supported by
|
||||
netrw#Obtain(); this means that one
|
||||
may use "mc" to copy a remote file
|
||||
to a local file using sftp, and that
|
||||
the |netrw-O| command can obtain remote
|
||||
files via sftp.
|
||||
* added [count]C support (see |netrw-C|)
|
||||
Apr 18, 2014 * when |g:netrw_chgwin| is one more than
|
||||
the last window, then vertically split
|
||||
the last window and use it as the
|
||||
chgwin window.
|
||||
May 09, 2014 * SavePosn was "saving filename under cursor"
|
||||
from a non-netrw window when using :Rex.
|
||||
v151: Jan 22, 2014 * extended :Rexplore to return to buffer
|
||||
prior to Explore or editing a directory
|
||||
* (Ken Takata) netrw gave error when
|
||||
clipboard was disabled. Sol'n: Placed
|
||||
several if has("clipboard") tests in.
|
||||
* Fixed ftp://X@Y@Z// problem; X@Y now
|
||||
part of user id, and only Z is part of
|
||||
hostname.
|
||||
* (A Loumiotis) reported that completion
|
||||
using a directory name containing spaces
|
||||
did not work. Fixed with a retry in
|
||||
netrw#Explore() which removes the
|
||||
backslashes vim inserted.
|
||||
Feb 26, 2014 * :Rexplore now records the current file
|
||||
using w:netrw_rexfile when returning via
|
||||
|:Rexplore|
|
||||
Mar 08, 2014 * (David Kotchan) provided some patches
|
||||
allowing netrw to work properly with
|
||||
windows shares.
|
||||
* Multiple one-liner help messages available
|
||||
by pressing <cr> while atop the "Quick
|
||||
Help" line
|
||||
* worked on ShellCmdPost, FocusGained event
|
||||
handling.
|
||||
* |:Lexplore| path: will be used to update
|
||||
a left-side netrw browsing directory.
|
||||
Mar 12, 2014 * |:netrw-s-cr|: use <s-cr> to close
|
||||
tree directory implemented
|
||||
Mar 13, 2014 * (Tony Mechylynck) reported that using
|
||||
the browser with ftp on a directory,
|
||||
and selecting a gzipped txt file, that
|
||||
an E19 occurred (which was issued by
|
||||
gzip.vim). Fixed.
|
||||
Mar 14, 2014 * Implemented :MF and :MT (see |netrw-:MF|
|
||||
and |netrw-:MT|, respectively)
|
||||
Mar 17, 2014 * |:Ntree| [dir] wasn't working properly; fixed
|
||||
Mar 18, 2014 * Changed all uses of set to setl
|
||||
Mar 18, 2014 * Commented the netrw_btkeep line in
|
||||
s:NetrwOptionSave(); the effect is that
|
||||
netrw buffers will remain as |'bt'|=nofile.
|
||||
This should prevent swapfiles being created
|
||||
for netrw buffers.
|
||||
Mar 20, 2014 * Changed all uses of lcd to use s:NetrwLcd()
|
||||
instead. Consistent error handling results
|
||||
and it also handles Window's shares
|
||||
* Fixed |netrw-d| command when applied with ftp
|
||||
* https: support included for netrw#NetRead()
|
||||
v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to
|
||||
return to the netrw directory listing
|
||||
Jul 13, 2013 * (Jonas Diemer) suggested changing
|
||||
a <cWORD> to <cfile>.
|
||||
Jul 21, 2013 * (Yuri Kanivetsky) reported that netrw's
|
||||
use of mkdir did not produce directories
|
||||
following umask.
|
||||
following the user's umask.
|
||||
Aug 27, 2013 * introduced |g:netrw_altfile| option
|
||||
Sep 05, 2013 * s:Strlen() now uses |strdisplaywidth()|
|
||||
when available, by default
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 7.4. Last change: 2013 Aug 03
|
||||
*quickfix.txt* For Vim version 7.4. Last change: 2014 Mar 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -202,8 +202,8 @@ command with 'l'.
|
||||
the current window is used instead of the quickfix
|
||||
list.
|
||||
|
||||
*:caddb* *:caddbuffer*
|
||||
:caddb[uffer] [bufnr] Read the error list from the current buffer and add
|
||||
*:cad* *:caddbuffer*
|
||||
:cad[dbuffer] [bufnr] Read the error list from the current buffer and add
|
||||
the errors to the current quickfix list. If a
|
||||
quickfix list is not present, then a new list is
|
||||
created. Otherwise, same as ":cbuffer".
|
||||
@@ -240,8 +240,8 @@ command with 'l'.
|
||||
:lgete[xpr] {expr} Same as |:cgetexpr|, except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cad* *:caddexpr*
|
||||
:cad[dexpr] {expr} Evaluate {expr} and add the resulting lines to the
|
||||
*:cadde* *:caddexpr*
|
||||
:cadde[xpr] {expr} Evaluate {expr} and add the resulting lines to the
|
||||
current quickfix list. If a quickfix list is not
|
||||
present, then a new list is created. The current
|
||||
cursor position will not be changed. See |:cexpr| for
|
||||
@@ -304,18 +304,23 @@ use this code: >
|
||||
|
||||
*:cope* *:copen* *w:quickfix_title*
|
||||
:cope[n] [height] Open a window to show the current list of errors.
|
||||
|
||||
When [height] is given, the window becomes that high
|
||||
(if there is room). Otherwise the window is made ten
|
||||
lines high.
|
||||
The window will contain a special buffer, with
|
||||
'buftype' equal to "quickfix". Don't change this!
|
||||
(if there is room). When [height] is omitted the
|
||||
window is made ten lines high.
|
||||
|
||||
If there already is a quickfix window, it will be made
|
||||
the current window. It is not possible to open a
|
||||
second quickfix window. The window will have the
|
||||
w:quickfix_title variable set which will indicate the
|
||||
command that produced the quickfix list. This can be
|
||||
used to compose a custom status line if the value of
|
||||
'statusline' is adjusted properly.
|
||||
second quickfix window. If [height] is given the
|
||||
existing window will be resized to it.
|
||||
|
||||
The window will contain a special buffer, with
|
||||
'buftype' equal to "quickfix". Don't change this!
|
||||
The window will have the w:quickfix_title variable set
|
||||
which will indicate the command that produced the
|
||||
quickfix list. This can be used to compose a custom
|
||||
status line if the value of 'statusline' is adjusted
|
||||
properly.
|
||||
|
||||
*:lop* *:lopen*
|
||||
:lop[en] [height] Open a window to show the location list for the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 7.4. Last change: 2013 Jun 29
|
||||
*quickref.txt* For Vim version 7.4. Last change: 2014 Jun 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -624,6 +624,8 @@ Short explanation of each option: *option-list*
|
||||
'bioskey' 'biosk' MS-DOS: use bios calls for input characters
|
||||
'bomb' prepend a Byte Order Mark to the file
|
||||
'breakat' 'brk' characters that may cause a line break
|
||||
'breakindent' 'bri' wrapped line repeats indent
|
||||
'breakindentopt' 'briopt' settings for 'breakindent'
|
||||
'browsedir' 'bsdir' which directory to start browsing in
|
||||
'bufhidden' 'bh' what to do when buffer is no longer in window
|
||||
'buflisted' 'bl' whether the buffer shows up in the buffer list
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*recover.txt* For Vim version 7.4. Last change: 2010 Jul 20
|
||||
*recover.txt* For Vim version 7.4. Last change: 2014 Mar 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -81,7 +81,14 @@ the amount of memory used to be higher than given with 'maxmem' or
|
||||
'maxmemtot'. And when making a change to a read-only file, the swap file is
|
||||
created anyway.
|
||||
|
||||
The 'swapfile' option can be reset to avoid creating a swapfile.
|
||||
The 'swapfile' option can be reset to avoid creating a swapfile. And the
|
||||
|:noswapfile| modifier can be used to not create a swapfile for a new buffer.
|
||||
|
||||
:nos[wapfile] {command} *:nos* *:noswapfile*
|
||||
Execute {command}. If it contains a command that loads a new
|
||||
buffer, it will be loaded without creating a swapfile and the
|
||||
'swapfile' option will be reset. If a buffer already had a
|
||||
swapfile it is not removed and 'swapfile' is not reset.
|
||||
|
||||
|
||||
Detecting an existing swap file ~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 7.4. Last change: 2014 Feb 11
|
||||
*repeat.txt* For Vim version 7.4. Last change: 2014 Mar 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -588,6 +588,12 @@ the |+reltime| feature, which is present more often.
|
||||
|
||||
For profiling syntax highlighting see |:syntime|.
|
||||
|
||||
For example, to profile the one_script.vim script file: >
|
||||
:profile start /tmp/one_script_profile
|
||||
:profile file one_script.vim
|
||||
:source one_script.vim
|
||||
:exit
|
||||
|
||||
|
||||
:prof[ile] start {fname} *:prof* *:profile* *E750*
|
||||
Start profiling, write the output in {fname} upon exit.
|
||||
@@ -612,8 +618,10 @@ For profiling syntax highlighting see |:syntime|.
|
||||
This only profiles the script itself, not the functions
|
||||
defined in it.
|
||||
When the [!] is added then all functions defined in the script
|
||||
will also be profiled. But only if the script is loaded after
|
||||
this command.
|
||||
will also be profiled.
|
||||
Note that profiling only starts when the script is loaded
|
||||
after this command. A :profile command in the script itself
|
||||
won't work.
|
||||
|
||||
|
||||
:profd[el] ... *:profd* *:profdel*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 7.4. Last change: 2013 Nov 17
|
||||
*sign.txt* For Vim version 7.4. Last change: 2014 May 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@@ -137,6 +137,7 @@ PLACING SIGNS *:sign-place* *E158*
|
||||
:sign place {id} line={lnum} name={name} buffer={nr}
|
||||
Same, but use buffer {nr}.
|
||||
|
||||
*E885*
|
||||
:sign place {id} name={name} file={fname}
|
||||
Change the placed sign {id} in file {fname} to use the defined
|
||||
sign {name}. See remark above about {fname} |:sign-fname|.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*spell.txt* For Vim version 7.4. Last change: 2013 Nov 12
|
||||
*spell.txt* For Vim version 7.4. Last change: 2014 Jul 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -939,9 +939,10 @@ be combined without errors.
|
||||
|
||||
If you get an E763 warning that the word tables differ you need to update your
|
||||
".spl" spell files. If you downloaded the files, get the latest version of
|
||||
all spell files you use. Otherwise generate the .spl file again with
|
||||
|:mkspell|. If you still get errors check the FOL, LOW and UPP lines in the
|
||||
used .aff files.
|
||||
all spell files you use. If you are only using one, e.g., German, then also
|
||||
download the recent English spell files. Otherwise generate the .spl file
|
||||
again with |:mkspell|. If you still get errors check the FOL, LOW and UPP
|
||||
lines in the used .aff files.
|
||||
|
||||
The XX.ascii.spl spell file generated with the "-ascii" argument will not
|
||||
contain the table with characters, so that it can be combine with spell files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 7.4. Last change: 2013 Jul 20
|
||||
*starting.txt* For Vim version 7.4. Last change: 2014 Jul 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -167,7 +167,10 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
*-+/*
|
||||
+/{pat} The cursor will be positioned on the first line containing
|
||||
"pat" in the first file being edited (see |pattern| for the
|
||||
available search patterns).
|
||||
available search patterns). The search starts at the cursor
|
||||
position, which can be the first line or the cursor position
|
||||
last used from |viminfo|. To force a search from the first
|
||||
line use "+1 +/pat".
|
||||
|
||||
+{command} *-+c* *-c*
|
||||
-c {command} {command} will be executed after the first file has been
|
||||
@@ -1276,8 +1279,10 @@ triggered.
|
||||
When [!] is included an existing file is overwritten.
|
||||
When [file] is omitted or is a number from 1 to 9, a
|
||||
name is generated and 'viewdir' prepended. When the
|
||||
last directory name in 'viewdir' does not exist, this
|
||||
directory is created.
|
||||
last path part of 'viewdir' does not exist, this
|
||||
directory is created. E.g., when 'viewdir' is
|
||||
"$VIM/vimfiles/view" then "view" is created in
|
||||
"$VIM/vimfiles".
|
||||
An existing file is always overwritten then. Use
|
||||
|:loadview| to load this view again.
|
||||
When [file] is the name of a file ('viewdir' is not
|
||||
@@ -1501,7 +1506,7 @@ most of the information will be restored).
|
||||
already set (registers, marks, |v:oldfiles|, etc.)
|
||||
will be overwritten {not in Vi}
|
||||
|
||||
*:wv* *:wviminfo* *E137* *E138* *E574*
|
||||
*:wv* *:wviminfo* *E137* *E138* *E574* *E886*
|
||||
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
|
||||
The information in the file is first read in to make
|
||||
a merge between old and new info. When [!] is used,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.4. Last change: 2014 Feb 25
|
||||
*syntax.txt* For Vim version 7.4. Last change: 2014 Jun 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1022,6 +1022,21 @@ Or to avoid the highlighting: >
|
||||
This works immediately.
|
||||
|
||||
|
||||
CLOJURE *ft-clojure-syntax*
|
||||
|
||||
Setting *g:clojure_fold* enables folding Clojure code via the syntax engine.
|
||||
Any list, vector, or map that extends over more than one line can be folded
|
||||
using the standard Vim |fold-commands|.
|
||||
|
||||
Please note that this option does not work with scripts that redefine the
|
||||
bracket syntax regions, such as rainbow-parentheses plugins.
|
||||
|
||||
This option is off by default.
|
||||
>
|
||||
" Default
|
||||
let g:clojure_fold = 0
|
||||
<
|
||||
|
||||
COBOL *cobol.vim* *ft-cobol-syntax*
|
||||
|
||||
COBOL highlighting has different needs for legacy code than it does for fresh
|
||||
@@ -1673,7 +1688,7 @@ vimrc file: >
|
||||
HTML comments are rather special (see an HTML reference document for the
|
||||
details), and the syntax coloring scheme will highlight all errors.
|
||||
However, if you prefer to use the wrong style (starts with <!-- and
|
||||
ends with --!>) you can define >
|
||||
ends with -->) you can define >
|
||||
:let html_wrong_comments=1
|
||||
|
||||
JavaScript and Visual Basic embedded inside HTML documents are highlighted as
|
||||
@@ -1944,7 +1959,7 @@ If you don't want to set the variable, use the modeline in EVERY LPC file.
|
||||
There are several implementations for LPC, we intend to support most widely
|
||||
used ones. Here the default LPC syntax is for MudOS series, for MudOS v22
|
||||
and before, you should turn off the sensible modifiers, and this will also
|
||||
asserts the new efuns after v22 to be invalid, don't set this variable when
|
||||
assert the new efuns after v22 to be invalid, don't set this variable when
|
||||
you are using the latest version of MudOS: >
|
||||
|
||||
:let lpc_pre_v22 = 1
|
||||
@@ -2264,7 +2279,7 @@ files, you may set the 'perl_include_pod' option to 0: >
|
||||
|
||||
:let perl_include_pod = 0
|
||||
|
||||
The reduce the complexity of parsing (and increase performance) you can switch
|
||||
To reduce the complexity of parsing (and increase performance) you can switch
|
||||
off two elements in the parsing of variable names and contents. >
|
||||
|
||||
To handle package references in variable and function names not differently
|
||||
|
||||
@@ -91,6 +91,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'bl' options.txt /*'bl'*
|
||||
'bomb' options.txt /*'bomb'*
|
||||
'breakat' options.txt /*'breakat'*
|
||||
'breakindent' options.txt /*'breakindent'*
|
||||
'breakindentopt' options.txt /*'breakindentopt'*
|
||||
'bri' options.txt /*'bri'*
|
||||
'briopt' options.txt /*'briopt'*
|
||||
'brk' options.txt /*'brk'*
|
||||
'browsedir' options.txt /*'browsedir'*
|
||||
'bs' options.txt /*'bs'*
|
||||
@@ -1201,6 +1205,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
+mouse various.txt /*+mouse*
|
||||
+mouse_dec various.txt /*+mouse_dec*
|
||||
+mouse_gpm various.txt /*+mouse_gpm*
|
||||
+mouse_jsbterm various.txt /*+mouse_jsbterm*
|
||||
+mouse_netterm various.txt /*+mouse_netterm*
|
||||
+mouse_pterm various.txt /*+mouse_pterm*
|
||||
+mouse_sgr various.txt /*+mouse_sgr*
|
||||
@@ -1415,6 +1420,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
/\%>c pattern.txt /*\/\\%>c*
|
||||
/\%>l pattern.txt /*\/\\%>l*
|
||||
/\%>v pattern.txt /*\/\\%>v*
|
||||
/\%C pattern.txt /*\/\\%C*
|
||||
/\%U pattern.txt /*\/\\%U*
|
||||
/\%V pattern.txt /*\/\\%V*
|
||||
/\%[] pattern.txt /*\/\\%[]*
|
||||
@@ -1973,8 +1979,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:cabc map.txt /*:cabc*
|
||||
:cabclear map.txt /*:cabclear*
|
||||
:cad quickfix.txt /*:cad*
|
||||
:caddb quickfix.txt /*:caddb*
|
||||
:caddbuffer quickfix.txt /*:caddbuffer*
|
||||
:cadde quickfix.txt /*:cadde*
|
||||
:caddexpr quickfix.txt /*:caddexpr*
|
||||
:caddf quickfix.txt /*:caddf*
|
||||
:caddfile quickfix.txt /*:caddfile*
|
||||
@@ -2500,6 +2506,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:nbkey netbeans.txt /*:nbkey*
|
||||
:nbstart netbeans.txt /*:nbstart*
|
||||
:ne editing.txt /*:ne*
|
||||
:netrw-s-cr pi_netrw.txt /*:netrw-s-cr*
|
||||
:new windows.txt /*:new*
|
||||
:next editing.txt /*:next*
|
||||
:next_f editing.txt /*:next_f*
|
||||
@@ -2520,8 +2527,11 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:noautocmd autocmd.txt /*:noautocmd*
|
||||
:noh pattern.txt /*:noh*
|
||||
:nohlsearch pattern.txt /*:nohlsearch*
|
||||
:nor map.txt /*:nor*
|
||||
:nore map.txt /*:nore*
|
||||
:norea map.txt /*:norea*
|
||||
:noreabbrev map.txt /*:noreabbrev*
|
||||
:norem map.txt /*:norem*
|
||||
:noremap map.txt /*:noremap*
|
||||
:noremap! map.txt /*:noremap!*
|
||||
:noreme gui.txt /*:noreme*
|
||||
@@ -2529,6 +2539,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:norm various.txt /*:norm*
|
||||
:normal various.txt /*:normal*
|
||||
:normal-range various.txt /*:normal-range*
|
||||
:nos recover.txt /*:nos*
|
||||
:noswapfile recover.txt /*:noswapfile*
|
||||
:nu various.txt /*:nu*
|
||||
:number various.txt /*:number*
|
||||
:nun map.txt /*:nun*
|
||||
@@ -4307,6 +4319,11 @@ E879 syntax.txt /*E879*
|
||||
E88 windows.txt /*E88*
|
||||
E880 if_pyth.txt /*E880*
|
||||
E881 autocmd.txt /*E881*
|
||||
E882 eval.txt /*E882*
|
||||
E883 eval.txt /*E883*
|
||||
E884 eval.txt /*E884*
|
||||
E885 sign.txt /*E885*
|
||||
E886 starting.txt /*E886*
|
||||
E89 message.txt /*E89*
|
||||
E90 message.txt /*E90*
|
||||
E91 options.txt /*E91*
|
||||
@@ -4436,6 +4453,13 @@ Operator-pending-mode intro.txt /*Operator-pending-mode*
|
||||
OverTheSpot mbyte.txt /*OverTheSpot*
|
||||
P change.txt /*P*
|
||||
PATHEXT eval.txt /*PATHEXT*
|
||||
PHP_BracesAtCodeLevel indent.txt /*PHP_BracesAtCodeLevel*
|
||||
PHP_autoformatcomment indent.txt /*PHP_autoformatcomment*
|
||||
PHP_default_indenting indent.txt /*PHP_default_indenting*
|
||||
PHP_outdentSLComments indent.txt /*PHP_outdentSLComments*
|
||||
PHP_outdentphpescape indent.txt /*PHP_outdentphpescape*
|
||||
PHP_removeCRwhenUnix indent.txt /*PHP_removeCRwhenUnix*
|
||||
PHP_vintage_case_default_indent indent.txt /*PHP_vintage_case_default_indent*
|
||||
Pattern pattern.txt /*Pattern*
|
||||
Perl if_perl.txt /*Perl*
|
||||
Posix intro.txt /*Posix*
|
||||
@@ -4779,6 +4803,7 @@ argidx() eval.txt /*argidx()*
|
||||
arglist editing.txt /*arglist*
|
||||
arglist-position editing.txt /*arglist-position*
|
||||
arglist-quit usr_07.txt /*arglist-quit*
|
||||
arglistid() eval.txt /*arglistid()*
|
||||
argument-list editing.txt /*argument-list*
|
||||
argv() eval.txt /*argv()*
|
||||
as motion.txt /*as*
|
||||
@@ -5364,6 +5389,7 @@ diW motion.txt /*diW*
|
||||
dialog gui_w32.txt /*dialog*
|
||||
dialogs-added version5.txt /*dialogs-added*
|
||||
dib motion.txt /*dib*
|
||||
dict eval.txt /*dict*
|
||||
dict-functions usr_41.txt /*dict-functions*
|
||||
dict-identity eval.txt /*dict-identity*
|
||||
dict-modification eval.txt /*dict-modification*
|
||||
@@ -5508,6 +5534,7 @@ exclusive motion.txt /*exclusive*
|
||||
exclusive-linewise motion.txt /*exclusive-linewise*
|
||||
executable() eval.txt /*executable()*
|
||||
execute-menus gui.txt /*execute-menus*
|
||||
exepath() eval.txt /*exepath()*
|
||||
exim starting.txt /*exim*
|
||||
exists() eval.txt /*exists()*
|
||||
exp() eval.txt /*exp()*
|
||||
@@ -5724,6 +5751,7 @@ ft-changelog-plugin filetype.txt /*ft-changelog-plugin*
|
||||
ft-changelog-syntax syntax.txt /*ft-changelog-syntax*
|
||||
ft-chill-syntax syntax.txt /*ft-chill-syntax*
|
||||
ft-clojure-indent indent.txt /*ft-clojure-indent*
|
||||
ft-clojure-syntax syntax.txt /*ft-clojure-syntax*
|
||||
ft-cobol-syntax syntax.txt /*ft-cobol-syntax*
|
||||
ft-coldfusion-syntax syntax.txt /*ft-coldfusion-syntax*
|
||||
ft-cpp-syntax syntax.txt /*ft-cpp-syntax*
|
||||
@@ -5894,6 +5922,7 @@ g:ada_with_gnat_project_files ft_ada.txt /*g:ada_with_gnat_project_files*
|
||||
g:ada_withuse_ordinary ft_ada.txt /*g:ada_withuse_ordinary*
|
||||
g:clojure_align_multiline_strings indent.txt /*g:clojure_align_multiline_strings*
|
||||
g:clojure_align_subforms indent.txt /*g:clojure_align_subforms*
|
||||
g:clojure_fold syntax.txt /*g:clojure_fold*
|
||||
g:clojure_fuzzy_indent indent.txt /*g:clojure_fuzzy_indent*
|
||||
g:clojure_fuzzy_indent_blacklist indent.txt /*g:clojure_fuzzy_indent_blacklist*
|
||||
g:clojure_fuzzy_indent_patterns indent.txt /*g:clojure_fuzzy_indent_patterns*
|
||||
@@ -5963,6 +5992,7 @@ g:netrw_dynamic_maxfilenamelen pi_netrw.txt /*g:netrw_dynamic_maxfilenamelen*
|
||||
g:netrw_errorlvl pi_netrw.txt /*g:netrw_errorlvl*
|
||||
g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse*
|
||||
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
|
||||
g:netrw_ffkeep pi_netrw.txt /*g:netrw_ffkeep*
|
||||
g:netrw_fname_escape pi_netrw.txt /*g:netrw_fname_escape*
|
||||
g:netrw_ftp pi_netrw.txt /*g:netrw_ftp*
|
||||
g:netrw_ftp_browse_reject pi_netrw.txt /*g:netrw_ftp_browse_reject*
|
||||
@@ -6107,6 +6137,7 @@ getcharmod() eval.txt /*getcharmod()*
|
||||
getcmdline() eval.txt /*getcmdline()*
|
||||
getcmdpos() eval.txt /*getcmdpos()*
|
||||
getcmdtype() eval.txt /*getcmdtype()*
|
||||
getcurpos() eval.txt /*getcurpos()*
|
||||
getcwd() eval.txt /*getcwd()*
|
||||
getfontname() eval.txt /*getfontname()*
|
||||
getfperm() eval.txt /*getfperm()*
|
||||
@@ -6690,6 +6721,7 @@ linewise-register change.txt /*linewise-register*
|
||||
linewise-visual visual.txt /*linewise-visual*
|
||||
lisp.vim syntax.txt /*lisp.vim*
|
||||
lispindent() eval.txt /*lispindent()*
|
||||
list eval.txt /*list*
|
||||
list-functions usr_41.txt /*list-functions*
|
||||
list-identity eval.txt /*list-identity*
|
||||
list-index eval.txt /*list-index*
|
||||
@@ -6801,6 +6833,7 @@ match() eval.txt /*match()*
|
||||
match-highlight pattern.txt /*match-highlight*
|
||||
match-parens tips.txt /*match-parens*
|
||||
matchadd() eval.txt /*matchadd()*
|
||||
matchaddpos() eval.txt /*matchaddpos()*
|
||||
matcharg() eval.txt /*matcharg()*
|
||||
matchdelete() eval.txt /*matchdelete()*
|
||||
matchend() eval.txt /*matchend()*
|
||||
@@ -6942,6 +6975,15 @@ netreadfixup pi_netrw.txt /*netreadfixup*
|
||||
netrw pi_netrw.txt /*netrw*
|
||||
netrw-% pi_netrw.txt /*netrw-%*
|
||||
netrw-- pi_netrw.txt /*netrw--*
|
||||
netrw-:Explore pi_netrw.txt /*netrw-:Explore*
|
||||
netrw-:Hexplore pi_netrw.txt /*netrw-:Hexplore*
|
||||
netrw-:Lexplore pi_netrw.txt /*netrw-:Lexplore*
|
||||
netrw-:MF pi_netrw.txt /*netrw-:MF*
|
||||
netrw-:MT pi_netrw.txt /*netrw-:MT*
|
||||
netrw-:Rexplore pi_netrw.txt /*netrw-:Rexplore*
|
||||
netrw-:Sexplore pi_netrw.txt /*netrw-:Sexplore*
|
||||
netrw-:Texplore pi_netrw.txt /*netrw-:Texplore*
|
||||
netrw-:Vexplore pi_netrw.txt /*netrw-:Vexplore*
|
||||
netrw-C pi_netrw.txt /*netrw-C*
|
||||
netrw-D pi_netrw.txt /*netrw-D*
|
||||
netrw-O pi_netrw.txt /*netrw-O*
|
||||
@@ -7057,6 +7099,7 @@ netrw-p12 pi_netrw.txt /*netrw-p12*
|
||||
netrw-p13 pi_netrw.txt /*netrw-p13*
|
||||
netrw-p14 pi_netrw.txt /*netrw-p14*
|
||||
netrw-p15 pi_netrw.txt /*netrw-p15*
|
||||
netrw-p16 pi_netrw.txt /*netrw-p16*
|
||||
netrw-p2 pi_netrw.txt /*netrw-p2*
|
||||
netrw-p3 pi_netrw.txt /*netrw-p3*
|
||||
netrw-p4 pi_netrw.txt /*netrw-p4*
|
||||
@@ -7398,6 +7441,7 @@ profile repeat.txt /*profile*
|
||||
profiling repeat.txt /*profiling*
|
||||
profiling-variable eval.txt /*profiling-variable*
|
||||
progname-variable eval.txt /*progname-variable*
|
||||
progpath-variable eval.txt /*progpath-variable*
|
||||
progress.vim syntax.txt /*progress.vim*
|
||||
pronounce intro.txt /*pronounce*
|
||||
psql ft_sql.txt /*psql*
|
||||
@@ -7898,6 +7942,7 @@ strcspn() eval.txt /*strcspn()*
|
||||
strdisplaywidth() eval.txt /*strdisplaywidth()*
|
||||
strftime() eval.txt /*strftime()*
|
||||
stridx() eval.txt /*stridx()*
|
||||
string eval.txt /*string*
|
||||
string() eval.txt /*string()*
|
||||
string-functions usr_41.txt /*string-functions*
|
||||
string-match eval.txt /*string-match*
|
||||
@@ -7962,6 +8007,7 @@ sysmouse term.txt /*sysmouse*
|
||||
system() eval.txt /*system()*
|
||||
system-functions usr_41.txt /*system-functions*
|
||||
system-vimrc starting.txt /*system-vimrc*
|
||||
systemlist() eval.txt /*systemlist()*
|
||||
s~ change.txt /*s~*
|
||||
t motion.txt /*t*
|
||||
t: eval.txt /*t:*
|
||||
@@ -8306,6 +8352,7 @@ undo_ftplugin usr_41.txt /*undo_ftplugin*
|
||||
undofile() eval.txt /*undofile()*
|
||||
undotree() eval.txt /*undotree()*
|
||||
unicode mbyte.txt /*unicode*
|
||||
uniq() eval.txt /*uniq()*
|
||||
unix os_unix.txt /*unix*
|
||||
unlisted-buffer windows.txt /*unlisted-buffer*
|
||||
up-down-motions motion.txt /*up-down-motions*
|
||||
@@ -8404,6 +8451,7 @@ v:operator eval.txt /*v:operator*
|
||||
v:prevcount eval.txt /*v:prevcount*
|
||||
v:profiling eval.txt /*v:profiling*
|
||||
v:progname eval.txt /*v:progname*
|
||||
v:progpath eval.txt /*v:progpath*
|
||||
v:register eval.txt /*v:register*
|
||||
v:scrollstart eval.txt /*v:scrollstart*
|
||||
v:searchforward eval.txt /*v:searchforward*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 7.4. Last change: 2013 Mar 13
|
||||
*term.txt* For Vim version 7.4. Last change: 2014 May 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -666,8 +666,8 @@ When the X-server clipboard is available, the command server described in
|
||||
|
||||
*xterm-copy-paste*
|
||||
NOTE: In some (older) xterms, it's not possible to move the cursor past column
|
||||
95. This is an xterm problem, not Vim's. Get a newer xterm |color-xterm|.
|
||||
Now the limit is 223 columns.
|
||||
95 or 223. This is an xterm problem, not Vim's. Get a newer xterm
|
||||
|color-xterm|. Also see |'ttymouse'|.
|
||||
|
||||
Copy/paste in xterm with (current mode NOT included in 'mouse'):
|
||||
1. Press left mouse button on first letter of text, move mouse pointer to last
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.4. Last change: 2014 Mar 08
|
||||
*todo.txt* For Vim version 7.4. Last change: 2014 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,130 +34,174 @@ not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Forfeit test_listlbr when encoding is not utf8? (Danek Duvall)
|
||||
|
||||
Regexp problems:
|
||||
- NFA regexp doesn't count tab matches correctly. (Urtica Dioica / gaultheria
|
||||
Shallon, 2013 Nov 18)
|
||||
- After patch 7.4.100 there is still a difference between NFA and old engine.
|
||||
25 a's with pattern \v^(aa+)\1+$ (Urtica Dioica, 2013 Nov 21) Also: 9 a's
|
||||
with pattern \v^(a{-2,})\1+$ (Nov 23)
|
||||
- NFA engine combining character mismatch. (glts, 2013 Aug 27)
|
||||
Remark from Dominique, Aug 27
|
||||
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
|
||||
(Lech Lorens, 2014 Feb 3)
|
||||
- Issue 164: freeze on regexp search.
|
||||
- NFA problem with non-greedy match and branches. (Ingo Karkat, 2013 Nov 29)
|
||||
- Ignorecase not handled properly for multi-byte characters. (Axel Bender,
|
||||
2013 Dec 11)
|
||||
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski
|
||||
Remark from Brett 2014 Jan 6 and 7.
|
||||
- Bug with back references. (Lech Lorens, 2014 Feb 3)
|
||||
- Bug when using \>. (Ramel, 2014 Feb 2) (Aaron Bohannon, 2014 Feb 13)
|
||||
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
|
||||
- Does not work with NFA regexp engine:
|
||||
\%u, \%x, \%o, \%d followed by a composing character
|
||||
|
||||
Patch to set y_width when getting the register from the clipboard.
|
||||
(Yukihiro Nakadaira, 2014 Jul 10)
|
||||
|
||||
Problem that a previous silent ":throw" causes a following try/catch not to
|
||||
work. (ZyX, 2013 Sep 28)
|
||||
|
||||
Patch for VMS. (Zoltan Arpadffy, 2014 Mar 6)
|
||||
|
||||
Euphoria syntax, Shian Lee, Feb 27
|
||||
Completion for :buf does not use 'wildignorecase'. (Akshay H, 2014 May 31)
|
||||
|
||||
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
|
||||
directory exists. (Sergio Gallelli, 2013 Dec 29)
|
||||
|
||||
The entries added by matchaddpos() are returned by getmatches() but can't be
|
||||
set with setmatches(). (lcd47, 2014 Jun 29)
|
||||
|
||||
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
|
||||
|
||||
Can't build Vim with Perl when -Dusethreads is not specified for building
|
||||
perl, and building with --enable-perlinterp=dynamic.
|
||||
Patch by Yasuhiro Matsumoto, 2014 Feb 24.
|
||||
|
||||
Update for Clojure ftplugin. (Sung Pae). Await discussion about formatting in
|
||||
ftplugins.
|
||||
|
||||
Update for phpcomplete.vim. (Complex, 2014 Mar 1)
|
||||
|
||||
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
|
||||
|
||||
Using autoconf 2.69 gives a lot of warnings.
|
||||
When using an undo file, also restore the changelist, so that "g;" works.
|
||||
|
||||
Patch to allow for negative index in string. (LCD, 2014 Feb 13)
|
||||
Feb 14 with test. Or does this intentionally not work?
|
||||
Value returned by virtcol() changes depending on how lines wrap. This is
|
||||
inconsistant with the documentation.
|
||||
|
||||
Issue 197: ]P doesn't paste over Visual selection. With patch from Christian
|
||||
Brabandt, Feb 6. Issue 197.
|
||||
|
||||
Make 'lispwords' global-local. (Sung Pae, 2014 Feb 16)
|
||||
|
||||
Problem with 'spellsuggest' file, only works for some words.
|
||||
(Cesar Romani, 2013 Aug 20) Depends on file name? (Aug 24)
|
||||
Additional remark by glts: the suggested words are marked bad?
|
||||
|
||||
8 non-ASCII font names don't work. Need to convert from 'encoding' and use
|
||||
the wide functions. Patch by Ken Takata, 2013 Dec 22.
|
||||
Update 2014 Jan 6.
|
||||
MS-Windows: Crash opening very long file name starting with "\\".
|
||||
(Christian Brock, 2012 Jun 29)
|
||||
|
||||
Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
|
||||
|
||||
Problem with 'errorformat'. Patch by Lcd, 2014 Feb 21. With test.
|
||||
|
||||
Patch for the problem that a mapping where the second byte is 0x80 isn't
|
||||
handled correcly. (Nobuhiro Takasaki, 2014 Feb 11)
|
||||
Update 2014 Mar 8.
|
||||
|
||||
Patch for mksession. (Nobuhiro Takasaki, 2014 Jan 31)
|
||||
Also fixes another problem (following email)
|
||||
|
||||
Patch to use rubyarchhdrdir for Ruby 2.x. (James McCoy, 2014 Feb 24)
|
||||
|
||||
Dynamic Ruby linking issues. Patch by Danek Duvall (2014 Feb 26)
|
||||
and by Yukihiro Nakadaira (2014 Feb 27)
|
||||
|
||||
Patch: Detect grep options for Solaris. (Danek Duvall, 2014 Feb 26)
|
||||
|
||||
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
|
||||
|
||||
"hi link" does not respect groups with GUI settings only. (Mark Lodato, 2014
|
||||
Jun 8)
|
||||
|
||||
Syntax file for gnuplot. Existing one is very old. (Andrew Rasmussen, 2014
|
||||
Feb 24)
|
||||
|
||||
Crash with ":%s/\n//g" on long file. (Aidan Marlin, 2014 Jan 15)
|
||||
Christian Brabandt: patch to run this into a join. (2014 Jan 18)
|
||||
Suggestion to not save replaced line for undo: Yukihiro Nakadaira, 2014 Jan
|
||||
25.
|
||||
|
||||
Add digraph for Rouble: =P. What's the Unicode?
|
||||
|
||||
Bug: "!ls %" expands parenthesis in %, but not spaces. So this doesn't work
|
||||
either: ':!ls "%"'.
|
||||
Patch by Gary Johnson, 2014 Mar 6.
|
||||
|
||||
Issue 174: Detect Mason files.
|
||||
|
||||
No error for missing endwhile. (ZyX, 2014 Mar 20)
|
||||
|
||||
Phpcomplete.vim update. (Complex, 2014 Jan 15)
|
||||
|
||||
PHP syntax is extremely slow. (Anhad Jai Singh, 2014 Jan 19)
|
||||
|
||||
Spell files use a latin single quote. Unicode also has another single quote:
|
||||
0x2019. (Ron Aaron, 2014 Apr 4)
|
||||
New OpenOffice spell files support this with ICONV. But they are not
|
||||
compatible with Vim spell files. The old files can no longer be downloaded.
|
||||
|
||||
Win32: use different args for SearchPath()? (Yasuhiro Matsumoto, 2009 Jan 30)
|
||||
Also fixes wrong result from executable().
|
||||
Update from Ken Takata, 2014 Jan 10. Newer 2014 Apr 3.
|
||||
|
||||
Win32: use 64 bit stat() if possible. (Ken Takata, 2014 May 12)
|
||||
More tests May 14. Update May 29.
|
||||
|
||||
The garbage collector may use too much stack. Make set_ref_in_item()
|
||||
iterative instead of recursive. Test program by Marc Weber (2013 Dec 10)
|
||||
Patch by Ben Fritz, 2014 Jun 22.
|
||||
|
||||
Idea: For a window in the middle (has window above and below it), use
|
||||
right-mouse-drag on the status line to move a window up/down without changing
|
||||
it's height? It's like dragging the status bar above it at the same time.
|
||||
|
||||
Can we make ":unlet $VAR" use unsetenv() to delete the env var?
|
||||
What for systems that don't have unsetenv()?
|
||||
|
||||
spec ftplugin: patch from Igor Gnatenko, 2014 Jan 26.
|
||||
Include if maintainers don't respond.
|
||||
This does not give an error: (Andre Sihera, 2014 Mar 21)
|
||||
vim -u NONE 1 2 3 -c 'bufdo if 1 | echo 1'
|
||||
This neither: (ZyX)
|
||||
vim -u NONE 1 2 3 -c 'bufdo while 1 | echo 1'
|
||||
|
||||
Patch to make has() check for Vim version and patch at the same time.
|
||||
(Marc Weber, 2013 Jun 7)
|
||||
'viewdir' default on MS-Windows is not a good choice, it's a system directory.
|
||||
Change 'viewdir' to "$HOME/vimfiles/view" and use 'viewdiralt' to also read
|
||||
from?
|
||||
|
||||
Regression on pach 7.4.034. (Ingo Karkat, 2013 Nov 20)
|
||||
Problem with upwards search on Windows (works OK on Linux). (Brett Stahlman,
|
||||
2014 Jun 8)
|
||||
|
||||
Patch to include smack support (Linux security library). (Jose Bollo, 2014 Jan
|
||||
14) Update Jan 15.
|
||||
When 'clipboard' is "unnamed", :g/pat/d is very slow. Only set the clipboard
|
||||
after the last delete? (Praful, 2014 May 28)
|
||||
Patch by Christian Brabandt, 2014 Jun 18. Update Jun 25.
|
||||
|
||||
Tag list, as used for :tjump, does not unescape regexp. (Gary Johnson, 2014 Jan
|
||||
6) With patch in another message.
|
||||
Include a plugin manager with Vim? Neobundle seems to be the best currently.
|
||||
Long message about this from ZyX, 2014 Mar 23. And following replies.
|
||||
Also see http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html
|
||||
User view:
|
||||
- Support multiple sources, basically any http:// URL. Be able to look into
|
||||
the files before deciding to install.
|
||||
- Be able to try out a plugin and remove it again with (almost) no traces.
|
||||
- Each plugin needs a "manifest" file that has the version, dependencies
|
||||
(including Vim version and features), conflicts, list of files, etc.
|
||||
Updater uses that to decide what/how to update.
|
||||
Dependencies can use a URL for specific versions, or short name for scripts
|
||||
on vim.org.
|
||||
- Once a plugin is installed it remembers where it came from, updater checks
|
||||
there. Can manually update when really needed.
|
||||
- Must be possible to install for one user. Also system wide?
|
||||
- Can edit plugin config with Vim. Can temporarily disable a plugin.
|
||||
- Run the update manually, find latest version and install.
|
||||
- Be able to download without special tools, must work for 95% of users.
|
||||
Implementation:
|
||||
- Avoid the 'runtimepath' getting long. Need some other way to keep each
|
||||
plugin separate.
|
||||
- When installing or updating, first figure out what needs to be done. This
|
||||
may involve recursively fetching manifest files for dependencies. Then show
|
||||
the user what's going to change and ask for OK.
|
||||
- Scripts on Vim.org must be able to consist of several files. Is zip format
|
||||
sufficient? Upload the manifest? Or refer to a site that has the manifest?
|
||||
- Best is to fetch individual files or use a Vimball. Reduces dependency on
|
||||
tools that might be missing and allows inspection of the files before
|
||||
installing.
|
||||
Out of scope:
|
||||
- Overview of plugins, ratings, comments, etc. That's another world.
|
||||
- Development work on plugins (although diff with distributed version would be
|
||||
useful).
|
||||
|
||||
Setting the spell file in a session only reads the local additions, not the
|
||||
normal spell file. (Enno Nagel, 2014 Mar 29)
|
||||
|
||||
CTRL-] in Visual mode uses the selected text as a tag. This does not work
|
||||
when preceded with CTRL-W. (Patrick Hemmer, 2014 Jun 28)
|
||||
|
||||
When typing the first character of a command, e.g. "f", then using a menu, the
|
||||
menu item doesn't work. Clear typeahead when using a menu?
|
||||
|
||||
Editing an ascii file as ucs-2 or ucs-4 causes display errors.
|
||||
(ZyX, 2014 Mar 30)
|
||||
|
||||
":Next 1 some-arg" does not complain about trailing argument. Also for
|
||||
various other commands. (ZyX, 2014 Mar 30)
|
||||
|
||||
patch to skip sort if no line matches the expression.
|
||||
(Christian Brabandt, 2014 Jun 25)
|
||||
|
||||
Patch to add sortuniq(). (Cade Forester, 2014 Mar 19)
|
||||
Or add uniq() instead? Patch by lcd47, but it has problems.
|
||||
|
||||
Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct
|
||||
30)
|
||||
|
||||
Patch to support expression argument to sort() instead of a function name.
|
||||
Yasuhiro Matsumoto, 2013 May 31.
|
||||
Or should we add a more general mechanism, like lambda functions?
|
||||
|
||||
VMS: Select() doesn't work properly, typing ESC may hang Vim. Use sys$qiow
|
||||
instead. (Samuel Ferencik, 2013 Sep 28)
|
||||
|
||||
Series of patches for NL vs NUL handling. (ZyX, 2013 Nov 3, Nov 9)
|
||||
|
||||
Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4)
|
||||
Remark on the docs. Should not be a compile time feature. But then what?
|
||||
|
||||
Patch to add flag to shortmess to avoid giving completion messages.
|
||||
(Shougo Matsu, 2014 Jan 6, update Jan 11)
|
||||
Completion of ":e" is ":earlier", whould be ":edit". Complete to the matching
|
||||
command instead of doing this alphabetically. (Mikel Jorgensen)
|
||||
|
||||
Patch to add v:completed_item. (Shougo Matsu, 2013 Nov 29).
|
||||
|
||||
@@ -175,6 +219,9 @@ Issue 28.
|
||||
|
||||
Go through more coverity reports.
|
||||
|
||||
Patch to add ":undorecover", get as much text out of the undo file as
|
||||
possible. (Christian Brabandt, 2014 Mar 12)
|
||||
|
||||
Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
|
||||
|
||||
Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16)
|
||||
@@ -190,7 +237,7 @@ With "$" in 'cpoptions' the popup menu isn't fully drawn. (Matti Niemenmaa,
|
||||
2013 Sep 5)
|
||||
|
||||
Patch to add "ntab" item in 'listchars' to repeat first character. (Nathaniel
|
||||
Braun, pragm, 2013 Oct 13) Again 2014 Mar 5.
|
||||
Braun, pragm, 2013 Oct 13) A better solution 2014 Mar 5.
|
||||
|
||||
Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct
|
||||
3. Doesn't work properly according to Yukihiro Nakadaira.
|
||||
@@ -243,10 +290,6 @@ GTK: problem with 'L' in 'guioptions' changing the window width.
|
||||
Patch to add option that tells whether small deletes go into the numbered
|
||||
registers. (Aryeh Leib Taurog, 2013 Nov 18)
|
||||
|
||||
Win32: use different args for SearchPath()? (Yasuhiro Matsumoto, 2009 Jan 30)
|
||||
Also fixes wrong result from executable().
|
||||
Update from Ken Takata, 2014 Jan 10.
|
||||
|
||||
Javascript file where indent gets stuck on: GalaxyMaster, 2012 May 3.
|
||||
|
||||
The BufUnload event is triggered when re-using the empty buffer.
|
||||
@@ -268,19 +311,12 @@ Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar
|
||||
Patch by Christian Brabandt, 2013 Mar 23.
|
||||
Not 100% sure this is the right solution.
|
||||
|
||||
Patch to support expression argument to sort() instead of a function name.
|
||||
Yasuhiro Matsumoto, 2013 May 31.
|
||||
Or should we add a more general mechanism, like lambda functions?
|
||||
|
||||
Problem caused by patch 7.3.638: window->open does not update window
|
||||
correctly. Issue 91.
|
||||
|
||||
Patch to add {lhs} to :mapclear: clear all maps starting with {lhs}.
|
||||
(Christian Brabandt, 2013 Dec 9)
|
||||
|
||||
The garbage collector may use too much stack. Make set_ref_in_item()
|
||||
iterative instead of recursive. Test program by Marc Weber (2013 Dec 10)
|
||||
|
||||
Exception caused by argument of return is not caught by try/catch.
|
||||
(David Barnett, 2013 Nov 19)
|
||||
|
||||
@@ -321,6 +357,7 @@ Patch to allow setting w:quickfix_title via setqflist() and setloclist()
|
||||
functions. (Christian Brabandt, 2013 May 8, update May 21)
|
||||
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
|
||||
Second one. Update May 22.
|
||||
Update by Daniel Hahler, 2014 Jul 4.
|
||||
|
||||
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
|
||||
|
||||
@@ -335,9 +372,6 @@ Patch by Christian Brabandt, 2013 Apr 20, unfinished.
|
||||
|
||||
Bug: findfile("any", "file:///tmp;") does not work.
|
||||
|
||||
v:register is not directly reset to " after a delete command that specifies a
|
||||
register. It is reset after the next command. (Steve Vermeulen, 2013 Mar 16)
|
||||
|
||||
'ff' is wrong for one-line file without EOL. (Issue 77)
|
||||
|
||||
Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14)
|
||||
@@ -347,12 +381,10 @@ In the ATTENTION message about an existing swap file, mention the name of the
|
||||
process that is running. It might actually be some other program, e.g. after
|
||||
a reboot.
|
||||
|
||||
MS-Windows: Crash opening very long file name starting with "\\".
|
||||
(Christian Brock, 2012 Jun 29)
|
||||
|
||||
Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Ben Fritz: problem with 'selection' set to "exclusive".
|
||||
Updated to current Vim, not quite right yet. (Ben Fritz, 2014 Mar 27)
|
||||
|
||||
Patch to select the next or previous text object if there isn't one under the
|
||||
cursor. (Daniel Thau, 2013 Nov 20)
|
||||
@@ -419,9 +451,6 @@ Should be possible to enable/disable matchparen per window or buffer.
|
||||
Add a check for b:no_match_paren in Highlight_matching_Pair() (Marcin
|
||||
Szamotulski, 2012 Nov 8)
|
||||
|
||||
Crash in autocmd that unloads buffers in a BufUnload event. (Andrew Pimlott,
|
||||
2012 Aug 11) Disallow :new when BufUnload is being handled?
|
||||
|
||||
Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
Session file creation: 'autochdir' causes trouble. Keep it off until after
|
||||
@@ -454,10 +483,6 @@ Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22.
|
||||
Help for 'b:undo_indent'. (Thilo Six, 2012 May 28)
|
||||
Also question if examples are correct.
|
||||
|
||||
It should be possible to make globpath() return a list instead of a string,
|
||||
like with glob(). (Greg Novack, 2012 Nov 2)
|
||||
Patch by Adnan Zafar, 2013 Jul 15.
|
||||
|
||||
The input map for CTRL-O in mswin.vim causes problems after CTRL-X CTRL-O.
|
||||
Suggestion for another map. (Philip Mat, 2012 Jun 18)
|
||||
But use "gi" instead of "a". Or use CTRL-\ CTRL-O.
|
||||
@@ -495,14 +520,6 @@ Apr 18)
|
||||
Patch for has('unnamedplus') docs. (Tony Mechelynck, 2011 Sep 27)
|
||||
And one for gui_x11.txt.
|
||||
|
||||
- Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
|
||||
Smilauer, 2004 Sep 13, fix Oct 31, update 2007 May 30)
|
||||
Version for latest MacVim: Tobia Conforto, 2009 Nov 23
|
||||
More recent version: https://retracile.net/wiki/VimBreakIndent
|
||||
Posted to vim-dev by Taylor Hedberg, 2011 Nov 25
|
||||
Update by Taylor Hedberg, 2013 May 30.
|
||||
Updated for Vim 7.4 by Ken Takata, 2013 Oct 5.
|
||||
|
||||
":cd" doesn't work when current directory path contains "**".
|
||||
finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10)
|
||||
Requires a rewrite of the file_file_in_path code.
|
||||
@@ -611,7 +628,7 @@ Patch to make "z=" work when 'spell' is off. Does this have nasty side
|
||||
effects? (Christian Brabandt, 2012 Aug 5, Update 2013 Aug 12)
|
||||
Would also need to do this for spellbadword() and spellsuggest().
|
||||
|
||||
Patch for variable tabstops.
|
||||
Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15)
|
||||
|
||||
On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a
|
||||
64 bits value. Change all number options to use nropt_T and define it to the
|
||||
@@ -653,9 +670,6 @@ Build problem with small features on Mac OS X 10.6. (Rainer, 2011 Jan 24)
|
||||
|
||||
"0g@$" puts '] on last byte of multi-byte. (ZyX, 2011 Jan 22)
|
||||
|
||||
Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct
|
||||
30)
|
||||
|
||||
Patch to addd TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011
|
||||
May 24) Update May 26.
|
||||
|
||||
@@ -741,9 +755,6 @@ crash? (Raiwil, 2010 Nov 17)
|
||||
Patch to add FoldedLineNr highlighting: different highlighting for the line
|
||||
number of a closed fold. (eXerigumo Clanjor, 2013 Jul 15)
|
||||
|
||||
Does not work with NFA regexp engine:
|
||||
- \%u, \%x, \%o, \%d followed by a composing character
|
||||
|
||||
Regexp engine performance:
|
||||
- Profiling:
|
||||
./vim -u NONE -s ~/vim/test/ruby.vim
|
||||
@@ -788,10 +799,6 @@ setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11)
|
||||
file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
|
||||
Patch by Christian Brabandt, 2010 Oct 21.
|
||||
|
||||
getpos()/setpos() don't include curswant. getpos() could return a fifth
|
||||
element. setpos() could accept an optional fifth element.
|
||||
Patch by Christian Brabandt, 2010 Sep 6. Again 2013 Aug 22.
|
||||
|
||||
With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
|
||||
2010 Oct 24)
|
||||
|
||||
@@ -833,8 +840,6 @@ Patch: Let rare word highlighting overrule good word highlighting.
|
||||
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
|
||||
instead of one. (Constantin Pan, 2010 Sep 10)
|
||||
|
||||
Crash in setqflist(). (Benoit Mortgat, 2010 Nov 18)
|
||||
|
||||
Gui menu edit/paste in block mode insert only inserts in one line (Bjorn
|
||||
Winckler, 2011 May 11)
|
||||
Requires a map mode for Insert mode started from blockwise Visual mode.
|
||||
@@ -1064,6 +1069,11 @@ Session file generates error upon loading, cause by --remote-silent-tab.
|
||||
Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing
|
||||
char 0x0301. (Tony Mechelynck, 2009 Mar 4)
|
||||
|
||||
Searching for composing char works, but not when inside []. (ZyX, Benjamin R.
|
||||
Haskell, 2010 Aug 24)
|
||||
|
||||
This does not work yet: "a\(%C\)" (get composing characters into a submatch).
|
||||
|
||||
A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
|
||||
|
||||
Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish
|
||||
@@ -1148,6 +1158,7 @@ is executed.
|
||||
|
||||
":pedit %" with a BufReadPre autocommand causes the cursor to move to the
|
||||
first line. (Ingo Karkat, 2008 Jul 1) Ian Kelling is working on this.
|
||||
Similar problem with ":e". (Marc Montu, 2014 Apr 22)
|
||||
|
||||
Wildmenu not deleted: "gvim -u NONE", ":set nocp wildmenu cmdheight=3
|
||||
laststatus=2", CTRL-D CTRL-H CTRL-H CTRL-H. (A.Politz, 2008 April 1)
|
||||
@@ -1291,9 +1302,6 @@ When 'smartcase' is set and using CTRL-L to add to the search pattern it may
|
||||
result in no matches. Convert chars to lower case? (Erik Wognsen, 2009 Apr
|
||||
16)
|
||||
|
||||
Searching for composing char works, but not when inside []. (ZyX, Benjamin R.
|
||||
Haskell, 2010 Aug 24)
|
||||
|
||||
Fail to edit file after failed register access. Error flag remains set?
|
||||
(Lech Lorens, 2010 Aug 30)
|
||||
|
||||
@@ -1495,6 +1503,7 @@ Engelke, 2007 Dec 20 - 2008 Jan 17)
|
||||
|
||||
Win64: Seek error in swap file for a very big file (3 Gbyte). Check storing
|
||||
pointer in long and seek offset in 64 bit var.
|
||||
Patches from Ken Takata might help (2014 Apr 17)
|
||||
|
||||
Win32: patch for fullscreen mode. (Liushaolin, 2008 April 17)
|
||||
|
||||
@@ -2768,8 +2777,6 @@ Problems that will (probably) not be solved:
|
||||
input method called from GDK code. Without Perl it doesn't crash.
|
||||
- VMS: Vimdiff doesn't work with the VMS diff, because the output looks
|
||||
different. This makes test 47 fail. Install a Unix-compatible diff.
|
||||
- VMS v7.1 and older: Tests 21 and 32 fail. From VMS v7.1-2 and newer Vim
|
||||
does not have this behavior. (Zoltan Arpadffy)
|
||||
- Win32 GUI: mouse wheel always scrolls rightmost window. The events arrive
|
||||
in Vim as if the rightmost scrollbar was used.
|
||||
- GTK with Gnome: Produces an error message when starting up:
|
||||
@@ -3123,12 +3130,8 @@ Multi-byte characters:
|
||||
8 toupper() function doesn't handle byte count changes.
|
||||
7 Searching and composing characters:
|
||||
When searching, should order of composing characters be ignored?
|
||||
Add special item to match with a composing character, zero-width, so that
|
||||
one can replace a base character and keep the composing characters.
|
||||
Add a special item to match with a composing character, so that composing
|
||||
characters can be manipulated.
|
||||
Add a modifier to ignore composing characters, only compare base
|
||||
characters. Useful for Hebrew (Ron Aaron)
|
||||
8 Should implement 'delcombine' for command line editing.
|
||||
8 Detect overlong UTF-8 sequences and handle them like illegal bytes.
|
||||
8 ":s/x/\u\1/" doesn't work, making uppercase isn't done for multi-byte
|
||||
@@ -4234,8 +4237,7 @@ Insert mode:
|
||||
7 Use Tabs for the indent of starting lines, pad with spaces for
|
||||
continuation lines. Allows changing 'tabstop' without messing up the
|
||||
indents.
|
||||
'keeptabs': when set don't change the tabs and spaces used for indent,
|
||||
when the indent remains the same or increases.
|
||||
Patch by Lech Lorens, 2010 Mar. Update by James McCoy, 2014 Mar 15.
|
||||
|
||||
|
||||
Java:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*undo.txt* For Vim version 7.4. Last change: 2013 Sep 08
|
||||
*undo.txt* For Vim version 7.4. Last change: 2014 May 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -97,9 +97,9 @@ change but joins in with the previous change use this command:
|
||||
or redo.
|
||||
{not in Vi}
|
||||
|
||||
This is most useful when you need to prompt the user halfway a change. For
|
||||
example in a function that calls |getchar()|. Do make sure that there was a
|
||||
related change before this that you must join with.
|
||||
This is most useful when you need to prompt the user halfway through a change.
|
||||
For example in a function that calls |getchar()|. Do make sure that there was
|
||||
a related change before this that you must join with.
|
||||
|
||||
This doesn't work by itself, because the next key press will start a new
|
||||
change again. But you can do something like this: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_08.txt* For Vim version 7.4. Last change: 2006 Jul 18
|
||||
*usr_08.txt* For Vim version 7.4. Last change: 2014 Jul 06
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -532,7 +532,7 @@ window. And you will notice a bar at the top with the two file names:
|
||||
|
||||
You now have two tab pages. The first one has a window for "thisfile" and the
|
||||
second one a window for "thatfile". It's like two pages that are on top of
|
||||
eachother, with a tab sticking out of each page showing the file name.
|
||||
each other, with a tab sticking out of each page showing the file name.
|
||||
|
||||
Now use the mouse to click on "thisfile" in the top line. The result is
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 7.4. Last change: 2014 Jan 10
|
||||
*usr_41.txt* For Vim version 7.4. Last change: 2014 May 28
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -623,6 +623,7 @@ List manipulation: *list-functions*
|
||||
map() change each List item
|
||||
sort() sort a List
|
||||
reverse() reverse the order of a List
|
||||
uniq() remove copies of repeated adjacent items
|
||||
split() split a String into a List
|
||||
join() join List items into a String
|
||||
range() return a List with a sequence of numbers
|
||||
@@ -707,6 +708,7 @@ Cursor and mark position: *cursor-functions* *mark-functions*
|
||||
cursor() position the cursor at a line/column
|
||||
screencol() get screen column of the cursor
|
||||
screenrow() get screen row of the cursor
|
||||
getcurpos() get position of the cursor
|
||||
getpos() get position of cursor, mark, etc.
|
||||
setpos() set position of cursor, mark, etc.
|
||||
byte2line() get line number at a specific byte count
|
||||
@@ -741,6 +743,7 @@ System functions and manipulation of files:
|
||||
pathshorten() shorten directory names in a path
|
||||
simplify() simplify a path without changing its meaning
|
||||
executable() check if an executable program exists
|
||||
exepath() full path of an executable program
|
||||
filereadable() check if a file can be read
|
||||
filewritable() check if a file can be written to
|
||||
getfperm() get the permissions of a file
|
||||
@@ -753,7 +756,8 @@ System functions and manipulation of files:
|
||||
mkdir() create a new directory
|
||||
delete() delete a file
|
||||
rename() rename a file
|
||||
system() get the result of a shell command
|
||||
system() get the result of a shell command as a string
|
||||
systemlist() get the result of a shell command as a list
|
||||
hostname() name of the system
|
||||
readfile() read a file into a List of lines
|
||||
writefile() write a List of lines into a file
|
||||
@@ -769,6 +773,7 @@ Date and Time: *date-functions* *time-functions*
|
||||
Buffers, windows and the argument list:
|
||||
argc() number of entries in the argument list
|
||||
argidx() current position in the argument list
|
||||
arglistid() get id of the argument list
|
||||
argv() get one entry from the argument list
|
||||
bufexists() check if a buffer exists
|
||||
buflisted() check if a buffer exists and is listed
|
||||
@@ -822,6 +827,7 @@ Syntax and highlighting: *syntax-functions* *highlighting-functions*
|
||||
synconcealed() get info about concealing
|
||||
diff_hlID() get highlight ID for diff mode at a position
|
||||
matchadd() define a pattern to highlight (a "match")
|
||||
matchaddpos() define a list of positions to highlight
|
||||
matcharg() get info about |:match| arguments
|
||||
matchdelete() delete a match defined by |matchadd()| or a
|
||||
|:match| command
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 7.4. Last change: 2013 May 18
|
||||
*various.txt* For Vim version 7.4. Last change: 2014 May 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -234,25 +234,41 @@ g8 Print the hex values of the bytes used in the
|
||||
*:!cmd* *:!* *E34*
|
||||
:!{cmd} Execute {cmd} with the shell. See also the 'shell'
|
||||
and 'shelltype' option.
|
||||
|
||||
Any '!' in {cmd} is replaced with the previous
|
||||
external command (see also 'cpoptions'). But not when
|
||||
there is a backslash before the '!', then that
|
||||
backslash is removed. Example: ":!ls" followed by
|
||||
":!echo ! \! \\!" executes "echo ls ! \!".
|
||||
After the command has been executed, the timestamp of
|
||||
the current file is checked |timestamp|.
|
||||
|
||||
A '|' in {cmd} is passed to the shell, you cannot use
|
||||
it to append a Vim command. See |:bar|.
|
||||
|
||||
If {cmd} contains "%" it is expanded to the current
|
||||
file name. Special characters are not escaped, use
|
||||
quotes to avoid their special meaning: >
|
||||
:!ls "%"
|
||||
< If the file name contains a "$" single quotes might
|
||||
work better (but a single quote causes trouble): >
|
||||
:!ls '%'
|
||||
< This should always work, but it's more typing: >
|
||||
:exe "!ls " . shellescape(expand("%"))
|
||||
<
|
||||
A newline character ends {cmd}, what follows is
|
||||
interpreted as a following ":" command. However, if
|
||||
there is a backslash before the newline it is removed
|
||||
and {cmd} continues. It doesn't matter how many
|
||||
backslashes are before the newline, only one is
|
||||
removed.
|
||||
|
||||
On Unix the command normally runs in a non-interactive
|
||||
shell. If you want an interactive shell to be used
|
||||
(to use aliases) set 'shellcmdflag' to "-ic".
|
||||
For Win32 also see |:!start|.
|
||||
|
||||
After the command has been executed, the timestamp and
|
||||
size of the current file is checked |timestamp|.
|
||||
|
||||
Vim redraws the screen after the command is finished,
|
||||
because it may have printed any text. This requires a
|
||||
hit-enter prompt, so that you can read any messages.
|
||||
@@ -363,6 +379,7 @@ N *+mouse* Mouse handling |mouse-using|
|
||||
N *+mouseshape* |'mouseshape'|
|
||||
B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse|
|
||||
N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse|
|
||||
N *+mouse_jsbterm* JSB mouse handling |jsbterm-mouse|
|
||||
B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse|
|
||||
N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal|
|
||||
N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|
|
||||
@@ -418,7 +435,7 @@ N *+user_commands* User-defined commands. |user-commands|
|
||||
N *+viminfo* |'viminfo'|
|
||||
N *+vertsplit* Vertically split windows |:vsplit|
|
||||
N *+virtualedit* |'virtualedit'|
|
||||
S *+visual* Visual mode |Visual-mode|
|
||||
S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.
|
||||
N *+visualextra* extra Visual mode commands |blockwise-operators|
|
||||
N *+vreplace* |gR| and |gr|
|
||||
N *+wildignore* |'wildignore'|
|
||||
|
||||
@@ -942,6 +942,7 @@ New and extended functions: ~
|
||||
|tagfiles()| List with tags file names
|
||||
|taglist()| get list of matching tags (Yegappan Lakshmanan)
|
||||
|tr()| translate characters (Ron Aaron)
|
||||
|uniq()| remove copies of repeated adjacent list items
|
||||
|values()| get List of Dictionary values
|
||||
|winnr()| takes an argument: what window to use
|
||||
|winrestview()| restore the view of the current window
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*visual.txt* For Vim version 7.4. Last change: 2013 Nov 02
|
||||
*visual.txt* For Vim version 7.4. Last change: 2014 Mar 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -22,7 +22,7 @@ This is introduced in section |04.4| of the user manual.
|
||||
|
||||
{Vi has no Visual mode, the name "visual" is used for Normal mode, to
|
||||
distinguish it from Ex mode}
|
||||
{not available when the |+visual| feature was disabled when compiling}
|
||||
{Since Vim 7.4.200 the |+visual| feature is always included}
|
||||
|
||||
==============================================================================
|
||||
1. Using Visual mode *visual-use*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 7.4. Last change: 2012 Nov 15
|
||||
*windows.txt* For Vim version 7.4. Last change: 2014 Mar 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -132,13 +132,20 @@ that have termcap codes for italics.
|
||||
CTRL-W s *CTRL-W_s*
|
||||
CTRL-W S *CTRL-W_S*
|
||||
CTRL-W CTRL-S *CTRL-W_CTRL-S*
|
||||
:[N]sp[lit] [++opt] [+cmd] *:sp* *:split*
|
||||
:[N]sp[lit] [++opt] [+cmd] [file] *:sp* *:split*
|
||||
Split current window in two. The result is two viewports on
|
||||
the same file. Make new window N high (default is to use half
|
||||
the height of the current window). Reduces the current window
|
||||
height to create room (and others, if the 'equalalways' option
|
||||
is set, 'eadirection' isn't "hor", and one of them is higher
|
||||
than the current or the new window).
|
||||
the same file.
|
||||
|
||||
Make the new window N high (default is to use half the height
|
||||
of the current window). Reduces the current window height to
|
||||
create room (and others, if the 'equalalways' option is set,
|
||||
'eadirection' isn't "hor", and one of them is higher than the
|
||||
current or the new window).
|
||||
|
||||
If [file] is given it will be edited in the new window. If it
|
||||
is not loaded in any buffer, it will be read. Else the new
|
||||
window will use the already loaded buffer.
|
||||
|
||||
Note: CTRL-S does not work on all terminals and might block
|
||||
further input, use CTRL-Q to get going again.
|
||||
Also see |++opt| and |+cmd|.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2014 Feb 26
|
||||
" Last Change: 2014 Jul 09
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -864,7 +864,7 @@ func! s:FThtml()
|
||||
setf xhtml
|
||||
return
|
||||
endif
|
||||
if getline(n) =~ '{%\s*\(extends\|block\)\>'
|
||||
if getline(n) =~ '{%\s*\(extends\|block\|load\)\>'
|
||||
setf htmldjango
|
||||
return
|
||||
endif
|
||||
@@ -1013,6 +1013,9 @@ au BufNewFile,BufRead *.kix setf kix
|
||||
" Kimwitu[++]
|
||||
au BufNewFile,BufRead *.k setf kwt
|
||||
|
||||
" Kivy
|
||||
au BufNewFile,BufRead *.kv setf kivy
|
||||
|
||||
" KDE script
|
||||
au BufNewFile,BufRead *.ks setf kscript
|
||||
|
||||
@@ -1646,6 +1649,20 @@ else
|
||||
au BufNewFile,BufRead *.rnw,*.snw setf rnoweb
|
||||
endif
|
||||
|
||||
" R Markdown file
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd setf rmd
|
||||
else
|
||||
au BufNewFile,BufRead *.rmd,*.smd setf rmd
|
||||
endif
|
||||
|
||||
" R reStructuredText file
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst
|
||||
else
|
||||
au BufNewFile,BufRead *.rrst,*.srst setf rrst
|
||||
endif
|
||||
|
||||
" Rexx, Rebol or R
|
||||
au BufNewFile,BufRead *.r,*.R call s:FTr()
|
||||
|
||||
@@ -2661,7 +2678,7 @@ au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
|
||||
|
||||
" Plain text files, needs to be far down to not override others. This avoids
|
||||
" the "conf" type being used if there is a line starting with '#'.
|
||||
au BufNewFile,BufRead *.txt,*.text setf text
|
||||
au BufNewFile,BufRead *.txt,*.text,README setf text
|
||||
|
||||
|
||||
" Use the filetype detect plugins. They may overrule any of the previously
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
" Maintainer: Sung Pae <self@sungpae.com>
|
||||
" URL: https://github.com/guns/vim-clojure-static
|
||||
" License: Same as Vim
|
||||
" Last Change: 08 September 2013
|
||||
" Last Change: 27 March 2014
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -15,7 +15,7 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = 'setlocal iskeyword< define< formatoptions< comments< commentstring<'
|
||||
let b:undo_ftplugin = 'setlocal iskeyword< define< formatoptions< comments< commentstring< lispwords<'
|
||||
|
||||
setlocal iskeyword+=?,-,*,!,+,/,=,<,>,.,:,$
|
||||
|
||||
@@ -23,14 +23,29 @@ setlocal iskeyword+=?,-,*,!,+,/,=,<,>,.,:,$
|
||||
" of user-defined def* definitions.
|
||||
setlocal define=\\v[(/]def(ault)@!\\S*
|
||||
|
||||
" Remove 't' from 'formatoptions' to avoid auto-wrapping code. The '+=croql'
|
||||
" is standard ftplugin boilerplate, although it is arguably intrusive.
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
" Remove 't' from 'formatoptions' to avoid auto-wrapping code.
|
||||
setlocal formatoptions-=t
|
||||
|
||||
" Lisp comments are routinely nested (e.g. ;;; SECTION HEADING)
|
||||
setlocal comments=n:;
|
||||
setlocal commentstring=;\ %s
|
||||
|
||||
" Specially indented symbols from clojure.core and clojure.test.
|
||||
"
|
||||
" Clojure symbols are indented in the defn style when they:
|
||||
"
|
||||
" * Define vars and anonymous functions
|
||||
" * Create new lexical scopes or scopes with altered environments
|
||||
" * Create conditional branches from a predicate function or value
|
||||
"
|
||||
" The arglists for these functions are generally in the form of [x & body];
|
||||
" Functions that accept a flat list of forms do not treat the first argument
|
||||
" specially and hence are not indented specially.
|
||||
"
|
||||
" -*- LISPWORDS -*-
|
||||
" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-010/clj/src/vim_clojure_static/generate.clj
|
||||
setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test
|
||||
|
||||
" Provide insert mode completions for special forms and clojure.core. As
|
||||
" 'omnifunc' is set by popular Clojure REPL client plugins, we also set
|
||||
" 'completefunc' so that the user has some form of completion available when
|
||||
|
||||
@@ -20,49 +20,9 @@ if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1)
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
endif
|
||||
|
||||
|
||||
if exists('&omnifunc')
|
||||
" Distinguish between HTML versions
|
||||
" To use with other HTML versions add another
|
||||
" elseif condition to match proper DOCTYPE
|
||||
setlocal omnifunc=htmlcomplete#CompleteTags
|
||||
|
||||
if &filetype == 'xhtml'
|
||||
let b:html_omni_flavor = 'xhtml10s'
|
||||
else
|
||||
let b:html_omni_flavor = 'html401t'
|
||||
endif
|
||||
let i = 1
|
||||
let line = ""
|
||||
while i < 10 && i < line("$")
|
||||
let line = getline(i)
|
||||
if line =~ '<!DOCTYPE.*\<DTD '
|
||||
break
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above
|
||||
if line =~ ' HTML 3\.2'
|
||||
let b:html_omni_flavor = 'html32'
|
||||
elseif line =~ ' XHTML 1\.1'
|
||||
let b:html_omni_flavor = 'xhtml11'
|
||||
else " two-step detection with strict/frameset/transitional
|
||||
if line =~ ' XHTML 1\.0'
|
||||
let b:html_omni_flavor = 'xhtml10'
|
||||
elseif line =~ ' HTML 4\.01'
|
||||
let b:html_omni_flavor = 'html401'
|
||||
elseif line =~ ' HTML 4.0\>'
|
||||
let b:html_omni_flavor = 'html40'
|
||||
endif
|
||||
if line =~ '\<Transitional\>'
|
||||
let b:html_omni_flavor .= 't'
|
||||
elseif line =~ '\<Frameset\>'
|
||||
let b:html_omni_flavor .= 'f'
|
||||
else
|
||||
let b:html_omni_flavor .= 's'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
setlocal omnifunc=htmlcomplete#CompleteTags
|
||||
call htmlcomplete#DetectOmniFlavor()
|
||||
endif
|
||||
|
||||
" HTML: thanks to Johannes Zellner and Benji Fisher.
|
||||
|
||||
@@ -1,18 +1,75 @@
|
||||
" Vim filetype plugin
|
||||
" Language: J
|
||||
" Maintainer: David Bürgin <676c7473@gmail.com>
|
||||
" Last Change: 2013-10-06
|
||||
" URL: https://github.com/glts/vim-j
|
||||
" Last Change: 2014-04-05
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal iskeyword=48-57,65-90,_,97-122
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal iskeyword=48-57,A-Z,_,a-z
|
||||
setlocal comments=:NB.
|
||||
setlocal commentstring=NB.\ %s
|
||||
setlocal formatoptions-=t
|
||||
setlocal shiftwidth=2 softtabstop=2 expandtab
|
||||
setlocal matchpairs=(:)
|
||||
|
||||
let b:undo_ftplugin = "setl mps< et< sts< sw< fo< cms< com< isk<"
|
||||
let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<'
|
||||
|
||||
" Section movement with ]] ][ [[ []. The start/end patterns below are amended
|
||||
" inside the function in order to avoid matching on the current cursor line.
|
||||
let s:sectionstart = '.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>.*'
|
||||
let s:sectionend = '\s*)\s*'
|
||||
|
||||
function! s:SearchSection(end, backwards, visualmode) abort
|
||||
if a:visualmode !=# ''
|
||||
normal! gv
|
||||
endif
|
||||
let flags = a:backwards ? 'bsW' : 'sW'
|
||||
if a:end
|
||||
call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags)
|
||||
else
|
||||
call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
noremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR>
|
||||
xnoremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR>
|
||||
sunmap <buffer> ]]
|
||||
noremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR>
|
||||
xnoremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR>
|
||||
sunmap <buffer> ][
|
||||
noremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR>
|
||||
xnoremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR>
|
||||
sunmap <buffer> [[
|
||||
noremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR>
|
||||
xnoremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR>
|
||||
sunmap <buffer> []
|
||||
|
||||
let b:undo_ftplugin .= ' | silent! execute "unmap <buffer> ]]"'
|
||||
\ . ' | silent! execute "unmap <buffer> ]["'
|
||||
\ . ' | silent! execute "unmap <buffer> [["'
|
||||
\ . ' | silent! execute "unmap <buffer> []"'
|
||||
|
||||
" Browse dialog filter on Windows (see ":help browsefilter")
|
||||
if has('gui_win32') && !exists('b:browsefilter')
|
||||
let b:browsefilter = "J Script Files (*.ijs)\t*.ijs\n"
|
||||
\ . "All Files (*.*)\t*.*\n"
|
||||
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
|
||||
endif
|
||||
|
||||
" Enhanced "%" matching (see ":help matchit")
|
||||
if exists('loaded_matchit') && !exists('b:match_words')
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words = '^.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>:^\s*\:\s*$:^\s*)\s*$'
|
||||
\ . ',\<\%(for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.:\<\%(case\|catch[dt]\=\|else\%(if\)\=\|fcase\)\.:\<end\.'
|
||||
let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words'
|
||||
endif
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
31
runtime/ftplugin/r.vim
Normal file
31
runtime/ftplugin/r.vim
Normal file
@@ -0,0 +1,31 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: R
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Sun Feb 23, 2014 04:07PM
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
setlocal formatoptions-=t
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal comments=:#',:###,:##,:#
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R)\t*.R\n" .
|
||||
\ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
29
runtime/ftplugin/rhelp.vim
Normal file
29
runtime/ftplugin/rhelp.vim
Normal file
@@ -0,0 +1,29 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: R help file
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 06:23PM
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl isk< | unlet! b:browsefilter"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: sw=2
|
||||
43
runtime/ftplugin/rmd.vim
Normal file
43
runtime/ftplugin/rmd.vim
Normal file
@@ -0,0 +1,43 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: R help file
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 06:23PM
|
||||
" Original work by Alex Zvoleff (adjusted for rmd by Michel Kuhlmann)
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
|
||||
|
||||
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
|
||||
setlocal formatoptions+=tcqln
|
||||
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Enables pandoc if it is installed
|
||||
unlet! b:did_ftplugin
|
||||
runtime ftplugin/pandoc.vim
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
if exists('b:undo_ftplugin')
|
||||
let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
|
||||
else
|
||||
let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: sw=2
|
||||
40
runtime/ftplugin/rnoweb.vim
Normal file
40
runtime/ftplugin/rnoweb.vim
Normal file
@@ -0,0 +1,40 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Rnoweb
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 06:23PM
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
runtime! ftplugin/tex.vim
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Enables Vim-Latex-Suite, LaTeX-Box if installed
|
||||
runtime ftplugin/tex_*.vim
|
||||
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
setlocal suffixesadd=.bib,.tex
|
||||
setlocal comments=b:%,b:#,b:##,b:###,b:#'
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
if exists('b:undo_ftplugin')
|
||||
let b:undo_ftplugin .= " | setl isk< sua< com< | unlet! b:browsefilter"
|
||||
else
|
||||
let b:undo_ftplugin = "setl isk< sua< com< | unlet! b:browsefilter"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: sw=2
|
||||
37
runtime/ftplugin/rrst.vim
Normal file
37
runtime/ftplugin/rrst.vim
Normal file
@@ -0,0 +1,37 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: reStructuredText documentation format with R code
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 06:23PM
|
||||
" Original work by Alex Zvoleff
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
|
||||
setlocal formatoptions+=tcqln
|
||||
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
if exists('b:undo_ftplugin')
|
||||
let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
|
||||
else
|
||||
let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: sw=2
|
||||
17
runtime/ftplugin/text.vim
Normal file
17
runtime/ftplugin/text.vim
Normal file
@@ -0,0 +1,17 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Text
|
||||
" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
|
||||
" Last Change: 2014 Jul 09
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = 'setlocal comments< commentstring<'
|
||||
|
||||
" We intentionally don't set formatoptions-=t since text should wrap as text.
|
||||
|
||||
" Pseudo comment leaders to indent bulleted lists.
|
||||
setlocal comments=fb:-,fb:*
|
||||
setlocal commentstring=
|
||||
@@ -6,7 +6,7 @@
|
||||
" Maintainer: Sung Pae <self@sungpae.com>
|
||||
" URL: https://github.com/guns/vim-clojure-static
|
||||
" License: Same as Vim
|
||||
" Last Change: 16 December 2013
|
||||
" Last Change: 27 March 2014
|
||||
|
||||
" TODO: Indenting after multibyte characters is broken:
|
||||
" (let [Δ (if foo
|
||||
@@ -21,7 +21,7 @@ let b:did_indent = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_indent = 'setlocal autoindent< smartindent< lispwords< expandtab< softtabstop< shiftwidth< indentexpr< indentkeys<'
|
||||
let b:undo_indent = 'setlocal autoindent< smartindent< expandtab< softtabstop< shiftwidth< indentexpr< indentkeys<'
|
||||
|
||||
setlocal noautoindent nosmartindent
|
||||
setlocal softtabstop=2 shiftwidth=2 expandtab
|
||||
@@ -70,7 +70,7 @@ if exists("*searchpairpos")
|
||||
endfunction
|
||||
|
||||
function! s:IsParen()
|
||||
return s:CurrentChar() =~ '\v[\(\)\[\]\{\}]' &&
|
||||
return s:CurrentChar() =~# '\v[\(\)\[\]\{\}]' &&
|
||||
\ s:SynIdName() !~? '\vstring|regex|comment|character'
|
||||
endfunction
|
||||
|
||||
@@ -82,7 +82,7 @@ if exists("*searchpairpos")
|
||||
\ ? a:patterns
|
||||
\ : map(split(a:patterns, ','), '"^" . v:val . "$"')
|
||||
for pat in list
|
||||
if a:string =~ pat | return 1 | endif
|
||||
if a:string =~# pat | return 1 | endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
@@ -148,6 +148,10 @@ if exists("*searchpairpos")
|
||||
return val
|
||||
endfunction
|
||||
|
||||
function! s:StripNamespaceAndMacroChars(word)
|
||||
return substitute(a:word, "\\v%(.*/|[#'`~@^,]*)(.*)", '\1', '')
|
||||
endfunction
|
||||
|
||||
function! s:ClojureIsMethodSpecialCaseWorker(position)
|
||||
" Find the next enclosing form.
|
||||
call search('\S', 'Wb')
|
||||
@@ -167,7 +171,8 @@ if exists("*searchpairpos")
|
||||
call cursor(nextParen)
|
||||
|
||||
call search('\S', 'W')
|
||||
if g:clojure_special_indent_words =~ '\<' . s:CurrentWord() . '\>'
|
||||
let w = s:StripNamespaceAndMacroChars(s:CurrentWord())
|
||||
if g:clojure_special_indent_words =~# '\V\<' . w . '\>'
|
||||
return 1
|
||||
endif
|
||||
|
||||
@@ -273,9 +278,9 @@ if exists("*searchpairpos")
|
||||
" metacharacters.
|
||||
"
|
||||
" e.g. clojure.core/defn and #'defn should both indent like defn.
|
||||
let ww = substitute(w, "\\v%(.*/|[#'`~@^,]*)(.*)", '\1', '')
|
||||
let ww = s:StripNamespaceAndMacroChars(w)
|
||||
|
||||
if &lispwords =~ '\V\<' . ww . '\>'
|
||||
if &lispwords =~# '\V\<' . ww . '\>'
|
||||
return paren[1] + &shiftwidth - 1
|
||||
endif
|
||||
|
||||
@@ -307,85 +312,6 @@ else
|
||||
|
||||
endif
|
||||
|
||||
" Specially indented symbols from clojure.core and clojure.test.
|
||||
"
|
||||
" Clojure symbols are indented in the defn style when they:
|
||||
"
|
||||
" * Define vars and anonymous functions
|
||||
" * Create new lexical scopes or scopes with altered environments
|
||||
" * Create conditional branches from a predicate function or value
|
||||
"
|
||||
" The arglists for these functions are generally in the form of [x & body];
|
||||
" Functions that accept a flat list of forms do not treat the first argument
|
||||
" specially and hence are not indented specially.
|
||||
|
||||
" Definitions
|
||||
setlocal lispwords=
|
||||
setlocal lispwords+=bound-fn
|
||||
setlocal lispwords+=def
|
||||
setlocal lispwords+=definline
|
||||
setlocal lispwords+=definterface
|
||||
setlocal lispwords+=defmacro
|
||||
setlocal lispwords+=defmethod
|
||||
setlocal lispwords+=defmulti
|
||||
setlocal lispwords+=defn
|
||||
setlocal lispwords+=defn-
|
||||
setlocal lispwords+=defonce
|
||||
setlocal lispwords+=defprotocol
|
||||
setlocal lispwords+=defrecord
|
||||
setlocal lispwords+=defstruct
|
||||
setlocal lispwords+=deftest " clojure.test
|
||||
setlocal lispwords+=deftest- " clojure.test
|
||||
setlocal lispwords+=deftype
|
||||
setlocal lispwords+=extend
|
||||
setlocal lispwords+=extend-protocol
|
||||
setlocal lispwords+=extend-type
|
||||
setlocal lispwords+=fn
|
||||
setlocal lispwords+=ns
|
||||
setlocal lispwords+=proxy
|
||||
setlocal lispwords+=reify
|
||||
setlocal lispwords+=set-test " clojure.test
|
||||
|
||||
" Binding forms
|
||||
setlocal lispwords+=as->
|
||||
setlocal lispwords+=binding
|
||||
setlocal lispwords+=doall
|
||||
setlocal lispwords+=dorun
|
||||
setlocal lispwords+=doseq
|
||||
setlocal lispwords+=dotimes
|
||||
setlocal lispwords+=doto
|
||||
setlocal lispwords+=for
|
||||
setlocal lispwords+=if-let
|
||||
setlocal lispwords+=let
|
||||
setlocal lispwords+=letfn
|
||||
setlocal lispwords+=locking
|
||||
setlocal lispwords+=loop
|
||||
setlocal lispwords+=testing " clojure.test
|
||||
setlocal lispwords+=when-first
|
||||
setlocal lispwords+=when-let
|
||||
setlocal lispwords+=with-bindings
|
||||
setlocal lispwords+=with-in-str
|
||||
setlocal lispwords+=with-local-vars
|
||||
setlocal lispwords+=with-open
|
||||
setlocal lispwords+=with-precision
|
||||
setlocal lispwords+=with-redefs
|
||||
setlocal lispwords+=with-redefs-fn
|
||||
setlocal lispwords+=with-test " clojure.test
|
||||
|
||||
" Conditional branching
|
||||
setlocal lispwords+=case
|
||||
setlocal lispwords+=cond->
|
||||
setlocal lispwords+=cond->>
|
||||
setlocal lispwords+=condp
|
||||
setlocal lispwords+=if
|
||||
setlocal lispwords+=if-not
|
||||
setlocal lispwords+=when
|
||||
setlocal lispwords+=when-not
|
||||
setlocal lispwords+=while
|
||||
|
||||
" Exception handling
|
||||
setlocal lispwords+=catch
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet! s:save_cpo
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,37 +1,50 @@
|
||||
" Vim indent file
|
||||
" Language: J
|
||||
" Maintainer: David Bürgin <676c7473@gmail.com>
|
||||
" Last Change: 2013-09-21
|
||||
" URL: https://github.com/glts/vim-j
|
||||
" Last Change: 2014-04-05
|
||||
|
||||
if exists("b:did_indent")
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetJIndent()
|
||||
setlocal indentkeys-=0{,0},\:,0#
|
||||
setlocal indentkeys+=0),=case.,=catch.,=catchd.,=catcht.,=do.,=else.,=elseif.,=end.,=fcase.
|
||||
setlocal indentkeys-=0{,0},:,0#
|
||||
setlocal indentkeys+=0),0<:>,=case.,=catch.,=catchd.,=catcht.,=do.,=else.,=elseif.,=end.,=fcase.
|
||||
|
||||
let b:undo_indent = "setl indk< inde<"
|
||||
let b:undo_indent = 'setlocal indentkeys< indentexpr<'
|
||||
|
||||
if exists("*GetJIndent")
|
||||
if exists('*GetJIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetJIndent()
|
||||
" If g:j_indent_definitions is true, the bodies of explicit definitions of
|
||||
" adverbs, conjunctions, and verbs will be indented. Default is false (0).
|
||||
if !exists('g:j_indent_definitions')
|
||||
let g:j_indent_definitions = 0
|
||||
endif
|
||||
|
||||
function GetJIndent() abort
|
||||
let prevlnum = prevnonblank(v:lnum-1)
|
||||
if prevlnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let indent = indent(prevlnum)
|
||||
if getline(prevlnum) =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.'
|
||||
if getline(prevlnum) !~# '\<end\.'
|
||||
let indent += &shiftwidth
|
||||
endif
|
||||
let prevline = getline(prevlnum)
|
||||
if prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$'
|
||||
" Increase indentation after an initial control word that starts or
|
||||
" continues a block and is not terminated by "end."
|
||||
let indent += shiftwidth()
|
||||
elseif g:j_indent_definitions && (prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || prevline =~# '^\s*:\s*$')
|
||||
" Increase indentation in explicit definitions of adverbs, conjunctions,
|
||||
" and verbs
|
||||
let indent += shiftwidth()
|
||||
endif
|
||||
if getline(v:lnum) =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.'
|
||||
let indent -= &shiftwidth
|
||||
" Decrease indentation in lines that start with either control words that
|
||||
" continue or end a block, or the special items ")" and ":"
|
||||
if getline(v:lnum) =~# '^\s*\%()\|:\|\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.\)'
|
||||
let indent -= shiftwidth()
|
||||
endif
|
||||
return indent
|
||||
endfunction
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
|
||||
" URL: http://www.2072productions.com/vim/indent/php.vim
|
||||
" Home: https://github.com/2072/PHP-Indenting-for-VIm
|
||||
" Last Change: 2014 Jan 21
|
||||
" Version: 1.39
|
||||
" Last Change: 2014 April 3rd
|
||||
" Version: 1.49
|
||||
"
|
||||
"
|
||||
" Type :help php-indent for available options
|
||||
@@ -39,7 +39,8 @@
|
||||
"
|
||||
" or simply 'let' the option PHP_removeCRwhenUnix to 1 and the script will
|
||||
" silently remove them when VIM load this script (at each bufread).
|
||||
"
|
||||
|
||||
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -126,14 +127,26 @@ if exists("*GetPhpIndent")
|
||||
finish " XXX -- comment this line for easy dev
|
||||
endif
|
||||
|
||||
|
||||
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
|
||||
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)'
|
||||
let s:functionDecl = '\<function\>\%(\s\+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\)\=\s*(.*'
|
||||
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
|
||||
let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
|
||||
let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
|
||||
|
||||
|
||||
|
||||
let s:escapeDebugStops = 0
|
||||
function! DebugPrintReturn(scriptLine)
|
||||
|
||||
echo "debug:" . a:scriptLine
|
||||
call getchar()
|
||||
if ! s:escapeDebugStops
|
||||
echo "debug:" . a:scriptLine
|
||||
let c = getchar()
|
||||
if c == "\<Del>"
|
||||
let s:escapeDebugStops = 1
|
||||
end
|
||||
endif
|
||||
|
||||
endfunction
|
||||
|
||||
@@ -190,6 +203,11 @@ function! GetLastRealCodeLNum(startline) " {{{
|
||||
while getline(lnum) !~? tofind && lnum > 1
|
||||
let lnum = lnum - 1
|
||||
endwhile
|
||||
elseif lastline =~ '^[^''"`]*[''"`][;,]'.s:endline
|
||||
let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$', '')
|
||||
while getline(lnum) !~? tofind && lnum > 1
|
||||
let lnum = lnum - 1
|
||||
endwhile
|
||||
else
|
||||
break
|
||||
endif
|
||||
@@ -211,9 +229,9 @@ function! Skippmatch2()
|
||||
let line = getline(".")
|
||||
|
||||
if line =~ "\\([\"']\\).*/\\*.*\\1" || line =~ '\%(//\|#\).*/\*'
|
||||
return 1
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
endif
|
||||
endfun
|
||||
|
||||
@@ -226,9 +244,23 @@ function! Skippmatch() " {{{
|
||||
endif
|
||||
endfun " }}}
|
||||
|
||||
function! FindOpenBracket(lnum) " {{{
|
||||
function! FindOpenBracket(lnum, blockStarter) " {{{
|
||||
call cursor(a:lnum, 1)
|
||||
return searchpair('{', '', '}', 'bW', 'Skippmatch()')
|
||||
let line = searchpair('{', '', '}', 'bW', 'Skippmatch()')
|
||||
|
||||
if a:blockStarter == 1
|
||||
while line > 1
|
||||
let linec = getline(line)
|
||||
|
||||
if linec =~ s:terminated || linec =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
|
||||
break
|
||||
endif
|
||||
|
||||
let line = GetLastRealCodeLNum(line - 1)
|
||||
endwhile
|
||||
endif
|
||||
|
||||
return line
|
||||
endfun " }}}
|
||||
|
||||
function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{
|
||||
@@ -248,7 +280,7 @@ function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{
|
||||
endif
|
||||
|
||||
if getline(beforeelse) =~ '^\s*}'
|
||||
let beforeelse = FindOpenBracket(beforeelse)
|
||||
let beforeelse = FindOpenBracket(beforeelse, 0)
|
||||
|
||||
if getline(beforeelse) =~ '^\s*{'
|
||||
let beforeelse = GetLastRealCodeLNum(beforeelse - 1)
|
||||
@@ -285,13 +317,13 @@ function! FindTheSwitchIndent (lnum) " {{{
|
||||
return indent(1) - &sw * b:PHP_vintage_case_default_indent
|
||||
end
|
||||
|
||||
if getline(test) =~ '^\s*}'
|
||||
let test = FindOpenBracket(test)
|
||||
while getline(test) =~ '^\s*}' && test > 1
|
||||
let test = GetLastRealCodeLNum(FindOpenBracket(test, 0) - 1)
|
||||
|
||||
if getline(test) =~ '^\s*{'
|
||||
let test = GetLastRealCodeLNum(GetLastRealCodeLNum(test - 1) - 1)
|
||||
if getline(test) =~ '^\s*switch\>'
|
||||
let test = GetLastRealCodeLNum(test - 1)
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
|
||||
if getline(test) =~# '^\s*switch\>'
|
||||
return indent(test)
|
||||
@@ -308,7 +340,7 @@ function! IslinePHP (lnum, tofind) " {{{
|
||||
let cline = getline(a:lnum)
|
||||
|
||||
if a:tofind==""
|
||||
let tofind = "^\\s*[\"']*\\s*\\zs\\S"
|
||||
let tofind = "^\\s*[\"'`]*\\s*\\zs\\S"
|
||||
else
|
||||
let tofind = a:tofind
|
||||
endif
|
||||
@@ -319,6 +351,14 @@ function! IslinePHP (lnum, tofind) " {{{
|
||||
|
||||
let synname = synIDattr(synID(a:lnum, coltotest, 0), "name")
|
||||
|
||||
if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick'
|
||||
if cline !~ '^\s*[''"`]'
|
||||
return ""
|
||||
else
|
||||
return synname
|
||||
end
|
||||
end
|
||||
|
||||
if get(s:SynPHPMatchGroups, synname) || synname =~ '^php' || synname =~? '^javaScript'
|
||||
return synname
|
||||
else
|
||||
@@ -326,9 +366,6 @@ function! IslinePHP (lnum, tofind) " {{{
|
||||
endif
|
||||
endfunction " }}}
|
||||
|
||||
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
|
||||
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\)'
|
||||
|
||||
let s:autoresetoptions = 0
|
||||
if ! s:autoresetoptions
|
||||
let s:autoresetoptions = 1
|
||||
@@ -344,7 +381,6 @@ function! ResetPhpOptions()
|
||||
setlocal formatoptions+=q
|
||||
setlocal formatoptions+=r
|
||||
setlocal formatoptions+=o
|
||||
setlocal formatoptions+=w
|
||||
setlocal formatoptions+=c
|
||||
setlocal formatoptions+=b
|
||||
endif
|
||||
@@ -443,6 +479,7 @@ function! GetPhpIndent()
|
||||
" Test if we are indenting PHP code {{{
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
let last_line = getline(lnum)
|
||||
let endline= s:endline
|
||||
|
||||
if b:InPHPcode_tofind!=""
|
||||
if cline =~? b:InPHPcode_tofind
|
||||
@@ -483,6 +520,9 @@ function! GetPhpIndent()
|
||||
let b:InPHPcode_and_script = 1
|
||||
endif
|
||||
|
||||
elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before
|
||||
let b:InPHPcode = 0
|
||||
let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
|
||||
elseif last_line =~? '<<<''\=\a\w*''\=$'
|
||||
let b:InPHPcode = 0
|
||||
let b:InPHPcode_tofind = substitute( last_line, '^.*<<<''\=\(\a\w*\)''\=$', '^\\s*\1;\\=$', '')
|
||||
@@ -545,7 +585,7 @@ function! GetPhpIndent()
|
||||
return 0
|
||||
endif
|
||||
|
||||
if cline =~? '^\s*\a\w*;$\|^\a\w*$' && cline !~? s:notPhpHereDoc
|
||||
if cline =~? '^\s*\a\w*;$\|^\a\w*$\|^\s*[''"`][;,]' && cline !~? s:notPhpHereDoc
|
||||
return 0
|
||||
endif " }}}
|
||||
|
||||
@@ -555,7 +595,6 @@ function! GetPhpIndent()
|
||||
|
||||
let last_line = getline(lnum)
|
||||
let ind = indent(lnum)
|
||||
let endline= s:endline
|
||||
|
||||
if ind==0 && b:PHP_default_indenting
|
||||
let ind = b:PHP_default_indenting
|
||||
@@ -567,7 +606,7 @@ function! GetPhpIndent()
|
||||
|
||||
|
||||
if cline =~ '^\s*}\%(}}\)\@!'
|
||||
let ind = indent(FindOpenBracket(v:lnum))
|
||||
let ind = indent(FindOpenBracket(v:lnum, 1))
|
||||
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
|
||||
return ind
|
||||
endif
|
||||
@@ -599,7 +638,7 @@ function! GetPhpIndent()
|
||||
|
||||
let LastLineClosed = 0
|
||||
|
||||
let terminated = '\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.endline
|
||||
let terminated = s:terminated
|
||||
|
||||
let unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.endline
|
||||
|
||||
@@ -614,7 +653,7 @@ function! GetPhpIndent()
|
||||
|
||||
while last_line_num > 1
|
||||
|
||||
if previous_line =~ '^\s*\%(' . s:blockstart . '\|\%([a-zA-Z]\s*\)*function\)'
|
||||
if previous_line =~ terminated || previous_line =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . endline
|
||||
|
||||
let ind = indent(last_line_num)
|
||||
|
||||
@@ -625,7 +664,7 @@ function! GetPhpIndent()
|
||||
return ind
|
||||
endif
|
||||
|
||||
let last_line_num = last_line_num - 1
|
||||
let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
|
||||
let previous_line = getline(last_line_num)
|
||||
endwhile
|
||||
|
||||
@@ -638,22 +677,29 @@ function! GetPhpIndent()
|
||||
let last_line_num = lnum
|
||||
let LastLineClosed = 1
|
||||
|
||||
let isSingleLineBlock = 0
|
||||
while 1
|
||||
if previous_line =~ '^\s*}\|;\s*}'.endline " XXX
|
||||
if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
|
||||
|
||||
call cursor(last_line_num, 1)
|
||||
call search('}\|;\s*}'.endline, 'cW')
|
||||
if previous_line !~ '^}'
|
||||
call search('}\|;\s*}'.endline, 'W')
|
||||
end
|
||||
let oldLastLine = last_line_num
|
||||
let last_line_num = searchpair('{', '', '}', 'bW', 'Skippmatch()')
|
||||
|
||||
if oldLastLine == last_line_num || getline(last_line_num) =~ '^\s*{'
|
||||
if getline(last_line_num) =~ '^\s*{'
|
||||
let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
|
||||
elseif oldLastLine == last_line_num
|
||||
let isSingleLineBlock = 1
|
||||
continue
|
||||
endif
|
||||
|
||||
let previous_line = getline(last_line_num)
|
||||
|
||||
continue
|
||||
else
|
||||
let isSingleLineBlock = 0
|
||||
|
||||
if getline(last_line_num) =~# '^\s*else\%(if\)\=\>'
|
||||
let last_line_num = FindTheIfOfAnElse(last_line_num, 0)
|
||||
@@ -711,7 +757,12 @@ function! GetPhpIndent()
|
||||
|
||||
if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline
|
||||
|
||||
if !b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{'
|
||||
let dontIndent = 0
|
||||
if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
|
||||
let dontIndent = 1
|
||||
endif
|
||||
|
||||
if !dontIndent && (!b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{')
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
|
||||
@@ -723,7 +774,7 @@ function! GetPhpIndent()
|
||||
|
||||
elseif last_line =~ '\S\+\s*),'.endline
|
||||
call cursor(lnum, 1)
|
||||
call search('),'.endline, 'W')
|
||||
call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
|
||||
let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
|
||||
if openedparent != lnum
|
||||
let ind = indent(openedparent)
|
||||
|
||||
111
runtime/indent/rhelp.vim
Normal file
111
runtime/indent/rhelp.vim
Normal file
@@ -0,0 +1,111 @@
|
||||
" Vim indent file
|
||||
" Language: R Documentation (Help), *.Rd
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 07:34PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
runtime indent/r.vim
|
||||
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetRHelpIndent()
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRHelpIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal noautoindent
|
||||
setlocal nocindent
|
||||
setlocal nosmartindent
|
||||
setlocal nolisp
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetCorrectRHelpIndent()
|
||||
|
||||
function s:SanitizeRHelpLine(line)
|
||||
let newline = substitute(a:line, '\\\\', "x", "g")
|
||||
let newline = substitute(newline, '\\{', "x", "g")
|
||||
let newline = substitute(newline, '\\}', "x", "g")
|
||||
let newline = substitute(newline, '\\%', "x", "g")
|
||||
let newline = substitute(newline, '%.*', "", "")
|
||||
let newline = substitute(newline, '\s*$', "", "")
|
||||
return newline
|
||||
endfunction
|
||||
|
||||
function GetRHelpIndent()
|
||||
|
||||
let clnum = line(".") " current line
|
||||
if clnum == 1
|
||||
return 0
|
||||
endif
|
||||
let cline = getline(clnum)
|
||||
|
||||
if cline =~ '^\s*}\s*$'
|
||||
let i = clnum
|
||||
let bb = -1
|
||||
while bb != 0 && i > 1
|
||||
let i -= 1
|
||||
let line = s:SanitizeRHelpLine(getline(i))
|
||||
let line2 = substitute(line, "{", "", "g")
|
||||
let openb = strlen(line) - strlen(line2)
|
||||
let line3 = substitute(line2, "}", "", "g")
|
||||
let closeb = strlen(line2) - strlen(line3)
|
||||
let bb += openb - closeb
|
||||
endwhile
|
||||
return indent(i)
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*#ifdef\>' || cline =~ '^\s*#endif\>'
|
||||
return 0
|
||||
endif
|
||||
|
||||
let lnum = clnum - 1
|
||||
let line = getline(lnum)
|
||||
if line =~ '^\s*#ifdef\>' || line =~ '^\s*#endif\>'
|
||||
let lnum -= 1
|
||||
let line = getline(lnum)
|
||||
endif
|
||||
while lnum > 1 && (line =~ '^\s*$' || line =~ '^#ifdef' || line =~ '^#endif')
|
||||
let lnum -= 1
|
||||
let line = getline(lnum)
|
||||
endwhile
|
||||
if lnum == 1
|
||||
return 0
|
||||
endif
|
||||
let line = s:SanitizeRHelpLine(line)
|
||||
let line2 = substitute(line, "{", "", "g")
|
||||
let openb = strlen(line) - strlen(line2)
|
||||
let line3 = substitute(line2, "}", "", "g")
|
||||
let closeb = strlen(line2) - strlen(line3)
|
||||
let bb = openb - closeb
|
||||
|
||||
let ind = indent(lnum) + (bb * &sw)
|
||||
|
||||
if line =~ '^\s*}\s*$'
|
||||
let ind = indent(lnum)
|
||||
endif
|
||||
|
||||
if ind < 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
function GetCorrectRHelpIndent()
|
||||
let lastsection = search('^\\[a-z]*{', "bncW")
|
||||
let secname = getline(lastsection)
|
||||
if secname =~ '^\\usage{' || secname =~ '^\\examples{' || secname =~ '^\\dontshow{' || secname =~ '^\\dontrun{' || secname =~ '^\\donttest{' || secname =~ '^\\testonly{' || secname =~ '^\\method{.*}{.*}('
|
||||
return s:RIndent()
|
||||
else
|
||||
return GetRHelpIndent()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" vim: sw=2
|
||||
46
runtime/indent/rmd.vim
Normal file
46
runtime/indent/rmd.vim
Normal file
@@ -0,0 +1,46 @@
|
||||
" Vim indent file
|
||||
" Language: Rmd
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 07:33PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
runtime indent/r.vim
|
||||
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetRmdIndent()
|
||||
|
||||
if exists("*GetRmdIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetMdIndent()
|
||||
let pline = getline(v:lnum - 1)
|
||||
let cline = getline(v:lnum)
|
||||
if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+'
|
||||
return indent(v:lnum)
|
||||
elseif pline =~ '^\s*[-\+\*]\s'
|
||||
return indent(v:lnum - 1) + 2
|
||||
elseif pline =~ '^\s*\d\+\.\s\+'
|
||||
return indent(v:lnum - 1) + 3
|
||||
endif
|
||||
return indent(prevnonblank(v:lnum - 1))
|
||||
endfunction
|
||||
|
||||
function GetRmdIndent()
|
||||
if getline(".") =~ '^```{r .*}$' || getline(".") =~ '^```$'
|
||||
return 0
|
||||
endif
|
||||
if search('^```{r', "bncW") > search('^```$', "bncW")
|
||||
return s:RIndent()
|
||||
else
|
||||
return GetMdIndent()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" vim: sw=2
|
||||
35
runtime/indent/rnoweb.vim
Normal file
35
runtime/indent/rnoweb.vim
Normal file
@@ -0,0 +1,35 @@
|
||||
" Vim indent file
|
||||
" Language: Rnoweb
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 07:28PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
runtime indent/tex.vim
|
||||
let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
unlet b:did_indent
|
||||
runtime indent/r.vim
|
||||
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item
|
||||
setlocal indentexpr=GetRnowebIndent()
|
||||
|
||||
if exists("*GetRnowebIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetRnowebIndent()
|
||||
if getline(".") =~ "^<<.*>>=$"
|
||||
return 0
|
||||
endif
|
||||
if search("^<<", "bncW") > search("^@", "bncW")
|
||||
return s:RIndent()
|
||||
endif
|
||||
return s:TeXIndent()
|
||||
endfunction
|
||||
|
||||
" vim: sw=2
|
||||
46
runtime/indent/rrst.vim
Normal file
46
runtime/indent/rrst.vim
Normal file
@@ -0,0 +1,46 @@
|
||||
" Vim indent file
|
||||
" Language: Rrst
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 07:33PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
runtime indent/r.vim
|
||||
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetRrstIndent()
|
||||
|
||||
if exists("*GetRrstIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetRstIndent()
|
||||
let pline = getline(v:lnum - 1)
|
||||
let cline = getline(v:lnum)
|
||||
if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+'
|
||||
return indent(v:lnum)
|
||||
elseif pline =~ '^\s*[-\+\*]\s'
|
||||
return indent(v:lnum - 1) + 2
|
||||
elseif pline =~ '^\s*\d\+\.\s\+'
|
||||
return indent(v:lnum - 1) + 3
|
||||
endif
|
||||
return indent(prevnonblank(v:lnum - 1))
|
||||
endfunction
|
||||
|
||||
function GetRrstIndent()
|
||||
if getline(".") =~ '^\.\. {r .*}$' || getline(".") =~ '^\.\. \.\.$'
|
||||
return 0
|
||||
endif
|
||||
if search('^\.\. {r', "bncW") > search('^\.\. \.\.$', "bncW")
|
||||
return s:RIndent()
|
||||
else
|
||||
return GetRstIndent()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" vim: sw=2
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim script to work like "less"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 May 18
|
||||
" Last Change: 2014 May 13
|
||||
|
||||
" Avoid loading this file twice, allow the user to define his own script.
|
||||
if exists("loaded_less")
|
||||
@@ -87,6 +87,9 @@ noremap <script> <Space> :call <SID>NextPage()<CR><SID>L
|
||||
map <C-V> <Space>
|
||||
map f <Space>
|
||||
map <C-F> <Space>
|
||||
map <PageDown> <Space>
|
||||
map <kPageDown> <Space>
|
||||
map <S-Down> <Space>
|
||||
map z <Space>
|
||||
map <Esc><Space> <Space>
|
||||
fun! s:NextPage()
|
||||
@@ -116,10 +119,14 @@ map e <CR>
|
||||
map <C-E> <CR>
|
||||
map j <CR>
|
||||
map <C-J> <CR>
|
||||
map <Down> <CR>
|
||||
|
||||
" Scroll one page backward
|
||||
noremap <script> b <C-B><SID>L
|
||||
map <C-B> b
|
||||
map <PageUp> b
|
||||
map <kPageUp> b
|
||||
map <S-Up> b
|
||||
map w b
|
||||
map <Esc>v b
|
||||
|
||||
@@ -133,6 +140,7 @@ map y k
|
||||
map <C-Y> k
|
||||
map <C-P> k
|
||||
map <C-K> k
|
||||
map <Up> k
|
||||
|
||||
" Redraw
|
||||
noremap <script> r <C-L><SID>L
|
||||
@@ -143,11 +151,15 @@ noremap <script> R <C-L><SID>L
|
||||
noremap <script> g gg<SID>L
|
||||
map < g
|
||||
map <Esc>< g
|
||||
map <Home> g
|
||||
map <kHome> g
|
||||
|
||||
" End of file
|
||||
noremap <script> G G<SID>L
|
||||
map > G
|
||||
map <Esc>> G
|
||||
map <End> G
|
||||
map <kEnd> G
|
||||
|
||||
" Go to percentage
|
||||
noremap <script> % %<SID>L
|
||||
@@ -184,6 +196,7 @@ fun! s:Backward()
|
||||
endfun
|
||||
|
||||
call s:Forward()
|
||||
cunmap <CR>
|
||||
|
||||
" Quitting
|
||||
noremap q :q<CR>
|
||||
@@ -240,6 +253,18 @@ fun! s:End()
|
||||
unmap v
|
||||
unmap /
|
||||
unmap ?
|
||||
unmap <Up>
|
||||
unmap <Down>
|
||||
unmap <PageDown>
|
||||
unmap <kPageDown>
|
||||
unmap <PageUp>
|
||||
unmap <kPageUp>
|
||||
unmap <S-Down>
|
||||
unmap <S-Up>
|
||||
unmap <Home>
|
||||
unmap <kHome>
|
||||
unmap <End>
|
||||
unmap <kEnd>
|
||||
endfun
|
||||
|
||||
" vim: sw=2
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" You can also use this as a start for your own set of menus.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2013 May 17
|
||||
" Last Change: 2014 May 22
|
||||
|
||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||
" in all modes and avoid side effects from mappings defined by the user.
|
||||
@@ -477,6 +477,7 @@ if has("folding")
|
||||
an 40.340.110 &Tools.&Folding.&Enable/Disable\ folds<Tab>zi zi
|
||||
an 40.340.120 &Tools.&Folding.&View\ Cursor\ Line<Tab>zv zv
|
||||
an 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx zMzx
|
||||
inoremenu 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx <C-O>zM<C-O>zx
|
||||
an 40.340.130 &Tools.&Folding.C&lose\ more\ folds<Tab>zm zm
|
||||
an 40.340.140 &Tools.&Folding.&Close\ all\ folds<Tab>zM zM
|
||||
an 40.340.150 &Tools.&Folding.O&pen\ more\ folds<Tab>zr zr
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2013 Jun 29
|
||||
" Last Change: 2014 Apr 01
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
if bufwinnr("option-window") > 0
|
||||
@@ -324,6 +324,12 @@ call <SID>BinOptionG("wrap", &wrap)
|
||||
call append("$", "linebreak\twrap long lines at a character in 'breakat'")
|
||||
call append("$", "\t(local to window)")
|
||||
call <SID>BinOptionL("lbr")
|
||||
call append("$", "breakindent\tpreserve indentation in wrapped text")
|
||||
call append("$", "\t(local to window)")
|
||||
call <SID>BinOptionL("bri")
|
||||
call append("$", "breakindentopt\tadjust breakindent behaviour")
|
||||
call append("$", "\t(local to window)")
|
||||
call <SID>OptionL("briopt")
|
||||
call append("$", "breakat\twhich characters might cause a line break")
|
||||
call <SID>OptionG("brk", &brk)
|
||||
call append("$", "showbreak\tstring to put before wrapped screen lines")
|
||||
@@ -855,7 +861,7 @@ if has("lispindent")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>BinOptionL("lisp")
|
||||
call append("$", "lispwords\twords that change how lisp indenting works")
|
||||
call <SID>OptionL("lw", &lw)
|
||||
call <SID>OptionL("lw")
|
||||
endif
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2013 May 08
|
||||
" Last Change: 2014 Jul 09
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded (or disabled)
|
||||
@@ -39,7 +39,7 @@ set cpo-=C
|
||||
function! s:Highlight_Matching_Pair()
|
||||
" Remove any previous match.
|
||||
if exists('w:paren_hl_on') && w:paren_hl_on
|
||||
3match none
|
||||
silent! call matchdelete(3)
|
||||
let w:paren_hl_on = 0
|
||||
endif
|
||||
|
||||
@@ -54,14 +54,15 @@ function! s:Highlight_Matching_Pair()
|
||||
let c_col = col('.')
|
||||
let before = 0
|
||||
|
||||
let c = getline(c_lnum)[c_col - 1]
|
||||
let text = getline(c_lnum)
|
||||
let c = text[c_col - 1]
|
||||
let plist = split(&matchpairs, '.\zs[:,]')
|
||||
let i = index(plist, c)
|
||||
if i < 0
|
||||
" not found, in Insert mode try character before the cursor
|
||||
if c_col > 1 && (mode() == 'i' || mode() == 'R')
|
||||
let before = 1
|
||||
let c = getline(c_lnum)[c_col - 2]
|
||||
let c = text[c_col - 2]
|
||||
let i = index(plist, c)
|
||||
endif
|
||||
if i < 0
|
||||
@@ -87,7 +88,7 @@ function! s:Highlight_Matching_Pair()
|
||||
" Find the match. When it was just before the cursor move it there for a
|
||||
" moment.
|
||||
if before > 0
|
||||
let save_cursor = winsaveview()
|
||||
let save_cursor = getcurpos()
|
||||
call cursor(c_lnum, c_col - before)
|
||||
endif
|
||||
|
||||
@@ -147,19 +148,23 @@ function! s:Highlight_Matching_Pair()
|
||||
endtry
|
||||
|
||||
if before > 0
|
||||
call winrestview(save_cursor)
|
||||
call setpos('.', save_cursor)
|
||||
endif
|
||||
|
||||
" If a match is found setup match highlighting.
|
||||
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
|
||||
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
|
||||
\ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
|
||||
if exists('*matchaddpos')
|
||||
call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
|
||||
else
|
||||
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
|
||||
\ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
|
||||
endif
|
||||
let w:paren_hl_on = 1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Define commands that will disable and enable the plugin.
|
||||
command! NoMatchParen windo 3match none | unlet! g:loaded_matchparen |
|
||||
command! NoMatchParen windo silent! call matchdelete(3) | unlet! g:loaded_matchparen |
|
||||
\ au! matchparen
|
||||
command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
|
||||
" PLUGIN SECTION
|
||||
" Date: Dec 31, 2013
|
||||
" Date: Jan 22, 2014
|
||||
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
|
||||
" Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1
|
||||
@@ -20,7 +20,7 @@
|
||||
if &cp || exists("g:loaded_netrwPlugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwPlugin = "v150"
|
||||
let g:loaded_netrwPlugin = "v152"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** you need vim version 7.2 for this version of netrw"
|
||||
@@ -43,6 +43,7 @@ set cpo&vim
|
||||
" Local Browsing Autocmds: {{{2
|
||||
augroup FileExplorer
|
||||
au!
|
||||
au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif
|
||||
au BufEnter * sil call s:LocalBrowse(expand("<amatch>"))
|
||||
au VimEnter * sil call s:VimEnter(expand("<amatch>"))
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
@@ -66,11 +67,11 @@ augroup Network
|
||||
augroup END
|
||||
|
||||
" Commands: :Nread, :Nwrite, :NetUserPass {{{2
|
||||
com! -count=1 -nargs=* Nread call netrw#NetrwSavePosn()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call netrw#NetrwRestorePosn()
|
||||
com! -range=% -nargs=* Nwrite call netrw#NetrwSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetrwRestorePosn()
|
||||
com! -count=1 -nargs=* Nread call netrw#SavePosn()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call netrw#RestorePosn()
|
||||
com! -range=% -nargs=* Nwrite call netrw#SavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#RestorePosn()
|
||||
com! -nargs=* NetUserPass call NetUserPass(<f-args>)
|
||||
com! -nargs=* Nsource call netrw#NetrwSavePosn()<bar>call netrw#NetSource(<f-args>)<bar>call netrw#NetrwRestorePosn()
|
||||
com! -nargs=? Ntree call netrw#NetrwSetTreetop(<q-args>)
|
||||
com! -nargs=* Nsource call netrw#SavePosn()<bar>call netrw#NetSource(<f-args>)<bar>call netrw#RestorePosn()
|
||||
com! -nargs=? Ntree call netrw#SetTreetop(<q-args>)
|
||||
|
||||
" Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2
|
||||
com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
|
||||
@@ -84,7 +85,7 @@ com! -nargs=* -bar -complete=dir Lexplore call netrw#Lexplore(<q-args>)
|
||||
|
||||
" Commands: NetrwSettings {{{2
|
||||
com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings()
|
||||
com! -bang NetrwClean call netrw#NetrwClean(<bang>0)
|
||||
com! -bang NetrwClean call netrw#Clean(<bang>0)
|
||||
|
||||
" Maps:
|
||||
if !exists("g:netrw_nogx") && maparg('gx','n') == ""
|
||||
@@ -118,11 +119,18 @@ fun! s:LocalBrowse(dirname)
|
||||
" call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)")
|
||||
if a:dirname != '' && isdirectory(a:dirname)
|
||||
sil! call netrw#LocalBrowseCheck(a:dirname)
|
||||
if exists("w:netrw_bannercnt")
|
||||
exe w:netrw_bannercnt
|
||||
endif
|
||||
endif
|
||||
|
||||
elseif isdirectory(a:dirname)
|
||||
" call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, not amiga)")
|
||||
" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
|
||||
" call Dredir("LocalBrowse ft last set: ","verbose set ft")
|
||||
sil! call netrw#LocalBrowseCheck(a:dirname)
|
||||
if exists("w:netrw_bannercnt")
|
||||
exe w:netrw_bannercnt
|
||||
endif
|
||||
|
||||
else
|
||||
" not a directory, ignore it
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: BibTeX (bibliographic database format for (La)TeX)
|
||||
" Maintainer: Bernd Feige <Bernd.Feige@gmx.net>
|
||||
" Filenames: *.bib
|
||||
" Last Change: 2011 Dec 25
|
||||
" Last Change: 2014 Mar 26
|
||||
|
||||
" Thanks to those who pointed out problems with this file or supplied fixes!
|
||||
|
||||
@@ -28,7 +28,7 @@ syn keyword bibType contained article book booklet conference inbook
|
||||
syn keyword bibType contained incollection inproceedings manual
|
||||
syn keyword bibType contained mastersthesis misc phdthesis
|
||||
syn keyword bibType contained proceedings techreport unpublished
|
||||
syn keyword bibType contained string
|
||||
syn keyword bibType contained string preamble
|
||||
|
||||
syn keyword bibEntryKw contained address annote author booktitle chapter
|
||||
syn keyword bibEntryKw contained crossref edition editor howpublished
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2013 Jul 05
|
||||
" Last Change: 2014 May 26
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -322,6 +322,9 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
|
||||
syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET
|
||||
syn keyword cConstant TMP_MAX stderr stdin stdout
|
||||
syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX
|
||||
" POSIX 2001
|
||||
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG
|
||||
syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ
|
||||
" Add POSIX errors as well
|
||||
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
|
||||
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
||||
" Language: C++
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/cpp-vim)
|
||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||
" Last Change: 2012 Jun 14
|
||||
" Last Change: 2014 May 14
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -39,6 +39,7 @@ if !exists("cpp_no_cpp11")
|
||||
syn keyword cppExceptions noexcept
|
||||
syn keyword cppStorageClass constexpr decltype
|
||||
syn keyword cppConstant nullptr
|
||||
syn region cppRawString matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
||||
endif
|
||||
|
||||
" The minimum and maximum operators in GNU C++
|
||||
@@ -62,6 +63,8 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
|
||||
HiLink cppStructure Structure
|
||||
HiLink cppBoolean Boolean
|
||||
HiLink cppConstant Constant
|
||||
HiLink cppRawDelimiter Delimiter
|
||||
HiLink cppRawString String
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Datascript
|
||||
" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
|
||||
" Last Change: 2012 Apr 30
|
||||
" Last Change: 2014 Feb 26
|
||||
"
|
||||
" DataScript is a formal language for modelling binary datatypes,
|
||||
" bitstreams or file formats. For more information, see:
|
||||
@@ -16,8 +16,8 @@ let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn keyword dsPackage import package
|
||||
syn keyword dsType bit string
|
||||
syn keyword dsType int8 int16 int32 int64
|
||||
syn keyword dsType bit bool string
|
||||
syn keyword dsType int int8 int16 int32 int64
|
||||
syn keyword dsType uint8 uint16 uint32 uint64
|
||||
syn keyword dsType leint16 leint32 leint64
|
||||
syn keyword dsType leuint16 leuint32 leuint64
|
||||
@@ -25,13 +25,14 @@ syn keyword dsEndian little big
|
||||
syn keyword dsAlign align
|
||||
syn keyword dsLabel case default
|
||||
syn keyword dsConditional if condition
|
||||
syn keyword dsCompound union choice on enum bitmask subtype
|
||||
syn keyword dsBoolean true false
|
||||
syn keyword dsCompound union choice on enum bitmask subtype explicit
|
||||
syn keyword dsKeyword function return
|
||||
syn keyword dsOperator sizeof bitsizeof lengthof is sum forall in
|
||||
syn keyword dsStorageClass const
|
||||
syn keyword dsTodo contained TODO FIXME XXX
|
||||
syn keyword dsSql sql sql_table sql_database sql_pragma
|
||||
syn keyword dsSql sql_integer sql_metadata sql_key
|
||||
syn keyword dsSql sql sql_table sql_database sql_pragma sql_index
|
||||
syn keyword dsSql sql_integer sql_metadata sql_key foreign_key
|
||||
|
||||
" dsCommentGroup allows adding matches for special things in comments.
|
||||
syn cluster dsCommentGroup contains=dsTodo
|
||||
@@ -70,6 +71,7 @@ hi def link dsOffset Label
|
||||
hi def link dsSql PreProc
|
||||
hi def link dsCompound Structure
|
||||
hi def link dsConditional Conditional
|
||||
hi def link dsBoolean Boolean
|
||||
hi def link dsKeyword Statement
|
||||
hi def link dsString String
|
||||
hi def link dsNumber Number
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
" :3s+-foo++g
|
||||
" Description: highlight dnsmasq configuration files
|
||||
" File: runtime/syntax/dnsmasq.vim
|
||||
" Version: 2.67
|
||||
" Last Change: 2013 Nov 03
|
||||
" Version: 2.70
|
||||
" Last Change: 2014 Apr 30
|
||||
" Modeline: vim: ts=8:sw=2:sts=2:
|
||||
"
|
||||
" License: VIM License
|
||||
@@ -132,6 +132,9 @@ syn match DnsmasqKeyword "^\s*dhcp-subscrid\>"
|
||||
syn match DnsmasqKeyword "^\s*dhcp-userclass\>"
|
||||
syn match DnsmasqKeyword "^\s*dhcp-vendorclass\>"
|
||||
syn match DnsmasqKeyword "^\s*dns-rr\>"
|
||||
syn match DnsmasqKeyword "^\s*dnssec\>"
|
||||
syn match DnsmasqKeyword "^\s*dnssec-check-unsigned\>"
|
||||
syn match DnsmasqKeyword "^\s*dnssec-no-timecheck\>"
|
||||
syn match DnsmasqKeyword "^\s*dns-forward-max\>"
|
||||
syn match DnsmasqKeyword "^\s*domain\>"
|
||||
syn match DnsmasqKeyword "^\s*domain-needed\>"
|
||||
@@ -153,6 +156,7 @@ syn match DnsmasqKeyword "^\s*listen-address\>"
|
||||
syn match DnsmasqKeyword "^\s*local\>"
|
||||
syn match DnsmasqKeyword "^\s*localmx\>"
|
||||
syn match DnsmasqKeyword "^\s*local-ttl\>"
|
||||
syn match DnsmasqKeyword "^\s*local-service\>"
|
||||
syn match DnsmasqKeyword "^\s*localise-queries\>"
|
||||
syn match DnsmasqKeyword "^\s*log-async\>"
|
||||
syn match DnsmasqKeyword "^\s*log-dhcp\>"
|
||||
@@ -187,8 +191,10 @@ syn match DnsmasqKeyword "^\s*read-ethers\>"
|
||||
syn match DnsmasqKeyword "^\s*rebind-domain-ok\>"
|
||||
syn match DnsmasqKeyword "^\s*rebind-localhost-ok\>"
|
||||
syn match DnsmasqKeyword "^\s*resolv-file\>"
|
||||
syn match DnsmasqKeyword "^\s*rev-server\>"
|
||||
syn match DnsmasqKeyword "^\s*selfmx\>"
|
||||
syn match DnsmasqKeyword "^\s*server\>"
|
||||
syn match DnsmasqKeyword "^\s*servers-file\>"
|
||||
syn match DnsmasqKeyword "^\s*srv-host\>"
|
||||
syn match DnsmasqKeyword "^\s*stop-dns-rebind\>"
|
||||
syn match DnsmasqKeyword "^\s*strict-order\>"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Euphoria 4.0.5 (http://www.openeuphoria.org/)
|
||||
" Maintainer: Shian Lee
|
||||
" Last Change: 2014 Feb 24 (for Vim 7.4)
|
||||
" Last Change: 2014 Feb 26 (for Vim 7.4)
|
||||
" Remark: Euphoria has two syntax files, euphoria3.vim and euphoria4.vim;
|
||||
" For details see :help ft-euphoria-syntax
|
||||
|
||||
@@ -73,7 +73,7 @@ syn keyword euphoria4Library bytes_to_int calc_hash calc_primes call_back
|
||||
syn keyword euphoria4Library canon2win canonical canonical_path ceil
|
||||
syn keyword euphoria4Library central_moment chance char_test chdir
|
||||
syn keyword euphoria4Library check_all_blocks check_break check_free_list
|
||||
syn keyword euphoria4Library checksum clear clear_directory close cmd_parse
|
||||
syn keyword euphoria4Library checksum clear clear_directory cmd_parse
|
||||
syn keyword euphoria4Library colors_to_attr columnize combine connect
|
||||
syn keyword euphoria4Library console_colors copy copy_file cosh count crash
|
||||
syn keyword euphoria4Library crash_file crash_message crash_routine create
|
||||
@@ -174,7 +174,7 @@ syn keyword euphoria4Library writef writefln years_day
|
||||
|
||||
" Library Identifiers (Type) - grep from $EUDIR/include/*:
|
||||
syn keyword euphoria4Type ascii_string boolean bordered_address byte_range
|
||||
syn keyword euphoria4Type case_flagset_type color cstring datetime
|
||||
syn keyword euphoria4Type case_flagset_type color cstring
|
||||
syn keyword euphoria4Type file_number file_position graphics_point
|
||||
syn keyword euphoria4Type integer_array lcid lock_type machine_addr map
|
||||
syn keyword euphoria4Type mixture number_array option_spec
|
||||
@@ -201,8 +201,9 @@ syn match euphoria4Operator "[{}]"
|
||||
" Character constant:
|
||||
syn region euphoria4Char start=/'/ skip=/\\'\|\\\\/ end=/'/ oneline
|
||||
|
||||
" Single and multiline string constant:
|
||||
syn region euphoria4String start=/"\|b"\|x"/ skip=/\\"\|\\\\/ end=/"/ oneline
|
||||
" String constant (""" must be *after* "):
|
||||
syn region euphoria4String start=/"/ skip=/\\"\|\\\\/ end=/"/ oneline
|
||||
syn region euphoria4String start=/b"\|x"/ end=/"/
|
||||
syn region euphoria4String start=/`/ end=/`/
|
||||
syn region euphoria4String start=/"""/ end=/"""/
|
||||
|
||||
|
||||
@@ -1,45 +1,140 @@
|
||||
" Vim syntax file
|
||||
" Language: J
|
||||
" Maintainer: David Bürgin <676c7473@gmail.com>
|
||||
" Last Change: 2013-10-06
|
||||
" URL: https://github.com/glts/vim-j
|
||||
" Last Change: 2014-05-25
|
||||
|
||||
if exists("b:current_syntax")
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syntax case match
|
||||
syntax sync minlines=50
|
||||
|
||||
syn match jControl /\<\%(assert\|break\|case\|catch[dt]\=\|continue\|do\|else\%(if\)\=\|end\|fcase\|for\|if\|return\|select\|throw\|try\|whil\%(e\|st\)\)\./
|
||||
syn match jControl /\<\%(for\|goto\|label\)_\a\k*\./
|
||||
syntax cluster jStdlibItems contains=jStdlibNoun,jStdlibAdverb,jStdlibConjunction,jStdlibVerb
|
||||
syntax cluster jPrimitiveItems contains=jNoun,jAdverb,jConjunction,jVerb,jCopula
|
||||
|
||||
syn region jString oneline start=/'/ skip=/''/ end=/'/
|
||||
syntax match jControl /\<\%(assert\|break\|case\|catch[dt]\=\|continue\|do\|else\%(if\)\=\|end\|fcase\|for\|if\|return\|select\|throw\|try\|whil\%(e\|st\)\)\./
|
||||
syntax match jControl /\<\%(for\|goto\|label\)_\a\k*\./
|
||||
|
||||
" Patterns for numbers in general, rational numbers, numbers with explicit
|
||||
" base, infinities, and numbers with extended precision.
|
||||
" Standard library names. A few names need to be defined with ":syntax match"
|
||||
" because they would otherwise take precedence over the corresponding jControl
|
||||
" and jDefineExpression items.
|
||||
syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFIOS IFJCDROID IFJHS IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCMPX JFL JINT JPTR JSIZES JSTR JTYPES JVERSION LF LF2 TAB UNAME UNXLIB andurl dbhelp libjqt
|
||||
syntax keyword jStdlibAdverb define each every fapplylines inv inverse items leaf rows table
|
||||
syntax keyword jStdlibConjunction bind cuts def on
|
||||
syntax keyword jStdlibVerb AND Endian IFDEF Note OR XOR alpha17 alpha27 anddf android_exec_host andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dberm dberr dbg dbjmp dblocals dblxq dblxs dbnxt dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf8 jcwdpath joinstring jpathsep jsystemdefs list ljust load loadd mema memf memr memw nameclass namelist names nc nl pick quote require rjust rplc script scriptd setbreak show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid startupconsole startupide stderr stdin stdout stringreplace symdat symget symset take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep
|
||||
syntax match jStdlibNoun /\<\%(adverb\|conjunction\|dyad\|monad\|noun\|verb\)\>/
|
||||
syntax match jStdlibVerb /\<\%(assert\|break\|do\)\>\.\@!/
|
||||
|
||||
" Numbers. Matching J numbers is difficult. The regular expression used for
|
||||
" the general case roughly embodies this grammar sketch:
|
||||
"
|
||||
" Matching J numbers is difficult. The regular expression used for the general
|
||||
" case roughly embodies this grammar sketch:
|
||||
" BASE := /_?\d+(\.\d*)?([eE]_?\d+)?/
|
||||
" RATIONAL := BASE | BASE r BASE
|
||||
" COMPLEX := BASE | BASE (j|a[dr]) BASE
|
||||
" JNUMBER := RATIONAL | RATIONAL [px] RATIONAL | COMPLEX | COMPLEX [px] COMPLEX
|
||||
"
|
||||
" EXP := /_?\d+(\.\d*)?([eE]_?\d+)?/
|
||||
" COMP := EXP | EXP (j|a[dr]) EXP
|
||||
" PIEU := COMP | COMP [px] COMP
|
||||
" The grammar is implemented as shown in this pseudo-regexp:
|
||||
"
|
||||
" For the rest, a compromise between correctness and practicality was made.
|
||||
" See http://www.jsoftware.com/help/dictionary/dcons.htm for reference.
|
||||
syn match jNumber /\<_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=/
|
||||
syn match jNumber /\<_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=/
|
||||
syn match jNumber /\<_\=\d\+\%([eE]\d\+\)\=b_\=[0-9a-z]\+/
|
||||
syn match jNumber /\<__\=\>/
|
||||
syn match jNumber /\<_\=\d\+x\>/
|
||||
" base rational complex remainder
|
||||
" /\< B ( [r]B ([px]B([r]B)?)? | (j|a[dr])B ([px]B((j|a[dr])B)?)? | [px]B ((j|a[dr]|r)B)? )?/
|
||||
"
|
||||
" All in all, a compromise between correctness and practicality had to be
|
||||
" made. See http://www.jsoftware.com/help/dictionary/dcons.htm for reference.
|
||||
syntax match jNumber /\<_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=\)\|\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=\)\|\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\|r\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\)\=/
|
||||
syntax match jNumber /\<_\=\d\+\%([eE]\d\+\)\=b_\=[0-9a-z]\+\%(\.[0-9a-z]\+\)\=/
|
||||
syntax match jNumber /\<__\=\>/
|
||||
syntax match jNumber /\<_\./
|
||||
syntax match jNumber /\<_\=\d\+x\>/
|
||||
|
||||
syn match jComment /NB\..*$/ contains=jTodo,@Spell
|
||||
syn keyword jTodo TODO FIXME XXX contained
|
||||
syntax region jString oneline start=/'/ skip=/''/ end=/'/
|
||||
|
||||
hi def link jControl Statement
|
||||
hi def link jString String
|
||||
hi def link jNumber Number
|
||||
hi def link jComment Comment
|
||||
hi def link jTodo Todo
|
||||
syntax keyword jArgument contained x y u v m n
|
||||
|
||||
let b:current_syntax = "j"
|
||||
" Primitives. Order is significant both within the patterns and among
|
||||
" ":syntax match" statements. Refer to "Parts of speech" in the J dictionary.
|
||||
syntax match jNoun /\<a[.:]/
|
||||
syntax match jAdverb /[}~]\|[/\\]\.\=\|\<\%([Mbft]\.\|t:\)/
|
||||
syntax match jConjunction /"\|`:\=\|[.:@&][.:]\=\|&\.:\|\<\%([dDHT]\.\|[DLS]:\)/
|
||||
syntax match jVerb /[=!\]]\|[\^?]\.\=\|[;[]:\=\|{\.\|[_/\\]:\|[<>+*\-%$|,#][.:]\=\|[~}"][.:]\|{\%[::]\|\<\%([ACeEiIjLor]\.\|p\.\.\=\|[ipqsux]:\|0:\|_\=[1-9]:\)/
|
||||
syntax match jCopula /=[.:]/
|
||||
syntax match jConjunction /;\.\|\^:\|![.:]/
|
||||
|
||||
" Explicit noun definition. The difficulty is that the define expression can
|
||||
" occur in the middle of a line but the jNounDefine region must only start on
|
||||
" the next line. The trick is to split the problem into two regions and link
|
||||
" them with "nextgroup=". The fold wrapper provides syntax folding.
|
||||
syntax region jNounDefineFold
|
||||
\ matchgroup=NONE start=/\<\%(\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>\)\@=/
|
||||
\ keepend matchgroup=NONE end=/^\s*)\s*$/
|
||||
\ contains=jNounDefineStart
|
||||
\ fold
|
||||
syntax region jNounDefineStart
|
||||
\ matchgroup=jDefineExpression start=/\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>/
|
||||
\ keepend matchgroup=NONE end=/$/
|
||||
\ contains=@jStdlibItems,@jPrimitiveItems,jNumber,jString,jParenGroup,jParen,jComment
|
||||
\ contained oneline skipempty nextgroup=jDefineEnd,jNounDefine
|
||||
" These two items must have "contained", which allows them to match only after
|
||||
" jNounDefineStart thanks to the "nextgroup=" above.
|
||||
syntax region jNounDefine
|
||||
\ matchgroup=NONE start=/^/
|
||||
\ matchgroup=jDefineEnd end=/^\s*)\s*$/
|
||||
\ contained
|
||||
" This match is necessary in case of an empty noun definition
|
||||
syntax match jDefineEnd contained /^\s*)\s*$/
|
||||
|
||||
" Explicit verb, adverb, and conjunction definition
|
||||
syntax region jDefine
|
||||
\ matchgroup=jDefineExpression start=/\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>/
|
||||
\ matchgroup=jDefineEnd end=/^\s*)\s*$/
|
||||
\ contains=jControl,@jStdlibItems,@jPrimitiveItems,jNumber,jString,jArgument,jParenGroup,jParen,jComment,jDefineMonadDyad
|
||||
\ fold
|
||||
syntax match jDefineMonadDyad contained /^\s*:\s*$/
|
||||
|
||||
" Paired parentheses. When a jDefineExpression such as "3 : 0" is
|
||||
" parenthesised it will erroneously extend jParenGroup to span over the whole
|
||||
" definition body. This situation receives a special treatment here.
|
||||
syntax match jParen /(\%(\s*\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\s*)\)\@=/
|
||||
syntax match jParen contained /\%((\s*\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\s*\)\@<=)/
|
||||
syntax region jParenGroup
|
||||
\ matchgroup=jParen start=/(\%(\s*\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>\)\@!/
|
||||
\ matchgroup=jParen end=/)/
|
||||
\ oneline transparent
|
||||
|
||||
syntax keyword jTodo contained TODO FIXME XXX
|
||||
syntax match jComment /NB\..*$/ contains=jTodo,@Spell
|
||||
|
||||
syntax match jSharpBang /\%^#!.*$/
|
||||
|
||||
highlight default link jControl Statement
|
||||
highlight default link jStdlibNoun Identifier
|
||||
highlight default link jStdlibAdverb Function
|
||||
highlight default link jStdlibConjunction Function
|
||||
highlight default link jStdlibVerb Function
|
||||
highlight default link jString String
|
||||
highlight default link jNumber Number
|
||||
highlight default link jNoun Constant
|
||||
highlight default link jAdverb Normal
|
||||
highlight default link jConjunction Normal
|
||||
highlight default link jVerb Normal
|
||||
highlight default link jCopula Normal
|
||||
highlight default link jArgument Identifier
|
||||
highlight default link jParen Delimiter
|
||||
|
||||
highlight default link jDefineExpression Define
|
||||
highlight default link jDefineMonadDyad Delimiter
|
||||
highlight default link jDefineEnd Delimiter
|
||||
highlight default link jNounDefine Normal
|
||||
|
||||
highlight default link jTodo Todo
|
||||
highlight default link jComment Comment
|
||||
highlight default link jSharpBang PreProc
|
||||
|
||||
let b:current_syntax = 'j'
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
36
runtime/syntax/kivy.vim
Normal file
36
runtime/syntax/kivy.vim
Normal file
@@ -0,0 +1,36 @@
|
||||
" Vim syntax file
|
||||
" Language: Kivy
|
||||
" Maintainer: Corey Prophitt <prophitt.corey@gmail.com>
|
||||
" Last Change: May 29th, 2014
|
||||
" Version: 1
|
||||
" URL: http://kivy.org/
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Load Python syntax first (Python can be used within Kivy)
|
||||
syn include @pyth $VIMRUNTIME/syntax/python.vim
|
||||
|
||||
" Kivy language rules can be found here
|
||||
" http://kivy.org/docs/guide/lang.html
|
||||
|
||||
" Define Kivy syntax
|
||||
syn match kivyPreProc /#:.*/
|
||||
syn match kivyComment /#.*/
|
||||
syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/
|
||||
syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue
|
||||
|
||||
syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite
|
||||
|
||||
syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite
|
||||
|
||||
hi def link kivyPreproc PreProc
|
||||
hi def link kivyComment Comment
|
||||
hi def link kivyRule Function
|
||||
hi def link kivyIdent Statement
|
||||
hi def link kivyAttribute Label
|
||||
|
||||
let b:current_syntax = "kivy"
|
||||
|
||||
" vim: ts=8
|
||||
@@ -1,7 +1,7 @@
|
||||
" Language : Netrw Remote-Directory Listing Syntax
|
||||
" Maintainer : Charles E. Campbell, Jr.
|
||||
" Last change: Dec 18, 2012
|
||||
" Version : 17
|
||||
" Last change: Mar 07, 2014
|
||||
" Version : 18
|
||||
" ---------------------------------------------------------------------
|
||||
|
||||
" Syntax Clearing: {{{1
|
||||
@@ -42,8 +42,9 @@ syn match netrwSortSeq "Sort sequence:" contained transparent skipwhite n
|
||||
syn match netrwCopyTgt "Copy/Move Tgt:" contained transparent skipwhite nextgroup=netrwList
|
||||
syn match netrwList ".*$" contained contains=netrwComma,@NoSpell
|
||||
syn match netrwComma "," contained
|
||||
syn region netrwQuickHelp matchgroup=Comment start="Quick Help:\s\+" end="$" contains=netrwHelpCmd,@NoSpell keepend contained
|
||||
syn match netrwHelpCmd "\S\ze:" contained skipwhite contains=@NoSpell nextgroup=netrwCmdSep
|
||||
syn region netrwQuickHelp matchgroup=Comment start="Quick Help:\s\+" end="$" contains=netrwHelpCmd,netrwQHTopic,@NoSpell keepend contained
|
||||
syn match netrwHelpCmd "\S\+\ze:" contained skipwhite contains=@NoSpell nextgroup=netrwCmdSep
|
||||
syn match netrwQHTopic "-\a\+-" contained skipwhite
|
||||
syn match netrwCmdSep ":" contained nextgroup=netrwCmdNote
|
||||
syn match netrwCmdNote ".\{-}\ze " contained contains=@NoSpell
|
||||
syn match netrwVersion "(netrw.*)" contained contains=@NoSpell
|
||||
@@ -80,6 +81,7 @@ if !exists("did_drchip_netrwlist_syntax")
|
||||
hi default link netrwComment Comment
|
||||
hi default link netrwDir Directory
|
||||
hi default link netrwHelpCmd Function
|
||||
hi default link netrwQHTopic Number
|
||||
hi default link netrwHidePat Statement
|
||||
hi default link netrwHideSep netrwComment
|
||||
hi default link netrwList Statement
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
" ninja build file syntax.
|
||||
" Language: ninja build file as described at
|
||||
" http://martine.github.com/ninja/manual.html
|
||||
" Version: 1.3
|
||||
" Last Change: 2013/04/16
|
||||
" Version: 1.4
|
||||
" Last Change: 2014/05/13
|
||||
" Maintainer: Nicolas Weber <nicolasweber@gmx.de>
|
||||
" Version 1.3 of this script is in the upstream vim repository and will be
|
||||
" Version 1.4 of this script is in the upstream vim repository and will be
|
||||
" included in the next vim release. If you change this, please send your change
|
||||
" upstream.
|
||||
|
||||
@@ -55,6 +55,7 @@ syn keyword ninjaPoolCommand contained depth
|
||||
" $simple_varname -> variable
|
||||
" ${varname} -> variable
|
||||
|
||||
syn match ninjaDollar "\$\$"
|
||||
syn match ninjaWrapLineOperator "\$$"
|
||||
syn match ninjaSimpleVar "\$[a-zA-Z0-9_-]\+"
|
||||
syn match ninjaVar "\${[a-zA-Z0-9_.-]\+}"
|
||||
@@ -70,6 +71,7 @@ hi def link ninjaComment Comment
|
||||
hi def link ninjaKeyword Keyword
|
||||
hi def link ninjaRuleCommand Statement
|
||||
hi def link ninjaPoolCommand Statement
|
||||
hi def link ninjaDollar ninjaOperator
|
||||
hi def link ninjaWrapLineOperator ninjaOperator
|
||||
hi def link ninjaOperator Operator
|
||||
hi def link ninjaSimpleVar ninjaVar
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
|
||||
" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
|
||||
" Tom Payne <tom@tompayne.org>
|
||||
" Last Change: Sun May 19, 2013 05:59PM
|
||||
" Last Change: Wed Jul 09, 2014 10:29PM
|
||||
" Filenames: *.R *.r *.Rhistory *.Rt
|
||||
"
|
||||
" NOTE: The highlighting of R functions is defined in the
|
||||
@@ -30,14 +30,16 @@ endif
|
||||
syn case match
|
||||
|
||||
" Comment
|
||||
syn match rComment contains=@Spell "#.*"
|
||||
syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):"
|
||||
syn match rComment contains=@Spell,rCommentTodo "#.*"
|
||||
|
||||
" Roxygen
|
||||
syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)"
|
||||
syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)"
|
||||
syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
|
||||
syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\)"
|
||||
syn match rOKeyword contained "@\(method\|nord\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
|
||||
syn match rOKeyword contained "@\(method\|noRd\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
|
||||
syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritsParams\)"
|
||||
syn match rOComment contains=@Spell,rOKeyword "#'.*"
|
||||
|
||||
|
||||
@@ -119,7 +121,7 @@ if &filetype != "rmd" && &filetype != "rrst"
|
||||
else
|
||||
syn match rOperator "[|!<>^~`/:]"
|
||||
endif
|
||||
syn match rOperator "%\{2}\|%\S*%"
|
||||
syn match rOperator "%\{2}\|%\S\{-}%"
|
||||
syn match rOpError '\*\{3}'
|
||||
syn match rOpError '//'
|
||||
syn match rOpError '&&&'
|
||||
@@ -164,8 +166,8 @@ syn match rLstElmt "@[a-zA-Z0-9\\._]*" contains=rDollar
|
||||
syn keyword rPreProc library require attach detach source
|
||||
|
||||
if &filetype == "rhelp"
|
||||
syn match rHelpIdent '\\method'
|
||||
syn match rHelpIdent '\\S4method'
|
||||
syn match rHelpIdent '\\method'
|
||||
syn match rHelpIdent '\\S4method'
|
||||
endif
|
||||
|
||||
" Type
|
||||
@@ -187,6 +189,7 @@ hi def link rArrow Statement
|
||||
hi def link rBoolean Boolean
|
||||
hi def link rBraceError Error
|
||||
hi def link rComment Comment
|
||||
hi def link rCommentTodo Todo
|
||||
hi def link rOComment Comment
|
||||
hi def link rComplex Number
|
||||
hi def link rConditional Conditional
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
" Language: R Help File
|
||||
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
|
||||
" Former Maintainer: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Last Change: Fri Oct 14, 2011 09:54PM
|
||||
" Version: 0.7.4
|
||||
" SVN: $Id: rhelp.vim 90 2010-11-22 10:58:11Z ranke $
|
||||
" Last Change: Wed Jul 09, 2014 10:28PM
|
||||
" Remarks: - Includes R syntax highlighting in the appropriate
|
||||
" sections if an r.vim file is in the same directory or in the
|
||||
" default debian location.
|
||||
@@ -23,6 +21,8 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
syn case match
|
||||
|
||||
" R help identifiers {{{1
|
||||
@@ -51,7 +51,12 @@ syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimi
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpIdentifier,rhelpS4method
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end="}" contains=@R
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end="}" contains=@R
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
|
||||
|
||||
if v:version > 703
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@1<!{.\{-}\\\@1<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
|
||||
else
|
||||
syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
|
||||
endif
|
||||
syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=")" contains=@R,rhelpDots
|
||||
syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end="}" contains=@R
|
||||
|
||||
@@ -127,8 +132,13 @@ syn region rhelpLink matchgroup=rhelpSection start="\\link\[.\{-}\]{" end="}" co
|
||||
syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend extend
|
||||
|
||||
" Verbatim like {{{1
|
||||
syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
|
||||
syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
|
||||
if v:version > 703
|
||||
syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
|
||||
syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
|
||||
else
|
||||
syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
|
||||
syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
|
||||
endif
|
||||
|
||||
" Type Styles {{{1
|
||||
syn match rhelpType "\\emph\>"
|
||||
@@ -200,6 +210,8 @@ syn match rhelpBraceError /[)}]/ contained
|
||||
syn match rhelpCurlyError /[)\]]/ contained
|
||||
syn match rhelpParenError /[\]}]/ contained
|
||||
|
||||
syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{"
|
||||
|
||||
" Define the default highlighting {{{1
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
@@ -233,4 +245,5 @@ if version >= 508 || !exists("did_rhelp_syntax_inits")
|
||||
endif
|
||||
|
||||
let b:current_syntax = "rhelp"
|
||||
" vim: foldmethod=marker:
|
||||
|
||||
" vim: foldmethod=marker sw=2
|
||||
|
||||
87
runtime/syntax/rmd.vim
Normal file
87
runtime/syntax/rmd.vim
Normal file
@@ -0,0 +1,87 @@
|
||||
" markdown Text with R statements
|
||||
" Language: markdown with R code chunks
|
||||
" Last Change: Wed Jul 09, 2014 10:29PM
|
||||
"
|
||||
" CONFIGURATION:
|
||||
" To highlight chunk headers as R code, put in your vimrc:
|
||||
" let rmd_syn_hl_chunk = 1
|
||||
|
||||
" for portability
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" load all of pandoc info
|
||||
runtime syntax/pandoc.vim
|
||||
if exists("b:current_syntax")
|
||||
let rmdIsPandoc = 1
|
||||
unlet b:current_syntax
|
||||
else
|
||||
let rmdIsPandoc = 0
|
||||
runtime syntax/markdown.vim
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
endif
|
||||
|
||||
" load all of the r syntax highlighting rules into @R
|
||||
syntax include @R syntax/r.vim
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
if exists("g:rmd_syn_hl_chunk")
|
||||
" highlight R code inside chunk header
|
||||
syntax match rmdChunkDelim "^[ \t]*```{r" contained
|
||||
syntax match rmdChunkDelim "}$" contained
|
||||
else
|
||||
syntax match rmdChunkDelim "^[ \t]*```{r.*}$" contained
|
||||
endif
|
||||
syntax match rmdChunkDelim "^[ \t]*```$" contained
|
||||
syntax region rmdChunk start="^[ \t]*``` *{r.*}$" end="^[ \t]*```$" contains=@R,rmdChunkDelim keepend fold
|
||||
|
||||
" also match and syntax highlight in-line R code
|
||||
syntax match rmdEndInline "`" contained
|
||||
syntax match rmdBeginInline "`r " contained
|
||||
syntax region rmdrInline start="`r " end="`" contains=@R,rmdBeginInline,rmdEndInline keepend
|
||||
|
||||
" match slidify special marker
|
||||
syntax match rmdSlidifySpecial "\*\*\*"
|
||||
|
||||
|
||||
if rmdIsPandoc == 0
|
||||
syn match rmdBlockQuote /^\s*>.*\n\(.*\n\@<!\n\)*/ skipnl
|
||||
" LaTeX
|
||||
syntax include @LaTeX syntax/tex.vim
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
" Inline
|
||||
syntax match rmdLaTeXInlDelim "\$"
|
||||
syntax match rmdLaTeXInlDelim "\\\$"
|
||||
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup
|
||||
" Region
|
||||
syntax match rmdLaTeXRegDelim "\$\$" contained
|
||||
syntax match rmdLaTeXRegDelim "\$\$latex$" contained
|
||||
syntax region rmdLaTeXRegion start="^\$\$" skip="\\\$" end="\$\$$" contains=@LaTeX,rmdLaTeXSt,rmdLaTeXRegDelim keepend
|
||||
syntax region rmdLaTeXRegion2 start="^\\\[" end="\\\]" contains=@LaTeX,rmdLaTeXSt,rmdLaTeXRegDelim keepend
|
||||
hi def link rmdLaTeXSt Statement
|
||||
hi def link rmdLaTeXInlDelim Special
|
||||
hi def link rmdLaTeXRegDelim Special
|
||||
endif
|
||||
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
syn sync match rmdSyncChunk grouphere rmdChunk "^[ \t]*``` *{r"
|
||||
|
||||
hi def link rmdChunkDelim Special
|
||||
hi def link rmdBeginInline Special
|
||||
hi def link rmdEndInline Special
|
||||
hi def link rmdBlockQuote Comment
|
||||
hi def link rmdSlidifySpecial Special
|
||||
|
||||
let b:current_syntax = "rmd"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
47
runtime/syntax/rrst.vim
Normal file
47
runtime/syntax/rrst.vim
Normal file
@@ -0,0 +1,47 @@
|
||||
" reStructured Text with R statements
|
||||
" Language: reST with R code chunks
|
||||
" Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu
|
||||
" Last Change: Wed Jul 09, 2014 10:29PM
|
||||
"
|
||||
" CONFIGURATION:
|
||||
" To highlight chunk headers as R code, put in your vimrc:
|
||||
" let rrst_syn_hl_chunk = 1
|
||||
|
||||
" for portability
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" load all of the rst info
|
||||
runtime syntax/rst.vim
|
||||
unlet b:current_syntax
|
||||
|
||||
" load all of the r syntax highlighting rules into @R
|
||||
syntax include @R syntax/r.vim
|
||||
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
" highlight R chunks
|
||||
if exists("g:rrst_syn_hl_chunk")
|
||||
" highlight R code inside chunk header
|
||||
syntax match rrstChunkDelim "^\.\. {r" contained
|
||||
syntax match rrstChunkDelim "}$" contained
|
||||
else
|
||||
syntax match rrstChunkDelim "^\.\. {r .*}$" contained
|
||||
endif
|
||||
syntax match rrstChunkDelim "^\.\. \.\.$" contained
|
||||
syntax region rrstChunk start="^\.\. {r.*}$" end="^\.\. \.\.$" contains=@R,rrstChunkDelim keepend transparent fold
|
||||
|
||||
" also highlight in-line R code
|
||||
syntax match rrstInlineDelim "`" contained
|
||||
syntax match rrstInlineDelim ":r:" contained
|
||||
syntax region rrstInline start=":r: *`" skip=/\\\\\|\\`/ end="`" contains=@R,rrstInlineDelim keepend
|
||||
|
||||
hi def link rrstChunkDelim Special
|
||||
hi def link rrstInlineDelim Special
|
||||
|
||||
let b:current_syntax = "rrst"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
@@ -2,10 +2,10 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Jul 02, 2013
|
||||
" Version: 131
|
||||
" Last Change: Mar 20, 2014
|
||||
" Version: 132
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr)
|
||||
|
||||
" For version 5.x: Clear all syntax items {{{1
|
||||
@@ -151,18 +151,18 @@ endif
|
||||
" Error Codes: {{{1
|
||||
" ============
|
||||
if !exists("g:sh_no_error")
|
||||
syn match shDoError "\<done\>"
|
||||
syn match shIfError "\<fi\>"
|
||||
syn match shInError "\<in\>"
|
||||
syn match shCaseError ";;"
|
||||
syn match shEsacError "\<esac\>"
|
||||
syn match shCurlyError "}"
|
||||
syn match shParenError ")"
|
||||
syn match shOK '\.\(done\|fi\|in\|esac\)'
|
||||
syn match shDoError "\<done\>"
|
||||
syn match shIfError "\<fi\>"
|
||||
syn match shInError "\<in\>"
|
||||
syn match shCaseError ";;"
|
||||
syn match shEsacError "\<esac\>"
|
||||
syn match shCurlyError "}"
|
||||
syn match shParenError ")"
|
||||
syn match shOK '\.\(done\|fi\|in\|esac\)'
|
||||
if exists("b:is_kornshell")
|
||||
syn match shDTestError "]]"
|
||||
syn match shDTestError "]]"
|
||||
endif
|
||||
syn match shTestError "]"
|
||||
syn match shTestError "]"
|
||||
endif
|
||||
|
||||
" Options: {{{1
|
||||
@@ -321,12 +321,12 @@ elseif !exists("g:sh_no_error")
|
||||
endif
|
||||
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
"syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial,shComment
|
||||
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
|
||||
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
|
||||
"syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial,shComment
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial
|
||||
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
|
||||
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shMoreSpecial
|
||||
|
||||
" Comments: {{{1
|
||||
"==========
|
||||
@@ -363,9 +363,9 @@ elseif s:sh_fold_heredoc
|
||||
syn region shHereDoc matchgroup=shRedir19 fold start="<<\\\z([^ \t|]*\)" matchgroup=shRedir19 end="^\z1\s*$"
|
||||
|
||||
else
|
||||
syn region shHereDoc matchgroup=shRedir20 start="<<\s*\\\=\z([^ \t|]*\)" matchgroup=shRedir20 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir20 start="<<\s*\\\=\z([^ \t|]*\)" matchgroup=shRedir20 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir21 start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir21 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir22 start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir22 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir22 start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir22 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir23 start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shRedir23 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir24 start="<<\s*'\z([^ \t|]*\)'" matchgroup=shRedir24 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir25 start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir25 end="^\s*\z1\s*$"
|
||||
@@ -450,21 +450,21 @@ syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@s
|
||||
syn match shDerefVar contained "{\@<=\k\+" nextgroup=@shDerefVarList
|
||||
|
||||
" sh ksh bash : ${var[... ]...} array reference: {{{1
|
||||
syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError
|
||||
syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError
|
||||
|
||||
" Special ${parameter OPERATOR word} handling: {{{1
|
||||
" sh ksh bash : ${parameter:-word} word is default value
|
||||
" sh ksh bash : ${parameter:=word} assign word as default value
|
||||
" sh ksh bash : ${parameter:?word} display word if parameter is null
|
||||
" sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing
|
||||
" ksh bash : ${parameter#pattern} remove small left pattern
|
||||
" ksh bash : ${parameter##pattern} remove large left pattern
|
||||
" ksh bash : ${parameter%pattern} remove small right pattern
|
||||
" ksh bash : ${parameter%%pattern} remove large right pattern
|
||||
" bash : ${parameter^pattern} Case modification
|
||||
" bash : ${parameter^^pattern} Case modification
|
||||
" bash : ${parameter,pattern} Case modification
|
||||
" bash : ${parameter,,pattern} Case modification
|
||||
" sh ksh bash : ${parameter:-word} word is default value
|
||||
" sh ksh bash : ${parameter:=word} assign word as default value
|
||||
" sh ksh bash : ${parameter:?word} display word if parameter is null
|
||||
" sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing
|
||||
" ksh bash : ${parameter#pattern} remove small left pattern
|
||||
" ksh bash : ${parameter##pattern} remove large left pattern
|
||||
" ksh bash : ${parameter%pattern} remove small right pattern
|
||||
" ksh bash : ${parameter%%pattern} remove large right pattern
|
||||
" bash : ${parameter^pattern} Case modification
|
||||
" bash : ${parameter^^pattern} Case modification
|
||||
" bash : ${parameter,pattern} Case modification
|
||||
" bash : ${parameter,,pattern} Case modification
|
||||
syn cluster shDerefPatternList contains=shDerefPattern,shDerefString
|
||||
if !exists("g:sh_no_error")
|
||||
syn match shDerefOpError contained ":[[:punct:]]"
|
||||
@@ -598,6 +598,7 @@ hi def link shSetOption shOption
|
||||
hi def link shSingleQuote shString
|
||||
hi def link shSource shOperator
|
||||
hi def link shStringSpecial shSpecial
|
||||
hi def link shStringSpecial Unique
|
||||
hi def link shSubShRegion shOperator
|
||||
hi def link shTestOpr shConditional
|
||||
hi def link shTestPattern shString
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: TeX
|
||||
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
|
||||
" Last Change: Jun 24, 2013
|
||||
" Version: 79
|
||||
" Last Change: Mar 20, 2014
|
||||
" Version: 81
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
|
||||
"
|
||||
" Notes: {{{1
|
||||
@@ -28,6 +28,16 @@
|
||||
" lexical error-checking will be done.
|
||||
"
|
||||
" ie. let g:tex_no_error=1
|
||||
"
|
||||
" 6. Please see :help latex-syntax for information on
|
||||
" syntax folding :help tex-folding
|
||||
" spell checking :help tex-nospell
|
||||
" commands and mathzones :help tex-runon
|
||||
" new command highlighting :help tex-morecommands
|
||||
" error highlighting :help tex-error
|
||||
" new math groups :help tex-math
|
||||
" new styles :help tex-style
|
||||
" using conceal mode :help tex-conceal
|
||||
|
||||
" Version Clears: {{{1
|
||||
" For version 5.x: Clear all syntax items
|
||||
@@ -139,7 +149,7 @@ else
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher
|
||||
endif
|
||||
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
|
||||
syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter
|
||||
if !exists("tex_no_math")
|
||||
syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ
|
||||
@@ -1144,7 +1154,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
else
|
||||
fun! s:Accents(chr,...)
|
||||
let i= 1
|
||||
for accent in ["`","\\'","^",'"','\~','\.',"c","H","k","r","u","v"]
|
||||
for accent in ["`","\\'","^",'"','\~','\.','=',"c","H","k","r","u","v"]
|
||||
if i > a:0
|
||||
break
|
||||
endif
|
||||
@@ -1160,46 +1170,46 @@ if has("conceal") && &enc == 'utf-8'
|
||||
let i= i + 1
|
||||
endfor
|
||||
endfun
|
||||
" \` \' \^ \" \~ \. \c \H \k \r \u \v
|
||||
call s:Accents('a','à','á','â','ä','ã','ȧ',' ',' ','ą','å','ă','ă')
|
||||
call s:Accents('A','À','Á','Â','Ä','Ã','Ȧ',' ',' ','Ą','Å','Ă','Ă')
|
||||
call s:Accents('c',' ','ć','ĉ',' ',' ','ċ','ç',' ',' ',' ',' ','č')
|
||||
call s:Accents('C',' ','Ć','Ĉ',' ',' ','Ċ','Ç',' ',' ',' ',' ','Č')
|
||||
call s:Accents('d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ď')
|
||||
call s:Accents('D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ď')
|
||||
call s:Accents('e','è','é','ê','ë','ẽ','ė','ȩ',' ','ę',' ','ĕ','ě')
|
||||
call s:Accents('E','È','É','Ê','Ë','Ẽ','Ė','Ȩ',' ','Ę',' ','Ĕ','Ě')
|
||||
call s:Accents('g',' ','ǵ','ĝ',' ',' ','ġ','ģ',' ',' ',' ','ğ',' ')
|
||||
call s:Accents('G',' ','Ǵ','Ĝ',' ',' ','Ġ','Ģ',' ',' ',' ','Ğ',' ')
|
||||
call s:Accents('h',' ',' ','ĥ',' ',' ',' ',' ',' ',' ',' ',' ','ȟ')
|
||||
call s:Accents('H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ȟ')
|
||||
call s:Accents('i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ','ĭ',' ')
|
||||
call s:Accents('I','Ì','Í','Î','Ï','Ĩ','İ',' ',' ',' ',' ','Ĭ',' ')
|
||||
call s:Accents('J',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ǰ')
|
||||
call s:Accents('k',' ',' ',' ',' ',' ',' ','ķ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('K',' ',' ',' ',' ',' ',' ','Ķ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('l',' ','ĺ','ľ',' ',' ',' ','ļ',' ',' ',' ',' ','ľ')
|
||||
call s:Accents('L',' ','Ĺ','Ľ',' ',' ',' ','Ļ',' ',' ',' ',' ','Ľ')
|
||||
call s:Accents('n',' ','ń',' ',' ','ñ',' ','ņ',' ',' ',' ',' ','ň')
|
||||
call s:Accents('N',' ','Ń',' ',' ','Ñ',' ','Ņ',' ',' ',' ',' ','Ň')
|
||||
call s:Accents('o','ò','ó','ô','ö','õ','ȯ',' ','ő','ǫ',' ','ŏ',' ')
|
||||
call s:Accents('O','Ò','Ó','Ô','Ö','Õ','Ȯ',' ','Ő','Ǫ',' ','Ŏ',' ')
|
||||
call s:Accents('r',' ','ŕ',' ',' ',' ',' ','ŗ',' ',' ',' ',' ','ř')
|
||||
call s:Accents('R',' ','Ŕ',' ',' ',' ',' ','Ŗ',' ',' ',' ',' ','Ř')
|
||||
call s:Accents('s',' ','ś','ŝ',' ',' ',' ','ş',' ','ȿ',' ',' ','š')
|
||||
call s:Accents('S',' ','Ś','Ŝ',' ',' ',' ','Ş',' ',' ',' ',' ','Š')
|
||||
call s:Accents('t',' ',' ',' ',' ',' ',' ','ţ',' ',' ',' ',' ','ť')
|
||||
call s:Accents('T',' ',' ',' ',' ',' ',' ','Ţ',' ',' ',' ',' ','Ť')
|
||||
call s:Accents('u','ù','ú','û','ü','ũ',' ',' ','ű','ų','ů','ŭ','ǔ')
|
||||
call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ',' ','Ű','Ų','Ů','Ŭ','Ǔ')
|
||||
call s:Accents('w',' ',' ','ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('W',' ',' ','Ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('y','ỳ','ý','ŷ','ÿ','ỹ',' ',' ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('Y','Ỳ','Ý','Ŷ','Ÿ','Ỹ',' ',' ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('z',' ','ź',' ',' ',' ','ż',' ',' ',' ',' ',' ','ž')
|
||||
call s:Accents('Z',' ','Ź',' ',' ',' ','Ż',' ',' ',' ',' ',' ','Ž')
|
||||
call s:Accents('\\i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ','ĭ',' ')
|
||||
" \` \' \^ \" \~ \. \c \H \k \r \u \v
|
||||
" \` \' \^ \" \~ \. \= \c \H \k \r \u \v
|
||||
call s:Accents('a','à','á','â','ä','ã','ȧ','ā',' ',' ','ą','å','ă','ǎ')
|
||||
call s:Accents('A','À','Á','Â','Ä','Ã','Ȧ','Ā',' ',' ','Ą','Å','Ă','Ǎ')
|
||||
call s:Accents('c',' ','ć','ĉ',' ',' ','ċ',' ','ç',' ',' ',' ',' ','č')
|
||||
call s:Accents('C',' ','Ć','Ĉ',' ',' ','Ċ',' ','Ç',' ',' ',' ',' ','Č')
|
||||
call s:Accents('d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ď')
|
||||
call s:Accents('D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ď')
|
||||
call s:Accents('e','è','é','ê','ë','ẽ','ė','ē','ȩ',' ','ę',' ','ĕ','ě')
|
||||
call s:Accents('E','È','É','Ê','Ë','Ẽ','Ė','Ē','Ȩ',' ','Ę',' ','Ĕ','Ě')
|
||||
call s:Accents('g',' ','ǵ','ĝ',' ',' ','ġ',' ','ģ',' ',' ',' ','ğ','ǧ')
|
||||
call s:Accents('G',' ','Ǵ','Ĝ',' ',' ','Ġ',' ','Ģ',' ',' ',' ','Ğ','Ǧ')
|
||||
call s:Accents('h',' ',' ','ĥ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ȟ')
|
||||
call s:Accents('H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ȟ')
|
||||
call s:Accents('i','ì','í','î','ï','ĩ','į','ī',' ',' ','į',' ','ĭ','ǐ')
|
||||
call s:Accents('I','Ì','Í','Î','Ï','Ĩ','İ','Ī',' ',' ','Į',' ','Ĭ','Ǐ')
|
||||
call s:Accents('J',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ǰ')
|
||||
call s:Accents('k',' ',' ',' ',' ',' ',' ',' ','ķ',' ',' ',' ',' ','ǩ')
|
||||
call s:Accents('K',' ',' ',' ',' ',' ',' ',' ','Ķ',' ',' ',' ',' ','Ǩ')
|
||||
call s:Accents('l',' ','ĺ','ľ',' ',' ',' ',' ','ļ',' ',' ',' ',' ','ľ')
|
||||
call s:Accents('L',' ','Ĺ','Ľ',' ',' ',' ',' ','Ļ',' ',' ',' ',' ','Ľ')
|
||||
call s:Accents('n',' ','ń',' ',' ','ñ',' ',' ','ņ',' ',' ',' ',' ','ň')
|
||||
call s:Accents('N',' ','Ń',' ',' ','Ñ',' ',' ','Ņ',' ',' ',' ',' ','Ň')
|
||||
call s:Accents('o','ò','ó','ô','ö','õ','ȯ','ō',' ','ő','ǫ',' ','ŏ','ǒ')
|
||||
call s:Accents('O','Ò','Ó','Ô','Ö','Õ','Ȯ','Ō',' ','Ő','Ǫ',' ','Ŏ','Ǒ')
|
||||
call s:Accents('r',' ','ŕ',' ',' ',' ',' ',' ','ŗ',' ',' ',' ',' ','ř')
|
||||
call s:Accents('R',' ','Ŕ',' ',' ',' ',' ',' ','Ŗ',' ',' ',' ',' ','Ř')
|
||||
call s:Accents('s',' ','ś','ŝ',' ',' ',' ',' ','ş',' ','ȿ',' ',' ','š')
|
||||
call s:Accents('S',' ','Ś','Ŝ',' ',' ',' ',' ','Ş',' ',' ',' ',' ','Š')
|
||||
call s:Accents('t',' ',' ',' ',' ',' ',' ',' ','ţ',' ',' ',' ',' ','ť')
|
||||
call s:Accents('T',' ',' ',' ',' ',' ',' ',' ','Ţ',' ',' ',' ',' ','Ť')
|
||||
call s:Accents('u','ù','ú','û','ü','ũ',' ','ū',' ','ű','ų','ů','ŭ','ǔ')
|
||||
call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ','Ū',' ','Ű','Ų','Ů','Ŭ','Ǔ')
|
||||
call s:Accents('w',' ',' ','ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('W',' ',' ','Ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('y','ỳ','ý','ŷ','ÿ','ỹ',' ',' ',' ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('Y','Ỳ','Ý','Ŷ','Ÿ','Ỹ',' ',' ',' ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('z',' ','ź',' ',' ',' ','ż',' ',' ',' ',' ',' ',' ','ž')
|
||||
call s:Accents('Z',' ','Ź',' ',' ',' ','Ż',' ',' ',' ',' ',' ',' ','Ž')
|
||||
call s:Accents('\\i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ',' ','ĭ',' ')
|
||||
" \` \' \^ \" \~ \. \= \c \H \k \r \u \v
|
||||
delfun s:Accents
|
||||
syn match texAccent '\\aa\>' conceal cchar=å
|
||||
syn match texAccent '\\AA\>' conceal cchar=Å
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 7.4 script
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Aug 16, 2013
|
||||
" Version: 7.4-1
|
||||
" Last Change: Mar 20, 2014
|
||||
" Version: 7.4-27
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" Quit when a syntax file was already loaded {{{2
|
||||
@@ -14,40 +14,40 @@ set cpo&vim
|
||||
|
||||
" vimTodo: contains common special-notices for comments {{{2
|
||||
" Use the vimCommentGroup cluster to add your own.
|
||||
syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained a arga[dd] ar[gs] bar bn[ext] breaka[dd] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cmdname cnf com con[tinue] cq[uit] cw[indow] delc[ommand] diffg[et] diffpu[t] dig[raphs] dr[op] earlier el[se] endfo[r] ene[w] filename fin[d] folddoc[losed] fu[nction] gui helpg[rep] ia in j[oin] kee[pmarks] laddf[ile] lb[uffer] le[ft] lgetb[uffer] l[ist] lN lNf lo[adview] lpf[ile] luado mak[e] menut[ranslate] mks[ession] mod[e] n new noautocmd on[ly] pc[lose] popu p[rint] promptr[epl] ptn pts[elect] py[thon] quote redi[r] res[ize] ru rv[iminfo] sbf[irst] sbr[ewind] scscope sfir[st] sim[alt] sme snoreme spe spellw[rong] star st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] XMLent xunme
|
||||
syn keyword vimCommand contained ab argd[elete] argu[ment] bd[elete] bN[ext] breakd[el] buf c cal[l] ce[nter] cg[etfile] cl cn cNf comc[lear] cope[n] cr[ewind] d d[elete] diffo diffsplit di[splay] ds[earch] ec elsei[f] endfun ex files fini[sh] foldd[oopen] g gvim helpt[ags] iabc[lear] index ju[mps] l lan lc[d] lefta[bove] lgete[xpr] ll lne lnf[ile] locale lp[revious] luafile Man mes mksp[ell] m[ove] N n[ext] noh[lsearch] o[pen] pe popu[p] P[rint] ps[earch] ptN pu[t] python3 r red[o] ret[ab] rub[y] sal[l] sbl[ast] sb[uffer] se[t] sh[ell] sl smenu snoremenu spelld[ump] sp[lit] start stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] XMLns xunmenu
|
||||
syn keyword vimCommand contained abc[lear] argdo as[cii] bel[owright] bo[tright] breakl[ist] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cN cnf[ile] comment co[py] cs de delf diffoff difft dj[ump] dsp[lit] echoe[rr] em[enu] endf[unction] exi[t] filet fir[st] foldo[pen] get h hi if intro k la lan[guage] lch[dir] let@ lg[etfile] lla[st] lnew[er] lNf[ile] loc[kmarks] lr[ewind] lv[imgrep] ma[rk] messages mkv mv nbc[lose] N[ext] nu[mber] opt[ions] ped[it] pp[op] pro pta[g] ptn[ext] pw[d] q re redr[aw] retu[rn] rubyd[o] san[dbox] sbm[odified] scrip setf[iletype] si sla[st] sn[ext] s@\n@\=\r" spe[llgood] spr[evious] startg[replace] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xnoreme xwininfo
|
||||
syn keyword vimCommand contained abo[veleft] arge[dit] au bf[irst] bp[revious] br[ewind] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cnew[er] cNf[ile] comp[iler] count cscope debug delf[unction] DiffOrig diffthis dl[ist] dwim echom[sg] emenu* en[dif] exu[sage] filetype fix[del] for go[to] ha[rdcopy] hid[e] ij[ump] is[earch] keepa lad la[st] lcl[ose] lex[pr] lgr[ep] lli[st] lne[xt] lo lockv[ar] ls lvimgrepa[dd] marks mk mkvie[w] mz nb[key] nkf o ownsyntax pe[rl] pr profd[el] ptf[irst] ptN[ext] py qa[ll] r[ead] redraws[tatus] rew[ind] rubyf[ile] sa[rgument] sbn[ext] scripte[ncoding] setg[lobal] sig sl[eep] sN[ext] so spelli[nfo] sre[wind] star[tinsert] sun[hide] sw[apname] synlist tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] TOhtml try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xnoremenu y[ank]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] bad[d] bl[ast] br bro[wse] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cn[ext] col[der] con cpf[ile] cstag debugg[reedy] delm[arks] diffp diffu[pdate] do e echon en endt[ry] f fin fo[ld] fu gr[ep] h[elp] his[tory] il[ist] isp[lit] keepalt laddb[uffer] lat lcs lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lol[der] lt[ag] lw[indow] mat[ch] mkdir mkv[imrc] mzf[ile] nbs[tart] nmapc[lear] ol[dfiles] p perld[o] pre[serve] prof[ile] ptj[ump] ptp[revious] py3 q[uit] rec[over] reg[isters] ri[ght] rundo sav[eas] sbN[ext] scrip[tnames] setl[ocal] sign sm[agic] sni[ff] sor[t] spellr[epall] st startr[eplace] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xterm errormsg
|
||||
syn keyword vimCommand contained ar argl[ocal] ba[ll] bm[odified] brea[k] browseset bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cN[ext] colo[rscheme] conf[irm] cp[revious] cuna[bbrev] del di diffpatch dig doau ea e[dit] endf endw[hile] f[ile] fina[lly] foldc[lose] fun grepa[dd] helpf[ind] i imapc[lear] iuna[bbrev] keepj[umps] lad[dexpr] later lcscope lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lop[en] lua ma menut mk[exrc] mo mz[scheme] ne noa omapc[lear] P po[p] prev[ious] promptf[ind] ptl[ast] ptr[ewind] pyf[ile] quita[ll] red Ren rightb[elow] ru[ntime] sba[ll] sbp[revious] scs sf[ind] sil[ent] sm[ap] sno[magic] so[urce] spellu[ndo] sta[g] stj[ump]
|
||||
syn keyword vimCommand contained a arga[dd] ar[gs] bd[elete] bN[ext] breakd[el] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] r[ead] redr[aw] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu
|
||||
syn keyword vimCommand contained ab argd[elete] argu[ment] bel[owright] bo[tright] breakl[ist] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] rec[over] redraws[tatus] rew[ind] rubyd[o] sal[l] sbf[irst] sbp[revious] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme
|
||||
syn keyword vimCommand contained abc[lear] argdo as[cii] bf[irst] bp[revious] br[ewind] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] red reg[isters] ri[ght] rubyf[ile] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] arge[dit] au bl[ast] br bro[wse] bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r redi[r] res[ize] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo
|
||||
syn keyword vimCommand contained al[l] argg[lobal] bad[d] bm[odified] brea[k] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re red[o] ret[ab] ru ru[ntime] sav[eas] sbn[ext] scrip se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank]
|
||||
syn keyword vimCommand contained ar argl[ocal] ba[ll] bn[ext] breaka[dd] buf c cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q
|
||||
syn match vimCommand contained "\<z[-+^.=]\="
|
||||
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
|
||||
|
||||
" vimOptions are caught only when contained in a vimSet {{{2
|
||||
syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cd ci cinw co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imd include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw remap rl ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tpm ttimeoutlen ttymouse udf undoreload vbs vi vop wcm whichwrap wildignore winaltkeys winminwidth wmnu write
|
||||
syn keyword vimOption contained ai ambw ari aw backupext beval biosk brk buflisted cdpath cin cinwords cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fileencoding fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imdisable includeexpr inf isident key langmap lines lmap ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe report rlc ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm tr ttm ttyscroll udir updatecount vdir viewdir wa wd wi wildignorecase window winwidth wmw writeany
|
||||
syn keyword vimOption contained akm anti arshape awa backupskip bex bioskey browsedir buftype cedit cindent clipboard cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencodings flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imi incsearch infercase isk keymap langmenu linespace loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape restorescreen rnu rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to ts tty ttytype ul updatetime ve viewoptions wak weirdinvert wic wildmenu winfixheight wiv wop writebackup
|
||||
syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bs casemap cf cink cmdheight colorcolumn completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileformat fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatekey iminsert inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt revins ro runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsl ttybuiltin tw undodir ur verbose viminfo warn wfh wig wildmode winfixwidth wiw wrap writedelay
|
||||
syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformats fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imak ims indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt readonly ri rs sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term tf titlelen toolbariconsize tsr ttyfast tx undofile ut verbosefile virtualedit wb wfw wildchar wildoptions winheight wm wrapmargin ws
|
||||
syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imc imsearch indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight redrawtime rightleft rtp sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeout ttym uc undolevels vb vfile visualbell wc wh wildcharm wim winminheight wmh wrapscan ww
|
||||
syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imcmdline inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh relativenumber rightleftcmd ru sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tbi termencoding thesaurus titlestring
|
||||
syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cd ci cinw co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap lines lmap ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe relativenumber rightleftcmd ru sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tbi termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wcm whichwrap wildignore winaltkeys winminwidth wmnu write
|
||||
syn keyword vimOption contained ai ambw ari aw backupext beval biosk brk buflisted cdpath cin cinwords cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu linespace loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape remap rl ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tr tty tw undofile vb vi wa wd wi wildignorecase window winwidth wmw writeany
|
||||
syn keyword vimOption contained akm anti arshape awa backupskip bex bioskey browsedir buftype cedit cindent clipboard cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt report rlc ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak weirdinvert wic wildmenu winfixheight wiv wop writebackup
|
||||
syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bs casemap cf cink cmdheight colorcolumn completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt re restorescreen rnu rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfh wig wildmode winfixwidth wiw wrap writedelay
|
||||
syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight readonly revins ro runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wfw wildchar wildoptions winheight wm wrapmargin ws
|
||||
syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh redrawtime ri rs sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc wh wildcharm wim winminheight wmh wrapscan ww
|
||||
syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw regexpengine rightleft rtp sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell
|
||||
|
||||
" vimOptions: These are the turn-off setting variants {{{2
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscopetag nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noesckeys noex noexrc nofk nofoldenable nogdefault nohid nohk nohkmapp nohls noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast novb nowa nowb nowfh nowildignorecase* * nowinfixheight nowiv nowrap nowrite nowritebackup
|
||||
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocscopeverbose nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noet noexpandtab nofen nofkmap nogd noguipty nohidden nohkmap nohkp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx novisualbell nowarn noweirdinvert nowfw nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
|
||||
syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocst nocul nocursorline nodg noea noedcompatible noeol
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofk nogd nohid nohkmap nohkp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
|
||||
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofkmap nogdefault nohidden nohkmapp nohls noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
|
||||
syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofoldenable noguipty nohk
|
||||
|
||||
" vimOptions: These are the invertible variants {{{2
|
||||
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscopetag invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invesckeys invex invexrc invfk invfoldenable invgdefault invhid invhk invhkmapp invhls invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invvb invwa invwb invwfh invwildignorecase* * invwinfixheight invwiv invwrap invwrite invwritebackup
|
||||
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invcf invcindent invconsk invcp invcscopeverbose invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invet invexpandtab invfen invfkmap invgd invguipty invhidden invhkmap invhkp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invvisualbell invwarn invweirdinvert invwfw invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcst invcul invcursorline invdg invea invedcompatible inveol
|
||||
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfk invgd invhid invhkmap invhkp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup
|
||||
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invcf invcindent invconsk invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfkmap invgdefault invhidden invhkmapp invhls invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfoldenable invguipty invhk
|
||||
|
||||
" termcap codes (which can also be set) {{{2
|
||||
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_cs t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm
|
||||
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs
|
||||
syn match vimOption contained "t_%1"
|
||||
syn match vimOption contained "t_#2"
|
||||
syn match vimOption contained "t_#4"
|
||||
@@ -62,20 +62,20 @@ syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
|
||||
|
||||
" AutoCmd Events {{{2
|
||||
syn case ignore
|
||||
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
|
||||
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse TextChanged TextChangedI User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
|
||||
|
||||
" Highlight commonly used Groupnames {{{2
|
||||
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
|
||||
|
||||
" Default highlighting groups {{{2
|
||||
syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
|
||||
syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
|
||||
syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs and argidx atan browsedir bufloaded bufwinnr call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_read remove repeat reverse search searchpair searchpos serverlist setcmdpos setloclist setpos setreg settabwinvar shellescape simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagenr tagfiles tan tempname toupper trunc undofile values visualmode wincol winline winrestcmd winsaveview writefile
|
||||
syn keyword vimFuncName contained acos append argv atan2 bufexists bufname byte2line ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchend max mode nr2char pow pumvisible range reltimestr remote_peek remote_send rename resolve round searchdecl searchpairpos server2client setbufvar setline setmatches setqflist settabvar setwinvar shiftwidth sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree virtcol winbufnr winheight winnr winrestview winwidth xor
|
||||
syn keyword vimFuncName contained add argc asin browse buflisted bufnr byteidx changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matcharg matchlist min mzeval or prevnonblank py3eval readfile remote_expr
|
||||
syn keyword vimFuncName contained abs and argidx atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matcharg matchlist min mzeval or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setpos setreg settabwinvar sha256 shiftwidth sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree virtcol wildmenumode wincol winline winrestcmd winsaveview writefile
|
||||
syn keyword vimFuncName contained acos append argv atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setline setmatches setqflist settabvar setwinvar shellescape simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagenr tagfiles tan tempname toupper trunc undofile values visualmode winbufnr winheight winnr winrestview winwidth xor
|
||||
syn keyword vimFuncName contained add argc asin browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
@@ -550,31 +550,15 @@ syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' e
|
||||
" Allows users to specify the type of embedded script highlighting
|
||||
" they want: (perl/python/ruby/tcl support)
|
||||
" g:vimsyn_embed == 0 : don't embed any scripts
|
||||
" g:vimsyn_embed ~= 'l' : embed lua
|
||||
" g:vimsyn_embed ~= 'm' : embed mzscheme
|
||||
" g:vimsyn_embed ~= 'p' : embed perl
|
||||
" g:vimsyn_embed ~= 'P' : embed python
|
||||
" g:vimsyn_embed ~= 'r' : embed ruby
|
||||
" g:vimsyn_embed ~= 't' : embed tcl
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
" apparently has("tcl") has been hanging vim on some windows systems with cygwin
|
||||
let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$')
|
||||
else
|
||||
let s:trytcl= 1
|
||||
endif
|
||||
" g:vimsyn_embed ~= 'l' : embed lua (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'm' : embed mzscheme (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'p' : embed perl (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'P' : embed python (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'r' : embed ruby (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 't' : embed tcl (but only if vim supports it)
|
||||
if !exists("g:vimsyn_embed")
|
||||
let g:vimsyn_embed= ""
|
||||
if has("lua") |let g:vimsyn_embed= g:vimsyn_embed."l"|endif
|
||||
if has("mzscheme") |let g:vimsyn_embed= g:vimsyn_embed."m"|endif
|
||||
if has("perl") |let g:vimsyn_embed= g:vimsyn_embed."p"|endif
|
||||
if has("python") |let g:vimsyn_embed= g:vimsyn_embed."P"
|
||||
elseif has("python3")|let g:vimsyn_embed= g:vimsyn_embed."P"|endif
|
||||
if has("ruby") |let g:vimsyn_embed= g:vimsyn_embed."r"|endif
|
||||
if s:trytcl
|
||||
if has("tcl") |let g:vimsyn_embed= g:vimsyn_embed."t"|endif
|
||||
endif
|
||||
let g:vimsyn_embed= "lmpPr"
|
||||
endif
|
||||
unlet s:trytcl
|
||||
|
||||
" [-- lua --] {{{3
|
||||
let s:luapath= fnameescape(expand("<sfile>:p:h")."/lua.vim")
|
||||
@@ -586,7 +570,7 @@ if !filereadable(s:luapath)
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
if (g:vimsyn_embed =~ 'l') && filereadable(s:luapath)
|
||||
if (g:vimsyn_embed =~ 'l' && has("lua")) && filereadable(s:luapath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimLuaScript ".s:luapath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'l'
|
||||
@@ -613,7 +597,7 @@ if !filereadable(s:perlpath)
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
if (g:vimsyn_embed =~ 'p') && filereadable(s:perlpath)
|
||||
if (g:vimsyn_embed =~ 'p' && has("perl")) && filereadable(s:perlpath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimPerlScript ".s:perlpath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'p'
|
||||
@@ -640,7 +624,7 @@ if !filereadable(s:rubypath)
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
if (g:vimsyn_embed =~ 'r') && filereadable(s:rubypath)
|
||||
if (g:vimsyn_embed =~ 'r' && has("ruby")) && filereadable(s:rubypath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimRubyScript ".s:rubypath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'r'
|
||||
@@ -666,7 +650,7 @@ if !filereadable(s:pythonpath)
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
if g:vimsyn_embed =~ 'P' && filereadable(s:pythonpath)
|
||||
if g:vimsyn_embed =~ 'P' && (has("python") || has("python3")) && filereadable(s:pythonpath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimPythonScript ".s:pythonpath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'P'
|
||||
@@ -684,31 +668,43 @@ endif
|
||||
unlet s:pythonpath
|
||||
|
||||
" [-- tcl --] {{{3
|
||||
let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim")
|
||||
if !filereadable(s:tclpath)
|
||||
for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n")
|
||||
if filereadable(fnameescape(s:tclpath))
|
||||
let s:tclpath= fnameescape(s:tclpath)
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
" apparently has("tcl") has been hanging vim on some windows systems with cygwin
|
||||
let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$')
|
||||
else
|
||||
let s:trytcl= 1
|
||||
endif
|
||||
if (g:vimsyn_embed =~ 't') && filereadable(s:tclpath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimTclScript ".s:tclpath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 't'
|
||||
syn region vimTclRegion fold matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
|
||||
syn region vimTclRegion fold matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
|
||||
else
|
||||
syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
|
||||
syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
|
||||
if s:trytcl
|
||||
let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim")
|
||||
if !filereadable(s:tclpath)
|
||||
for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n")
|
||||
if filereadable(fnameescape(s:tclpath))
|
||||
let s:tclpath= fnameescape(s:tclpath)
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
syn cluster vimFuncBodyList add=vimTclScript
|
||||
if (g:vimsyn_embed =~ 't' && has("tcl")) && filereadable(s:tclpath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimTclScript ".s:tclpath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 't'
|
||||
syn region vimTclRegion fold matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
|
||||
syn region vimTclRegion fold matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
|
||||
else
|
||||
syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
|
||||
syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
|
||||
endif
|
||||
syn cluster vimFuncBodyList add=vimTclScript
|
||||
else
|
||||
syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
|
||||
syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
|
||||
endif
|
||||
unlet s:tclpath
|
||||
else
|
||||
syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
|
||||
syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
|
||||
endif
|
||||
unlet s:tclpath
|
||||
unlet s:trytcl
|
||||
|
||||
" [-- mzscheme --] {{{3
|
||||
let s:mzschemepath= fnameescape(expand("<sfile>:p:h")."/scheme.vim")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Yacc
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Nov 14, 2012
|
||||
" Version: 10
|
||||
" Last Change: Mar 20, 2014
|
||||
" Version: 11
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Options: {{{1
|
||||
@@ -42,7 +42,7 @@ exe "syn include @yaccCode ".s:Cpath
|
||||
" ---------------------------------------------------------------------
|
||||
" Yacc Clusters: {{{1
|
||||
syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam,yaccParseOption
|
||||
syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString
|
||||
syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString,yaccComment
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Yacc Sections: {{{1
|
||||
|
||||
971
runtime/tutor/tutor.sr.cp1250
Normal file
971
runtime/tutor/tutor.sr.cp1250
Normal file
@@ -0,0 +1,971 @@
|
||||
===============================================================================
|
||||
= D o b r o d o <20> l i u VIM p r i r u <20> n i k - Verzija 1.7 =
|
||||
===============================================================================
|
||||
|
||||
Vim je mo<6D>an editor sa mnogo komandi, suvi<76>e da bismo ih ovde sve
|
||||
opisali. Priru<72>nik je zami<6D>ljen da opi<70>e dovoljno komandi da biste
|
||||
mogli lagodno da koristite Vim kao editor op<6F>te namene.
|
||||
|
||||
Pribli<6C>no vreme potrebno za uspe<70>an zavr<76>etak priru<72>nika je izme<6D>u
|
||||
25 i 30 minuta, u zavisnosti od vremena potro<72>enog na ve<76>bu.
|
||||
|
||||
UPOZORENJE:
|
||||
Komande u lekcijama <20>e menjati tekst. Iskopirajte ovaj fajl i
|
||||
ve<76>bajte na kopiji (ako ste pokrenuli "vimtutor" ovo je ve<76> kopija).
|
||||
|
||||
Va<56>no je upamtiti da je ovaj priru<72>nik zami<6D>ljen za aktivnu ve<76>bu.
|
||||
To zna<6E>i da morate upotrebljavati komande o kojima <20>itate da biste
|
||||
ih nau<61>ili. Ako samo <20>itate tekst, zaboravi<76>ete komande!
|
||||
|
||||
Ako je Caps Lock uklju<6A>en ISKLJU<4A>ITE ga. Pritisnite taster j dovoljno
|
||||
puta da lekcija 1.1 cela stane na ekran.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.1: POMERANJE KURSORA
|
||||
|
||||
|
||||
** Za pomeranje kursora, pritiskajte tastere h,j,k,l kako je prikazano **
|
||||
^
|
||||
k Savet: h je s leve strane i pomera kursor u levo.
|
||||
< h l > l je s desne strane i pomera kursor u desno.
|
||||
j j izgleda kao strelica nani<6E>e.
|
||||
v
|
||||
1. Pomerajte kursor po ekranu dok se ne naviknete na komande.
|
||||
|
||||
2. Pritisnite taster (j) dok ne po<70>ne da se ponavlja.
|
||||
Sada znate kako da do<64>ete do naredne lekcije.
|
||||
|
||||
3. Koriste<74>i taster j pre<72>ite na lekciju 1.2.
|
||||
|
||||
NAPOMENA: Ako niste sigurni <20>ta ste zapravo pritisnuli, pritisnite <ESC>
|
||||
za prelazak u Normal mod i poku<6B>ajte ponovo.
|
||||
|
||||
NAPOMENA: Strelice tako<6B>e pomeraju kursor, ali kori<72><69>enje tastera hjkl je
|
||||
znatno br<62>e, kad se jednom naviknete na njih. Zaista!
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.2: IZLAZAK IZ VIM-a
|
||||
|
||||
|
||||
!! UPOZORENJE: Pre izvo<76>enja bilo kog koraka, pro<72>itajte celu lekciju!!
|
||||
|
||||
1. Pritisnite <ESC> (editor je sada u Normal modu).
|
||||
|
||||
2. Otkucajte: :q! <ENTER>.
|
||||
Ovime se izlazi iz editora, sa GUBITKOM svih izmena.
|
||||
|
||||
3. Kada se pojavi komandni prompt, unesite komandu koja je pokrenula
|
||||
ovaj priru<72>nik: vimtutor <ENTER>
|
||||
|
||||
4. Ako ste upamtili ove korake, izvr<76>ite ih redom od 1 do 3 da biste
|
||||
iza<7A>li iz editora i ponovo ga pokrenuli.
|
||||
|
||||
NAPOMENA: :q! <ENTER> poni<6E>tava sve izmene koje ste napravili.
|
||||
U narednim lekcijama nau<61>i<EFBFBD>ete kako da sa<73>uvate izmene.
|
||||
|
||||
5. Pomerite kursor na lekciju 1.3.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.3: IZMENA TEKSTA - BRISANJE
|
||||
|
||||
|
||||
** Pritisnite x za brisanje znaka pod kursorom. **
|
||||
|
||||
1. Pomerite kursor na red ozna<6E>en sa --->.
|
||||
|
||||
2. Da biste ispravili gre<72>ke, pomerajte kursor dok se
|
||||
ne na<6E>e na slovu koje treba izbrisati.
|
||||
|
||||
3. Pritisnite taster x da izbri<72>ete ne<6E>eljeno slovo.
|
||||
|
||||
4. Ponavljajte korake od 2 do 4 dok ne ispravite sve gre<72>ke.
|
||||
|
||||
---> RRRibaa riibi grizzze rrreepp.
|
||||
|
||||
5. Kad ispravite red, pre<72>ite na lekciju 1.4.
|
||||
|
||||
NAPOMENA: Dok koristite priru<72>nik, nemojte u<>iti komande napamet,
|
||||
ve<76> ve<76>bajte njihovu primenu.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.4: IZMENA TEKSTA - UBACIVANJE
|
||||
|
||||
|
||||
** Pritisnite i za ubacivanje teksta ispred kursora. **
|
||||
|
||||
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
|
||||
|
||||
2. Da biste tekst prvog reda izjedna<6E>ili s tekstom drugog, namestite
|
||||
kursor na prvi znak POSLE kog <20>ete ubaciti potreban tekst.
|
||||
|
||||
3. Pritisnite i pa unesite potrebne dopune.
|
||||
|
||||
4. Po ispravci svake gre<72>ke pritisnite <ESC> da se vratite u Normal mod.
|
||||
Ponovite korake od 2 do 4 da biste ispravili celu re<72>enicu.
|
||||
|
||||
---> Do teka neoje v red.
|
||||
---> Deo teksta nedostaje iz ovog reda.
|
||||
|
||||
5. Pre<72>ite na slede<64>u lekciju.
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.5: IZMENA TEKSTA - DODAVANJE
|
||||
|
||||
|
||||
** Pritisnite A za dodavanje teksta. **
|
||||
|
||||
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
|
||||
Nije va<76>no gde se nalazi kursor u tom redu.
|
||||
|
||||
2. Pritisnite A i unesite dodatni tekst.
|
||||
|
||||
3. Po<50>to ste dodali tekst, pritisnite <ESC> za povratak u
|
||||
Normal mod.
|
||||
|
||||
4. Pomerite kursor na drugi red ozna<6E>en sa ---> i ponavljajte
|
||||
korake 2 i 3 dok ne ispravite tekst.
|
||||
|
||||
---> Deo teksta nedostaje u
|
||||
Deo teksta nedostaje u ovom redu.
|
||||
---> Deo teksta nedostaje
|
||||
Deo teksta nedostaje i ovde.
|
||||
|
||||
5. Pre<72>ite na lekciju 1.6.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.6: IZMENA FAJLA
|
||||
|
||||
|
||||
** Upotrebite :wq za snimanje teksta i izlazak iz editora. **
|
||||
|
||||
!! UPOZORENJE: Pre izvo<76>enja bilo kog koraka, pro<72>itajte celu lekciju!!
|
||||
|
||||
1. Iza<7A>ite iz editora kao u lekciji 1.2: :q!
|
||||
|
||||
2. Na komandnom promptu unesite slede<64>u komandu: vim tutor <ENTER>
|
||||
'vim' je komanda za pokretanja Vim editora, 'tutor' je ime fajla koji
|
||||
<20>elite da menjate. Koristite fajl koji imate pravo da menjate.
|
||||
|
||||
3. Ubacujte i bri<72>ite tekst kao u prethodnim lekcijama.
|
||||
|
||||
4. Snimite izmenjeni tekst i iza<7A>ite iz Vim-a: :wq <ENTER>
|
||||
|
||||
5. Ponovo pokrenite vimtutor i pro<72>itajte rezime koji sledi.
|
||||
|
||||
6. Po<50>to pro<72>itate korake iznad i u potpunosti ih razumete:
|
||||
izvr<76>ite ih.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 1
|
||||
|
||||
|
||||
1. Kursor se pomera strelicama ili pomo<6D>u tastera hjkl .
|
||||
h (levo) j (dole) k (gore) l (desno)
|
||||
|
||||
2. Za pokretanje Vim-a iz shell-a: vim IME_FAJLA <ENTER>
|
||||
|
||||
3. Izlaz: <ESC> :q! <ENTER> sve promene su izgubljene.
|
||||
ILI: <ESC> :wq <ENTER> promene su sa<73>uvane.
|
||||
|
||||
4. Brisanje znaka na kome se nalazi kursor: x
|
||||
|
||||
5. Ubacivanja ili dodavanje teksta:
|
||||
i unesite tekst <ESC> unos ispred kursora
|
||||
A unesite tekst <ESC> dodavanje na kraju reda
|
||||
|
||||
NAPOMENA: Pritiskom na <ESC> prebacujete Vim u Normal mod i
|
||||
prekidate ne<6E>eljenu ili delimi<6D>no izvr<76>enu komandu.
|
||||
|
||||
Nastavite sa lekcijom 2.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.1: NAREDBE BRISANJA
|
||||
|
||||
|
||||
** Otkucajte dw za brisanje re<72>i. **
|
||||
|
||||
1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu.
|
||||
|
||||
2. Pomerite kursor na red ozna<6E>en sa --->.
|
||||
|
||||
3. Pomerite kursor na po<70>etak re<72>i koju treba izbrisati.
|
||||
|
||||
4. Otkucajte dw da biste uklonili re<72>.
|
||||
|
||||
NAPOMENA: Slovo d <20>e se pojaviti na dnu ekrana kad ga otkucate. Vim <20>eka
|
||||
da otkucate w . Ako je prikazano neko drugo slovo, pogre<72>ili ste u
|
||||
kucanju; pritisnite <ESC> i poku<6B>ajte ponovo. (Ako se ne pojavi
|
||||
ni<6E>ta, mo<6D>da je isklju<6A>ena opcija 'showcmd': vidi lekciju 6.5.)
|
||||
|
||||
---> Neke re<72>i sme<6D>no ne pripadaju na papir ovoj re<72>enici.
|
||||
|
||||
5. Ponavljajte korake 3 i 4 dok ne ispravite re<72>enicu, pa
|
||||
pre<72>ite na lekciju 2.2.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.2: JO<4A> BRISANJA
|
||||
|
||||
|
||||
** Otkucajte d$ za brisanje znakova do kraja reda. **
|
||||
|
||||
1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu.
|
||||
|
||||
2. Pomerite kursor na red ozna<6E>en sa --->.
|
||||
|
||||
3. Pomerite kursor do kraja ispravnog dela re<72>enice
|
||||
(POSLE prve . ).
|
||||
|
||||
4. Otkucajte d$ za brisanje ostatka reda.
|
||||
|
||||
---> Neko je uneo kraj ovog reda dvaput. kraj ovog reda dvaput.
|
||||
|
||||
5. Pre<72>ite na lekciju 2.3 za podrobnije obja<6A>njenje.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.3: O OPERATORIMA I POKRETIMA
|
||||
|
||||
|
||||
Mnoge komande za izmenu teksta sastoje se od operatora i pokreta.
|
||||
Oblik komande brisanja sa d operatorom je slede<64>i:
|
||||
|
||||
d pokret
|
||||
|
||||
Pri <20>emu je:
|
||||
d - operator brisanja.
|
||||
pokret - ono na <20>emu <20>e se operacija izvr<76>avati (opisano u nastavku).
|
||||
|
||||
Kratak spisak pokreta:
|
||||
w - sve do po<70>etka slede<64>e re<72>i, NE UKLJU<4A>UJU<4A>I prvo slovo.
|
||||
e - sve do kraja teku<6B>e re<72>i, UKLJU<4A>UJU<4A>I poslednje slovo.
|
||||
$ - sve do kraje reda, UKLJU<4A>UJU<4A>I poslednje slovo.
|
||||
|
||||
Kucanjem de brisa<73>e se tekst od kursora do kraja re<72>i.
|
||||
|
||||
NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez
|
||||
operatora, kursor se pomera kao <20>to je opisano.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.4: KORI<52><49>ENJE BROJANJA ZA POKRETE
|
||||
|
||||
|
||||
** Uno<6E>enjem nekog broja pre pokreta, pokret se izvr<76>ava taj broj puta. **
|
||||
|
||||
1. Pomerite kursor na red ozna<6E>en sa --->.
|
||||
|
||||
2. Otkucajte 2w da pomerite kursor dve re<72>i napred.
|
||||
|
||||
3. Otkucajte 3e da pomerite kursor na kraj tre<72>e re<72>i napred.
|
||||
|
||||
4. Otkucajte 0 (nulu) da pomerite kursor na po<70>etak reda.
|
||||
|
||||
5. Ponovite korake 2 i 3 s nekim drugim brojevima.
|
||||
|
||||
---> Re<52>enica sa re<72>ima po kojoj mo<6D>ete pomerati kursor.
|
||||
|
||||
6. Pre<72>ite na lekciju 2.5.
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.5: KORI<52><49>ENJE BROJANJA ZA VE<56>E BRISANJE
|
||||
|
||||
|
||||
** Uno<6E>enje nekog broja s operatorom ponavlja operator taj broj puta. **
|
||||
|
||||
U kombinaciji operatora brisanja s pokretima spomenutim iznad
|
||||
mo<6D>ete uneti broj pre pokreta da biste izbrisali vi<76>e znakova:
|
||||
|
||||
d broj pokret
|
||||
|
||||
1. Pomerite kursor na prvo slovo u re<72>i s VELIKIM SLOVIMA u redu
|
||||
ozna<6E>enom sa --->.
|
||||
|
||||
2. Otkucajte d2w da izbri<72>ete dve re<72>i sa VELIKIM SLOVIMA
|
||||
|
||||
3. Ponovite korake 1 i 2 sa razli<6C>itim brojevima da izbri<72>ete
|
||||
uzastopne re<72>i sa VELIKIM SLOVIMA kori<72><69>enjem samo jedne komande.
|
||||
|
||||
---> ovaj ABC<42><43> D<>E red FGHI JK LMN OP s re<72>ima je RS<52> TUVZ<56> ispravljen.
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.6: OPERACIJE NAD REDOVIMA
|
||||
|
||||
|
||||
** Otkucajte dd za brisanje celog reda. **
|
||||
|
||||
Zbog u<>estalosti brisanja celih redova, autori Vi-ja odlu<6C>ili su da
|
||||
je lak<61>e brisati redove ako se otkuca d dvaput.
|
||||
|
||||
1. Pomerite kursor na drugi red u donjoj strofi.
|
||||
2. Otkucajte dd da ga izbri<72>ete.
|
||||
3. Pomerite kursor na <20>etvrti red.
|
||||
4. Otkucajte 2dd da biste izbrisali dva reda.
|
||||
|
||||
---> 1) Sedlo mi je od marame,
|
||||
---> 2) blato na sve strane,
|
||||
---> 3) uzda od kanapa,
|
||||
---> 4) auto mi je ovde,
|
||||
---> 5) satovi pokazuju vreme,
|
||||
---> 6) a bi<62> mi je od o<>ina
|
||||
---> 7) prebijena <20>tapa.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.7: PONI<4E>TAVANJE PROMENA
|
||||
|
||||
|
||||
** Pritisnite u za poni<6E>tavanje poslednje komande, U za ceo red. **
|
||||
|
||||
1. Pomerite kursor na red ozna<6E>en sa ---> i postavite ga na mesto
|
||||
prve gre<72>ke.
|
||||
2. Otkucajte x da izbri<72>ete prvi ne<6E>eljeni znak.
|
||||
3. Otkucajte u da poni<6E>tite poslednju izvr<76>enu komandu.
|
||||
4. Sad ispravite sve gre<72>ke u redu koriste<74>i komandu x .
|
||||
5. Otkucajte veliko U da biste vratili sadr<64>aj reda u prvobitno
|
||||
stanje.
|
||||
6. Onda otkucajte u nekoliko puta da biste poni<6E>tili U
|
||||
i prethodne komande.
|
||||
7. Sad otkucajte CTRL-R (dr<64>e<EFBFBD>i CTRL dok pritiskate R)
|
||||
nekoliko puta da biste vratili izmene (poni<6E>tili poni<6E>tavanja).
|
||||
|
||||
---> Iiisspravite gre<72>ke uu ovvom redu ii pooni<6E>titeee ih.
|
||||
|
||||
8. Ovo su veoma korisne komande. Pre<72>ite na rezime lekcije 2.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 2
|
||||
|
||||
|
||||
1. Brisanje od kursora do slede<64>e re<72>i: dw
|
||||
2. Brisanje od kursora do kraja reda: d$
|
||||
3. Brisanje celog reda: dd
|
||||
|
||||
4. Za ponavljanje pokreta prethodno unesite broj: 2w
|
||||
5. Oblik komande za izmenu:
|
||||
operator [broj] pokret
|
||||
gde je:
|
||||
operator - <20>ta uraditi, recimo d za brisanje
|
||||
[broj] - neobavezan broj ponavljanja pokreta
|
||||
pokret - kretanje po tekstu na kome se radi,
|
||||
kao <20>to je: w (re<72>), $ (kraj reda), itd.
|
||||
|
||||
6. Pomeranje kursora na po<70>etak reda: 0
|
||||
|
||||
7. Za poni<6E>tavanje prethodnih izmena, pritisnite: u (malo u)
|
||||
Za poni<6E>tavanje svih promena u redu, pritisnite: U (veliko U)
|
||||
Za vra<72>anja promena, otkucajte: CTRL-R
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 3.1: KOMANDA POSTAVLJANJA
|
||||
|
||||
|
||||
** Otkucajte p da postavite prethodno izbrisan tekst iza kursora. **
|
||||
|
||||
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
|
||||
|
||||
2. Otkucajte dd da izbri<72>ete red i smestite ga u Vim registar.
|
||||
|
||||
3. Pomerite kursor na red c), IZNAD mesta gde treba postaviti izbrisan red.
|
||||
|
||||
4. Otkucajte p da postavite red ispod kursora.
|
||||
|
||||
5. Ponavljajte korake 2 do 4 da biste postavili sve linije u pravilnom
|
||||
redosledu.
|
||||
|
||||
---> d) prebijena <20>tapa.
|
||||
---> b) uzda od kanapa,
|
||||
---> c) a bi<62> mi je od o<>ina
|
||||
---> a) Sedlo mi je od marame,
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 3.2: KOMANDA ZAMENE
|
||||
|
||||
|
||||
** Otkucajte rx da zamenite znak ispod kursora slovom x . **
|
||||
|
||||
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
|
||||
|
||||
2. Pomerite kursor tako da se nalazi na prvoj gre<72>ci.
|
||||
|
||||
3. Otkucajte r i onda znak koji treba da tu stoji.
|
||||
|
||||
4. Ponavljajte korake 2 i 3 sve dok prvi red ne bude
|
||||
isti kao drugi.
|
||||
|
||||
---> Kedi ju ovej red uga<67>en, nako je protresao pusta<74>ne testere!
|
||||
---> Kada je ovaj red uno<6E>en, neko je pritiskao pogre<72>ne tastere!
|
||||
|
||||
5. Pre<72>ite na lekciju 3.2.
|
||||
|
||||
NAPOMENA: Setite se da treba da u<>ite ve<76>banjem, ne pam<61>enjem.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 3.3: OPERATOR IZMENE
|
||||
|
||||
|
||||
** Za izmenu teksta do kraja re<72>i, otkucajte ce .**
|
||||
|
||||
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
|
||||
|
||||
2. Postavite kursor na a u rakdur.
|
||||
|
||||
3. Otkucajte ce i ispravite re<72> (u ovom slu<6C>aju otkucajte ed ).
|
||||
|
||||
4. Pritisnite <ESC> i pomerite kursor na slede<64>i znak koji
|
||||
treba ispraviti.
|
||||
|
||||
5. Ponavljajte korake 3 i 4 sve dok prva re<72>enica ne bude ista
|
||||
kao druga.
|
||||
|
||||
---> Ovaj rakdur ima nekoliko rejga koje treflja isprpikati operagrom izmene.
|
||||
---> Ovaj red ima nekoliko re<72>i koje treba ispraviti operatorom izmene.
|
||||
|
||||
Uo<EFBFBD>ite da ce bri<72>e re<72> i postavlja editor u Insert mod.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 3.4: DALJE IZMENE UPOTREBOM c
|
||||
|
||||
|
||||
** Komanda izmene se koristi sa istim pokretima kao i brisanje. **
|
||||
|
||||
1. Operator izmene se koristi na isti na<6E>in kao i operator brisanja:
|
||||
|
||||
c [broj] pokret
|
||||
|
||||
2. Pokreti su isti, recimo: w (re<72>) i $ (kraj reda).
|
||||
|
||||
3. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
|
||||
|
||||
4. Pomerite kursor na prvu gre<72>ku.
|
||||
|
||||
5. Otkucajte c$ i unesite ostatak reda tako da bude isti kao
|
||||
drugi red, pa pritisnite <ESC>.
|
||||
|
||||
---> Kraj ovog reda treba izmeniti tako da izgleda kao red ispod.
|
||||
---> Kraj ovog reda treba ispraviti kori<72><69>enjem c$ komande.
|
||||
|
||||
NAPOMENA: Za ispravljanje gre<72>aka mo<6D>ete koristiti Backspace .
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 3
|
||||
|
||||
|
||||
1. Za postavljanje teksta koji ste upravo izbrisali, pritisnite p . Ovo
|
||||
postavlja tekst IZA kursora (ako je bio izbrisan jedan ili vi<76>e redova
|
||||
sadr<64>aj <20>e do<64>i na red ispod kursora).
|
||||
|
||||
2. Za zamenu znaka na kome se nalazi kursor, pritisnite r i onda
|
||||
<20>eljeni znak.
|
||||
|
||||
3. Operator izmene dozvoljava promenu teksta od kursora do pozicije gde
|
||||
se zavr<76>ava pokret. Primera radi, kucajte ce za izmenu od kursora do
|
||||
kraja re<72>i, ili c$ za izmenu od kursora do kraja reda.
|
||||
|
||||
4. Oblik operacije izmene je:
|
||||
|
||||
c [broj] pokret
|
||||
|
||||
Pre<EFBFBD>ite na narednu lekciju.
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 4.1: POZICIJA KURSORA I STATUS FAJLA
|
||||
|
||||
** Pritisnite CTRL-G za prikaz pozicije kursora u tekstu i status fajla.
|
||||
Pritisnite G za pomeranje kursora na neki red u tekstu. **
|
||||
|
||||
NAPOMENA: Pro<72>itajte celu lekciju pre izvo<76>enja bilo kog koraka!!
|
||||
|
||||
1. Dr<44>ite taster CTRL i pritisnite g . Ovo zovemo CTRL-G.
|
||||
Editor <20>e na dnu ekrana ispisati poruku sa imenom fajla i pozicijom
|
||||
kursora u tekstu. Zapamtite broj reda za 3. korak.
|
||||
|
||||
NAPOMENA: U donjem desnom uglu mo<6D>e se videti poziciju kursora ako je
|
||||
uklju<6A>ena opcija 'ruler' (vidi :help ruler ili lekciju 6.5.)
|
||||
|
||||
2. Pritisnite G za pomeranje kursora na kraj teksta.
|
||||
Pritisnite 1G ili gg za pomranje kursora na po<70>etak teksta.
|
||||
|
||||
3. Otkucajte broj reda na kome ste malopre bili i onda G . Kursor
|
||||
<20>e se vratiti na red na kome je bio kad ste otkucali CTRL-G.
|
||||
|
||||
4. Ako ste spremni, izvr<76>ite korake od 1 do 3.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 4.2: KOMANDE PRETRA<52>IVANJA
|
||||
|
||||
** Otkucajte / i onda izraz koji <20>elite da potra<72>ite. **
|
||||
|
||||
1. U Normal modu otkucajte znak / . Primietite da se znak pojavio
|
||||
zajedno sa kursorom na dnu ekrana kao i kod komande : .
|
||||
|
||||
2. Sada otkucajte 'grrre<72>ka' <ENTER>. (Bez razmaka i navodnika.)
|
||||
To je re<72> koju tra<72>ite.
|
||||
|
||||
3. Za ponovno tra<72>enje istog izraza, otkucajte n .
|
||||
Za tra<72>enje istog izraza u suprotnom smeru, otkucajte N .
|
||||
|
||||
4. Za tra<72>enje izraza unatrag, koristite ? umesto / .
|
||||
|
||||
5. Za povratak na prethodnu poziciju otkucajte CTRL-O (dr<64>ite CTRL dok
|
||||
pritiskate O ). Ponavljajte za ranije pozicije. CTRL-I ide napred.
|
||||
|
||||
---> "grrre<72>ka" je pogre<72>no; umesto grrre<72>ka treba da stoji gre<72>ka.
|
||||
|
||||
NAPOMENA: Ako pretraga do<64>e do kraja teksta tra<72>enje <20>e se nastaviti od
|
||||
njegovog po<70>etka osim ako je opcija 'wrapscan' isklju<6A>ena.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 4.3: TRA<52>ENJE PARA ZAGRADE
|
||||
|
||||
|
||||
** Otkucajte % za nala<6C>enje para ), ] ili } . **
|
||||
|
||||
1. Postavite kursor na bilo koju od ( , [ ili {
|
||||
otvorenih zagrada u redu ozna<6E>enom sa --->.
|
||||
|
||||
2. Otkucajte znak % .
|
||||
|
||||
3. Kursor <20>e se pomeriti na odgovaraju<6A>u zatvorenu zagradu.
|
||||
|
||||
4. Otkucajte % da pomerite kursor na prvu zagradu u paru.
|
||||
|
||||
5. Pomerite kursor na neku od (,),[,],{ ili } i ponovite komandu % .
|
||||
|
||||
---> Red ( testiranja obi<62>nih ( [ uglastih ] i { viti<74>astih } zagrada.))
|
||||
|
||||
|
||||
NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama!
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 4.4: KOMANDA ZAMENE
|
||||
|
||||
|
||||
** Otkucajte :s/staro/novo/g da zamenite 'staro' za 'novo'. **
|
||||
|
||||
1. Pomerite kursor na red ozna<6E>en sa --->.
|
||||
|
||||
2. Otkucajte :s/rdi/ri/ <ENTER> . Primetite da ova komanda zamenjuje
|
||||
samo prvo "rdi" u redu.
|
||||
|
||||
3. Otkucajte :s/rdi/ri/g . Dodavanje opcije g zna<6E>i da <20>e se komanda
|
||||
izvr<76>iti u celom redu, zamenom svih pojava niza "rdi".
|
||||
|
||||
---> rdiba rdibi grdize rep.
|
||||
|
||||
4. Za zamenu svih izraza izme<6D>u neka dva reda,
|
||||
otkucajte :#,#s/staro/novo/g gde su #,# krajnji brojevi redova u opsegu
|
||||
u kome <20>e se obaviti zamena.
|
||||
Otkucajte :%s/staro/novo/g za zamenu svih izraza u celom tekstu.
|
||||
Otkucajte :%s/staro/novo/gc za nala<6C>enje svih izraza u tekstu i
|
||||
potvrdu zamene.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 4
|
||||
|
||||
|
||||
1. CTRL-G prikazuje poziciju kursora u tekstu i status fajla.
|
||||
G pomera kursor na kraj teksta.
|
||||
broj G pomera kursor na navedeni red.
|
||||
gg pomera kursor na prvi red teksta.
|
||||
|
||||
2. Kucanjem / sa izrazom taj izraz se tra<72>i UNAPRED.
|
||||
Kucanjem ? sa izrazom taj izraz se tra<72>i UNAZAD.
|
||||
Posle komande tra<72>enja koristite n za nala<6C>enje izraza u istom
|
||||
smeru, a N za nala<6C>enje u suprotnom smeru.
|
||||
CTRL-O vra<72>a kursor na prethodnu poziciju, a CTRL-I na narednu.
|
||||
|
||||
3. Kucanjem % kad je kursor na zagradi on se pomera na njen par.
|
||||
|
||||
4. Za zamenu prvog izraza staro za izraz novo :s/staro/novo/
|
||||
Za zamenu svih izraza u celom redu :s/staro/novo/g
|
||||
Za zamenu svih izraza u opsegu linija #,# :#,#s/staro/novo/g
|
||||
Za zamenu u celom tekstu :%s/staro/novo/g
|
||||
Za potvrdu svake zamene dodajte 'c' :%s/staro/novo/gc
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 5.1: IZVR<56>AVANJE SPOLJA<4A>NJIH KOMANDI
|
||||
|
||||
|
||||
** Otkucajte :! pa spolja<6A>nju komandu koju <20>elite da izvr<76>ite. **
|
||||
|
||||
1. Otkucajte poznatu komandu : da biste namestili kursor na dno
|
||||
ekrana. Time omogu<67>avate unos komande u komandnoj liniji editora.
|
||||
|
||||
2. Otkucajte znak ! (uzvi<76>nik). Ovime omogu<67>avate
|
||||
izvr<76>avanje bilo koje spolja<6A>nje komande.
|
||||
|
||||
3. Kao primer otkucajte ls posle ! i pritisnite <ENTER>. Ovo <20>e
|
||||
prikazati sadr<64>aj direktorijuma, kao da ste na komandnom promptu.
|
||||
Otkucajte :!dir ako :!ls ne radi.
|
||||
|
||||
NAPOMENA: Na ovaj na<6E>in mogu<67>e je izvr<76>iti bilo koju spolja<6A>nju komandu,
|
||||
zajedno sa njenim argumentima.
|
||||
|
||||
NAPOMENA: Sve : komande se izvr<76>avaju po<70>to pritisnete <ENTER> .
|
||||
U daljem tekstu to ne<6E>emo uvek napominjati.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 5.2: VI<56>E O SNIMANJU FAJLOVA
|
||||
|
||||
** Za snimanje promena, otkucajte :w IME_FAJLA . **
|
||||
|
||||
1. Otkucajte :!dir ili :!ls za pregled sadr<64>aja direktorijuma.
|
||||
Ve<56> znate da morate pritisnuti <ENTER> posle toga.
|
||||
|
||||
2. Izaberite ime fajla koji jo<6A> ne postoji, npr. TEST.
|
||||
|
||||
3. Otkucajte: :w TEST (gde je TEST ime koje ste izabrali.)
|
||||
|
||||
4. Time <20>ete snimiti ceo fajl (Vim Tutor) pod imenom TEST.
|
||||
Za proveru, otkucajte opet :!dir ili :!ls za pregled
|
||||
sadr<64>aja direktorijuma.
|
||||
|
||||
NAPOMENA: Ako biste napustili Vim i ponovo ga pokrenuli sa vim TEST ,
|
||||
tekst bi bio ta<74>na kopija ovog fajla u trenutku kad ste
|
||||
ga snimili.
|
||||
|
||||
5. Izbri<72>ite fajl tako <20>to <20>ete otkucati (MS-DOS): :!del TEST
|
||||
ili (Unix): :!rm TEST
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 5.3: SNIMANJE OZNA<4E>ENOG TEKSTA
|
||||
|
||||
|
||||
** Da biste snimili deo teksta, otkucajte v pokret :w IME_FAJLA **
|
||||
|
||||
1. Pomerite kursor na ovu liniju.
|
||||
|
||||
2. Pritisnite v i pomerite kursor pet redova ispod. Primetite da je
|
||||
tekst ozna<6E>en inverzno.
|
||||
|
||||
3. Pritisnite : . Na dnu ekrana pojavi<76>e se :'<,'> .
|
||||
|
||||
4. Otkucajte w TEST , gde je TEST ime fajla koji jo<6A> ne postoji.
|
||||
Proverite da zaista pi<70>e :'<,'>w TEST pre nego <20>to pritisnete <ENTER>.
|
||||
|
||||
5. Vim <20>e snimiti ozna<6E>eni tekst u TEST. Proverite sa :!dir ili !ls .
|
||||
Nemojte jo<6A> brisati fajl! Koristi<74>emo ga u narednoj lekciji.
|
||||
|
||||
NAPOMENA: Komanda v zapo<70>inje vizuelno ozna<6E>avanje. Mo<4D>ete pomerati kursor
|
||||
i tako menjati veli<6C>inu ozna<6E>enog teksta. Onda mo<6D>ete upotrebiti
|
||||
operatore nad tekstom. Na primer, d <20>e izbrisati ozna<6E>eni tekst.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 5.4: U<>ITAVANJE FAJLA U TEKST
|
||||
|
||||
|
||||
** Za ubacivanje sadr<64>aja fajla, otkucajte :r IME_FAJLA **
|
||||
|
||||
1. Postavite kursor iznad ove linije.
|
||||
|
||||
NAPOMENA: Po<50>to izvr<76>ite 2. korak vide<64>ete tekst iz lekcije 5.3. Tada
|
||||
pomerite kursor DOLE da biste ponovo videli ovu lekciju.
|
||||
|
||||
2. U<>itajte fajl TEST koriste<74>i komandu :r TEST gde je TEST ime fajla
|
||||
koje ste koristili u prethodnoj lekciji. Sadr<64>aj u<>itanog fajla je
|
||||
uba<62>en ispod kursora.
|
||||
|
||||
3. Da biste proverili da je fajl u<>itan, vratite kursor unazad i
|
||||
primetite dve kopije lekcije 5.3, originalnu i onu iz fajla.
|
||||
|
||||
NAPOMENA: Tako<6B>e mo<6D>ete u<>itati izlaz spolja<6A>nje komande. Na primer,
|
||||
:r !ls <20>e u<>itati izlaz komande ls i postaviti ga ispod
|
||||
kursora.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 5
|
||||
|
||||
|
||||
1. :!komanda izvr<76>ava spolja<6A>nju komandu.
|
||||
|
||||
Korisni primeri:
|
||||
(MS-DOS) (Unix)
|
||||
:!dir :!ls - pregled sadr<64>aja direktorijuma.
|
||||
:!del FAJL :!rm FAJL - bri<72>e fajl FAJL.
|
||||
|
||||
2. :w FAJL zapisuje trenutni tekst na disk pod imenom FAJL.
|
||||
|
||||
3. v pokret :w IME_FAJLA snima vizuelno ozna<6E>ene redove u fajl
|
||||
IME_FAJLA.
|
||||
|
||||
4. :r IME_FAJLA u<>itava fajl IME_FAJLA sa diska i stavlja
|
||||
njegov sadr<64>aj ispod kursora.
|
||||
|
||||
5. :r !dir u<>itava izlaz komande dir i postavlja ga ispod kursora.
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 6.1: KOMANDA OTVORI
|
||||
|
||||
|
||||
** Pritisnite o da biste otvorili red ispod kursora
|
||||
i pre<72>li u Insert mod. **
|
||||
|
||||
1. Pomerite kursor na slede<64>i red ozna<6E>en sa --->.
|
||||
|
||||
2. Otkucajte malo o da biste otvorili novi red ISPOD kursora
|
||||
i pre<72>li u Insert mod.
|
||||
|
||||
3. Otkucajte neki tekst i onda pritisnite <ESC> da biste iza<7A>li
|
||||
iz Insert moda.
|
||||
|
||||
---> Kad pritisnete o kursor prelazi u novootvoreni red u Insert modu.
|
||||
|
||||
4. Za otvaranje reda IZNAD kursora, umesto malog otkucajte veliko O .
|
||||
Isprobajte na donjem redu ozna<6E>enom sa --->.
|
||||
|
||||
---> Otvorite red iznad ovog kucanjem velikog O dok je kursor u ovom redu.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 6.2: KOMANDA DODAJ
|
||||
|
||||
|
||||
** Otkucajte a za dodavanje teksta IZA kursora. **
|
||||
|
||||
1. Pomerite kursor na po<70>etak slede<64>eg reda ozna<6E>enog sa --->.
|
||||
|
||||
2. Kucajte e dok kursor ne do<64>e na kraj re<72>i re .
|
||||
|
||||
3. Otkucajte a (malo) da biste dodali tekst IZA kursora.
|
||||
|
||||
4. Dopunite re<72> kao <20>to je u redu ispod. Pritisnite <ESC> za izlazak
|
||||
iz Insert moda.
|
||||
|
||||
5. Sa e pre<72>ite na narednu nepotpunu re<72> i ponovite korake 3 i 4.
|
||||
|
||||
---> Ovaj re omogu<67>ava ve dodav teksta u nekom redu.
|
||||
---> Ovaj red omogu<67>ava ve<76>banje dodavanja teksta u nekom redu.
|
||||
|
||||
NAPOMENA: Komande a, i, i A aktiviraju isti Insert mod, jedina
|
||||
razlika je u poziciji od koje <20>e se tekst ubacivati.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 6.3: DRUGI NA<4E>IN ZAMENE
|
||||
|
||||
|
||||
** Otkucajte veliko R da biste zamenili vi<76>e od jednog znaka. **
|
||||
|
||||
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
|
||||
Pomerite kursor na po<70>etak prvog xxx .
|
||||
|
||||
2. Pritisnite R i otkucajte broj koji je red ispod,
|
||||
tako da zameni xxx .
|
||||
|
||||
3. Pritisnite <ESC> za izlazak iz Replace moda.
|
||||
Primetite da je ostatak reda ostao nepromenjen.
|
||||
|
||||
4. Ponovite korake da biste zamenili drugo xxx.
|
||||
|
||||
---> Dodavanje 123 na xxx daje xxx.
|
||||
---> Dodavanje 123 na 456 daje 579.
|
||||
|
||||
NAPOMENA: Replace mod je kao Insert mod, s tom razlikom <20>to svaki
|
||||
uneti znak bri<72>e ve<76> postoje<6A>i.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 6.4: KOPIRANJE I LEPLJENJE TEKSTA
|
||||
|
||||
|
||||
** Koristite operator y za kopiranje a p za lepljenje teksta. **
|
||||
|
||||
1. Pomerite kursor na red sa ---> i postavite kursor posle "a)".
|
||||
|
||||
2. Aktivirajte Visual mod sa v i pomerite kursor sve do ispred "prvi".
|
||||
|
||||
3. Pritisnite y da biste kopirali ozna<6E>eni tekst u interni bafer.
|
||||
|
||||
4. Pomerite kursor do kraja slede<64>eg reda: j$
|
||||
|
||||
5. Pritisnite p da biste zalepili tekst. Onda otkucajte: a drugi <ESC> .
|
||||
|
||||
6. Upotrebite Visual mod da ozna<6E>ite " red.", kopirajte sa y , kursor
|
||||
pomerite na kraj slede<64>eg reda sa j$ i tamo zalepite tekst sa p .
|
||||
|
||||
---> a) ovo je prvi red.
|
||||
b)
|
||||
|
||||
NAPOMENA: tako<6B>e mo<6D>ete koristiti y kao operator; yw kopira jednu re<72>.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 6.5: POSTAVLJANJE OPCIJA
|
||||
|
||||
|
||||
** Postavite opciju tako da tra<72>enje i zamena ignori<72>u veli<6C>inu slova **
|
||||
|
||||
1. Potra<72>ite re<72> 'razlika': /razlika <ENTER>
|
||||
Ponovite nekoliko puta pritiskom na n .
|
||||
|
||||
2. Aktivirajte opciju 'ic' (Ignore case): :set ic
|
||||
|
||||
3. Ponovo potra<72>ite re<72> 'razlika' pritiskom na n
|
||||
Primetite da su sada prona<6E>eni i RAZLIKA i Razlika.
|
||||
|
||||
4. Aktivirajte opcije 'hlsearch' i 'incsearch': :set hls is
|
||||
|
||||
5. Ponovo otkucajte komandu tra<72>enja i uo<75>ite razlike: /razlika <ENTER>
|
||||
|
||||
6. Za deaktiviranje opcije ic kucajte: :set noic
|
||||
|
||||
NAPOMENA: Za neozna<6E>avanje prona<6E>enih izraza otkucajte: :nohlsearch
|
||||
NAPOMENA: Ako <20>elite da ne razlikujete veli<6C>inu slova u samo jednoj komandi
|
||||
tra<72>enja, dodajte \c u izraz: /razlika\c <ENTER>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 6
|
||||
|
||||
1. Pritisnite o za otvaranje reda ISPOD kursora i prelazak u Insert mod.
|
||||
Pritisnite O za otvaranje reda IZNAD kursora.
|
||||
|
||||
2. Pritisnite a za unos teksta IZA kursora.
|
||||
Pritisnite A za unos teksta na kraju reda.
|
||||
|
||||
3. Komanda e pomera kursor na kraj re<72>i.
|
||||
|
||||
4. Operator y kopira tekst, p ga lepi.
|
||||
|
||||
5. Kucanje velikog R aktivira Replace mod dok ne pritisnete <ESC> .
|
||||
|
||||
6. Kucanje ":set xxx" aktivira opciju "xxx". Neke opcije su:
|
||||
'ic' 'ignorecase' ne razlikuje velika/mala slova pri tra<72>enju
|
||||
'is' 'incsearch' prikazuje prona<6E>en tekst dok kucate izraz
|
||||
'hls' 'hlsearch' ozna<6E>ava inverzno sve prona<6E>ene izraze
|
||||
Mo<4D>ete koristite dugo ili kratko ime opcije.
|
||||
|
||||
7. Ispred imena opcije stavite "no" da je deaktivirate: :set noic
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 7.1: DOBIJANJE POMO<4D>I
|
||||
|
||||
|
||||
** Koristite on-line sistem za pomo<6D> **
|
||||
|
||||
Vim ima detaljan on-line sistem za pomo<6D>. Za po<70>etak, poku<6B>ajte ne<6E>to
|
||||
od slede<64>eg:
|
||||
- pritisnite taster <HELP> (ako ga imate na tastaturi)
|
||||
- pritisnite taster <F1> (ako ga imate na tastaturi)
|
||||
- otkucajte :help <ENTER>
|
||||
|
||||
Pro<72>itajte tekst u prozoru pomo<6D>i da biste nau<61>ili pomo<6D> radi.
|
||||
Kucanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi.
|
||||
Otkucajte :q <ENTER> da zatvorite prozor pomo<6D>i.
|
||||
|
||||
Pomo<6D> o prakti<74>no bilo kojoj temi mo<6D>ete dobiti dodavanjem argumenta
|
||||
komandi ":help". Poku<6B>ajte ovo (ne zaboravite <ENTER> na kraju):
|
||||
|
||||
:help w
|
||||
:help c_CTRL-D
|
||||
:help insert-index
|
||||
:help user-manual
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 7.2: PRAVLJENJE STARTNOG SKRIPTA
|
||||
|
||||
|
||||
** Aktivirajte mogu<67>nosti editora **
|
||||
|
||||
Vim ima mnogo vi<76>e mogu<67>nosti nego Vi, ali ve<76>ina nije automatski
|
||||
aktivirana. Za dodatne mogu<67>nosti napravite "vimrc" fajl.
|
||||
|
||||
1. Otvorite "vimrc" fajl. Ovo zavisi od va<76>eg sistema:
|
||||
:e ~/.vimrc za Unix
|
||||
:e $VIM/_vimrc za MS-Windows
|
||||
|
||||
2. Onda u<>itajte primer sadr<64>aja "vimrc" fajla:
|
||||
:r $VIMRUNTIME/vimrc_example.vim
|
||||
|
||||
3. Snimite fajl sa:
|
||||
:w
|
||||
|
||||
Slede<64>i put kada pokrenete Vim, bojenje sintakse teksta bi<62>e
|
||||
aktivirano. Sva svoja pode<64>avanja mo<6D>ete dodati u "vimrc" fajl.
|
||||
Za vi<76>e informacija otkucajte :help vimrc-intro
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 7.3: AUTOMATSKO DOVR<56>AVANJE
|
||||
|
||||
|
||||
** Dovr<76>avanje komandne linije sa CTRL-D i <TAB> **
|
||||
|
||||
1. Podesite Vim da ne bude u Vi-kompatibilnom modu: :set nocp
|
||||
|
||||
2. Pogledajte koji fajlovi postoje u direktorijumu: :!ls ili :!dir
|
||||
|
||||
3. Otkucajte po<70>etak komande: :e
|
||||
|
||||
4. Otkucajte CTRL-D i Vim <20>e prikazati spisak komandi koje po<70>inju sa "e".
|
||||
|
||||
5. Pritisnite <TAB> i Vim <20>e dopuniti ime komande u ":edit".
|
||||
|
||||
6. Dodajte razmak i po<70>etak imena postoje<6A>eg fajla: :edit FA
|
||||
|
||||
7. Pritisnite <TAB>. Vim <20>e dopuniti ime fajla (ako je jedinstveno).
|
||||
|
||||
NAPOMENA: Mogu<67>e je dopuniti mnoge komande. Samo probajte CTRL-D i <TAB>.
|
||||
Naro<72>ito je korisno za :help komande.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 7
|
||||
|
||||
|
||||
1. Otkucajte :help ili pritisnite <F1> ili <Help> za pomo<6D>.
|
||||
|
||||
2. Otkucajte :help komanda biste dobili pomo<6D> za tu komandu.
|
||||
|
||||
3. Otkucajte CTRL-W CTRL-W za prelazak u drugi prozor.
|
||||
|
||||
4. Otkucajte :q da zatvorite prozor pomo<6D>i.
|
||||
|
||||
5. Napravite vimrc startni skript za aktiviranje pode<64>avanja koja
|
||||
vam odgovaraju.
|
||||
|
||||
6. Dok kucate neku od : komandi, pritisnite CTRL-D da biste videli mogu<67>e
|
||||
vrednosti. Pritisnite <TAB> da odaberete jednu od njih.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Ovim je priru<72>nik zavr<76>en. Njegov cilj je bio kratak pregled Vim editora,
|
||||
koliko da omogu<67>i njegovo relativno jednostavno kori<72><69>enje. Priru<72>nik nije
|
||||
potpun, jer Vim ima mnogo vi<76>e komandi. Kao slede<64>e, pro<72>itajte priru<72>nik:
|
||||
":help user-manual".
|
||||
|
||||
Za dalje <20>itanje i u<>enje, preporu<72>ujemo knjigu:
|
||||
Vim - Vi Improved - by Steve Oualline
|
||||
Izdava<76>: New Riders
|
||||
Prva knjiga potpuno posve<76>ena Vim-u. Naro<72>ito korisna za po<70>etnike.
|
||||
Ima mno<6E>tvo primera i slika.
|
||||
Vidite http://iccf-holland.org/click5.html
|
||||
|
||||
Slede<64>a knjiga je starija i vi<76>e govori o Vi-u nego o Vim-u, ali je tako<6B>e
|
||||
preporu<72>ujemo:
|
||||
Learning the Vi Editor - by Linda Lamb
|
||||
Izdava<76>: O'Reilly & Associates Inc.
|
||||
Dobra knjiga iz koje mo<6D>ete saznati skoro sve <20>to mo<6D>ete raditi u Vi-ju.
|
||||
<20>esto izdanje ima i informacija o Vim-u.
|
||||
|
||||
Ovaj priru<72>nik su napisali: Michael C. Pierce i Robert K. Ware,
|
||||
Colorado School of Mines koriste<74>i ideje Charlesa Smitha,
|
||||
Colorado State University. E-mail: bware@mines.colorado.edu.
|
||||
|
||||
Prilago<67>avanje za Vim uradio je Bram Moolenaar.
|
||||
|
||||
Prevod na srpski: Ivan Nejgebauer <ian@uns.ac.rs>
|
||||
Verzija 1.0, maj/juni 2014.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
971
runtime/tutor/tutor.sr.utf-8
Normal file
971
runtime/tutor/tutor.sr.utf-8
Normal file
@@ -0,0 +1,971 @@
|
||||
===============================================================================
|
||||
= D o b r o d o š l i u VIM p r i r u č n i k - Verzija 1.7 =
|
||||
===============================================================================
|
||||
|
||||
Vim je moćan editor sa mnogo komandi, suviše da bismo ih ovde sve
|
||||
opisali. Priručnik je zamišljen da opiše dovoljno komandi da biste
|
||||
mogli lagodno da koristite Vim kao editor opšte namene.
|
||||
|
||||
Približno vreme potrebno za uspešan završetak priručnika je između
|
||||
25 i 30 minuta, u zavisnosti od vremena potrošenog na vežbu.
|
||||
|
||||
UPOZORENJE:
|
||||
Komande u lekcijama će menjati tekst. Iskopirajte ovaj fajl i
|
||||
vežbajte na kopiji (ako ste pokrenuli "vimtutor" ovo je već kopija).
|
||||
|
||||
Važno je upamtiti da je ovaj priručnik zamišljen za aktivnu vežbu.
|
||||
To znači da morate upotrebljavati komande o kojima čitate da biste
|
||||
ih naučili. Ako samo čitate tekst, zaboravićete komande!
|
||||
|
||||
Ako je Caps Lock uključen ISKLJUČITE ga. Pritisnite taster j dovoljno
|
||||
puta da lekcija 1.1 cela stane na ekran.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.1: POMERANJE KURSORA
|
||||
|
||||
|
||||
** Za pomeranje kursora, pritiskajte tastere h,j,k,l kako je prikazano **
|
||||
^
|
||||
k Savet: h je s leve strane i pomera kursor u levo.
|
||||
< h l > l je s desne strane i pomera kursor u desno.
|
||||
j j izgleda kao strelica naniže.
|
||||
v
|
||||
1. Pomerajte kursor po ekranu dok se ne naviknete na komande.
|
||||
|
||||
2. Pritisnite taster (j) dok ne počne da se ponavlja.
|
||||
Sada znate kako da dođete do naredne lekcije.
|
||||
|
||||
3. Koristeći taster j pređite na lekciju 1.2.
|
||||
|
||||
NAPOMENA: Ako niste sigurni šta ste zapravo pritisnuli, pritisnite <ESC>
|
||||
za prelazak u Normal mod i pokušajte ponovo.
|
||||
|
||||
NAPOMENA: Strelice takođe pomeraju kursor, ali korišćenje tastera hjkl je
|
||||
znatno brže, kad se jednom naviknete na njih. Zaista!
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.2: IZLAZAK IZ VIM-a
|
||||
|
||||
|
||||
!! UPOZORENJE: Pre izvođenja bilo kog koraka, pročitajte celu lekciju!!
|
||||
|
||||
1. Pritisnite <ESC> (editor je sada u Normal modu).
|
||||
|
||||
2. Otkucajte: :q! <ENTER>.
|
||||
Ovime se izlazi iz editora, sa GUBITKOM svih izmena.
|
||||
|
||||
3. Kada se pojavi komandni prompt, unesite komandu koja je pokrenula
|
||||
ovaj priručnik: vimtutor <ENTER>
|
||||
|
||||
4. Ako ste upamtili ove korake, izvršite ih redom od 1 do 3 da biste
|
||||
izašli iz editora i ponovo ga pokrenuli.
|
||||
|
||||
NAPOMENA: :q! <ENTER> poništava sve izmene koje ste napravili.
|
||||
U narednim lekcijama naučićete kako da sačuvate izmene.
|
||||
|
||||
5. Pomerite kursor na lekciju 1.3.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.3: IZMENA TEKSTA - BRISANJE
|
||||
|
||||
|
||||
** Pritisnite x za brisanje znaka pod kursorom. **
|
||||
|
||||
1. Pomerite kursor na red označen sa --->.
|
||||
|
||||
2. Da biste ispravili greške, pomerajte kursor dok se
|
||||
ne nađe na slovu koje treba izbrisati.
|
||||
|
||||
3. Pritisnite taster x da izbrišete neželjeno slovo.
|
||||
|
||||
4. Ponavljajte korake od 2 do 4 dok ne ispravite sve greške.
|
||||
|
||||
---> RRRibaa riibi grizzze rrreepp.
|
||||
|
||||
5. Kad ispravite red, pređite na lekciju 1.4.
|
||||
|
||||
NAPOMENA: Dok koristite priručnik, nemojte učiti komande napamet,
|
||||
već vežbajte njihovu primenu.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.4: IZMENA TEKSTA - UBACIVANJE
|
||||
|
||||
|
||||
** Pritisnite i za ubacivanje teksta ispred kursora. **
|
||||
|
||||
1. Pomerite kursor na prvi sledeći red označen sa --->.
|
||||
|
||||
2. Da biste tekst prvog reda izjednačili s tekstom drugog, namestite
|
||||
kursor na prvi znak POSLE kog ćete ubaciti potreban tekst.
|
||||
|
||||
3. Pritisnite i pa unesite potrebne dopune.
|
||||
|
||||
4. Po ispravci svake greške pritisnite <ESC> da se vratite u Normal mod.
|
||||
Ponovite korake od 2 do 4 da biste ispravili celu rečenicu.
|
||||
|
||||
---> Do teka neoje v red.
|
||||
---> Deo teksta nedostaje iz ovog reda.
|
||||
|
||||
5. Pređite na sledeću lekciju.
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.5: IZMENA TEKSTA - DODAVANJE
|
||||
|
||||
|
||||
** Pritisnite A za dodavanje teksta. **
|
||||
|
||||
1. Pomerite kursor na prvi sledeći red označen sa --->.
|
||||
Nije važno gde se nalazi kursor u tom redu.
|
||||
|
||||
2. Pritisnite A i unesite dodatni tekst.
|
||||
|
||||
3. Pošto ste dodali tekst, pritisnite <ESC> za povratak u
|
||||
Normal mod.
|
||||
|
||||
4. Pomerite kursor na drugi red označen sa ---> i ponavljajte
|
||||
korake 2 i 3 dok ne ispravite tekst.
|
||||
|
||||
---> Deo teksta nedostaje u
|
||||
Deo teksta nedostaje u ovom redu.
|
||||
---> Deo teksta nedostaje
|
||||
Deo teksta nedostaje i ovde.
|
||||
|
||||
5. Pređite na lekciju 1.6.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 1.6: IZMENA FAJLA
|
||||
|
||||
|
||||
** Upotrebite :wq za snimanje teksta i izlazak iz editora. **
|
||||
|
||||
!! UPOZORENJE: Pre izvođenja bilo kog koraka, pročitajte celu lekciju!!
|
||||
|
||||
1. Izađite iz editora kao u lekciji 1.2: :q!
|
||||
|
||||
2. Na komandnom promptu unesite sledeću komandu: vim tutor <ENTER>
|
||||
'vim' je komanda za pokretanja Vim editora, 'tutor' je ime fajla koji
|
||||
želite da menjate. Koristite fajl koji imate pravo da menjate.
|
||||
|
||||
3. Ubacujte i brišite tekst kao u prethodnim lekcijama.
|
||||
|
||||
4. Snimite izmenjeni tekst i izađite iz Vim-a: :wq <ENTER>
|
||||
|
||||
5. Ponovo pokrenite vimtutor i pročitajte rezime koji sledi.
|
||||
|
||||
6. Pošto pročitate korake iznad i u potpunosti ih razumete:
|
||||
izvršite ih.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 1
|
||||
|
||||
|
||||
1. Kursor se pomera strelicama ili pomoću tastera hjkl .
|
||||
h (levo) j (dole) k (gore) l (desno)
|
||||
|
||||
2. Za pokretanje Vim-a iz shell-a: vim IME_FAJLA <ENTER>
|
||||
|
||||
3. Izlaz: <ESC> :q! <ENTER> sve promene su izgubljene.
|
||||
ILI: <ESC> :wq <ENTER> promene su sačuvane.
|
||||
|
||||
4. Brisanje znaka na kome se nalazi kursor: x
|
||||
|
||||
5. Ubacivanja ili dodavanje teksta:
|
||||
i unesite tekst <ESC> unos ispred kursora
|
||||
A unesite tekst <ESC> dodavanje na kraju reda
|
||||
|
||||
NAPOMENA: Pritiskom na <ESC> prebacujete Vim u Normal mod i
|
||||
prekidate neželjenu ili delimično izvršenu komandu.
|
||||
|
||||
Nastavite sa lekcijom 2.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.1: NAREDBE BRISANJA
|
||||
|
||||
|
||||
** Otkucajte dw za brisanje reči. **
|
||||
|
||||
1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu.
|
||||
|
||||
2. Pomerite kursor na red označen sa --->.
|
||||
|
||||
3. Pomerite kursor na početak reči koju treba izbrisati.
|
||||
|
||||
4. Otkucajte dw da biste uklonili reč.
|
||||
|
||||
NAPOMENA: Slovo d će se pojaviti na dnu ekrana kad ga otkucate. Vim čeka
|
||||
da otkucate w . Ako je prikazano neko drugo slovo, pogrešili ste u
|
||||
kucanju; pritisnite <ESC> i pokušajte ponovo. (Ako se ne pojavi
|
||||
ništa, možda je isključena opcija 'showcmd': vidi lekciju 6.5.)
|
||||
|
||||
---> Neke reči smešno ne pripadaju na papir ovoj rečenici.
|
||||
|
||||
5. Ponavljajte korake 3 i 4 dok ne ispravite rečenicu, pa
|
||||
pređite na lekciju 2.2.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.2: JOŠ BRISANJA
|
||||
|
||||
|
||||
** Otkucajte d$ za brisanje znakova do kraja reda. **
|
||||
|
||||
1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu.
|
||||
|
||||
2. Pomerite kursor na red označen sa --->.
|
||||
|
||||
3. Pomerite kursor do kraja ispravnog dela rečenice
|
||||
(POSLE prve . ).
|
||||
|
||||
4. Otkucajte d$ za brisanje ostatka reda.
|
||||
|
||||
---> Neko je uneo kraj ovog reda dvaput. kraj ovog reda dvaput.
|
||||
|
||||
5. Pređite na lekciju 2.3 za podrobnije objašnjenje.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.3: O OPERATORIMA I POKRETIMA
|
||||
|
||||
|
||||
Mnoge komande za izmenu teksta sastoje se od operatora i pokreta.
|
||||
Oblik komande brisanja sa d operatorom je sledeći:
|
||||
|
||||
d pokret
|
||||
|
||||
Pri čemu je:
|
||||
d - operator brisanja.
|
||||
pokret - ono na čemu će se operacija izvršavati (opisano u nastavku).
|
||||
|
||||
Kratak spisak pokreta:
|
||||
w - sve do početka sledeće reči, NE UKLJUČUJUĆI prvo slovo.
|
||||
e - sve do kraja tekuće reči, UKLJUČUJUĆI poslednje slovo.
|
||||
$ - sve do kraje reda, UKLJUČUJUĆI poslednje slovo.
|
||||
|
||||
Kucanjem de brisaće se tekst od kursora do kraja reči.
|
||||
|
||||
NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez
|
||||
operatora, kursor se pomera kao što je opisano.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.4: KORIŠĆENJE BROJANJA ZA POKRETE
|
||||
|
||||
|
||||
** Unošenjem nekog broja pre pokreta, pokret se izvršava taj broj puta. **
|
||||
|
||||
1. Pomerite kursor na red označen sa --->.
|
||||
|
||||
2. Otkucajte 2w da pomerite kursor dve reči napred.
|
||||
|
||||
3. Otkucajte 3e da pomerite kursor na kraj treće reči napred.
|
||||
|
||||
4. Otkucajte 0 (nulu) da pomerite kursor na početak reda.
|
||||
|
||||
5. Ponovite korake 2 i 3 s nekim drugim brojevima.
|
||||
|
||||
---> Rečenica sa rečima po kojoj možete pomerati kursor.
|
||||
|
||||
6. Pređite na lekciju 2.5.
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.5: KORIŠĆENJE BROJANJA ZA VEĆE BRISANJE
|
||||
|
||||
|
||||
** Unošenje nekog broja s operatorom ponavlja operator taj broj puta. **
|
||||
|
||||
U kombinaciji operatora brisanja s pokretima spomenutim iznad
|
||||
možete uneti broj pre pokreta da biste izbrisali više znakova:
|
||||
|
||||
d broj pokret
|
||||
|
||||
1. Pomerite kursor na prvo slovo u reči s VELIKIM SLOVIMA u redu
|
||||
označenom sa --->.
|
||||
|
||||
2. Otkucajte d2w da izbrišete dve reči sa VELIKIM SLOVIMA
|
||||
|
||||
3. Ponovite korake 1 i 2 sa različitim brojevima da izbrišete
|
||||
uzastopne reči sa VELIKIM SLOVIMA korišćenjem samo jedne komande.
|
||||
|
||||
---> ovaj ABCČĆ DĐE red FGHI JK LMN OP s rečima je RSŠ TUVZŽ ispravljen.
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.6: OPERACIJE NAD REDOVIMA
|
||||
|
||||
|
||||
** Otkucajte dd za brisanje celog reda. **
|
||||
|
||||
Zbog učestalosti brisanja celih redova, autori Vi-ja odlučili su da
|
||||
je lakše brisati redove ako se otkuca d dvaput.
|
||||
|
||||
1. Pomerite kursor na drugi red u donjoj strofi.
|
||||
2. Otkucajte dd da ga izbrišete.
|
||||
3. Pomerite kursor na četvrti red.
|
||||
4. Otkucajte 2dd da biste izbrisali dva reda.
|
||||
|
||||
---> 1) Sedlo mi je od marame,
|
||||
---> 2) blato na sve strane,
|
||||
---> 3) uzda od kanapa,
|
||||
---> 4) auto mi je ovde,
|
||||
---> 5) satovi pokazuju vreme,
|
||||
---> 6) a bič mi je od očina
|
||||
---> 7) prebijena štapa.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 2.7: PONIŠTAVANJE PROMENA
|
||||
|
||||
|
||||
** Pritisnite u za poništavanje poslednje komande, U za ceo red. **
|
||||
|
||||
1. Pomerite kursor na red označen sa ---> i postavite ga na mesto
|
||||
prve greške.
|
||||
2. Otkucajte x da izbrišete prvi neželjeni znak.
|
||||
3. Otkucajte u da poništite poslednju izvršenu komandu.
|
||||
4. Sad ispravite sve greške u redu koristeći komandu x .
|
||||
5. Otkucajte veliko U da biste vratili sadržaj reda u prvobitno
|
||||
stanje.
|
||||
6. Onda otkucajte u nekoliko puta da biste poništili U
|
||||
i prethodne komande.
|
||||
7. Sad otkucajte CTRL-R (držeći CTRL dok pritiskate R)
|
||||
nekoliko puta da biste vratili izmene (poništili poništavanja).
|
||||
|
||||
---> Iiisspravite greške uu ovvom redu ii pooništiteee ih.
|
||||
|
||||
8. Ovo su veoma korisne komande. Pređite na rezime lekcije 2.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 2
|
||||
|
||||
|
||||
1. Brisanje od kursora do sledeće reči: dw
|
||||
2. Brisanje od kursora do kraja reda: d$
|
||||
3. Brisanje celog reda: dd
|
||||
|
||||
4. Za ponavljanje pokreta prethodno unesite broj: 2w
|
||||
5. Oblik komande za izmenu:
|
||||
operator [broj] pokret
|
||||
gde je:
|
||||
operator - šta uraditi, recimo d za brisanje
|
||||
[broj] - neobavezan broj ponavljanja pokreta
|
||||
pokret - kretanje po tekstu na kome se radi,
|
||||
kao što je: w (reč), $ (kraj reda), itd.
|
||||
|
||||
6. Pomeranje kursora na početak reda: 0
|
||||
|
||||
7. Za poništavanje prethodnih izmena, pritisnite: u (malo u)
|
||||
Za poništavanje svih promena u redu, pritisnite: U (veliko U)
|
||||
Za vraćanja promena, otkucajte: CTRL-R
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 3.1: KOMANDA POSTAVLJANJA
|
||||
|
||||
|
||||
** Otkucajte p da postavite prethodno izbrisan tekst iza kursora. **
|
||||
|
||||
1. Pomerite kursor na prvi sledeći red označen sa --->.
|
||||
|
||||
2. Otkucajte dd da izbrišete red i smestite ga u Vim registar.
|
||||
|
||||
3. Pomerite kursor na red c), IZNAD mesta gde treba postaviti izbrisan red.
|
||||
|
||||
4. Otkucajte p da postavite red ispod kursora.
|
||||
|
||||
5. Ponavljajte korake 2 do 4 da biste postavili sve linije u pravilnom
|
||||
redosledu.
|
||||
|
||||
---> d) prebijena štapa.
|
||||
---> b) uzda od kanapa,
|
||||
---> c) a bič mi je od očina
|
||||
---> a) Sedlo mi je od marame,
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 3.2: KOMANDA ZAMENE
|
||||
|
||||
|
||||
** Otkucajte rx da zamenite znak ispod kursora slovom x . **
|
||||
|
||||
1. Pomerite kursor na prvi sledeći red označen sa --->.
|
||||
|
||||
2. Pomerite kursor tako da se nalazi na prvoj grešci.
|
||||
|
||||
3. Otkucajte r i onda znak koji treba da tu stoji.
|
||||
|
||||
4. Ponavljajte korake 2 i 3 sve dok prvi red ne bude
|
||||
isti kao drugi.
|
||||
|
||||
---> Kedi ju ovej red ugašen, nako je protresao pustašne testere!
|
||||
---> Kada je ovaj red unošen, neko je pritiskao pogrešne tastere!
|
||||
|
||||
5. Pređite na lekciju 3.2.
|
||||
|
||||
NAPOMENA: Setite se da treba da učite vežbanjem, ne pamćenjem.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 3.3: OPERATOR IZMENE
|
||||
|
||||
|
||||
** Za izmenu teksta do kraja reči, otkucajte ce .**
|
||||
|
||||
1. Pomerite kursor na prvi sledeći red označen sa --->.
|
||||
|
||||
2. Postavite kursor na a u rakdur.
|
||||
|
||||
3. Otkucajte ce i ispravite reč (u ovom slučaju otkucajte ed ).
|
||||
|
||||
4. Pritisnite <ESC> i pomerite kursor na sledeći znak koji
|
||||
treba ispraviti.
|
||||
|
||||
5. Ponavljajte korake 3 i 4 sve dok prva rečenica ne bude ista
|
||||
kao druga.
|
||||
|
||||
---> Ovaj rakdur ima nekoliko rejga koje treflja isprpikati operagrom izmene.
|
||||
---> Ovaj red ima nekoliko reči koje treba ispraviti operatorom izmene.
|
||||
|
||||
Uočite da ce briše reč i postavlja editor u Insert mod.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 3.4: DALJE IZMENE UPOTREBOM c
|
||||
|
||||
|
||||
** Komanda izmene se koristi sa istim pokretima kao i brisanje. **
|
||||
|
||||
1. Operator izmene se koristi na isti način kao i operator brisanja:
|
||||
|
||||
c [broj] pokret
|
||||
|
||||
2. Pokreti su isti, recimo: w (reč) i $ (kraj reda).
|
||||
|
||||
3. Pomerite kursor na prvi sledeći red označen sa --->.
|
||||
|
||||
4. Pomerite kursor na prvu grešku.
|
||||
|
||||
5. Otkucajte c$ i unesite ostatak reda tako da bude isti kao
|
||||
drugi red, pa pritisnite <ESC>.
|
||||
|
||||
---> Kraj ovog reda treba izmeniti tako da izgleda kao red ispod.
|
||||
---> Kraj ovog reda treba ispraviti korišćenjem c$ komande.
|
||||
|
||||
NAPOMENA: Za ispravljanje grešaka možete koristiti Backspace .
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 3
|
||||
|
||||
|
||||
1. Za postavljanje teksta koji ste upravo izbrisali, pritisnite p . Ovo
|
||||
postavlja tekst IZA kursora (ako je bio izbrisan jedan ili više redova
|
||||
sadržaj će doći na red ispod kursora).
|
||||
|
||||
2. Za zamenu znaka na kome se nalazi kursor, pritisnite r i onda
|
||||
željeni znak.
|
||||
|
||||
3. Operator izmene dozvoljava promenu teksta od kursora do pozicije gde
|
||||
se završava pokret. Primera radi, kucajte ce za izmenu od kursora do
|
||||
kraja reči, ili c$ za izmenu od kursora do kraja reda.
|
||||
|
||||
4. Oblik operacije izmene je:
|
||||
|
||||
c [broj] pokret
|
||||
|
||||
Pređite na narednu lekciju.
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 4.1: POZICIJA KURSORA I STATUS FAJLA
|
||||
|
||||
** Pritisnite CTRL-G za prikaz pozicije kursora u tekstu i status fajla.
|
||||
Pritisnite G za pomeranje kursora na neki red u tekstu. **
|
||||
|
||||
NAPOMENA: Pročitajte celu lekciju pre izvođenja bilo kog koraka!!
|
||||
|
||||
1. Držite taster CTRL i pritisnite g . Ovo zovemo CTRL-G.
|
||||
Editor će na dnu ekrana ispisati poruku sa imenom fajla i pozicijom
|
||||
kursora u tekstu. Zapamtite broj reda za 3. korak.
|
||||
|
||||
NAPOMENA: U donjem desnom uglu može se videti poziciju kursora ako je
|
||||
uključena opcija 'ruler' (vidi :help ruler ili lekciju 6.5.)
|
||||
|
||||
2. Pritisnite G za pomeranje kursora na kraj teksta.
|
||||
Pritisnite 1G ili gg za pomranje kursora na početak teksta.
|
||||
|
||||
3. Otkucajte broj reda na kome ste malopre bili i onda G . Kursor
|
||||
će se vratiti na red na kome je bio kad ste otkucali CTRL-G.
|
||||
|
||||
4. Ako ste spremni, izvršite korake od 1 do 3.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 4.2: KOMANDE PRETRAŽIVANJA
|
||||
|
||||
** Otkucajte / i onda izraz koji želite da potražite. **
|
||||
|
||||
1. U Normal modu otkucajte znak / . Primietite da se znak pojavio
|
||||
zajedno sa kursorom na dnu ekrana kao i kod komande : .
|
||||
|
||||
2. Sada otkucajte 'grrreška' <ENTER>. (Bez razmaka i navodnika.)
|
||||
To je reč koju tražite.
|
||||
|
||||
3. Za ponovno traženje istog izraza, otkucajte n .
|
||||
Za traženje istog izraza u suprotnom smeru, otkucajte N .
|
||||
|
||||
4. Za traženje izraza unatrag, koristite ? umesto / .
|
||||
|
||||
5. Za povratak na prethodnu poziciju otkucajte CTRL-O (držite CTRL dok
|
||||
pritiskate O ). Ponavljajte za ranije pozicije. CTRL-I ide napred.
|
||||
|
||||
---> "grrreška" je pogrešno; umesto grrreška treba da stoji greška.
|
||||
|
||||
NAPOMENA: Ako pretraga dođe do kraja teksta traženje će se nastaviti od
|
||||
njegovog početka osim ako je opcija 'wrapscan' isključena.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 4.3: TRAŽENJE PARA ZAGRADE
|
||||
|
||||
|
||||
** Otkucajte % za nalaženje para ), ] ili } . **
|
||||
|
||||
1. Postavite kursor na bilo koju od ( , [ ili {
|
||||
otvorenih zagrada u redu označenom sa --->.
|
||||
|
||||
2. Otkucajte znak % .
|
||||
|
||||
3. Kursor će se pomeriti na odgovarajuću zatvorenu zagradu.
|
||||
|
||||
4. Otkucajte % da pomerite kursor na prvu zagradu u paru.
|
||||
|
||||
5. Pomerite kursor na neku od (,),[,],{ ili } i ponovite komandu % .
|
||||
|
||||
---> Red ( testiranja običnih ( [ uglastih ] i { vitičastih } zagrada.))
|
||||
|
||||
|
||||
NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama!
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 4.4: KOMANDA ZAMENE
|
||||
|
||||
|
||||
** Otkucajte :s/staro/novo/g da zamenite 'staro' za 'novo'. **
|
||||
|
||||
1. Pomerite kursor na red označen sa --->.
|
||||
|
||||
2. Otkucajte :s/rdi/ri/ <ENTER> . Primetite da ova komanda zamenjuje
|
||||
samo prvo "rdi" u redu.
|
||||
|
||||
3. Otkucajte :s/rdi/ri/g . Dodavanje opcije g znači da će se komanda
|
||||
izvršiti u celom redu, zamenom svih pojava niza "rdi".
|
||||
|
||||
---> rdiba rdibi grdize rep.
|
||||
|
||||
4. Za zamenu svih izraza između neka dva reda,
|
||||
otkucajte :#,#s/staro/novo/g gde su #,# krajnji brojevi redova u opsegu
|
||||
u kome će se obaviti zamena.
|
||||
Otkucajte :%s/staro/novo/g za zamenu svih izraza u celom tekstu.
|
||||
Otkucajte :%s/staro/novo/gc za nalaženje svih izraza u tekstu i
|
||||
potvrdu zamene.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 4
|
||||
|
||||
|
||||
1. CTRL-G prikazuje poziciju kursora u tekstu i status fajla.
|
||||
G pomera kursor na kraj teksta.
|
||||
broj G pomera kursor na navedeni red.
|
||||
gg pomera kursor na prvi red teksta.
|
||||
|
||||
2. Kucanjem / sa izrazom taj izraz se traži UNAPRED.
|
||||
Kucanjem ? sa izrazom taj izraz se traži UNAZAD.
|
||||
Posle komande traženja koristite n za nalaženje izraza u istom
|
||||
smeru, a N za nalaženje u suprotnom smeru.
|
||||
CTRL-O vraća kursor na prethodnu poziciju, a CTRL-I na narednu.
|
||||
|
||||
3. Kucanjem % kad je kursor na zagradi on se pomera na njen par.
|
||||
|
||||
4. Za zamenu prvog izraza staro za izraz novo :s/staro/novo/
|
||||
Za zamenu svih izraza u celom redu :s/staro/novo/g
|
||||
Za zamenu svih izraza u opsegu linija #,# :#,#s/staro/novo/g
|
||||
Za zamenu u celom tekstu :%s/staro/novo/g
|
||||
Za potvrdu svake zamene dodajte 'c' :%s/staro/novo/gc
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 5.1: IZVRŠAVANJE SPOLJAŠNJIH KOMANDI
|
||||
|
||||
|
||||
** Otkucajte :! pa spoljašnju komandu koju želite da izvršite. **
|
||||
|
||||
1. Otkucajte poznatu komandu : da biste namestili kursor na dno
|
||||
ekrana. Time omogućavate unos komande u komandnoj liniji editora.
|
||||
|
||||
2. Otkucajte znak ! (uzvičnik). Ovime omogućavate
|
||||
izvršavanje bilo koje spoljašnje komande.
|
||||
|
||||
3. Kao primer otkucajte ls posle ! i pritisnite <ENTER>. Ovo će
|
||||
prikazati sadržaj direktorijuma, kao da ste na komandnom promptu.
|
||||
Otkucajte :!dir ako :!ls ne radi.
|
||||
|
||||
NAPOMENA: Na ovaj način moguće je izvršiti bilo koju spoljašnju komandu,
|
||||
zajedno sa njenim argumentima.
|
||||
|
||||
NAPOMENA: Sve : komande se izvršavaju pošto pritisnete <ENTER> .
|
||||
U daljem tekstu to nećemo uvek napominjati.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 5.2: VIŠE O SNIMANJU FAJLOVA
|
||||
|
||||
** Za snimanje promena, otkucajte :w IME_FAJLA . **
|
||||
|
||||
1. Otkucajte :!dir ili :!ls za pregled sadržaja direktorijuma.
|
||||
Već znate da morate pritisnuti <ENTER> posle toga.
|
||||
|
||||
2. Izaberite ime fajla koji još ne postoji, npr. TEST.
|
||||
|
||||
3. Otkucajte: :w TEST (gde je TEST ime koje ste izabrali.)
|
||||
|
||||
4. Time ćete snimiti ceo fajl (Vim Tutor) pod imenom TEST.
|
||||
Za proveru, otkucajte opet :!dir ili :!ls za pregled
|
||||
sadržaja direktorijuma.
|
||||
|
||||
NAPOMENA: Ako biste napustili Vim i ponovo ga pokrenuli sa vim TEST ,
|
||||
tekst bi bio tačna kopija ovog fajla u trenutku kad ste
|
||||
ga snimili.
|
||||
|
||||
5. Izbrišite fajl tako što ćete otkucati (MS-DOS): :!del TEST
|
||||
ili (Unix): :!rm TEST
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 5.3: SNIMANJE OZNAČENOG TEKSTA
|
||||
|
||||
|
||||
** Da biste snimili deo teksta, otkucajte v pokret :w IME_FAJLA **
|
||||
|
||||
1. Pomerite kursor na ovu liniju.
|
||||
|
||||
2. Pritisnite v i pomerite kursor pet redova ispod. Primetite da je
|
||||
tekst označen inverzno.
|
||||
|
||||
3. Pritisnite : . Na dnu ekrana pojaviće se :'<,'> .
|
||||
|
||||
4. Otkucajte w TEST , gde je TEST ime fajla koji još ne postoji.
|
||||
Proverite da zaista piše :'<,'>w TEST pre nego što pritisnete <ENTER>.
|
||||
|
||||
5. Vim će snimiti označeni tekst u TEST. Proverite sa :!dir ili !ls .
|
||||
Nemojte još brisati fajl! Koristićemo ga u narednoj lekciji.
|
||||
|
||||
NAPOMENA: Komanda v započinje vizuelno označavanje. Možete pomerati kursor
|
||||
i tako menjati veličinu označenog teksta. Onda možete upotrebiti
|
||||
operatore nad tekstom. Na primer, d će izbrisati označeni tekst.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 5.4: UČITAVANJE FAJLA U TEKST
|
||||
|
||||
|
||||
** Za ubacivanje sadržaja fajla, otkucajte :r IME_FAJLA **
|
||||
|
||||
1. Postavite kursor iznad ove linije.
|
||||
|
||||
NAPOMENA: Pošto izvršite 2. korak videćete tekst iz lekcije 5.3. Tada
|
||||
pomerite kursor DOLE da biste ponovo videli ovu lekciju.
|
||||
|
||||
2. Učitajte fajl TEST koristeći komandu :r TEST gde je TEST ime fajla
|
||||
koje ste koristili u prethodnoj lekciji. Sadržaj učitanog fajla je
|
||||
ubačen ispod kursora.
|
||||
|
||||
3. Da biste proverili da je fajl učitan, vratite kursor unazad i
|
||||
primetite dve kopije lekcije 5.3, originalnu i onu iz fajla.
|
||||
|
||||
NAPOMENA: Takođe možete učitati izlaz spoljašnje komande. Na primer,
|
||||
:r !ls će učitati izlaz komande ls i postaviti ga ispod
|
||||
kursora.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 5
|
||||
|
||||
|
||||
1. :!komanda izvršava spoljašnju komandu.
|
||||
|
||||
Korisni primeri:
|
||||
(MS-DOS) (Unix)
|
||||
:!dir :!ls - pregled sadržaja direktorijuma.
|
||||
:!del FAJL :!rm FAJL - briše fajl FAJL.
|
||||
|
||||
2. :w FAJL zapisuje trenutni tekst na disk pod imenom FAJL.
|
||||
|
||||
3. v pokret :w IME_FAJLA snima vizuelno označene redove u fajl
|
||||
IME_FAJLA.
|
||||
|
||||
4. :r IME_FAJLA učitava fajl IME_FAJLA sa diska i stavlja
|
||||
njegov sadržaj ispod kursora.
|
||||
|
||||
5. :r !dir učitava izlaz komande dir i postavlja ga ispod kursora.
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 6.1: KOMANDA OTVORI
|
||||
|
||||
|
||||
** Pritisnite o da biste otvorili red ispod kursora
|
||||
i prešli u Insert mod. **
|
||||
|
||||
1. Pomerite kursor na sledeći red označen sa --->.
|
||||
|
||||
2. Otkucajte malo o da biste otvorili novi red ISPOD kursora
|
||||
i prešli u Insert mod.
|
||||
|
||||
3. Otkucajte neki tekst i onda pritisnite <ESC> da biste izašli
|
||||
iz Insert moda.
|
||||
|
||||
---> Kad pritisnete o kursor prelazi u novootvoreni red u Insert modu.
|
||||
|
||||
4. Za otvaranje reda IZNAD kursora, umesto malog otkucajte veliko O .
|
||||
Isprobajte na donjem redu označenom sa --->.
|
||||
|
||||
---> Otvorite red iznad ovog kucanjem velikog O dok je kursor u ovom redu.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 6.2: KOMANDA DODAJ
|
||||
|
||||
|
||||
** Otkucajte a za dodavanje teksta IZA kursora. **
|
||||
|
||||
1. Pomerite kursor na početak sledećeg reda označenog sa --->.
|
||||
|
||||
2. Kucajte e dok kursor ne dođe na kraj reči re .
|
||||
|
||||
3. Otkucajte a (malo) da biste dodali tekst IZA kursora.
|
||||
|
||||
4. Dopunite reč kao što je u redu ispod. Pritisnite <ESC> za izlazak
|
||||
iz Insert moda.
|
||||
|
||||
5. Sa e pređite na narednu nepotpunu reč i ponovite korake 3 i 4.
|
||||
|
||||
---> Ovaj re omogućava ve dodav teksta u nekom redu.
|
||||
---> Ovaj red omogućava vežbanje dodavanja teksta u nekom redu.
|
||||
|
||||
NAPOMENA: Komande a, i, i A aktiviraju isti Insert mod, jedina
|
||||
razlika je u poziciji od koje će se tekst ubacivati.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 6.3: DRUGI NAČIN ZAMENE
|
||||
|
||||
|
||||
** Otkucajte veliko R da biste zamenili više od jednog znaka. **
|
||||
|
||||
1. Pomerite kursor na prvi sledeći red označen sa --->.
|
||||
Pomerite kursor na početak prvog xxx .
|
||||
|
||||
2. Pritisnite R i otkucajte broj koji je red ispod,
|
||||
tako da zameni xxx .
|
||||
|
||||
3. Pritisnite <ESC> za izlazak iz Replace moda.
|
||||
Primetite da je ostatak reda ostao nepromenjen.
|
||||
|
||||
4. Ponovite korake da biste zamenili drugo xxx.
|
||||
|
||||
---> Dodavanje 123 na xxx daje xxx.
|
||||
---> Dodavanje 123 na 456 daje 579.
|
||||
|
||||
NAPOMENA: Replace mod je kao Insert mod, s tom razlikom što svaki
|
||||
uneti znak briše već postojeći.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 6.4: KOPIRANJE I LEPLJENJE TEKSTA
|
||||
|
||||
|
||||
** Koristite operator y za kopiranje a p za lepljenje teksta. **
|
||||
|
||||
1. Pomerite kursor na red sa ---> i postavite kursor posle "a)".
|
||||
|
||||
2. Aktivirajte Visual mod sa v i pomerite kursor sve do ispred "prvi".
|
||||
|
||||
3. Pritisnite y da biste kopirali označeni tekst u interni bafer.
|
||||
|
||||
4. Pomerite kursor do kraja sledećeg reda: j$
|
||||
|
||||
5. Pritisnite p da biste zalepili tekst. Onda otkucajte: a drugi <ESC> .
|
||||
|
||||
6. Upotrebite Visual mod da označite " red.", kopirajte sa y , kursor
|
||||
pomerite na kraj sledećeg reda sa j$ i tamo zalepite tekst sa p .
|
||||
|
||||
---> a) ovo je prvi red.
|
||||
b)
|
||||
|
||||
NAPOMENA: takođe možete koristiti y kao operator; yw kopira jednu reč.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 6.5: POSTAVLJANJE OPCIJA
|
||||
|
||||
|
||||
** Postavite opciju tako da traženje i zamena ignorišu veličinu slova **
|
||||
|
||||
1. Potražite reč 'razlika': /razlika <ENTER>
|
||||
Ponovite nekoliko puta pritiskom na n .
|
||||
|
||||
2. Aktivirajte opciju 'ic' (Ignore case): :set ic
|
||||
|
||||
3. Ponovo potražite reč 'razlika' pritiskom na n
|
||||
Primetite da su sada pronađeni i RAZLIKA i Razlika.
|
||||
|
||||
4. Aktivirajte opcije 'hlsearch' i 'incsearch': :set hls is
|
||||
|
||||
5. Ponovo otkucajte komandu traženja i uočite razlike: /razlika <ENTER>
|
||||
|
||||
6. Za deaktiviranje opcije ic kucajte: :set noic
|
||||
|
||||
NAPOMENA: Za neoznačavanje pronađenih izraza otkucajte: :nohlsearch
|
||||
NAPOMENA: Ako želite da ne razlikujete veličinu slova u samo jednoj komandi
|
||||
traženja, dodajte \c u izraz: /razlika\c <ENTER>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 6
|
||||
|
||||
1. Pritisnite o za otvaranje reda ISPOD kursora i prelazak u Insert mod.
|
||||
Pritisnite O za otvaranje reda IZNAD kursora.
|
||||
|
||||
2. Pritisnite a za unos teksta IZA kursora.
|
||||
Pritisnite A za unos teksta na kraju reda.
|
||||
|
||||
3. Komanda e pomera kursor na kraj reči.
|
||||
|
||||
4. Operator y kopira tekst, p ga lepi.
|
||||
|
||||
5. Kucanje velikog R aktivira Replace mod dok ne pritisnete <ESC> .
|
||||
|
||||
6. Kucanje ":set xxx" aktivira opciju "xxx". Neke opcije su:
|
||||
'ic' 'ignorecase' ne razlikuje velika/mala slova pri traženju
|
||||
'is' 'incsearch' prikazuje pronađen tekst dok kucate izraz
|
||||
'hls' 'hlsearch' označava inverzno sve pronađene izraze
|
||||
Možete koristite dugo ili kratko ime opcije.
|
||||
|
||||
7. Ispred imena opcije stavite "no" da je deaktivirate: :set noic
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 7.1: DOBIJANJE POMOĆI
|
||||
|
||||
|
||||
** Koristite on-line sistem za pomoć **
|
||||
|
||||
Vim ima detaljan on-line sistem za pomoć. Za početak, pokušajte nešto
|
||||
od sledećeg:
|
||||
- pritisnite taster <HELP> (ako ga imate na tastaturi)
|
||||
- pritisnite taster <F1> (ako ga imate na tastaturi)
|
||||
- otkucajte :help <ENTER>
|
||||
|
||||
Pročitajte tekst u prozoru pomoći da biste naučili pomoć radi.
|
||||
Kucanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi.
|
||||
Otkucajte :q <ENTER> da zatvorite prozor pomoći.
|
||||
|
||||
Pomoć o praktično bilo kojoj temi možete dobiti dodavanjem argumenta
|
||||
komandi ":help". Pokušajte ovo (ne zaboravite <ENTER> na kraju):
|
||||
|
||||
:help w
|
||||
:help c_CTRL-D
|
||||
:help insert-index
|
||||
:help user-manual
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 7.2: PRAVLJENJE STARTNOG SKRIPTA
|
||||
|
||||
|
||||
** Aktivirajte mogućnosti editora **
|
||||
|
||||
Vim ima mnogo više mogućnosti nego Vi, ali većina nije automatski
|
||||
aktivirana. Za dodatne mogućnosti napravite "vimrc" fajl.
|
||||
|
||||
1. Otvorite "vimrc" fajl. Ovo zavisi od vašeg sistema:
|
||||
:e ~/.vimrc za Unix
|
||||
:e $VIM/_vimrc za MS-Windows
|
||||
|
||||
2. Onda učitajte primer sadržaja "vimrc" fajla:
|
||||
:r $VIMRUNTIME/vimrc_example.vim
|
||||
|
||||
3. Snimite fajl sa:
|
||||
:w
|
||||
|
||||
Sledeći put kada pokrenete Vim, bojenje sintakse teksta biće
|
||||
aktivirano. Sva svoja podešavanja možete dodati u "vimrc" fajl.
|
||||
Za više informacija otkucajte :help vimrc-intro
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lekcija 7.3: AUTOMATSKO DOVRŠAVANJE
|
||||
|
||||
|
||||
** Dovršavanje komandne linije sa CTRL-D i <TAB> **
|
||||
|
||||
1. Podesite Vim da ne bude u Vi-kompatibilnom modu: :set nocp
|
||||
|
||||
2. Pogledajte koji fajlovi postoje u direktorijumu: :!ls ili :!dir
|
||||
|
||||
3. Otkucajte početak komande: :e
|
||||
|
||||
4. Otkucajte CTRL-D i Vim će prikazati spisak komandi koje počinju sa "e".
|
||||
|
||||
5. Pritisnite <TAB> i Vim će dopuniti ime komande u ":edit".
|
||||
|
||||
6. Dodajte razmak i početak imena postojećeg fajla: :edit FA
|
||||
|
||||
7. Pritisnite <TAB>. Vim će dopuniti ime fajla (ako je jedinstveno).
|
||||
|
||||
NAPOMENA: Moguće je dopuniti mnoge komande. Samo probajte CTRL-D i <TAB>.
|
||||
Naročito je korisno za :help komande.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
REZIME lekcije 7
|
||||
|
||||
|
||||
1. Otkucajte :help ili pritisnite <F1> ili <Help> za pomoć.
|
||||
|
||||
2. Otkucajte :help komanda biste dobili pomoć za tu komandu.
|
||||
|
||||
3. Otkucajte CTRL-W CTRL-W za prelazak u drugi prozor.
|
||||
|
||||
4. Otkucajte :q da zatvorite prozor pomoći.
|
||||
|
||||
5. Napravite vimrc startni skript za aktiviranje podešavanja koja
|
||||
vam odgovaraju.
|
||||
|
||||
6. Dok kucate neku od : komandi, pritisnite CTRL-D da biste videli moguće
|
||||
vrednosti. Pritisnite <TAB> da odaberete jednu od njih.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Ovim je priručnik završen. Njegov cilj je bio kratak pregled Vim editora,
|
||||
koliko da omogući njegovo relativno jednostavno korišćenje. Priručnik nije
|
||||
potpun, jer Vim ima mnogo više komandi. Kao sledeće, pročitajte priručnik:
|
||||
":help user-manual".
|
||||
|
||||
Za dalje čitanje i učenje, preporučujemo knjigu:
|
||||
Vim - Vi Improved - by Steve Oualline
|
||||
Izdavač: New Riders
|
||||
Prva knjiga potpuno posvećena Vim-u. Naročito korisna za početnike.
|
||||
Ima mnoštvo primera i slika.
|
||||
Vidite http://iccf-holland.org/click5.html
|
||||
|
||||
Sledeća knjiga je starija i više govori o Vi-u nego o Vim-u, ali je takođe
|
||||
preporučujemo:
|
||||
Learning the Vi Editor - by Linda Lamb
|
||||
Izdavač: O'Reilly & Associates Inc.
|
||||
Dobra knjiga iz koje možete saznati skoro sve što možete raditi u Vi-ju.
|
||||
Šesto izdanje ima i informacija o Vim-u.
|
||||
|
||||
Ovaj priručnik su napisali: Michael C. Pierce i Robert K. Ware,
|
||||
Colorado School of Mines koristeći ideje Charlesa Smitha,
|
||||
Colorado State University. E-mail: bware@mines.colorado.edu.
|
||||
|
||||
Prilagođavanje za Vim uradio je Bram Moolenaar.
|
||||
|
||||
Prevod na srpski: Ivan Nejgebauer <ian@uns.ac.rs>
|
||||
Verzija 1.0, maj/juni 2014.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim tutor support file
|
||||
" Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Last Change: 2012 Sep 21
|
||||
" Last Change: 2014 Jun 25
|
||||
|
||||
" This Vim script is used for detecting if a translation of the
|
||||
" tutor file exist, i.e., a tutor.xx file, where xx is the language.
|
||||
@@ -36,6 +36,8 @@ else
|
||||
let s:ext = ".pl"
|
||||
elseif s:lang =~ "Slovak"
|
||||
let s:ext = ".sk"
|
||||
elseif s:lang =~ "Serbian"
|
||||
let s:ext = ".sr"
|
||||
elseif s:lang =~ "Czech"
|
||||
let s:ext = ".cs"
|
||||
elseif s:lang =~ "Dutch"
|
||||
@@ -122,6 +124,15 @@ if s:ext =~? '\.sk'
|
||||
endif
|
||||
endif
|
||||
|
||||
" The Slovak tutor is available in two encodings, guess which one to use
|
||||
" Note that the utf-8 version is the original, the cp1250 version is created
|
||||
" from it.
|
||||
if s:ext =~? '\.sr'
|
||||
if &enc =~ 1250
|
||||
let s:ext = ".sr.cp1250"
|
||||
endif
|
||||
endif
|
||||
|
||||
" The Czech tutor is available in three encodings, guess which one to use
|
||||
if s:ext =~? '\.cs'
|
||||
if &enc =~ 1250
|
||||
|
||||
@@ -973,6 +973,7 @@ $(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
|
||||
$(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
|
||||
$(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \
|
||||
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
|
||||
if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1
|
||||
|
||||
$(VIM): $(VIM).exe
|
||||
|
||||
|
||||
31
src/Makefile
31
src/Makefile
@@ -546,6 +546,7 @@ CClink = $(CC)
|
||||
# again.
|
||||
#CC = cc
|
||||
#CC = gcc
|
||||
#CC = clang
|
||||
|
||||
# COMPILER FLAGS - change as you please. Either before running {{{1
|
||||
# configure or afterwards. For examples see below.
|
||||
@@ -585,6 +586,9 @@ CClink = $(CC)
|
||||
# as root: sysctl -w vm.max_proc_mmap=30000
|
||||
#EXTRA_LIBS = /usr/local/lib/libefence.a
|
||||
|
||||
# Autoconf binary.
|
||||
AUTOCONF = autoconf
|
||||
|
||||
# PURIFY - remove the # to use the "purify" program (hoi Nia++!)
|
||||
#PURIFY = purify
|
||||
|
||||
@@ -1660,13 +1664,16 @@ tools: $(TOOLS)
|
||||
# auto/config.h isn't updated. The dependency on auto/config.mk should make
|
||||
# sure configure is run when it's needed.
|
||||
#
|
||||
# Remove the config.cache every time, once in a while it causes problems that
|
||||
# are very hard to figure out.
|
||||
#
|
||||
config auto/config.mk: auto/configure config.mk.in config.h.in
|
||||
if test -f auto/config.cache && \
|
||||
grep '^ac_cv_env_CFLAGS_value=' auto/config.cache > /dev/null && \
|
||||
! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \
|
||||
rm auto/config.cache; \
|
||||
fi
|
||||
GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \
|
||||
-rm -f auto/config.cache
|
||||
if test "X$(MAKECMDGOALS)" != "Xclean" \
|
||||
-a "X$(MAKECMDGOALS)" != "Xdistclean" \
|
||||
-a "X$(MAKECMDGOALS)" != "Xautoconf" \
|
||||
-a "X$(MAKECMDGOALS)" != "Xreconfig"; then \
|
||||
GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \
|
||||
CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
|
||||
LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \
|
||||
./configure $(CONF_OPT_GUI) $(CONF_OPT_X) $(CONF_OPT_XSMP) \
|
||||
@@ -1679,7 +1686,8 @@ config auto/config.mk: auto/configure config.mk.in config.h.in
|
||||
$(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
|
||||
$(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
|
||||
$(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \
|
||||
$(CONF_OPT_SYSMOUSE)
|
||||
$(CONF_OPT_SYSMOUSE); \
|
||||
fi
|
||||
|
||||
# Use "make reconfig" to rerun configure without cached values.
|
||||
# When config.h changes, most things will be recompiled automatically.
|
||||
@@ -1710,7 +1718,7 @@ reconfig: scratch clean
|
||||
# - Uses ">config.log" instead of "./config.log".
|
||||
autoconf:
|
||||
if test ! -f configure.save; then mv configure configure.save; fi
|
||||
autoconf
|
||||
$(AUTOCONF)
|
||||
sed -e 's+>config.log+>auto/config.log+' -e 's+\./config.log+auto/config.log+' configure > auto/configure
|
||||
chmod 755 auto/configure
|
||||
mv -f configure.save configure
|
||||
@@ -1861,7 +1869,7 @@ test check:
|
||||
-if test $(VIMTARGET) != vim -a ! -r vim; then \
|
||||
ln -s $(VIMTARGET) vim; \
|
||||
fi
|
||||
cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG)
|
||||
cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
$(MAKE) -f Makefile unittest
|
||||
|
||||
unittesttargets:
|
||||
@@ -1874,6 +1882,9 @@ unittest unittests: $(UNITTEST_TARGETS)
|
||||
|
||||
# Run individual test, assuming that Vim was already compiled.
|
||||
test1 test2 test3 test4 test5 test6 test7 test8 test9 \
|
||||
test_autoformat_join \
|
||||
test_eval \
|
||||
test_options \
|
||||
test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \
|
||||
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
|
||||
test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \
|
||||
@@ -1884,7 +1895,7 @@ test1 test2 test3 test4 test5 test6 test7 test8 test9 \
|
||||
test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
|
||||
test90 test91 test92 test93 test94 test95 test96 test97 test98 test99 \
|
||||
test100 test101 test102 test103 test104 test105 test106 test107:
|
||||
cd testdir; rm $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET)
|
||||
cd testdir; rm $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
|
||||
testclean:
|
||||
cd testdir; $(MAKE) -f Makefile clean
|
||||
|
||||
1302
src/auto/configure
vendored
1302
src/auto/configure
vendored
File diff suppressed because it is too large
Load Diff
44
src/buffer.c
44
src/buffer.c
@@ -371,7 +371,11 @@ close_buffer(win, buf, action, abort_if_last)
|
||||
unload_buf = TRUE;
|
||||
#endif
|
||||
|
||||
if (win != NULL)
|
||||
if (win != NULL
|
||||
#ifdef FEAT_WINDOWS
|
||||
&& win_valid(win) /* in case autocommands closed the window */
|
||||
#endif
|
||||
)
|
||||
{
|
||||
/* Set b_last_cursor when closing the last window for the buffer.
|
||||
* Remember the last cursor position and window options of the buffer.
|
||||
@@ -676,8 +680,16 @@ free_buffer(buf)
|
||||
#endif
|
||||
#ifdef FEAT_AUTOCMD
|
||||
aubuflocal_remove(buf);
|
||||
if (autocmd_busy)
|
||||
{
|
||||
/* Do not free the buffer structure while autocommands are executing,
|
||||
* it's still needed. Free it when autocmd_busy is reset. */
|
||||
buf->b_next = au_pending_free_buf;
|
||||
au_pending_free_buf = buf;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
vim_free(buf);
|
||||
vim_free(buf);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1432,10 +1444,8 @@ set_curbuf(buf, action)
|
||||
curwin->w_alt_fnum = curbuf->b_fnum; /* remember alternate file */
|
||||
buflist_altfpos(curwin); /* remember curpos */
|
||||
|
||||
#ifdef FEAT_VISUAL
|
||||
/* Don't restart Select mode after switching to another buffer. */
|
||||
VIsual_reselect = FALSE;
|
||||
#endif
|
||||
|
||||
/* close_windows() or apply_autocmds() may change curbuf */
|
||||
prevbuf = curbuf;
|
||||
@@ -1683,7 +1693,11 @@ buflist_new(ffname, sfname, lnum, flags)
|
||||
buf->b_p_bl = TRUE;
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (!(flags & BLN_DUMMY))
|
||||
{
|
||||
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf);
|
||||
if (!buf_valid(buf))
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return buf;
|
||||
@@ -1859,8 +1873,14 @@ buflist_new(ffname, sfname, lnum, flags)
|
||||
if (!(flags & BLN_DUMMY))
|
||||
{
|
||||
apply_autocmds(EVENT_BUFNEW, NULL, NULL, FALSE, buf);
|
||||
if (!buf_valid(buf))
|
||||
return NULL;
|
||||
if (flags & BLN_LISTED)
|
||||
{
|
||||
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf);
|
||||
if (!buf_valid(buf))
|
||||
return NULL;
|
||||
}
|
||||
# ifdef FEAT_EVAL
|
||||
if (aborting()) /* autocmds may abort script processing */
|
||||
return NULL;
|
||||
@@ -5509,6 +5529,10 @@ buf_addsign(buf, id, lnum, typenr)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* For an existing, placed sign "markId" change the type to "typenr".
|
||||
* Returns the line number of the sign, or zero if the sign is not found.
|
||||
*/
|
||||
linenr_T
|
||||
buf_change_sign_type(buf, markId, typenr)
|
||||
buf_T *buf; /* buffer to store sign in */
|
||||
@@ -5677,6 +5701,14 @@ buf_delete_signs(buf)
|
||||
{
|
||||
signlist_T *next;
|
||||
|
||||
/* When deleting the last sign need to redraw the windows to remove the
|
||||
* sign column. */
|
||||
if (buf->b_signlist != NULL)
|
||||
{
|
||||
redraw_buf_later(buf, NOT_VALID);
|
||||
changed_cline_bef_curs();
|
||||
}
|
||||
|
||||
while (buf->b_signlist != NULL)
|
||||
{
|
||||
next = buf->b_signlist->next;
|
||||
@@ -5695,11 +5727,7 @@ buf_delete_all_signs()
|
||||
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
if (buf->b_signlist != NULL)
|
||||
{
|
||||
/* Need to redraw the windows to remove the sign column. */
|
||||
redraw_buf_later(buf, NOT_VALID);
|
||||
buf_delete_signs(buf);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -867,9 +867,10 @@ linetabsize_col(startcol, s)
|
||||
char_u *s;
|
||||
{
|
||||
colnr_T col = startcol;
|
||||
char_u *line = s; /* pointer to start of line, for breakindent */
|
||||
|
||||
while (*s != NUL)
|
||||
col += lbr_chartabsize_adv(&s, col);
|
||||
col += lbr_chartabsize_adv(line, &s, col);
|
||||
return (int)col;
|
||||
}
|
||||
|
||||
@@ -877,16 +878,17 @@ linetabsize_col(startcol, s)
|
||||
* Like linetabsize(), but for a given window instead of the current one.
|
||||
*/
|
||||
int
|
||||
win_linetabsize(wp, p, len)
|
||||
win_linetabsize(wp, line, len)
|
||||
win_T *wp;
|
||||
char_u *p;
|
||||
char_u *line;
|
||||
colnr_T len;
|
||||
{
|
||||
colnr_T col = 0;
|
||||
char_u *s;
|
||||
|
||||
for (s = p; *s != NUL && (len == MAXCOL || s < p + len); mb_ptr_adv(s))
|
||||
col += win_lbr_chartabsize(wp, s, col, NULL);
|
||||
for (s = line; *s != NUL && (len == MAXCOL || s < line + len);
|
||||
mb_ptr_adv(s))
|
||||
col += win_lbr_chartabsize(wp, line, s, col, NULL);
|
||||
return (int)col;
|
||||
}
|
||||
|
||||
@@ -1021,12 +1023,13 @@ vim_isprintc_strict(c)
|
||||
* like chartabsize(), but also check for line breaks on the screen
|
||||
*/
|
||||
int
|
||||
lbr_chartabsize(s, col)
|
||||
lbr_chartabsize(line, s, col)
|
||||
char_u *line; /* start of the line */
|
||||
unsigned char *s;
|
||||
colnr_T col;
|
||||
{
|
||||
#ifdef FEAT_LINEBREAK
|
||||
if (!curwin->w_p_lbr && *p_sbr == NUL)
|
||||
if (!curwin->w_p_lbr && *p_sbr == NUL && !curwin->w_p_bri)
|
||||
{
|
||||
#endif
|
||||
#ifdef FEAT_MBYTE
|
||||
@@ -1036,7 +1039,7 @@ lbr_chartabsize(s, col)
|
||||
RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, s, col)
|
||||
#ifdef FEAT_LINEBREAK
|
||||
}
|
||||
return win_lbr_chartabsize(curwin, s, col, NULL);
|
||||
return win_lbr_chartabsize(curwin, line == NULL ? s : line, s, col, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1044,13 +1047,14 @@ lbr_chartabsize(s, col)
|
||||
* Call lbr_chartabsize() and advance the pointer.
|
||||
*/
|
||||
int
|
||||
lbr_chartabsize_adv(s, col)
|
||||
lbr_chartabsize_adv(line, s, col)
|
||||
char_u *line; /* start of the line */
|
||||
char_u **s;
|
||||
colnr_T col;
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = lbr_chartabsize(*s, col);
|
||||
retval = lbr_chartabsize(line, *s, col);
|
||||
mb_ptr_adv(*s);
|
||||
return retval;
|
||||
}
|
||||
@@ -1063,8 +1067,9 @@ lbr_chartabsize_adv(s, col)
|
||||
* value, init to 0 before calling.
|
||||
*/
|
||||
int
|
||||
win_lbr_chartabsize(wp, s, col, headp)
|
||||
win_lbr_chartabsize(wp, line, s, col, headp)
|
||||
win_T *wp;
|
||||
char_u *line; /* start of the line */
|
||||
char_u *s;
|
||||
colnr_T col;
|
||||
int *headp UNUSED;
|
||||
@@ -1073,6 +1078,7 @@ win_lbr_chartabsize(wp, s, col, headp)
|
||||
int c;
|
||||
int size;
|
||||
colnr_T col2;
|
||||
colnr_T col_adj = 0; /* col + screen size of tab */
|
||||
colnr_T colmax;
|
||||
int added;
|
||||
# ifdef FEAT_MBYTE
|
||||
@@ -1086,9 +1092,9 @@ win_lbr_chartabsize(wp, s, col, headp)
|
||||
int n;
|
||||
|
||||
/*
|
||||
* No 'linebreak' and 'showbreak': return quickly.
|
||||
* No 'linebreak', 'showbreak' and 'breakindent': return quickly.
|
||||
*/
|
||||
if (!wp->w_p_lbr && *p_sbr == NUL)
|
||||
if (!wp->w_p_lbr && !wp->w_p_bri && *p_sbr == NUL)
|
||||
#endif
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
@@ -1104,6 +1110,8 @@ win_lbr_chartabsize(wp, s, col, headp)
|
||||
*/
|
||||
size = win_chartabsize(wp, s, col);
|
||||
c = *s;
|
||||
if (tab_corr)
|
||||
col_adj = size - 1;
|
||||
|
||||
/*
|
||||
* If 'linebreak' set check at a blank before a non-blank if the line
|
||||
@@ -1112,7 +1120,6 @@ win_lbr_chartabsize(wp, s, col, headp)
|
||||
if (wp->w_p_lbr
|
||||
&& vim_isbreak(c)
|
||||
&& !vim_isbreak(s[1])
|
||||
&& !wp->w_p_list
|
||||
&& wp->w_p_wrap
|
||||
# ifdef FEAT_VERTSPLIT
|
||||
&& wp->w_width != 0
|
||||
@@ -1125,12 +1132,13 @@ win_lbr_chartabsize(wp, s, col, headp)
|
||||
*/
|
||||
numberextra = win_col_off(wp);
|
||||
col2 = col;
|
||||
colmax = (colnr_T)(W_WIDTH(wp) - numberextra);
|
||||
colmax = (colnr_T)(W_WIDTH(wp) - numberextra - col_adj);
|
||||
if (col >= colmax)
|
||||
{
|
||||
n = colmax + win_col_off2(wp);
|
||||
colmax += col_adj;
|
||||
n = colmax + win_col_off2(wp);
|
||||
if (n > 0)
|
||||
colmax += (((col - colmax) / n) + 1) * n;
|
||||
colmax += (((col - colmax) / n) + 1) * n - col_adj;
|
||||
}
|
||||
|
||||
for (;;)
|
||||
@@ -1147,7 +1155,7 @@ win_lbr_chartabsize(wp, s, col, headp)
|
||||
col2 += win_chartabsize(wp, s, col2);
|
||||
if (col2 >= colmax) /* doesn't fit */
|
||||
{
|
||||
size = colmax - col;
|
||||
size = colmax - col + col_adj;
|
||||
tab_corr = FALSE;
|
||||
break;
|
||||
}
|
||||
@@ -1163,11 +1171,12 @@ win_lbr_chartabsize(wp, s, col, headp)
|
||||
# endif
|
||||
|
||||
/*
|
||||
* May have to add something for 'showbreak' string at start of line
|
||||
* May have to add something for 'breakindent' and/or 'showbreak'
|
||||
* string at start of line.
|
||||
* Set *headp to the size of what we add.
|
||||
*/
|
||||
added = 0;
|
||||
if (*p_sbr != NUL && wp->w_p_wrap && col != 0)
|
||||
if ((*p_sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && col != 0)
|
||||
{
|
||||
numberextra = win_col_off(wp);
|
||||
col += numberextra + mb_added;
|
||||
@@ -1180,7 +1189,12 @@ win_lbr_chartabsize(wp, s, col, headp)
|
||||
}
|
||||
if (col == 0 || col + size > (colnr_T)W_WIDTH(wp))
|
||||
{
|
||||
added = vim_strsize(p_sbr);
|
||||
added = 0;
|
||||
if (*p_sbr != NUL)
|
||||
added += vim_strsize(p_sbr);
|
||||
if (wp->w_p_bri)
|
||||
added += get_breakindent_win(wp, line);
|
||||
|
||||
if (tab_corr)
|
||||
size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts;
|
||||
else
|
||||
@@ -1274,13 +1288,14 @@ getvcol(wp, pos, start, cursor, end)
|
||||
colnr_T vcol;
|
||||
char_u *ptr; /* points to current char */
|
||||
char_u *posptr; /* points to char at pos->col */
|
||||
char_u *line; /* start of the line */
|
||||
int incr;
|
||||
int head;
|
||||
int ts = wp->w_buffer->b_p_ts;
|
||||
int c;
|
||||
|
||||
vcol = 0;
|
||||
ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
|
||||
line = ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
|
||||
if (pos->col == MAXCOL)
|
||||
posptr = NULL; /* continue until the NUL */
|
||||
else
|
||||
@@ -1288,12 +1303,13 @@ getvcol(wp, pos, start, cursor, end)
|
||||
|
||||
/*
|
||||
* This function is used very often, do some speed optimizations.
|
||||
* When 'list', 'linebreak' and 'showbreak' are not set use a simple loop.
|
||||
* When 'list', 'linebreak', 'showbreak' and 'breakindent' are not set
|
||||
* use a simple loop.
|
||||
* Also use this when 'list' is set but tabs take their normal size.
|
||||
*/
|
||||
if ((!wp->w_p_list || lcs_tab1 != NUL)
|
||||
#ifdef FEAT_LINEBREAK
|
||||
&& !wp->w_p_lbr && *p_sbr == NUL
|
||||
&& !wp->w_p_lbr && *p_sbr == NUL && !wp->w_p_bri
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@@ -1355,7 +1371,7 @@ getvcol(wp, pos, start, cursor, end)
|
||||
{
|
||||
/* A tab gets expanded, depending on the current column */
|
||||
head = 0;
|
||||
incr = win_lbr_chartabsize(wp, ptr, vcol, &head);
|
||||
incr = win_lbr_chartabsize(wp, line, ptr, vcol, &head);
|
||||
/* make sure we don't go past the end of the line */
|
||||
if (*ptr == NUL)
|
||||
{
|
||||
@@ -1380,10 +1396,7 @@ getvcol(wp, pos, start, cursor, end)
|
||||
&& (State & NORMAL)
|
||||
&& !wp->w_p_list
|
||||
&& !virtual_active()
|
||||
#ifdef FEAT_VISUAL
|
||||
&& !(VIsual_active
|
||||
&& (*p_sel == 'e' || ltoreq(*pos, VIsual)))
|
||||
#endif
|
||||
&& !(VIsual_active && (*p_sel == 'e' || ltoreq(*pos, VIsual)))
|
||||
)
|
||||
*cursor = vcol + incr - 1; /* cursor at end */
|
||||
else
|
||||
@@ -1463,7 +1476,6 @@ getvvcol(wp, pos, start, cursor, end)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_VISUAL) || defined(PROTO)
|
||||
/*
|
||||
* Get the leftmost and rightmost virtual column of pos1 and pos2.
|
||||
* Used for Visual block mode.
|
||||
@@ -1500,7 +1512,6 @@ getvcols(wp, pos1, pos2, left, right)
|
||||
else
|
||||
*right = to1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* skipwhite: skip over ' ' and '\t'.
|
||||
|
||||
@@ -191,6 +191,7 @@
|
||||
#undef HAVE_SIGSETJMP
|
||||
#undef HAVE_SIGSTACK
|
||||
#undef HAVE_SIGVEC
|
||||
#undef HAVE_SMACK
|
||||
#undef HAVE_STRCASECMP
|
||||
#undef HAVE_STRERROR
|
||||
#undef HAVE_STRFTIME
|
||||
|
||||
@@ -164,6 +164,8 @@ OS_EXTRA_OBJ = @OS_EXTRA_OBJ@
|
||||
### If the *.po files are to be translated to *.mo files.
|
||||
MAKEMO = @MAKEMO@
|
||||
|
||||
MSGFMT = @MSGFMT@
|
||||
|
||||
# Make sure that "make first" will run "make all" once configure has done its
|
||||
# work. This is needed when using the Makefile in the top directory.
|
||||
first: all
|
||||
|
||||
159
src/configure.in
159
src/configure.in
@@ -14,6 +14,7 @@ dnl Checks for programs.
|
||||
AC_PROG_CC dnl required by almost everything
|
||||
AC_PROG_CPP dnl required by header file checks
|
||||
AC_PROGRAM_EGREP dnl required by AC_EGREP_CPP
|
||||
AC_PROG_FGREP dnl finds working grep -F
|
||||
AC_ISC_POSIX dnl required by AC_C_CROSS
|
||||
AC_PROG_AWK dnl required for "make html" in ../doc
|
||||
|
||||
@@ -45,10 +46,10 @@ if test -z "$CFLAGS"; then
|
||||
fi
|
||||
if test "$GCC" = yes; then
|
||||
dnl method that should work for nearly all versions
|
||||
gccversion=`"$CC" -dumpversion`
|
||||
gccversion=`$CC -dumpversion`
|
||||
if test "x$gccversion" = "x"; then
|
||||
dnl old method; fall-back for when -dumpversion doesn't work
|
||||
gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
|
||||
gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
|
||||
fi
|
||||
dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki
|
||||
if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
|
||||
@@ -67,7 +68,7 @@ dnl warning when that flag is passed to. Accordingly, adjust CFLAGS based on
|
||||
dnl the version number of the clang in use.
|
||||
dnl Note that this does not work to get the version of clang 3.1 or 3.2.
|
||||
AC_MSG_CHECKING(for recent clang version)
|
||||
CLANG_VERSION_STRING=`"$CC" --version 2>/dev/null | sed -n -e 's/^.*clang.*\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*$/\1/p'`
|
||||
CLANG_VERSION_STRING=`$CC --version 2>/dev/null | sed -n -e 's/^.*clang.*\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*$/\1/p'`
|
||||
if test x"$CLANG_VERSION_STRING" != x"" ; then
|
||||
CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*/\1/p'`
|
||||
CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*/\1/p'`
|
||||
@@ -386,18 +387,48 @@ fi
|
||||
AC_SUBST(QUOTESED)
|
||||
|
||||
|
||||
dnl Link with -lselinux for SELinux stuff; if not found
|
||||
AC_MSG_CHECKING(--disable-selinux argument)
|
||||
AC_ARG_ENABLE(selinux,
|
||||
[ --disable-selinux Don't check for SELinux support.],
|
||||
, enable_selinux="yes")
|
||||
if test "$enable_selinux" = "yes"; then
|
||||
dnl Link with -lsmack for Smack stuff; if not found
|
||||
AC_MSG_CHECKING(--disable-smack argument)
|
||||
AC_ARG_ENABLE(smack,
|
||||
[ --disable-smack Do not check for Smack support.],
|
||||
, enable_smack="yes")
|
||||
if test "$enable_smack" = "yes"; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_CHECK_LIB(selinux, is_selinux_enabled,
|
||||
[LIBS="$LIBS -lselinux"
|
||||
AC_DEFINE(HAVE_SELINUX)])
|
||||
AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no")
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
if test "$enable_smack" = "yes"; then
|
||||
AC_CHECK_HEADER([attr/xattr.h], true, enable_smack="no")
|
||||
fi
|
||||
if test "$enable_smack" = "yes"; then
|
||||
AC_MSG_CHECKING(for XATTR_NAME_SMACKEXEC in linux/xattr.h)
|
||||
AC_EGREP_CPP(XATTR_NAME_SMACKEXEC, [#include <linux/xattr.h>],
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no); enable_smack="no")
|
||||
fi
|
||||
if test "$enable_smack" = "yes"; then
|
||||
AC_CHECK_LIB(attr, setxattr,
|
||||
[LIBS="$LIBS -lattr"
|
||||
found_smack="yes"
|
||||
AC_DEFINE(HAVE_SMACK)])
|
||||
fi
|
||||
|
||||
dnl When smack was found don't search for SELinux
|
||||
if test "x$found_smack" = "x"; then
|
||||
dnl Link with -lselinux for SELinux stuff; if not found
|
||||
AC_MSG_CHECKING(--disable-selinux argument)
|
||||
AC_ARG_ENABLE(selinux,
|
||||
[ --disable-selinux Do not check for SELinux support.],
|
||||
, enable_selinux="yes")
|
||||
if test "$enable_selinux" = "yes"; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_CHECK_LIB(selinux, is_selinux_enabled,
|
||||
[LIBS="$LIBS -lselinux"
|
||||
AC_DEFINE(HAVE_SELINUX)])
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Check user requested features.
|
||||
@@ -936,7 +967,7 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
|
||||
PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[[^ ]]*//'`
|
||||
fi
|
||||
if test "X$perlldflags" != "X"; then
|
||||
if test "X`echo \"$LDFLAGS\" | grep -F -e \"$perlldflags\"`" = "X"; then
|
||||
if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
|
||||
LDFLAGS="$perlldflags $LDFLAGS"
|
||||
fi
|
||||
fi
|
||||
@@ -1101,10 +1132,15 @@ eof
|
||||
vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
|
||||
fi
|
||||
])
|
||||
AC_CACHE_VAL(vi_cv_dll_name_python,
|
||||
[
|
||||
if test "X$python_DLLLIBRARY" != "X"; then
|
||||
vi_cv_dll_name_python="$python_DLLLIBRARY"
|
||||
else
|
||||
vi_cv_dll_name_python="$python_INSTSONAME"
|
||||
fi
|
||||
])
|
||||
|
||||
if test "X$python_DLLLIBRARY" != "X"; then
|
||||
python_INSTSONAME="$python_DLLLIBRARY"
|
||||
fi
|
||||
PYTHON_LIBS="${vi_cv_path_python_plibs}"
|
||||
if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
|
||||
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
|
||||
@@ -1292,19 +1328,24 @@ __:
|
||||
@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python3_INSTSONAME='$(INSTSONAME)'"
|
||||
eof
|
||||
dnl -- delete the lines from make about Entering/Leaving directory
|
||||
eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||
rm -f -- "${tmp_mkf}"
|
||||
dnl -- delete the lines from make about Entering/Leaving directory
|
||||
eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||
rm -f -- "${tmp_mkf}"
|
||||
vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
|
||||
vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
|
||||
dnl remove -ltermcap, it can conflict with an earlier -lncurses
|
||||
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
|
||||
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
|
||||
])
|
||||
|
||||
if test "X$python3_DLLLIBRARY" != "X"; then
|
||||
python3_INSTSONAME="$python3_DLLLIBRARY"
|
||||
fi
|
||||
vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
|
||||
dnl remove -ltermcap, it can conflict with an earlier -lncurses
|
||||
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
|
||||
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
|
||||
])
|
||||
AC_CACHE_VAL(vi_cv_dll_name_python3,
|
||||
[
|
||||
if test "X$python3_DLLLIBRARY" != "X"; then
|
||||
vi_cv_dll_name_python3="$python3_DLLLIBRARY"
|
||||
else
|
||||
vi_cv_dll_name_python3="$python3_INSTSONAME"
|
||||
fi
|
||||
])
|
||||
|
||||
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
|
||||
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
|
||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
|
||||
@@ -1397,7 +1438,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
|
||||
ldflags_save=$LDFLAGS
|
||||
dnl -ldl must go first to make this work on Archlinux (Roland Puntaier)
|
||||
LDFLAGS="-ldl $LDFLAGS"
|
||||
AC_RUN_IFELSE([
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||
#include <dlfcn.h>
|
||||
/* If this program fails, then RTLD_GLOBAL is needed.
|
||||
* RTLD_GLOBAL will be used and then it is not possible to
|
||||
@@ -1427,10 +1468,10 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int not_needed = 0;
|
||||
if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}"))
|
||||
if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
|
||||
not_needed = 1;
|
||||
return !not_needed;
|
||||
}],
|
||||
}])],
|
||||
[AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)])
|
||||
|
||||
CFLAGS=$cflags_save
|
||||
@@ -1442,7 +1483,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
|
||||
ldflags_save=$LDFLAGS
|
||||
dnl -ldl must go first to make this work on Archlinux (Roland Puntaier)
|
||||
LDFLAGS="-ldl $LDFLAGS"
|
||||
AC_RUN_IFELSE([
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||
#include <dlfcn.h>
|
||||
#include <wchar.h>
|
||||
/* If this program fails, then RTLD_GLOBAL is needed.
|
||||
@@ -1473,10 +1514,10 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int not_needed = 0;
|
||||
if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}"))
|
||||
if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
|
||||
not_needed = 1;
|
||||
return !not_needed;
|
||||
}],
|
||||
}])],
|
||||
[AC_MSG_RESULT(yes);AC_DEFINE(PY3_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)])
|
||||
|
||||
CFLAGS=$cflags_save
|
||||
@@ -1484,17 +1525,17 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
|
||||
|
||||
PYTHON_SRC="if_python.c"
|
||||
PYTHON_OBJ="objects/if_python.o"
|
||||
PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
|
||||
PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
|
||||
PYTHON_LIBS=
|
||||
PYTHON3_SRC="if_python3.c"
|
||||
PYTHON3_OBJ="objects/if_python3.o"
|
||||
PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\""
|
||||
PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
|
||||
PYTHON3_LIBS=
|
||||
elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
|
||||
AC_DEFINE(DYNAMIC_PYTHON)
|
||||
PYTHON_SRC="if_python.c"
|
||||
PYTHON_OBJ="objects/if_python.o"
|
||||
PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\""
|
||||
PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
|
||||
PYTHON_LIBS=
|
||||
elif test "$python_ok" = yes; then
|
||||
dnl Check that adding -fPIE works. It may be needed when using a static
|
||||
@@ -1516,7 +1557,7 @@ elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
|
||||
AC_DEFINE(DYNAMIC_PYTHON3)
|
||||
PYTHON3_SRC="if_python3.c"
|
||||
PYTHON3_OBJ="objects/if_python3.o"
|
||||
PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\""
|
||||
PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
|
||||
PYTHON3_LIBS=
|
||||
elif test "$python3_ok" = yes; then
|
||||
dnl Check that adding -fPIE works. It may be needed when using a static
|
||||
@@ -1692,9 +1733,9 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
if test "X$rubyhdrdir" != "X"; then
|
||||
AC_MSG_RESULT($rubyhdrdir)
|
||||
RUBY_CFLAGS="-I$rubyhdrdir"
|
||||
rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['arch']]"`
|
||||
if test -d "$rubyhdrdir/$rubyarch"; then
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
|
||||
rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG[['rubyarchhdrdir']] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG[['arch']]"`
|
||||
if test -d "$rubyarchdir"; then
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
|
||||
fi
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
|
||||
if test "X$rubyversion" = "X"; then
|
||||
@@ -1727,7 +1768,7 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
dnl configure, so strip these flags first (if present)
|
||||
rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
|
||||
if test "X$rubyldflags" != "X"; then
|
||||
if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then
|
||||
if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$rubyldflags\"`" = "X"; then
|
||||
LDFLAGS="$rubyldflags $LDFLAGS"
|
||||
fi
|
||||
fi
|
||||
@@ -2612,7 +2653,7 @@ if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_
|
||||
AC_MSG_CHECKING(for XIMText in X11/Xlib.h)
|
||||
AC_EGREP_CPP(XIMText, [#include <X11/Xlib.h>],
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no; xim has been disabled); enable_xim = "no")
|
||||
AC_MSG_RESULT(no; xim has been disabled); enable_xim="no")
|
||||
fi
|
||||
CPPFLAGS=$cppflags_save
|
||||
|
||||
@@ -2737,7 +2778,7 @@ dnl Checks for libraries and include files.
|
||||
|
||||
AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken],
|
||||
[
|
||||
AC_RUN_IFELSE([[
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#if STDC_HEADERS
|
||||
@@ -2745,7 +2786,7 @@ AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken],
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
|
||||
]],[
|
||||
]])],[
|
||||
vim_cv_toupper_broken=yes
|
||||
],[
|
||||
vim_cv_toupper_broken=no
|
||||
@@ -2993,7 +3034,7 @@ fi
|
||||
|
||||
AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo],
|
||||
[
|
||||
AC_RUN_IFELSE([[
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include "confdefs.h"
|
||||
#ifdef HAVE_TERMCAP_H
|
||||
# include <termcap.h>
|
||||
@@ -3007,7 +3048,7 @@ AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo],
|
||||
#endif
|
||||
main()
|
||||
{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
|
||||
]],[
|
||||
]])],[
|
||||
vim_cv_terminfo=no
|
||||
],[
|
||||
vim_cv_terminfo=yes
|
||||
@@ -3023,7 +3064,7 @@ fi
|
||||
if test "x$olibs" != "x$LIBS"; then
|
||||
AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent],
|
||||
[
|
||||
AC_RUN_IFELSE([[
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include "confdefs.h"
|
||||
#ifdef HAVE_TERMCAP_H
|
||||
# include <termcap.h>
|
||||
@@ -3034,7 +3075,7 @@ if test "x$olibs" != "x$LIBS"; then
|
||||
#endif
|
||||
main()
|
||||
{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
|
||||
]],[
|
||||
]])],[
|
||||
vim_cv_tgent=zero
|
||||
],[
|
||||
vim_cv_tgent=non-zero
|
||||
@@ -3158,7 +3199,7 @@ dnl support provided by Luke Mewburn <lm@rmit.edu.au>, 931222
|
||||
rm -f conftest_grp
|
||||
AC_CACHE_CHECK([default tty permissions/group], [vim_cv_tty_group],
|
||||
[
|
||||
AC_RUN_IFELSE([[
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
@@ -3194,7 +3235,7 @@ main()
|
||||
fclose(fp);
|
||||
exit(0);
|
||||
}
|
||||
]],[
|
||||
]])],[
|
||||
if test -f conftest_grp; then
|
||||
vim_cv_tty_group=`cat conftest_grp`
|
||||
if test "x$vim_cv_tty_mode" = "x" ; then
|
||||
@@ -3252,7 +3293,7 @@ dnl tricky stuff: try to find out if getcwd() is implemented with
|
||||
dnl system("sh -c pwd")
|
||||
AC_CACHE_CHECK([getcwd implementation is broken], [vim_cv_getcwd_broken],
|
||||
[
|
||||
AC_RUN_IFELSE([[
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include "confdefs.h"
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
@@ -3265,7 +3306,7 @@ main()
|
||||
environ = dagger;
|
||||
return getcwd(buffer, 500) ? 0 : 1;
|
||||
}
|
||||
]],[
|
||||
]])],[
|
||||
vim_cv_getcwd_broken=no
|
||||
],[
|
||||
vim_cv_getcwd_broken=yes
|
||||
@@ -3308,7 +3349,7 @@ AC_TRY_COMPILE(
|
||||
|
||||
AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash],
|
||||
[
|
||||
AC_RUN_IFELSE([[
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include "confdefs.h"
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
@@ -3317,7 +3358,7 @@ AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_s
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
main() {struct stat st; exit(stat("configure/", &st) != 0); }
|
||||
]],[
|
||||
]])],[
|
||||
vim_cv_stat_ignores_slash=yes
|
||||
],[
|
||||
vim_cv_stat_ignores_slash=no
|
||||
@@ -3631,7 +3672,7 @@ main() {
|
||||
|
||||
AC_CACHE_CHECK([whether memmove handles overlaps],[vim_cv_memmove_handles_overlap],
|
||||
[
|
||||
AC_RUN_IFELSE([[#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog]],
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog]])],
|
||||
[
|
||||
vim_cv_memmove_handles_overlap=yes
|
||||
],[
|
||||
@@ -3646,7 +3687,7 @@ if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
|
||||
else
|
||||
AC_CACHE_CHECK([whether bcopy handles overlaps],[vim_cv_bcopy_handles_overlap],
|
||||
[
|
||||
AC_RUN_IFELSE([[#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog]],
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog]])],
|
||||
[
|
||||
vim_cv_bcopy_handles_overlap=yes
|
||||
],[
|
||||
@@ -3661,7 +3702,7 @@ else
|
||||
else
|
||||
AC_CACHE_CHECK([whether memcpy handles overlaps],[vim_cv_memcpy_handles_overlap],
|
||||
[
|
||||
AC_RUN_IFELSE([[#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog]],
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog]])],
|
||||
[
|
||||
vim_cv_memcpy_handles_overlap=yes
|
||||
],[
|
||||
|
||||
@@ -622,6 +622,7 @@ diff_redraw(dofold)
|
||||
wp->w_topfill = (n < 0 ? 0 : n);
|
||||
else if (n > 0 && n > wp->w_topfill)
|
||||
wp->w_topfill = n;
|
||||
check_topfill(wp, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1425,6 +1425,8 @@ static digr_T digraphdefault[] =
|
||||
{'W', '=', 0x20a9},
|
||||
{'=', 'e', 0x20ac}, /* euro */
|
||||
{'E', 'u', 0x20ac}, /* euro */
|
||||
{'=', 'R', 0x20bd}, /* rouble */
|
||||
{'=', 'P', 0x20bd}, /* rouble */
|
||||
{'o', 'C', 0x2103},
|
||||
{'c', 'o', 0x2105},
|
||||
{'o', 'F', 0x2109},
|
||||
|
||||
99
src/edit.c
99
src/edit.c
@@ -220,9 +220,7 @@ static int ins_esc __ARGS((long *count, int cmdchar, int nomove));
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
static void ins_ctrl_ __ARGS((void));
|
||||
#endif
|
||||
#ifdef FEAT_VISUAL
|
||||
static int ins_start_select __ARGS((int c));
|
||||
#endif
|
||||
static void ins_insert __ARGS((int replaceState));
|
||||
static void ins_ctrl_o __ARGS((void));
|
||||
static void ins_shift __ARGS((int c, int lastc));
|
||||
@@ -932,7 +930,6 @@ edit(cmdchar, startln, count)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_VISUAL
|
||||
/*
|
||||
* If 'keymodel' contains "startsel", may start selection. If it
|
||||
* does, a CTRL-O and c will be stuffed, we need to get these
|
||||
@@ -940,7 +937,6 @@ edit(cmdchar, startln, count)
|
||||
*/
|
||||
if (ins_start_select(c))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The big switch to handle a character in insert mode.
|
||||
@@ -1960,7 +1956,7 @@ change_indent(type, amount, round, replaced, call_changed_bytes)
|
||||
else
|
||||
#endif
|
||||
++new_cursor_col;
|
||||
vcol += lbr_chartabsize(ptr + new_cursor_col, (colnr_T)vcol);
|
||||
vcol += lbr_chartabsize(ptr, ptr + new_cursor_col, (colnr_T)vcol);
|
||||
}
|
||||
vcol = last_vcol;
|
||||
|
||||
@@ -3858,7 +3854,7 @@ ins_compl_prep(c)
|
||||
ins_compl_free();
|
||||
compl_started = FALSE;
|
||||
compl_matches = 0;
|
||||
msg_clr_cmdline(); /* necessary for "noshowmode" */
|
||||
msg_clr_cmdline(); /* necessary for "noshowmode" */
|
||||
ctrl_x_mode = 0;
|
||||
compl_enter_selects = FALSE;
|
||||
if (edit_submode != NULL)
|
||||
@@ -5289,7 +5285,8 @@ ins_complete(c)
|
||||
{
|
||||
ctrl_x_mode = 0;
|
||||
edit_submode = NULL;
|
||||
msg_clr_cmdline();
|
||||
if (!shortmess(SHM_COMPLETIONMENU))
|
||||
msg_clr_cmdline();
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -5548,15 +5545,18 @@ ins_complete(c)
|
||||
|
||||
/* Show a message about what (completion) mode we're in. */
|
||||
showmode();
|
||||
if (edit_submode_extra != NULL)
|
||||
if (!shortmess(SHM_COMPLETIONMENU))
|
||||
{
|
||||
if (!p_smd)
|
||||
msg_attr(edit_submode_extra,
|
||||
edit_submode_highl < HLF_COUNT
|
||||
? hl_attr(edit_submode_highl) : 0);
|
||||
if (edit_submode_extra != NULL)
|
||||
{
|
||||
if (!p_smd)
|
||||
msg_attr(edit_submode_extra,
|
||||
edit_submode_highl < HLF_COUNT
|
||||
? hl_attr(edit_submode_highl) : 0);
|
||||
}
|
||||
else
|
||||
msg_clr_cmdline(); /* necessary for "noshowmode" */
|
||||
}
|
||||
else
|
||||
msg_clr_cmdline(); /* necessary for "noshowmode" */
|
||||
|
||||
/* Show the popup menu, unless we got interrupted. */
|
||||
if (!compl_interrupted)
|
||||
@@ -6900,7 +6900,6 @@ stop_insert(end_insert_pos, esc, nomove)
|
||||
else if (cc != NUL)
|
||||
++curwin->w_cursor.col; /* put cursor back on the NUL */
|
||||
|
||||
#ifdef FEAT_VISUAL
|
||||
/* <C-S-Right> may have started Visual mode, adjust the position for
|
||||
* deleted characters. */
|
||||
if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum)
|
||||
@@ -6910,12 +6909,11 @@ stop_insert(end_insert_pos, esc, nomove)
|
||||
if (VIsual.col > len)
|
||||
{
|
||||
VIsual.col = len;
|
||||
# ifdef FEAT_VIRTUALEDIT
|
||||
#ifdef FEAT_VIRTUALEDIT
|
||||
VIsual.coladd = 0;
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
did_ai = FALSE;
|
||||
@@ -7127,9 +7125,10 @@ oneleft()
|
||||
for (;;)
|
||||
{
|
||||
coladvance(v - width);
|
||||
/* getviscol() is slow, skip it when 'showbreak' is empty and
|
||||
* there are no multi-byte characters */
|
||||
if ((*p_sbr == NUL
|
||||
/* getviscol() is slow, skip it when 'showbreak' is empty,
|
||||
* 'breakindent' is not set and there are no multi-byte
|
||||
* characters */
|
||||
if ((*p_sbr == NUL && !curwin->w_p_bri
|
||||
# ifdef FEAT_MBYTE
|
||||
&& !has_mbyte
|
||||
# endif
|
||||
@@ -8112,9 +8111,7 @@ ins_reg()
|
||||
int need_redraw = FALSE;
|
||||
int regname;
|
||||
int literally = 0;
|
||||
#ifdef FEAT_VISUAL
|
||||
int vis_active = VIsual_active;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If we are going to wait for a character, show a '"'.
|
||||
@@ -8218,11 +8215,9 @@ ins_reg()
|
||||
if (need_redraw || stuff_empty())
|
||||
edit_unputchar();
|
||||
|
||||
#ifdef FEAT_VISUAL
|
||||
/* Disallow starting Visual mode here, would get a weird mode. */
|
||||
if (!vis_active && VIsual_active)
|
||||
end_visual_mode();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -8419,11 +8414,7 @@ ins_esc(count, cmdchar, nomove)
|
||||
#endif
|
||||
)
|
||||
&& (restart_edit == NUL
|
||||
|| (gchar_cursor() == NUL
|
||||
#ifdef FEAT_VISUAL
|
||||
&& !VIsual_active
|
||||
#endif
|
||||
))
|
||||
|| (gchar_cursor() == NUL && !VIsual_active))
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
&& !revins_on
|
||||
#endif
|
||||
@@ -8525,7 +8516,6 @@ ins_ctrl_()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_VISUAL
|
||||
/*
|
||||
* If 'keymodel' contains "startsel", may start selection.
|
||||
* Returns TRUE when a CTRL-O and other keys stuffed.
|
||||
@@ -8581,7 +8571,6 @@ ins_start_select(c)
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* <Insert> key in Insert mode: toggle insert/replace mode.
|
||||
@@ -8701,7 +8690,7 @@ ins_del()
|
||||
{
|
||||
temp = curwin->w_cursor.col;
|
||||
if (!can_bs(BS_EOL) /* only if "eol" included */
|
||||
|| do_join(2, FALSE, TRUE, FALSE) == FAIL)
|
||||
|| do_join(2, FALSE, TRUE, FALSE, FALSE) == FAIL)
|
||||
vim_beep();
|
||||
else
|
||||
curwin->w_cursor.col = temp;
|
||||
@@ -8776,8 +8765,8 @@ ins_bs(c, mode, inserted_space_p)
|
||||
((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0)
|
||||
|| (!can_bs(BS_START)
|
||||
&& (arrow_used
|
||||
|| (curwin->w_cursor.lnum == Insstart.lnum
|
||||
&& curwin->w_cursor.col <= Insstart.col)))
|
||||
|| (curwin->w_cursor.lnum == Insstart_orig.lnum
|
||||
&& curwin->w_cursor.col <= Insstart_orig.col)))
|
||||
|| (!can_bs(BS_INDENT) && !arrow_used && ai_col > 0
|
||||
&& curwin->w_cursor.col <= ai_col)
|
||||
|| (!can_bs(BS_EOL) && curwin->w_cursor.col == 0))))
|
||||
@@ -8828,8 +8817,8 @@ ins_bs(c, mode, inserted_space_p)
|
||||
*/
|
||||
if (curwin->w_cursor.col == 0)
|
||||
{
|
||||
lnum = Insstart.lnum;
|
||||
if (curwin->w_cursor.lnum == Insstart.lnum
|
||||
lnum = Insstart_orig.lnum;
|
||||
if (curwin->w_cursor.lnum == lnum
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
|| revins_on
|
||||
#endif
|
||||
@@ -8838,8 +8827,8 @@ ins_bs(c, mode, inserted_space_p)
|
||||
if (u_save((linenr_T)(curwin->w_cursor.lnum - 2),
|
||||
(linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL)
|
||||
return FALSE;
|
||||
--Insstart.lnum;
|
||||
Insstart.col = MAXCOL;
|
||||
--Insstart_orig.lnum;
|
||||
Insstart_orig.col = MAXCOL;
|
||||
}
|
||||
/*
|
||||
* In replace mode:
|
||||
@@ -8882,7 +8871,7 @@ ins_bs(c, mode, inserted_space_p)
|
||||
ptr[len - 1] = NUL;
|
||||
}
|
||||
|
||||
(void)do_join(2, FALSE, FALSE, FALSE);
|
||||
(void)do_join(2, FALSE, FALSE, FALSE, FALSE);
|
||||
if (temp == NUL && gchar_cursor() != NUL)
|
||||
inc_cursor();
|
||||
}
|
||||
@@ -8997,9 +8986,9 @@ ins_bs(c, mode, inserted_space_p)
|
||||
while (vcol < want_vcol)
|
||||
{
|
||||
/* Remember the first char we inserted */
|
||||
if (curwin->w_cursor.lnum == Insstart.lnum
|
||||
&& curwin->w_cursor.col < Insstart.col)
|
||||
Insstart.col = curwin->w_cursor.col;
|
||||
if (curwin->w_cursor.lnum == Insstart_orig.lnum
|
||||
&& curwin->w_cursor.col < Insstart_orig.col)
|
||||
Insstart_orig.col = curwin->w_cursor.col;
|
||||
|
||||
#ifdef FEAT_VREPLACE
|
||||
if (State & VREPLACE_FLAG)
|
||||
@@ -9087,8 +9076,8 @@ ins_bs(c, mode, inserted_space_p)
|
||||
revins_on ||
|
||||
#endif
|
||||
(curwin->w_cursor.col > mincol
|
||||
&& (curwin->w_cursor.lnum != Insstart.lnum
|
||||
|| curwin->w_cursor.col != Insstart.col)));
|
||||
&& (curwin->w_cursor.lnum != Insstart_orig.lnum
|
||||
|| curwin->w_cursor.col != Insstart_orig.col)));
|
||||
did_backspace = TRUE;
|
||||
}
|
||||
#ifdef FEAT_SMARTINDENT
|
||||
@@ -9106,9 +9095,9 @@ ins_bs(c, mode, inserted_space_p)
|
||||
AppendCharToRedobuff(c);
|
||||
|
||||
/* If deleted before the insertion point, adjust it */
|
||||
if (curwin->w_cursor.lnum == Insstart.lnum
|
||||
&& curwin->w_cursor.col < Insstart.col)
|
||||
Insstart.col = curwin->w_cursor.col;
|
||||
if (curwin->w_cursor.lnum == Insstart_orig.lnum
|
||||
&& curwin->w_cursor.col < Insstart_orig.col)
|
||||
Insstart_orig.col = curwin->w_cursor.col;
|
||||
|
||||
/* vi behaviour: the cursor moves backward but the character that
|
||||
* was there remains visible
|
||||
@@ -9769,11 +9758,11 @@ ins_tab()
|
||||
getvcol(curwin, &fpos, &vcol, NULL, NULL);
|
||||
getvcol(curwin, cursor, &want_vcol, NULL, NULL);
|
||||
|
||||
/* Use as many TABs as possible. Beware of 'showbreak' and
|
||||
* 'linebreak' adding extra virtual columns. */
|
||||
/* Use as many TABs as possible. Beware of 'breakindent', 'showbreak'
|
||||
* and 'linebreak' adding extra virtual columns. */
|
||||
while (vim_iswhite(*ptr))
|
||||
{
|
||||
i = lbr_chartabsize((char_u *)"\t", vcol);
|
||||
i = lbr_chartabsize(NULL, (char_u *)"\t", vcol);
|
||||
if (vcol + i > want_vcol)
|
||||
break;
|
||||
if (*ptr != TAB)
|
||||
@@ -9795,11 +9784,12 @@ ins_tab()
|
||||
if (change_col >= 0)
|
||||
{
|
||||
int repl_off = 0;
|
||||
char_u *line = ptr;
|
||||
|
||||
/* Skip over the spaces we need. */
|
||||
while (vcol < want_vcol && *ptr == ' ')
|
||||
{
|
||||
vcol += lbr_chartabsize(ptr, vcol);
|
||||
vcol += lbr_chartabsize(line, ptr, vcol);
|
||||
++ptr;
|
||||
++repl_off;
|
||||
}
|
||||
@@ -10040,6 +10030,7 @@ ins_copychar(lnum)
|
||||
int c;
|
||||
int temp;
|
||||
char_u *ptr, *prev_ptr;
|
||||
char_u *line;
|
||||
|
||||
if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
@@ -10049,13 +10040,13 @@ ins_copychar(lnum)
|
||||
|
||||
/* try to advance to the cursor column */
|
||||
temp = 0;
|
||||
ptr = ml_get(lnum);
|
||||
line = ptr = ml_get(lnum);
|
||||
prev_ptr = ptr;
|
||||
validate_virtcol();
|
||||
while ((colnr_T)temp < curwin->w_virtcol && *ptr != NUL)
|
||||
{
|
||||
prev_ptr = ptr;
|
||||
temp += lbr_chartabsize_adv(&ptr, (colnr_T)temp);
|
||||
temp += lbr_chartabsize_adv(line, &ptr, (colnr_T)temp);
|
||||
}
|
||||
if ((colnr_T)temp > curwin->w_virtcol)
|
||||
ptr = prev_ptr;
|
||||
|
||||
1038
src/eval.c
1038
src/eval.c
File diff suppressed because it is too large
Load Diff
@@ -1012,7 +1012,18 @@ do_bang(addr_count, eap, forceit, do_in, do_out)
|
||||
|
||||
if (bangredo) /* put cmd in redo buffer for ! command */
|
||||
{
|
||||
AppendToRedobuffLit(prevcmd, -1);
|
||||
/* If % or # appears in the command, it must have been escaped.
|
||||
* Reescape them, so that redoing them does not substitute them by the
|
||||
* buffername. */
|
||||
char_u *cmd = vim_strsave_escaped(prevcmd, (char_u *)"%#");
|
||||
|
||||
if (cmd != NULL)
|
||||
{
|
||||
AppendToRedobuffLit(cmd, -1);
|
||||
vim_free(cmd);
|
||||
}
|
||||
else
|
||||
AppendToRedobuffLit(prevcmd, -1);
|
||||
AppendToRedobuff((char_u *)"\n");
|
||||
bangredo = FALSE;
|
||||
}
|
||||
@@ -1541,7 +1552,18 @@ make_filter_cmd(cmd, itmp, otmp)
|
||||
char_u *buf;
|
||||
long_u len;
|
||||
|
||||
len = (long_u)STRLEN(cmd) + 3; /* "()" + NUL */
|
||||
#if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2)
|
||||
int is_fish_shell;
|
||||
char_u *shell_name = get_isolated_shell_name();
|
||||
|
||||
/* Account for fish's different syntax for subshells */
|
||||
is_fish_shell = (fnamecmp(shell_name, "fish") == 0);
|
||||
vim_free(shell_name);
|
||||
if (is_fish_shell)
|
||||
len = (long_u)STRLEN(cmd) + 13; /* "begin; " + "; end" + NUL */
|
||||
else
|
||||
#endif
|
||||
len = (long_u)STRLEN(cmd) + 3; /* "()" + NUL */
|
||||
if (itmp != NULL)
|
||||
len += (long_u)STRLEN(itmp) + 9; /* " { < " + " } " */
|
||||
if (otmp != NULL)
|
||||
@@ -1556,7 +1578,12 @@ make_filter_cmd(cmd, itmp, otmp)
|
||||
* redirecting input and/or output.
|
||||
*/
|
||||
if (itmp != NULL || otmp != NULL)
|
||||
vim_snprintf((char *)buf, len, "(%s)", (char *)cmd);
|
||||
{
|
||||
if (is_fish_shell)
|
||||
vim_snprintf((char *)buf, len, "begin; %s; end", (char *)cmd);
|
||||
else
|
||||
vim_snprintf((char *)buf, len, "(%s)", (char *)cmd);
|
||||
}
|
||||
else
|
||||
STRCPY(buf, cmd);
|
||||
if (itmp != NULL)
|
||||
@@ -1566,7 +1593,7 @@ make_filter_cmd(cmd, itmp, otmp)
|
||||
}
|
||||
#else
|
||||
/*
|
||||
* for shells that don't understand braces around commands, at least allow
|
||||
* For shells that don't understand braces around commands, at least allow
|
||||
* the use of commands in a pipe.
|
||||
*/
|
||||
STRCPY(buf, cmd);
|
||||
@@ -1977,11 +2004,14 @@ write_viminfo(file, forceit)
|
||||
{
|
||||
fclose(fp_in);
|
||||
|
||||
/*
|
||||
* In case of an error keep the original viminfo file.
|
||||
* Otherwise rename the newly written file.
|
||||
*/
|
||||
if (viminfo_errcnt || vim_rename(tempname, fname) == -1)
|
||||
/* In case of an error keep the original viminfo file. Otherwise
|
||||
* rename the newly written file. Give an error if that fails. */
|
||||
if (viminfo_errcnt == 0 && vim_rename(tempname, fname) == -1)
|
||||
{
|
||||
++viminfo_errcnt;
|
||||
EMSG2(_("E886: Can't rename viminfo file to %s!"), fname);
|
||||
}
|
||||
if (viminfo_errcnt > 0)
|
||||
mch_remove(tempname);
|
||||
|
||||
#ifdef WIN3264
|
||||
@@ -3263,13 +3293,11 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
|
||||
goto theend;
|
||||
}
|
||||
|
||||
#ifdef FEAT_VISUAL
|
||||
/*
|
||||
* End Visual mode before switching to another buffer, so the text can be
|
||||
* copied into the GUI selection buffer.
|
||||
*/
|
||||
reset_VIsual();
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if ((command != NULL || newlnum > (linenr_T)0)
|
||||
@@ -3334,6 +3362,12 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
|
||||
#endif
|
||||
buf = buflist_new(ffname, sfname, 0L,
|
||||
BLN_CURBUF | ((flags & ECMD_SET_HELP) ? 0 : BLN_LISTED));
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* autocommands may change curwin and curbuf */
|
||||
if (oldwin != NULL)
|
||||
oldwin = curwin;
|
||||
old_curbuf = curbuf;
|
||||
#endif
|
||||
}
|
||||
if (buf == NULL)
|
||||
goto theend;
|
||||
@@ -4300,7 +4334,7 @@ do_sub(eap)
|
||||
pos_T old_cursor = curwin->w_cursor;
|
||||
int start_nsubs;
|
||||
#ifdef FEAT_EVAL
|
||||
int save_ma = 0;
|
||||
int save_ma = 0;
|
||||
#endif
|
||||
|
||||
cmd = eap->arg;
|
||||
@@ -4411,6 +4445,31 @@ do_sub(eap)
|
||||
endcolumn = (curwin->w_curswant == MAXCOL);
|
||||
}
|
||||
|
||||
/* Recognize ":%s/\n//" and turn it into a join command, which is much
|
||||
* more efficient.
|
||||
* TODO: find a generic solution to make line-joining operations more
|
||||
* efficient, avoid allocating a string that grows in size.
|
||||
*/
|
||||
if (pat != NULL && STRCMP(pat, "\\n") == 0
|
||||
&& *sub == NUL
|
||||
&& (*cmd == NUL || (cmd[1] == NUL && (*cmd == 'g' || *cmd == 'l'
|
||||
|| *cmd == 'p' || *cmd == '#'))))
|
||||
{
|
||||
curwin->w_cursor.lnum = eap->line1;
|
||||
if (*cmd == 'l')
|
||||
eap->flags = EXFLAG_LIST;
|
||||
else if (*cmd == '#')
|
||||
eap->flags = EXFLAG_NR;
|
||||
else if (*cmd == 'p')
|
||||
eap->flags = EXFLAG_PRINT;
|
||||
|
||||
(void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE, TRUE);
|
||||
sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1;
|
||||
(void)do_sub_msg(FALSE);
|
||||
ex_may_print(eap);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find trailing options. When '&' is used, keep old options.
|
||||
*/
|
||||
@@ -5946,7 +6005,7 @@ find_help_tags(arg, num_matches, matches, keep_lang)
|
||||
"/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
|
||||
"\\[count]", "\\[quotex]", "\\[range]",
|
||||
"\\[pattern]", "\\\\bar", "/\\\\%\\$",
|
||||
"s/\\\\\\~", "s/\\\\U", "s/\\\\L",
|
||||
"s/\\\\\\~", "s/\\\\U", "s/\\\\L",
|
||||
"s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"};
|
||||
int flags;
|
||||
|
||||
@@ -5986,7 +6045,7 @@ find_help_tags(arg, num_matches, matches, keep_lang)
|
||||
/* Replace:
|
||||
* "[:...:]" with "\[:...:]"
|
||||
* "[++...]" with "\[++...]"
|
||||
* "\{" with "\\{" -- matching "} \}"
|
||||
* "\{" with "\\{" -- matching "} \}"
|
||||
*/
|
||||
if ((arg[0] == '[' && (arg[1] == ':'
|
||||
|| (arg[1] == '+' && arg[2] == '+')))
|
||||
@@ -7235,7 +7294,10 @@ ex_sign(eap)
|
||||
else
|
||||
/* ":sign place {id} file={fname}": change sign type */
|
||||
lnum = buf_change_sign_type(buf, id, sp->sn_typenr);
|
||||
update_debug_sign(buf, lnum);
|
||||
if (lnum > 0)
|
||||
update_debug_sign(buf, lnum);
|
||||
else
|
||||
EMSG2(_("E885: Not possible to change sign %s"), sign_name);
|
||||
}
|
||||
else
|
||||
EMSG(_(e_invarg));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user