mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
updated for version 7.0013
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
*pi_netrw.txt For Vim version 6.2. Last change: Jun 25, 2004
|
||||
*pi_netrw.txt For Vim version 6.2. Last change: Jul 26, 2004
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
|
||||
@ -503,22 +503,22 @@ from <netrw.vim> itself:
|
||||
?..........Help....................................|netrw-help|
|
||||
<cr>.......Browsing................................|netrw-cr|
|
||||
<c-l>......Refreshing the Listing..................|netrw-c-l|
|
||||
<del>......Removing Files or Directories...........|netrw-delete|
|
||||
D..........Removing Files or Directories...........|netrw-D|
|
||||
\H.........Edit File/Directory Hiding List.........|netrw-H|
|
||||
\M.........Make A New Directory....................|netrw-M|
|
||||
R..........Renaming Files or Directories...........|netrw-R|
|
||||
<del>......Deleting Files or Directories...........|netrw-delete|
|
||||
-..........Going Up................................|netrw--|
|
||||
a..........Hiding Files or Directories.............|netrw-a|
|
||||
D..........Deleting Files or Directories...........|netrw-D|
|
||||
\h.........Edit File/Directory Hiding List.........|netrw-h|
|
||||
i..........Long Listing............................|netrw-i|
|
||||
\m.........Make A New Directory....................|netrw-m|
|
||||
o..........Browsing with a Horizontal Split........|netrw-o|
|
||||
r..........Reversing Sorting Order.................|netrw-r|
|
||||
R..........Renaming Files or Directories...........|netrw-R|
|
||||
s..........Selecting Sorting Style.................|netrw-s|
|
||||
v..........Browsing with a Vertical Split..........|netrw-v|
|
||||
x..........Customizing Browsing....................|netrw-x|
|
||||
*netrw-browse-cmds*
|
||||
|
||||
QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
|
||||
>
|
||||
Quick Reference Commands Table
|
||||
------- -----------
|
||||
Command Explanation
|
||||
------- -----------
|
||||
@ -530,8 +530,9 @@ from <netrw.vim> itself:
|
||||
R Netrw will attempt to rename the file(s)/directory(ies)
|
||||
- Makes Netrw go up one directory
|
||||
a Show all of a directory (temporarily ignore g:netrw_list_hide)
|
||||
h Edit file hiding list
|
||||
\h Edit file hiding list
|
||||
i Toggles between long and short listing
|
||||
\m Make a directory
|
||||
o Enter the file/directory under the cursor in a new browser
|
||||
window. A horizontal split is used.
|
||||
r Reverse sorting order
|
||||
@ -540,7 +541,7 @@ from <netrw.vim> itself:
|
||||
window. A vertical split is used.
|
||||
x Apply a function to a file.
|
||||
<
|
||||
*netrw-browse-var*
|
||||
NETRW BROWSER VARIABLES *netrw-browse-var*
|
||||
>
|
||||
--- -----------
|
||||
Var Explanation
|
||||
@ -556,6 +557,7 @@ from <netrw.vim> itself:
|
||||
g:netrw_rm_cmd supports removing files
|
||||
g:netrw_rmdir_cmd supports removing directories
|
||||
g:netrw_rmf_cmd supports removing softlinks to directories
|
||||
g:netrw_hide if true, the hiding list is used
|
||||
g:netrw_sort_by sort by "name", "time", or "size"
|
||||
g:netrw_sort_direction sorting direction: "normal" or "reverse"
|
||||
g:netrw_sort_sequence when sorting by name, first sort by the
|
||||
@ -577,6 +579,8 @@ trailing slash and it will be interpreted as a request to list a directory:
|
||||
|
||||
vim [protocol]://[user@]hostname/path/
|
||||
|
||||
To get no-password directory listings, scp, ssh interaction, etc, see
|
||||
|netrw-list-hack|.
|
||||
|
||||
REFRESHING THE LISTING *netrw-c-l*
|
||||
|
||||
@ -615,18 +619,18 @@ directories or displays the filename, file size (in bytes), and the
|
||||
time and date of last modification for local directories.
|
||||
|
||||
|
||||
MAKING A NEW DIRECTORY *netrw-M*
|
||||
MAKING A NEW DIRECTORY *netrw-m*
|
||||
|
||||
Actually <Leader>M, where the <Leader> is, by default, the backslash.
|
||||
Actually <Leader>m, where the <Leader> is, by default, the backslash.
|
||||
|
||||
With the "<Leader>M" map one may make a new directory either remotely (which
|
||||
With the "<Leader>m" map one may make a new directory either remotely (which
|
||||
depends on the global variable g:netrw_mkdir_cmd) or locally (which depends on
|
||||
the global variable g:netrw_local_mkdir). Netrw will issue a request for the
|
||||
new directory's name. A bare <CR> at that point will abort the making of the
|
||||
directory. Attempts to make a local directory that already exists (as either
|
||||
a file or a directory) will be detected, reported on, and ignored.
|
||||
|
||||
REMOVING FILES OR DIRECTORIES *netrw-delete* *netrw-remove* *netrw-D*
|
||||
DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D*
|
||||
|
||||
Deleting/removing files and directories involves moving the cursor to the
|
||||
file/directory to be deleted and pressing "D". Directories must be empty first
|
||||
@ -668,30 +672,32 @@ value is:
|
||||
|
||||
ssh HOSTNAME mv
|
||||
|
||||
One may rename a block of files and directories by selecting them with
|
||||
the V (|linewise-visual|).
|
||||
|
||||
HIDING FILES OR DIRECTORIES *g:netrw_a* *g:netrw_list_hide*
|
||||
HIDING FILES OR DIRECTORIES *g:netrw-a* *g:netrw_list_hide*
|
||||
|
||||
The "a" map lets the browser ignore the g:netrw_list_hide variable. Normally
|
||||
the g:netrw_list_hide variable holds a comma separated list of patterns which
|
||||
will be hidden (removed) from the directory listing. Mnemonically, the
|
||||
"a" stands for show All.
|
||||
The "a" map toggles the netrw vim file browser (both remote and local) between
|
||||
displaying hidden files (show-all) versus hiding files. For files to be
|
||||
hidden, the g:netrw_list_hide variable must hold a comma delimited list of
|
||||
patterns (ex. \.obj) to be hidden from normal listing. (see |netrw-h|)
|
||||
|
||||
|
||||
EDIT FILE OR DIRECTORY HIDING LIST *netrw-H*
|
||||
EDIT FILE OR DIRECTORY HIDING LIST *netrw-h*
|
||||
|
||||
Actually <Leader>H, where the <Leader> is, by default, the backslash.
|
||||
Actually <Leader>h, where the <Leader> is, by default, the backslash.
|
||||
|
||||
The "<Leader>H" map brings up a requestor allowing the user to change the
|
||||
file/directory hiding list. The hiding list consists of one or more
|
||||
patterns delimited by commas. Files and/or directories satisfying
|
||||
these patterns will be hidden (ie. not shown).
|
||||
The "<Leader>h" map brings up a requestor allowing the user to change the
|
||||
file/directory hiding list. The hiding list consists of one or more patterns
|
||||
delimited by commas. Files and/or directories satisfying these patterns will
|
||||
be hidden (ie. not shown).
|
||||
|
||||
|
||||
BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o*
|
||||
|
||||
Normally one enters a file or directory using the <cr>. However, the "o"
|
||||
map allows one to open a new window to hold the new directory listing or
|
||||
file. A horizontal split is used. (also see |netrw-v|)
|
||||
Normally one enters a file or directory using the <cr>. However, the "o" map
|
||||
allows one to open a new window to hold the new directory listing or file. A
|
||||
horizontal split is used. (also see |netrw-v|)
|
||||
|
||||
|
||||
SELECTING SORTING STYLE *netrw-s*
|
||||
@ -779,7 +785,7 @@ which is loaded automatically at startup (assuming :set nocp).
|
||||
==============================================================================
|
||||
9. History *netrw-history*
|
||||
|
||||
v47: *
|
||||
v47: * now handles local directory browsing.
|
||||
v46: * now handles remote directory browsing
|
||||
* g:netrw_silent (if 1) will cause all transfers to be silent'd
|
||||
v45: * made the [user@]hostname:path form a bit more restrictive
|
||||
|
@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 7.0aa. Last change: 2004 Jul 11
|
||||
*quickref.txt* For Vim version 7.0aa. Last change: 2004 Jul 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -934,6 +934,8 @@ Short explanation of each option: *option-list*
|
||||
position
|
||||
|ga| ga show ascii value of character under cursor in
|
||||
decimal, hex, and octal
|
||||
|g8| g8 for utf-8 encoding: show byte sequence for
|
||||
character under cursor in hex.
|
||||
|g_CTRL-G| g CTRL-G show cursor column, line, and character
|
||||
position
|
||||
|CTRL-C| CTRL-C during searches: Interrupt the search
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 26
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -36,6 +36,14 @@ Aborting at the ATTENTION prompt causes trouble:
|
||||
":sbuf" and ":ball" leave an empty window behind.
|
||||
Change in handle_swap_exists() also in 6.3?
|
||||
|
||||
Add remap-abbreviation solution to Vim 6.3? It's about adding REMAP_SKIP and
|
||||
RM_ABBR in getchar.c.
|
||||
|
||||
Added ga_append() here: (also to 6.3?)
|
||||
script_get(eap, cmd)
|
||||
gui_do_findrepl(flags, find_text, repl_text, down)
|
||||
serverGetVimNames(dpy) if_xcmdsrv.c, os_mswin.c
|
||||
|
||||
|
||||
For version 7.0:
|
||||
- Include many PATCHES:
|
||||
@ -3093,6 +3101,8 @@ Various improvements:
|
||||
paragraphs). Complements the '2' flag. Use '>' flag when larger indent
|
||||
starts a new paragraph, use '<' flag when smaller indent starts a new
|
||||
paragraph. Both start a new paragraph on any indent change.
|
||||
7 Add a way to define an item list with a pattern in 'formatoptions'. The
|
||||
'n' flag doesn't work for "6.3" or "6a.".
|
||||
8 Add 'formatexpr' option: Used for formatting operator "gq" instead of the
|
||||
builtin formatting or 'formatprg'.
|
||||
8 Allow using a trailing space to signal a paragraph that continues on the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 25
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -289,4 +289,8 @@ resizing the GUI shell upon startup.
|
||||
Python: Using buffer.append(f.readlines()) didn't work. Allow appending a
|
||||
string with a trailing newline. The newline is ignored.
|
||||
|
||||
When using the ":saveas f2" command for buffer "f1", the Buffers menu would
|
||||
contain "f2" twice, one of them leading to "f1". Also trigger the BufFilePre
|
||||
and BufFilePost events for the alternate buffer that gets the old name.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
@ -1,7 +1,12 @@
|
||||
" Set options and add mapping such that Vim behaves a lot like MS-Windows
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2004 May 26
|
||||
" Last change: 2004 Jul 27
|
||||
|
||||
" bail out if this isn't wanted (mrsvim.vim uses this).
|
||||
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
|
||||
finish
|
||||
endif
|
||||
|
||||
" set the 'cpoptions' to its Vim default
|
||||
if 1 " only do this when compiled with expression evaluation
|
||||
|
@ -1,8 +1,8 @@
|
||||
" NetrwFileHandlers: contains various extension-based file handlers for
|
||||
" netrw's browsers' x command
|
||||
" netrw's browsers' x command ("eXecute launcher")
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Jul 06, 2004
|
||||
" Version: 3
|
||||
" Date: Jul 09, 2004
|
||||
" Version: 1
|
||||
" ---------------------------------------------------------------------
|
||||
|
||||
" NetrwFileHandler_html: handles html when the user hits "x" when the
|
||||
@ -105,7 +105,7 @@ fun! NetrwFileHandler_pnm(pnmfile)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwFileHandler_bmp:
|
||||
" NetrwFileHandler_bmp: visualize bmp files
|
||||
fun! NetrwFileHandler_bmp(bmpfile)
|
||||
" call Dfunc("NetrwFileHandler_bmp(bmpfile<".a:bmpfile.">)")
|
||||
|
||||
@ -123,3 +123,84 @@ fun! NetrwFileHandler_bmp(bmpfile)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwFileHandler_pdf: visualize pdf files
|
||||
fun! NetrwFileHandler_pdf(pdf)
|
||||
" call Dfunc("NetrwFileHandler_pdf(pdf<".a:pdf.">)")
|
||||
if executable("gs")
|
||||
exe "silent! !gs ".a:pdf
|
||||
else
|
||||
" call Dret("NetrwFileHandler_pdf 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("NetrwFileHandler_pdf 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwFileHandler_sxw: visualize sxw files
|
||||
fun! NetrwFileHandler_sxw(sxw)
|
||||
" call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
|
||||
if executable("gs")
|
||||
exe "silent! !gs ".a:sxw
|
||||
else
|
||||
" call Dret("NetrwFileHandler_sxw 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("NetrwFileHandler_sxw 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwFileHandler_doc: visualize doc files
|
||||
fun! NetrwFileHandler_doc(doc)
|
||||
" call Dfunc("NetrwFileHandler_doc(doc<".a:doc.">)")
|
||||
|
||||
if executable("oowriter")
|
||||
exe "silent! !oowriter ".a:doc
|
||||
redraw!
|
||||
else
|
||||
" call Dret("NetrwFileHandler_doc 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("NetrwFileHandler_doc 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwFileHandler_sxw: visualize sxw files
|
||||
fun! NetrwFileHandler_sxw(sxw)
|
||||
" call Dfunc("NetrwFileHandler_sxw(sxw<".a:sxw.">)")
|
||||
|
||||
if executable("oowriter")
|
||||
exe "silent! !oowriter ".a:sxw
|
||||
redraw!
|
||||
else
|
||||
" call Dret("NetrwFileHandler_sxw 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("NetrwFileHandler_sxw 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwFileHandler_xls: visualize xls files
|
||||
fun! NetrwFileHandler_xls(xls)
|
||||
" call Dfunc("NetrwFileHandler_xls(xls<".a:xls.">)")
|
||||
|
||||
if executable("oocalc")
|
||||
exe "silent! !oocalc ".a:xls
|
||||
redraw!
|
||||
else
|
||||
" call Dret("NetrwFileHandler_xls 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("NetrwFileHandler_xls 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
|
@ -1,7 +1,7 @@
|
||||
" netrw.vim: Handles file transfer and remote directory listing across a network
|
||||
" Last Change: Jul 08, 2004
|
||||
" Last Change: Jul 26, 2004
|
||||
" Maintainer: Charles E. Campbell, Jr. PhD <drchipNOSPAM at campbellfamily.biz>
|
||||
" Version: 47l ASTRO-ONLY
|
||||
" Version: 47m
|
||||
" License: Vim License (see vim's :help license)
|
||||
"
|
||||
" But be doers of the word, and not only hearers, deluding your own selves
|
||||
@ -12,7 +12,7 @@
|
||||
if exists("loaded_netrw") || &cp
|
||||
finish
|
||||
endif
|
||||
let loaded_netrw = "v47l ASTRO-ONLY"
|
||||
let loaded_netrw = "v47m"
|
||||
let s:save_cpo = &cpo
|
||||
let loaded_explorer = 1
|
||||
set cpo&vim
|
||||
@ -79,7 +79,7 @@ if !exists("g:netrw_longlist") || g:netrw_longlist == 0
|
||||
let g:netrw_longlist= 0
|
||||
else
|
||||
let g:netrw_longlist= 1
|
||||
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa -l"
|
||||
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa -lk"
|
||||
endif
|
||||
if !exists("g:netrw_timefmt")
|
||||
let g:netrw_timefmt= "%c"
|
||||
@ -100,6 +100,9 @@ endif
|
||||
if !exists("g:netrw_mkdir_cmd")
|
||||
let g:netrw_mkdir_cmd= "ssh HOSTNAME mkdir"
|
||||
endif
|
||||
if !exists("g:netrw_hide")
|
||||
let g:netrw_hide= 1
|
||||
endif
|
||||
|
||||
" BufEnter event ignored by decho when following variable is true
|
||||
" Has a side effect that doau BufReadPost doesn't work, so
|
||||
@ -173,7 +176,7 @@ if version >= 600
|
||||
endif
|
||||
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<afile>")|exe "Nread 0r ".expand("<afile>")|exe "silent doau BufReadPost ".expand("<afile>")
|
||||
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<afile>")|exe "Nread " .expand("<afile>")|exe "silent doau BufReadPost ".expand("<afile>")
|
||||
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "Nwrite " .expand("<afile>")|call <SID>NetRestorePosn()
|
||||
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<afile>")|exe "Nwrite " .expand("<afile>")|exe "silent doau BufWritePost ".expand("<afile>")
|
||||
augroup END
|
||||
endif
|
||||
|
||||
@ -986,6 +989,7 @@ fun! <SID>NetBrowse(dirname)
|
||||
" call Dret("NetBrowse 0 : badly formatted dirname")
|
||||
return 0
|
||||
endif
|
||||
|
||||
let method = substitute(a:dirname,dirpat,'\1','')
|
||||
let user = substitute(a:dirname,dirpat,'\2','')
|
||||
let machine = substitute(a:dirname,dirpat,'\3','')
|
||||
@ -1061,13 +1065,14 @@ fun! <SID>NetBrowse(dirname)
|
||||
endif
|
||||
setlocal ts=32 bt=nofile bh=wipe nobl
|
||||
exe 'file '.escape(bufname,' ')
|
||||
" call Decho("renaming file to bufname<".bufname.">")
|
||||
setlocal bt=nowrite bh=hide nobl
|
||||
nnoremap <buffer> <silent> <cr> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> <c-l> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
|
||||
nnoremap <buffer> <silent> - :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'../'))<cr>
|
||||
nnoremap <buffer> <silent> a :let g:netrw_list_showall=1<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
|
||||
nnoremap <buffer> <silent> <Leader>H :call <SID>NetHideEdit(0)<cr>
|
||||
nnoremap <buffer> <silent> i :call <SID>NetLongList(0)<cr>
|
||||
nnoremap <buffer> <silent> a :let g:netrw_hide=!g:netrw_hide<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
|
||||
nnoremap <buffer> <silent> <Leader>h :call <SID>NetHideEdit(0)<cr>
|
||||
nnoremap <buffer> <silent> i :call <SID>NetSavePosn()<bar>call <SID>NetLongList(0)<bar>call <SID>NetRestorePosn()<cr>
|
||||
nnoremap <buffer> <silent> o :exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> s :let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
|
||||
@ -1079,7 +1084,8 @@ fun! <SID>NetBrowse(dirname)
|
||||
exe 'nnoremap <buffer> <silent> D :exe "norm! 0"<bar>call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
|
||||
exe 'vnoremap <buffer> <silent> D :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
|
||||
exe 'nnoremap <buffer> <silent> R :exe "norm! 0"<bar>call <SID>NetBrowseRename("'.user.machine.'","'.path.'")<cr>'
|
||||
exe 'nnoremap <buffer> <silent> <Leader>M :call <SID>NetMakeDir("'.user.machine.'")<cr>'
|
||||
exe 'vnoremap <buffer> <silent> R :call <SID>NetBrowseRename("'.user.machine.'","'.path.'")<cr>'
|
||||
exe 'nnoremap <buffer> <silent> <Leader>m :call <SID>NetMakeDir("'.user.machine.'")<cr>'
|
||||
nnoremap <buffer> ? :he netrw-browse-cmds<cr>
|
||||
setlocal ma
|
||||
|
||||
@ -1098,7 +1104,7 @@ fun! <SID>NetBrowse(dirname)
|
||||
" sorted by size or date
|
||||
keepjumps put ='\" Sorted by '.g:netrw_sort_by
|
||||
endif
|
||||
if g:netrw_list_hide != "" && !exists("g:netrw_list_showall")
|
||||
if g:netrw_list_hide != "" && g:netrw_hide
|
||||
keepjumps put ='\" Hiding: '.g:netrw_list_hide
|
||||
let g:netrw_bannercnt= g:netrw_bannercnt + 1
|
||||
endif
|
||||
@ -1111,18 +1117,14 @@ fun! <SID>NetBrowse(dirname)
|
||||
" manipulate the directory listing (hide, sort)
|
||||
setlocal ft=netrwlist
|
||||
if line("$") >= g:netrw_bannercnt
|
||||
if !exists("g:netrw_list_showall")
|
||||
if g:netrw_list_hide != ""
|
||||
call s:NetrwListHide()
|
||||
endif
|
||||
else
|
||||
unlet g:netrw_list_showall
|
||||
if g:netrw_hide && g:netrw_list_hide != ""
|
||||
call s:NetrwListHide()
|
||||
endif
|
||||
if g:netrw_longlist
|
||||
" do a long listing; these substitutions need to be done prior to sorting
|
||||
keepjumps silent /^total\s*\d\+$/d
|
||||
exe 'keepjumps silent '.g:netrw_bannercnt.',$s/ -> .*$//e'
|
||||
exe 'keepjumps silent '.g:netrw_bannercnt.',$s/\(\S\+\s\+\S\+\s\+\S\+\s\+\S\+\s\+\S\+\s\+\S\+\s\+\S\+\s\+\S\+\)\s\+\(\S\+\)$/\2\t\1/e'
|
||||
exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2\t\1/e'
|
||||
exe g:netrw_bannercnt
|
||||
endif
|
||||
if g:netrw_sort_by =~ "^n"
|
||||
@ -1130,10 +1132,10 @@ fun! <SID>NetBrowse(dirname)
|
||||
exe 'keepjumps silent '.g:netrw_bannercnt.',$call s:NetSort()'
|
||||
exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^\d\{3}\///e'
|
||||
endif
|
||||
endif
|
||||
let prvbuf= bufnr(bufname)
|
||||
if prvbuf != -1
|
||||
exe "silent! b ".prvbuf
|
||||
if g:netrw_longlist
|
||||
" shorten the list to keep its width <= 80 characters
|
||||
exe "keepjumps silent ".g:netrw_bannercnt.',$s/\t[-dstrwx]\+/\t/e'
|
||||
endif
|
||||
endif
|
||||
|
||||
setlocal noma nomod
|
||||
@ -1188,7 +1190,7 @@ endfun
|
||||
" ---------------------------------------------------------------------
|
||||
" NetGetDir: it gets the directory named under the cursor
|
||||
fun! <SID>NetGetDir()
|
||||
" call Dfunc("NetGetDir()")
|
||||
" call Dfunc("NetGetDir() line#".line("."))
|
||||
let dirname= getline(".")
|
||||
if dirname =~ '\t'
|
||||
let dirname= substitute(dirname,'\t.*$','','e')
|
||||
@ -1211,7 +1213,7 @@ fun! <SID>NetBrowseRm(usrhost,path) range
|
||||
exe ctr
|
||||
|
||||
norm! 0
|
||||
let rmfile= a:path.expand("<cWORD>")
|
||||
let rmfile= a:path.s:NetGetDir()
|
||||
" call Decho("rmfile<".rmfile.">")
|
||||
|
||||
if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '/$')
|
||||
@ -1265,7 +1267,7 @@ endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetBrowseRename: rename a remote file or directory {{{2
|
||||
fun! <SID>NetBrowseRename(usrhost,path)
|
||||
fun! <SID>NetBrowseRename(usrhost,path) range
|
||||
" call Dfunc("NetBrowseRename(usrhost<".a:usrhost."> path<".a:path.">)")
|
||||
|
||||
" preparation for removing multiple files/directories
|
||||
@ -1277,7 +1279,7 @@ fun! <SID>NetBrowseRename(usrhost,path)
|
||||
exe "keepjumps ".ctr
|
||||
|
||||
norm! 0
|
||||
let oldname= a:path.expand("<cWORD>")
|
||||
let oldname= a:path.s:NetGetDir()
|
||||
" call Decho("oldname<".oldname.">")
|
||||
|
||||
call inputsave()
|
||||
@ -1426,6 +1428,7 @@ fun! <SID>NetMakeDir(usrhost)
|
||||
" call Dret("NetMakeDir : user aborted with bare <cr>")
|
||||
return
|
||||
endif
|
||||
let newdirname= escape(newdirname,' ')
|
||||
|
||||
if a:usrhost == ""
|
||||
|
||||
@ -1485,8 +1488,8 @@ fun! <SID>LocalBrowse(dirname)
|
||||
" one can no longer enter the DBG buffer.
|
||||
" call Dfunc("LocalBrowse(dirname<".a:dirname.">)")
|
||||
|
||||
exe 'cd '.escape(a:dirname,' ')
|
||||
let dirname= getcwd()."/"
|
||||
exe 'cd '.escape(substitute(a:dirname,'\\','/','ge'),' ')
|
||||
let dirname= substitute(getcwd(),'\\','/','ge')."/"
|
||||
" call Decho("dirname<".dirname.">")
|
||||
|
||||
" make this buffer modifiable
|
||||
@ -1502,64 +1505,84 @@ fun! <SID>LocalBrowse(dirname)
|
||||
let dirnamenr= bufnr(substitute(dirname,'/$','','e'))
|
||||
endif
|
||||
" call Decho("bufnr(dirname<".dirname.">)=".dirnamenr)
|
||||
" call Dredir("file")
|
||||
|
||||
if dirnamenr != -1 && bufexists(dirname)
|
||||
" buffer already exists (hidden), so switch to it!
|
||||
" call Dredir("file")
|
||||
exe "b ".dirnamenr
|
||||
exe 'cd '.escape(dirname,' ')
|
||||
" call Dredir("file")
|
||||
exe 'cd '.escape(substitute(a:dirname,'\\','/','ge'),' ')
|
||||
" call Dredir("file")
|
||||
" call Decho("changed directory to<".dirname.">")
|
||||
" call Dredir("file")
|
||||
if a:dirname != "." && line("$") >= 5
|
||||
" call Dret("LocalBrowse : buffer already exists with info")
|
||||
return
|
||||
endif
|
||||
" call Dredir("file")
|
||||
" call Decho("buffer already exists, but needs listing (buf#".dirnamenr.")")
|
||||
keepjumps %d
|
||||
" call Dredir("file")
|
||||
if expand("%:p") != escape(dirname,' ')
|
||||
exe 'silent! file '.escape(dirname,' ')
|
||||
" call Decho("renamed file to<".escape(dirname,' ').">")
|
||||
endif
|
||||
" call Dredir("file")
|
||||
else
|
||||
" call Dredir("ls!")
|
||||
" call Decho("generate new buffer named<".dirname.">")
|
||||
" call Decho("generate new buffer named<".escape(dirname,' ').">")
|
||||
silent! enew!
|
||||
exe 'silent! file '.escape(dirname,' ')
|
||||
" call Decho("renamed file to<".escape(dirname,' ').">")
|
||||
endif
|
||||
" set standard browser options on buffer
|
||||
setlocal ts=32 bt=nowrite bh=hide nobl
|
||||
|
||||
" set up all the maps
|
||||
nnoremap <buffer> <silent> <cr> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> <c-l> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),'./'))<cr>
|
||||
nnoremap <buffer> <silent> - :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),'../'))<cr>
|
||||
nnoremap <buffer> <silent> a :let g:netrw_list_showall=1<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),'./'))<cr>
|
||||
nnoremap <buffer> <silent> <Leader>H :call <SID>NetHideEdit(1)<cr>
|
||||
nnoremap <buffer> <silent> <Leader>M :call <SID>NetMakeDir("")<cr>
|
||||
" call Decho("Setting up local browser maps")
|
||||
nnoremap <buffer> <silent> <cr> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> <c-l> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),'./'))<cr>
|
||||
nnoremap <buffer> <silent> - :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),'../'))<cr>
|
||||
nnoremap <buffer> <silent> a :let g:netrw_hide=!g:netrw_hide<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),'./'))<cr>
|
||||
nnoremap <buffer> <silent> <Leader>h :call <SID>NetHideEdit(1)<cr>
|
||||
nnoremap <buffer> <silent> <Leader>m :call <SID>NetMakeDir("")<cr>
|
||||
nnoremap <buffer> <silent> i :call <SID>NetLongList(1)<cr>
|
||||
nnoremap <buffer> <silent> o :exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> s :let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),'./'))<cr>
|
||||
nnoremap <buffer> <silent> v :exe g:netrw_winsize."wincmd v"<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> x :exe "norm! 0"<bar>call <SID>NetBrowseX(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()),0)<cr>
|
||||
nnoremap <buffer> <silent> <2-leftmouse> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%:p"),<SID>NetGetDir()))<cr>
|
||||
exe 'nnoremap <buffer> <silent> <del> :exe "norm! 0"<bar>call <SID>LocalBrowseRm("'.expand("%:p").<SID>NetGetDir().'")<cr>'
|
||||
exe 'vnoremap <buffer> <silent> <del> :call <SID>LocalBrowseRm("'.expand("%:p").<SID>NetGetDir().'")<cr>'
|
||||
exe 'nnoremap <buffer> <silent> D :exe "norm! 0"<bar>call <SID>LocalBrowseRm("'.expand("%:p").<SID>NetGetDir().'")<cr>'
|
||||
exe 'vnoremap <buffer> <silent> D :call <SID>LocalBrowseRm("'.expand("%:p").<SID>NetGetDir().'")<cr>'
|
||||
exe 'nnoremap <buffer> <silent> R :exe "norm! 0"<bar>call <SID>LocalBrowseRename("'.expand("%:p").<SID>NetGetDir().'")<cr>'
|
||||
nnoremap <buffer> <silent> o :exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> s :let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),'./'))<cr>
|
||||
nnoremap <buffer> <silent> v :exe g:netrw_winsize."wincmd v"<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()))<cr>
|
||||
nnoremap <buffer> <silent> x :exe "norm! 0"<bar>call <SID>NetBrowseX(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()),0)<cr>
|
||||
nnoremap <buffer> <silent> <2-leftmouse> :exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(getcwd(),<SID>NetGetDir()))<cr>
|
||||
exe 'nnoremap <buffer> <silent> <del> :exe "norm! 0"<bar>call <SID>LocalBrowseRm("'.getcwd().'/")<cr>'
|
||||
exe 'vnoremap <buffer> <silent> <del> :call <SID>LocalBrowseRm("'.getcwd().'/")<cr>'
|
||||
exe 'nnoremap <buffer> <silent> D :exe "norm! 0"<bar>call <SID>LocalBrowseRm("'.getcwd().'/")<cr>'
|
||||
exe 'vnoremap <buffer> <silent> D :call <SID>LocalBrowseRm("'.getcwd().'/")<cr>'
|
||||
exe 'nnoremap <buffer> <silent> R :exe "norm! 0"<bar>call <SID>LocalBrowseRename("'.getcwd().'/")<cr>'
|
||||
exe 'vnoremap <buffer> <silent> R :call <SID>LocalBrowseRename("'.getcwd().'/")<cr>'
|
||||
exe 'nnoremap <buffer> <silent> <Leader>m :call <SID>NetMakeDir("")<cr>'
|
||||
nnoremap <buffer> ? :he netrw-dir<cr>
|
||||
|
||||
" Set up the banner
|
||||
" call Decho("set up banner")
|
||||
keepjumps put ='\" ================='
|
||||
keepjumps 1d
|
||||
keepjumps put ='\" Directory Listing'
|
||||
keepjumps put ='\" '.dirname
|
||||
let g:netrw_bannercnt= 6
|
||||
|
||||
if g:netrw_sort_by =~ "^n"
|
||||
" call Decho("directories will be sorted by name")
|
||||
" sorted by name
|
||||
let g:netrw_bannercnt= g:netrw_bannercnt + 1
|
||||
keepjumps put ='\" Sorted by '.g:netrw_sort_by
|
||||
keepjumps put ='\" Sort sequence: '.g:netrw_sort_sequence
|
||||
else
|
||||
" call Decho("directories will be sorted by size or date")
|
||||
" sorted by size or date
|
||||
keepjumps put ='\" Sorted by '.g:netrw_sort_by
|
||||
endif
|
||||
if g:netrw_list_hide != "" && !exists("g:netrw_list_showall")
|
||||
if g:netrw_list_hide != "" && g:netrw_hide
|
||||
keepjumps put ='\" Hiding: '.g:netrw_list_hide
|
||||
let g:netrw_bannercnt= g:netrw_bannercnt + 1
|
||||
endif
|
||||
@ -1571,12 +1594,8 @@ fun! <SID>LocalBrowse(dirname)
|
||||
" manipulate the directory listing (hide, sort)
|
||||
setlocal ft=netrwlist
|
||||
if line("$") >= g:netrw_bannercnt
|
||||
if !exists("g:netrw_list_showall")
|
||||
if g:netrw_list_hide != ""
|
||||
call s:NetrwListHide()
|
||||
endif
|
||||
else
|
||||
unlet g:netrw_list_showall
|
||||
if g:netrw_hide && g:netrw_list_hide != ""
|
||||
call s:NetrwListHide()
|
||||
endif
|
||||
if g:netrw_sort_by =~ "^n"
|
||||
call s:SetSort()
|
||||
@ -1588,16 +1607,10 @@ fun! <SID>LocalBrowse(dirname)
|
||||
endif
|
||||
endif
|
||||
exe g:netrw_bannercnt
|
||||
try
|
||||
exe 'cd '.escape(substitute(dirname,'/$','','e'),' ')
|
||||
" call Decho("changed directory to<".dirname.">")
|
||||
catch
|
||||
echoerr "Not a directory: <".dirname.">"
|
||||
endtry
|
||||
|
||||
setlocal noma nomod
|
||||
|
||||
" call Dret("LocalBrowse")
|
||||
" call Dret("LocalBrowse : file<".expand("%:p").">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
@ -1623,7 +1636,9 @@ fun! LocalBrowseList(dirname)
|
||||
endif
|
||||
let pfile= strpart(pfile,dirnamelen)
|
||||
if g:netrw_longlist
|
||||
let pfile= pfile."\t".getfsize(file)."\t".strftime(g:netrw_timefmt,getftime(file))
|
||||
let sz = getfsize(file)
|
||||
let fsz = strpart(" ",1,15-strlen(sz)).sz
|
||||
let pfile= pfile."\t".fsz." ".strftime(g:netrw_timefmt,getftime(file))
|
||||
endif
|
||||
if g:netrw_sort_by =~ "^t"
|
||||
" sort by time (handles time up to 1 quintillion seconds, US)
|
||||
@ -1655,7 +1670,7 @@ endfun
|
||||
fun! <SID>LocalBrowseChgDir(dirname,newdir)
|
||||
" call Dfunc("LocalBrowseChgDir(dirname<".a:dirname."> newdir<".a:newdir.">)")
|
||||
|
||||
let dirname= a:dirname
|
||||
let dirname= substitute(a:dirname,'\\','/','ge')
|
||||
let newdir = a:newdir
|
||||
|
||||
if dirname !~ '/$'
|
||||
@ -1706,7 +1721,7 @@ fun! <SID>LocalBrowseRm(path) range
|
||||
exe ctr
|
||||
|
||||
norm! 0
|
||||
let rmfile= a:path.expand("<cWORD>")
|
||||
let rmfile= a:path.s:NetGetDir()
|
||||
" call Decho("rmfile<".rmfile.">")
|
||||
|
||||
if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '/$')
|
||||
@ -1724,7 +1739,7 @@ fun! <SID>LocalBrowseRm(path) range
|
||||
call inputsave()
|
||||
let ok= input("Confirm deletion of directory<".rmfile."> ","y")
|
||||
call inputrestore()
|
||||
let rmfile= substitute(rmfile,'/$','','e')
|
||||
let rmfile= escape(substitute(rmfile,'/$','','e'),' ')
|
||||
|
||||
if ok == "y"
|
||||
call system(g:netrw_local_rmdir." ".rmfile)
|
||||
@ -1764,7 +1779,7 @@ endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LocalBrowseRename: rename a remote file or directory {{{2
|
||||
fun! <SID>LocalBrowseRename(path)
|
||||
fun! <SID>LocalBrowseRename(path) range
|
||||
" call Dfunc("LocalBrowseRename(path<".a:path.">)")
|
||||
|
||||
" preparation for removing multiple files/directories
|
||||
@ -1775,7 +1790,7 @@ fun! <SID>LocalBrowseRename(path)
|
||||
exe "keepjumps ".ctr
|
||||
|
||||
norm! 0
|
||||
let oldname= a:path.expand("<cWORD>")
|
||||
let oldname= a:path.s:NetGetDir()
|
||||
" call Decho("oldname<".oldname.">")
|
||||
|
||||
call inputsave()
|
||||
@ -1790,6 +1805,7 @@ fun! <SID>LocalBrowseRename(path)
|
||||
|
||||
" refresh the directory
|
||||
let curline= line(".")
|
||||
" call Decho("refresh the directory listing")
|
||||
call <SID>LocalBrowse(<SID>LocalBrowseChgDir(expand("%"),'./'))
|
||||
exe "keepjumps ".curline
|
||||
" call Dret("LocalBrowseRename")
|
||||
|
@ -2,7 +2,7 @@
|
||||
"
|
||||
" Language: Logtalk
|
||||
" Maintainer: Paulo Moura <pmoura@logtalk.org>
|
||||
" Last Change: 2004 June 1
|
||||
" Last Change: 2004 July 7
|
||||
|
||||
|
||||
" Quit when a syntax file was already loaded:
|
||||
@ -75,6 +75,7 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=log
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn match logtalkDirTag ":- dynamic\."
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- discontiguous(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- multifile(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- public(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- protected(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- private(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
|
@ -8065,6 +8065,7 @@ f_winrestcmd(argvars, retvar)
|
||||
# endif
|
||||
++winnr;
|
||||
}
|
||||
ga_append(&ga, NUL);
|
||||
|
||||
retvar->var_val.var_string = ga.ga_data;
|
||||
#else
|
||||
|
@ -2203,6 +2203,7 @@ do_write(eap)
|
||||
buf_T *was_curbuf = curbuf;
|
||||
|
||||
apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf);
|
||||
apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, alt_buf);
|
||||
# ifdef FEAT_EVAL
|
||||
if (curbuf != was_curbuf || aborting())
|
||||
# else
|
||||
@ -2231,6 +2232,7 @@ do_write(eap)
|
||||
buf_name_changed(curbuf);
|
||||
#ifdef FEAT_AUTOCMD
|
||||
apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf);
|
||||
apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, alt_buf);
|
||||
if (!alt_buf->b_p_bl)
|
||||
{
|
||||
alt_buf->b_p_bl = TRUE;
|
||||
|
@ -1193,9 +1193,9 @@ ex_throw(eap)
|
||||
}
|
||||
|
||||
/*
|
||||
* Throw the current exception through the specified cstack. Common routine for
|
||||
* ":throw" (user exception) and error and interrupt exceptions. Also used for
|
||||
* rethrowing an uncaught exception.
|
||||
* Throw the current exception through the specified cstack. Common routine
|
||||
* for ":throw" (user exception) and error and interrupt exceptions. Also
|
||||
* used for rethrowing an uncaught exception.
|
||||
*/
|
||||
void
|
||||
do_throw(cstack)
|
||||
@ -1210,8 +1210,8 @@ do_throw(cstack)
|
||||
* conditional itself, so that its ACTIVE flag can be tested below. But
|
||||
* if a previous error or interrupt has not been converted to an exception,
|
||||
* inactivate the try conditional, too, as if the conversion had been done,
|
||||
* and reset the did_emsg or got_int flag, so this won't happen again at the
|
||||
* next surrounding try conditional.
|
||||
* and reset the did_emsg or got_int flag, so this won't happen again at
|
||||
* the next surrounding try conditional.
|
||||
*/
|
||||
if (did_emsg && !THROW_ON_ERROR)
|
||||
{
|
||||
@ -1228,16 +1228,16 @@ do_throw(cstack)
|
||||
{
|
||||
/*
|
||||
* If this try conditional is active and we are before its first
|
||||
* ":catch", set THROWN so that the ":catch" commands will check whether
|
||||
* the exception matches. When the exception came from any of the
|
||||
* catch clauses, it will be made pending at the ":finally" (if present)
|
||||
* and rethrown at the ":endtry". This will also happen if the try
|
||||
* conditional is inactive. This is the case when we are throwing an
|
||||
* exception due to an error or interrupt on the way from a preceding
|
||||
* ":continue", ":break", ":return", ":finish", error or interrupt (not
|
||||
* converted to an exception) to the finally clause or from a preceding
|
||||
* throw of a user or error or interrupt exception to the matching catch
|
||||
* clause or the finally clause.
|
||||
* ":catch", set THROWN so that the ":catch" commands will check
|
||||
* whether the exception matches. When the exception came from any of
|
||||
* the catch clauses, it will be made pending at the ":finally" (if
|
||||
* present) and rethrown at the ":endtry". This will also happen if
|
||||
* the try conditional is inactive. This is the case when we are
|
||||
* throwing an exception due to an error or interrupt on the way from
|
||||
* a preceding ":continue", ":break", ":return", ":finish", error or
|
||||
* interrupt (not converted to an exception) to the finally clause or
|
||||
* from a preceding throw of a user or error or interrupt exception to
|
||||
* the matching catch clause or the finally clause.
|
||||
*/
|
||||
if (!(cstack->cs_flags[idx] & CSF_CAUGHT))
|
||||
{
|
||||
@ -1253,8 +1253,8 @@ do_throw(cstack)
|
||||
cstack->cs_exception[idx] = current_exception;
|
||||
}
|
||||
#if 0
|
||||
/* TODO: Add optimization below. Not yet done because of interface problems
|
||||
* to eval.c and ex_cmds2.c. (Servatius) */
|
||||
/* TODO: Add optimization below. Not yet done because of interface
|
||||
* problems to eval.c and ex_cmds2.c. (Servatius) */
|
||||
else
|
||||
{
|
||||
/*
|
||||
|
@ -5476,6 +5476,7 @@ script_get(eap, cmd)
|
||||
ga_append(&ga, '\n');
|
||||
vim_free(theline);
|
||||
}
|
||||
ga_append(&ga, NUL);
|
||||
|
||||
return (char_u *)ga.ga_data;
|
||||
}
|
||||
|
@ -4586,12 +4586,14 @@ gui_do_findrepl(flags, find_text, repl_text, down)
|
||||
ga_concat(&ga, (char_u *)"/");
|
||||
concat_esc(&ga, repl_text, '/'); /* escape slashes */
|
||||
ga_concat(&ga, (char_u *)"/g");
|
||||
ga_append(&ga, NUL);
|
||||
do_cmdline_cmd(ga.ga_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Search for the next match. */
|
||||
i = msg_scroll;
|
||||
ga_append(&ga, NUL);
|
||||
do_search(NULL, down ? '/' : '?', ga.ga_data, 1L,
|
||||
SEARCH_MSG + SEARCH_MARK);
|
||||
msg_scroll = i; /* don't let an error message set msg_scroll */
|
||||
|
@ -683,6 +683,7 @@ serverGetVimNames(dpy)
|
||||
}
|
||||
if (regProp != empty_prop)
|
||||
XFree(regProp);
|
||||
ga_append(&ga, NUL);
|
||||
return ga.ga_data;
|
||||
}
|
||||
|
||||
@ -1258,7 +1259,7 @@ serverEventProc(dpy, eventPtr)
|
||||
ga_append(&reply, 0);
|
||||
ga_concat(&reply, (char_u *)"-c 1");
|
||||
}
|
||||
ga_append(&reply, 0);
|
||||
ga_append(&reply, NUL);
|
||||
(void)AppendPropCarefully(dpy, resWindow, commProperty,
|
||||
reply.ga_data, reply.ga_len);
|
||||
}
|
||||
@ -1363,7 +1364,7 @@ serverEventProc(dpy, eventPtr)
|
||||
if ((r = ServerReplyFind(win, SROP_Add)) != NULL)
|
||||
{
|
||||
ga_concat(&(r->strings), str);
|
||||
ga_append(&(r->strings), 0);
|
||||
ga_append(&(r->strings), NUL);
|
||||
}
|
||||
#ifdef FEAT_AUTOCMD
|
||||
sprintf((char *)winstr, "0x%x", (unsigned int)win);
|
||||
|
@ -159,7 +159,6 @@
|
||||
# define mch_fopen(n, p) fopen((n), (p))
|
||||
# endif
|
||||
# define mch_fstat(n, p) fstat((n), (p))
|
||||
# define mch_lstat(n, p) lstat((n), (p))
|
||||
# ifdef MSWIN /* has it's own mch_stat() function */
|
||||
# define mch_stat(n, p) vim_stat((n), (p))
|
||||
# else
|
||||
@ -173,6 +172,12 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LSTAT
|
||||
# define mch_lstat(n, p) lstat((n), (p))
|
||||
#else
|
||||
# define mch_lstat(n, p) mch_stat((n), (p))
|
||||
#endif
|
||||
|
||||
#ifdef MACOS_CLASSIC
|
||||
/* MacOS classic doesn't support perm but MacOS X does. */
|
||||
# define mch_open(n, m, p) open((n), (m))
|
||||
|
@ -5312,11 +5312,13 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
|
||||
|
||||
#ifdef FEAT_PRINTER
|
||||
else if (varp == &p_popt)
|
||||
errmsg = parse_list_options(p_popt, printer_opts, OPT_PRINT_NUM_OPTIONS);
|
||||
errmsg = parse_list_options(p_popt, printer_opts,
|
||||
OPT_PRINT_NUM_OPTIONS);
|
||||
|
||||
# if defined(FEAT_MBYTE) && defined(FEAT_POSTSCRIPT)
|
||||
else if (varp == &p_pmfn)
|
||||
errmsg = parse_list_options(p_pmfn, mbfont_opts, OPT_MBFONT_NUM_OPTIONS);
|
||||
errmsg = parse_list_options(p_pmfn, mbfont_opts,
|
||||
OPT_MBFONT_NUM_OPTIONS);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -2689,6 +2689,7 @@ serverGetVimNames(void)
|
||||
ga_init2(&ga, 1, 100);
|
||||
|
||||
EnumWindows(enumWindowsGetNames, (LPARAM)(&ga));
|
||||
ga_append(&ga, NUL);
|
||||
|
||||
return ga.ga_data;
|
||||
}
|
||||
|
Reference in New Issue
Block a user