GRAYBYTE WORDPRESS FILE MANAGER7577

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/share/vim/vim80/doc/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/share/vim/vim80/doc//if_perl.txt
*if_perl.txt*   For Vim version 8.0.  Last change: 2017 Nov 24


		  VIM REFERENCE MANUAL    by Sven Verdoolaege
					 and Matt Gerassimof

Perl and Vim				*perl* *Perl*

1. Editing Perl files			|perl-editing|
2. Compiling Vim with Perl interface	|perl-compiling|
3. Using the Perl interface		|perl-using|
4. Dynamic loading			|perl-dynamic|

{Vi does not have any of these commands}

The Perl interface only works when Vim was compiled with the |+perl| feature.

==============================================================================
1. Editing Perl files					*perl-editing*

Vim syntax highlighting supports Perl and POD files.  Vim assumes a file is
Perl code if the filename has a .pl or .pm suffix.  Vim also examines the first
line of a file, regardless of the filename suffix, to check if a file is a
Perl script (see scripts.vim in Vim's syntax directory).  Vim assumes a file
is POD text if the filename has a .POD suffix.

To use tags with Perl, you need a recent version of Exuberant ctags.  Look
here:
	http://ctags.sourceforge.net

Alternatively, you can use the Perl script pltags.pl, which is shipped with
Vim in the $VIMRUNTIME/tools directory.  This script has currently more
features than Exuberant ctags' Perl support.

==============================================================================
2. Compiling Vim with Perl interface			*perl-compiling*

To compile Vim with Perl interface, you need Perl 5.004 (or later).  Perl must
be installed before you compile Vim.  Vim's Perl interface does NOT work with
the 5.003 version that has been officially released!  It will probably work
with Perl 5.003_05 and later.

The Perl patches for Vim were made by:
	Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
	Matt Gerassimof

Perl for MS-Windows can be found at: http://www.perl.com/
The ActiveState one should work.

==============================================================================
3. Using the Perl interface				*perl-using*

							*:perl* *:pe*
:pe[rl] {cmd}		Execute Perl command {cmd}.  The current package
			is "main".  Simple example to test if `:perl` is
			working: >
				:perl VIM::Msg("Hello")

:pe[rl] << {endpattern}
{script}
{endpattern}
			Execute Perl script {script}.
			{endpattern} must NOT be preceded by any white space.
			If {endpattern} is omitted, it defaults to a dot '.'
			like for the |:append| and |:insert| commands.  Using
			'.' helps when inside a function, because "$i;" looks
			like the start of an |:insert| command to Vim.
			This form of the |:perl| command is mainly useful for
			including perl code in vim scripts.
			Note: This command doesn't work when the Perl feature
			wasn't compiled in.  To avoid errors, see
			|script-here|.


Example vim script: >

	function! WhitePearl()
	perl << EOF
		VIM::Msg("pearls are nice for necklaces");
		VIM::Msg("rubys for rings");
		VIM::Msg("pythons for bags");
		VIM::Msg("tcls????");
	EOF
	endfunction
<
To see what version of Perl you have: >
	:perl print $^V
<

							*:perldo* *:perld*
:[range]perld[o] {cmd}	Execute Perl command {cmd} for each line in the
			[range], with $_ being set to the text of each line in
			turn, without a trailing <EOL>.  Setting $_ will change
			the text, but note that it is not possible to add or
			delete lines using this command.
			The default for [range] is the whole file: "1,$".

Here are some things you can try: >

  :perl $a=1
  :perldo $_ = reverse($_);1
  :perl VIM::Msg("hello")
  :perl $line = $curbuf->Get(42)
<
							*E299*
Executing Perl commands in the |sandbox| is limited.  ":perldo" will not be
possible at all.  ":perl" will be evaluated in the Safe environment, if
possible.


							*perl-overview*
Here is an overview of the functions that are available to Perl: >

  :perl VIM::Msg("Text")		# displays a message
  :perl VIM::Msg("Wrong!", "ErrorMsg")	# displays an error message
  :perl VIM::Msg("remark", "Comment")	# displays a highlighted message
  :perl VIM::SetOption("ai")		# sets a vim option
  :perl $nbuf = VIM::Buffers()		# returns the number of buffers
  :perl @buflist = VIM::Buffers()	# returns array of all buffers
  :perl $mybuf = (VIM::Buffers('qq.c'))[0] # returns buffer object for 'qq.c'
  :perl @winlist = VIM::Windows()	# returns array of all windows
  :perl $nwin = VIM::Windows()		# returns the number of windows
  :perl ($success, $v) = VIM::Eval('&path') # $v: option 'path', $success: 1
  :perl ($success, $v) = VIM::Eval('&xyz')  # $v: '' and $success: 0
  :perl $v = VIM::Eval('expand("<cfile>")') # expands <cfile>
  :perl $curwin->SetHeight(10)		# sets the window height
  :perl @pos = $curwin->Cursor()	# returns (row, col) array
  :perl @pos = (10, 10)
  :perl $curwin->Cursor(@pos)		# sets cursor to @pos
  :perl $curwin->Cursor(10,10)		# sets cursor to row 10 col 10
  :perl $mybuf = $curwin->Buffer()	# returns the buffer object for window
  :perl $curbuf->Name()			# returns buffer name
  :perl $curbuf->Number()		# returns buffer number
  :perl $curbuf->Count()		# returns the number of lines
  :perl $l = $curbuf->Get(10)		# returns line 10
  :perl @l = $curbuf->Get(1 .. 5)	# returns lines 1 through 5
  :perl $curbuf->Delete(10)		# deletes line 10
  :perl $curbuf->Delete(10, 20)		# delete lines 10 through 20
  :perl $curbuf->Append(10, "Line")	# appends a line
  :perl $curbuf->Append(10, "Line1", "Line2", "Line3") # appends 3 lines
  :perl @l = ("L1", "L2", "L3")
  :perl $curbuf->Append(10, @l)		# appends L1, L2 and L3
  :perl $curbuf->Set(10, "Line")	# replaces line 10
  :perl $curbuf->Set(10, "Line1", "Line2")	# replaces lines 10 and 11
  :perl $curbuf->Set(10, @l)		# replaces 3 lines
<
							*perl-Msg*
VIM::Msg({msg}, {group}?)
			Displays the message {msg}.  The optional {group}
			argument specifies a highlight group for Vim to use
			for the message.

							*perl-SetOption*
VIM::SetOption({arg})	Sets a vim option.  {arg} can be any argument that the
			":set" command accepts.  Note that this means that no
			spaces are allowed in the argument!  See |:set|.

							*perl-Buffers*
VIM::Buffers([{bn}...])	With no arguments, returns a list of all the buffers
			in an array context or returns the number of buffers
			in a scalar context.  For a list of buffer names or
			numbers {bn}, returns a list of the buffers matching
			{bn}, using the same rules as Vim's internal
			|bufname()| function.
			WARNING: the list becomes invalid when |:bwipe| is
			used.  Using it anyway may crash Vim.

							*perl-Windows*
VIM::Windows([{wn}...])	With no arguments, returns a list of all the windows
			in an array context or returns the number of windows
			in a scalar context.  For a list of window numbers
			{wn}, returns a list of the windows with those
			numbers.
			WARNING: the list becomes invalid when a window is
			closed.  Using it anyway may crash Vim.

							*perl-DoCommand*
VIM::DoCommand({cmd})	Executes Ex command {cmd}.

							*perl-Eval*
VIM::Eval({expr})	Evaluates {expr} and returns (success, value) in list 
			context or just value in scalar context.
			success=1 indicates that val contains the value of
			{expr}; success=0 indicates a failure to evaluate
			the expression.  '@x' returns the contents of register
			x, '&x' returns the value of option x, 'x' returns the
			value of internal |variables| x, and '$x' is equivalent
			to perl's $ENV{x}.  All |functions| accessible from
			the command-line are valid for {expr}.
			A |List| is turned into a string by joining the items
			and inserting line breaks.

							*perl-SetHeight*
Window->SetHeight({height})
			Sets the Window height to {height}, within screen
			limits.

							*perl-GetCursor*
Window->Cursor({row}?, {col}?)
			With no arguments, returns a (row, col) array for the
			current cursor position in the Window.  With {row} and
			{col} arguments, sets the Window's cursor position to
			{row} and {col}.  Note that {col} is numbered from 0,
			Perl-fashion, and thus is one less than the value in
			Vim's ruler.

Window->Buffer()					*perl-Buffer*
			Returns the Buffer object corresponding to the given
			Window.

							*perl-Name*
Buffer->Name()		Returns the filename for the Buffer.

							*perl-Number*
Buffer->Number()	Returns the number of the Buffer.

							*perl-Count*
Buffer->Count()		Returns the number of lines in the Buffer.

							*perl-Get*
Buffer->Get({lnum}, {lnum}?, ...)
			Returns a text string of line {lnum} in the Buffer
			for each {lnum} specified.  An array can be passed
			with a list of {lnum}'s specified.

							*perl-Delete*
Buffer->Delete({lnum}, {lnum}?)
			Deletes line {lnum} in the Buffer.  With the second
			{lnum}, deletes the range of lines from the first
			{lnum} to the second {lnum}.

							*perl-Append*
Buffer->Append({lnum}, {line}, {line}?, ...)
			Appends each {line} string after Buffer line {lnum}.
			The list of {line}s can be an array.

							*perl-Set*
Buffer->Set({lnum}, {line}, {line}?, ...)
			Replaces one or more Buffer lines with specified
			{lines}s, starting at Buffer line {lnum}.  The list of
			{line}s can be an array.  If the arguments are
			invalid, replacement does not occur.

$main::curwin
			The current window object.

$main::curbuf
			The current buffer object.


							*script-here*
When using a script language in-line, you might want to skip this when the
language isn't supported.  But this mechanism doesn't work: >
   if has('perl')
     perl << EOF
       this will NOT work!
   EOF
   endif
Instead, put the Perl/Python/Ruby/etc. command in a function and call that
function: >
    if has('perl')
      function DefPerl()
	perl << EOF
	  this works
    EOF
      endfunction
      call DefPerl()
    endif
Note that "EOF" must be at the start of the line.

==============================================================================
4. Dynamic loading					*perl-dynamic*

On MS-Windows and Unix the Perl library can be loaded dynamically.  The
|:version| output then includes |+perl/dyn|.

This means that Vim will search for the Perl DLL or shared library file only
when needed.  When you don't use the Perl interface you don't need it, thus
you can use Vim without this file.


MS-Windows ~

You can download Perl from http://www.perl.org.  The one from ActiveState was
used for building Vim.

To use the Perl interface the Perl DLL must be in your search path.
If Vim reports it cannot find the perl512.dll, make sure your $PATH includes
the directory where it is located.  The Perl installer normally does that.
In a console window type "path" to see what directories are used.  The
'perldll' option can be also used to specify the Perl DLL.

The name of the DLL must match the Perl version Vim was compiled with.
Currently the name is "perl512.dll".  That is for Perl 5.12.  To know for
sure edit "gvim.exe" and search for "perl\d*.dll\c".


Unix ~

The 'perldll' option can be used to specify the Perl shared library file
instead of DYNAMIC_PERL_DLL file what was specified at compile time.  The
version of the shared library must match the Perl version Vim was compiled
with.

==============================================================================
 vim:tw=78:ts=8:ft=help:norl:

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 05 2024 23:19:13
root / root
0755
arabic.txt
11.656 KB
August 02 2022 16:56:59
root / root
0644
autocmd.txt
63.869 KB
August 02 2022 16:56:59
root / root
0644
change.txt
73.122 KB
August 02 2022 16:56:59
root / root
0644
channel.txt
30.097 KB
August 02 2022 16:56:59
root / root
0644
cmdline.txt
46.175 KB
August 02 2022 16:56:59
root / root
0644
debug.txt
7.014 KB
August 02 2022 16:56:59
root / root
0644
debugger.txt
5.609 KB
August 02 2022 16:56:59
root / root
0644
develop.txt
21.82 KB
August 02 2022 16:56:59
root / root
0644
diff.txt
16.138 KB
August 02 2022 16:56:59
root / root
0644
digraph.txt
60.667 KB
August 02 2022 16:56:59
root / root
0644
editing.txt
71.461 KB
August 02 2022 16:56:59
root / root
0644
eval.txt
434.045 KB
August 02 2022 16:56:59
root / root
0644
farsi.txt
9.476 KB
August 02 2022 16:56:59
root / root
0644
filetype.txt
25.325 KB
August 02 2022 16:56:59
root / root
0644
fold.txt
23.139 KB
August 02 2022 16:56:59
root / root
0644
ft_ada.txt
17.819 KB
August 02 2022 16:56:59
root / root
0644
ft_rust.txt
9.303 KB
August 02 2022 16:56:59
root / root
0644
ft_sql.txt
29.975 KB
August 02 2022 16:56:59
root / root
0644
gui.txt
44.523 KB
August 02 2022 16:56:59
root / root
0644
gui_w32.txt
18.473 KB
August 02 2022 16:56:59
root / root
0644
gui_x11.txt
28.789 KB
August 02 2022 16:56:59
root / root
0644
hangulin.txt
3.214 KB
August 02 2022 16:56:59
root / root
0644
hebrew.txt
5.58 KB
August 02 2022 16:56:59
root / root
0644
help.txt
8.377 KB
August 02 2022 16:56:59
root / root
0644
helphelp.txt
14.002 KB
August 02 2022 16:56:59
root / root
0644
howto.txt
2.843 KB
August 02 2022 16:56:59
root / root
0644
if_cscop.txt
18.907 KB
August 02 2022 16:56:59
root / root
0644
if_lua.txt
14.299 KB
August 02 2022 16:56:59
root / root
0644
if_mzsch.txt
11.546 KB
August 02 2022 16:56:59
root / root
0644
if_ole.txt
7.231 KB
August 02 2022 16:56:59
root / root
0644
if_perl.txt
10.888 KB
August 02 2022 16:56:59
root / root
0644
if_pyth.txt
37.055 KB
August 02 2022 16:56:59
root / root
0644
if_ruby.txt
7.826 KB
August 02 2022 16:56:59
root / root
0644
if_sniff.txt
0.26 KB
August 02 2022 16:56:59
root / root
0644
if_tcl.txt
22.486 KB
August 02 2022 16:56:59
root / root
0644
indent.txt
38.503 KB
August 02 2022 16:56:59
root / root
0644
index.txt
74.651 KB
August 02 2022 16:56:59
root / root
0644
insert.txt
81.207 KB
August 02 2022 16:56:59
root / root
0644
intro.txt
38.307 KB
August 02 2022 16:56:59
root / root
0644
map.txt
63.152 KB
August 02 2022 16:56:59
root / root
0644
mbyte.txt
57.916 KB
August 02 2022 16:56:59
root / root
0644
message.txt
30.498 KB
August 02 2022 16:56:59
root / root
0644
mlang.txt
7.666 KB
August 02 2022 16:56:59
root / root
0644
motion.txt
50.393 KB
August 02 2022 16:56:59
root / root
0644
netbeans.txt
36.131 KB
August 02 2022 16:56:59
root / root
0644
options.txt
378.018 KB
August 02 2022 16:56:59
root / root
0644
os_390.txt
4.642 KB
August 02 2022 16:56:59
root / root
0644
os_amiga.txt
5.333 KB
August 02 2022 16:56:59
root / root
0644
os_beos.txt
10.726 KB
August 02 2022 16:56:59
root / root
0644
os_dos.txt
11.739 KB
August 02 2022 16:56:59
root / root
0644
os_mac.txt
6.69 KB
August 02 2022 16:56:59
root / root
0644
os_mint.txt
1.369 KB
August 02 2022 16:56:59
root / root
0644
os_msdos.txt
0.506 KB
August 02 2022 16:56:59
root / root
0644
os_os2.txt
0.287 KB
August 02 2022 16:56:59
root / root
0644
os_qnx.txt
3.976 KB
August 02 2022 16:56:59
root / root
0644
os_risc.txt
0.315 KB
August 02 2022 16:56:59
root / root
0644
os_unix.txt
2.534 KB
August 02 2022 16:56:59
root / root
0644
os_vms.txt
31.348 KB
August 02 2022 16:56:59
root / root
0644
os_win32.txt
13.035 KB
August 02 2022 16:56:59
root / root
0644
pattern.txt
57.931 KB
August 02 2022 16:56:59
root / root
0644
pi_getscript.txt
20.584 KB
August 02 2022 16:56:59
root / root
0644
pi_gzip.txt
1.29 KB
August 02 2022 16:56:59
root / root
0644
pi_logipat.txt
4.088 KB
August 02 2022 16:56:59
root / root
0644
pi_netrw.txt
171.436 KB
August 02 2022 16:56:59
root / root
0644
pi_paren.txt
2.216 KB
August 02 2022 16:56:59
root / root
0644
pi_spec.txt
4.025 KB
August 02 2022 16:56:59
root / root
0644
pi_tar.txt
6.501 KB
August 02 2022 16:56:59
root / root
0644
pi_vimball.txt
11.575 KB
August 02 2022 16:56:59
root / root
0644
pi_zip.txt
6.87 KB
August 02 2022 16:56:59
root / root
0644
print.txt
30.428 KB
August 02 2022 16:56:59
root / root
0644
quickfix.txt
67.403 KB
August 02 2022 16:56:59
root / root
0644
quickref.txt
69.586 KB
August 02 2022 16:56:59
root / root
0644
quotes.txt
12.444 KB
August 02 2022 16:56:59
root / root
0644
recover.txt
10.443 KB
August 02 2022 16:56:59
root / root
0644
remote.txt
8.223 KB
August 02 2022 16:56:59
root / root
0644
repeat.txt
38.646 KB
August 02 2022 16:56:59
root / root
0644
rileft.txt
4.859 KB
August 02 2022 16:56:59
root / root
0644
russian.txt
3.018 KB
August 02 2022 16:56:59
root / root
0644
scroll.txt
13.741 KB
August 02 2022 16:56:59
root / root
0644
sign.txt
6.729 KB
August 02 2022 16:56:59
root / root
0644
spell.txt
61.31 KB
August 02 2022 16:56:59
root / root
0644
sponsor.txt
7.029 KB
August 02 2022 16:56:59
root / root
0644
starting.txt
71.896 KB
August 02 2022 16:56:59
root / root
0644
syntax.txt
212.374 KB
August 02 2022 16:56:59
root / root
0644
tabpage.txt
16.328 KB
August 02 2022 16:56:59
root / root
0644
tags
320.991 KB
August 02 2022 16:56:59
root / root
0644
tagsrch.txt
35.777 KB
August 02 2022 16:56:59
root / root
0644
term.txt
44.352 KB
August 02 2022 16:56:59
root / root
0644
terminal.txt
32.78 KB
August 02 2022 16:56:59
root / root
0644
tips.txt
20.074 KB
August 02 2022 16:56:59
root / root
0644
todo.txt
289.324 KB
August 02 2022 16:56:59
root / root
0644
uganda.txt
13.695 KB
August 02 2022 16:56:59
root / root
0644
undo.txt
16.151 KB
August 02 2022 16:56:59
root / root
0644
usr_01.txt
6.924 KB
August 02 2022 16:56:59
root / root
0644
usr_02.txt
23.769 KB
August 02 2022 16:56:59
root / root
0644
usr_03.txt
23.052 KB
August 02 2022 16:56:59
root / root
0644
usr_04.txt
18.635 KB
August 02 2022 16:56:59
root / root
0644
usr_05.txt
23.266 KB
August 02 2022 16:56:59
root / root
0644
usr_06.txt
9.362 KB
August 02 2022 16:56:59
root / root
0644
usr_07.txt
15.609 KB
August 02 2022 16:56:59
root / root
0644
usr_08.txt
18.92 KB
August 02 2022 16:56:59
root / root
0644
usr_09.txt
11.182 KB
August 02 2022 16:56:59
root / root
0644
usr_10.txt
28.496 KB
August 02 2022 16:56:59
root / root
0644
usr_11.txt
12.315 KB
August 02 2022 16:56:59
root / root
0644
usr_12.txt
13.109 KB
August 02 2022 16:56:59
root / root
0644
usr_20.txt
13.382 KB
August 02 2022 16:56:59
root / root
0644
usr_21.txt
17.942 KB
August 02 2022 16:56:59
root / root
0644
usr_22.txt
13.962 KB
August 02 2022 16:56:59
root / root
0644
usr_23.txt
12.293 KB
August 02 2022 16:56:59
root / root
0644
usr_24.txt
20.38 KB
August 02 2022 16:56:59
root / root
0644
usr_25.txt
18.666 KB
August 02 2022 16:56:59
root / root
0644
usr_26.txt
8.061 KB
August 02 2022 16:56:59
root / root
0644
usr_27.txt
17.308 KB
August 02 2022 16:56:59
root / root
0644
usr_28.txt
15.64 KB
August 02 2022 16:56:59
root / root
0644
usr_29.txt
19.645 KB
August 02 2022 16:56:59
root / root
0644
usr_30.txt
22.125 KB
August 02 2022 16:56:59
root / root
0644
usr_31.txt
10.15 KB
August 02 2022 16:56:59
root / root
0644
usr_32.txt
5.247 KB
August 02 2022 16:56:59
root / root
0644
usr_40.txt
22.641 KB
August 02 2022 16:56:59
root / root
0644
usr_41.txt
87.208 KB
August 02 2022 16:56:59
root / root
0644
usr_42.txt
13.475 KB
August 02 2022 16:56:59
root / root
0644
usr_43.txt
7.23 KB
August 02 2022 16:56:59
root / root
0644
usr_44.txt
28.526 KB
August 02 2022 16:56:59
root / root
0644
usr_45.txt
17.492 KB
August 02 2022 16:56:59
root / root
0644
usr_90.txt
17.247 KB
August 02 2022 16:56:59
root / root
0644
usr_toc.txt
9.002 KB
August 02 2022 16:56:59
root / root
0644
various.txt
28.176 KB
August 02 2022 16:56:59
root / root
0644
version4.txt
13.58 KB
August 02 2022 16:56:59
root / root
0644
version5.txt
301.312 KB
August 02 2022 16:56:59
root / root
0644
version6.txt
563.527 KB
August 02 2022 16:56:59
root / root
0644
version7.txt
658.951 KB
August 02 2022 16:56:59
root / root
0644
version8.txt
668.215 KB
August 02 2022 16:56:59
root / root
0644
vi_diff.txt
41.809 KB
August 02 2022 16:56:59
root / root
0644
visual.txt
21.331 KB
August 02 2022 16:56:59
root / root
0644
windows.txt
51.787 KB
August 02 2022 16:56:59
root / root
0644
workshop.txt
4.522 KB
August 02 2022 16:56:59
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF